Juergen Gross
2023-Jun-01 09:29 UTC
[PATCH RFC 13/43] x86/paravirt: Use relative reference for original instruction
On 28.04.23 11:50, Hou Wenlong wrote:> Similar to the alternative patching, use relative reference for original > instruction rather than absolute one, which saves 8 bytes for one entry > on x86_64. And it could generate R_X86_64_PC32 relocation instead of > R_X86_64_64 relocation, which also reduces relocation metadata on > relocatable builds. And the alignment could be hard coded to be 4 now. > > Signed-off-by: Hou Wenlong <houwenlong.hwl at antgroup.com> > Cc: Thomas Garnier <thgarnie at chromium.org> > Cc: Lai Jiangshan <jiangshan.ljs at antgroup.com> > Cc: Kees Cook <keescook at chromium.org>Reviewed-by: Juergen Gross <jgross at suse.com> I think this patch should be taken even without the series. Juergen -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_0xB0DE9DD628BF132F.asc Type: application/pgp-keys Size: 3098 bytes Desc: OpenPGP public key URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20230601/f645a72e/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 495 bytes Desc: OpenPGP digital signature URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20230601/f645a72e/attachment.sig>
Nadav Amit
2023-Jun-05 06:40 UTC
[PATCH RFC 13/43] x86/paravirt: Use relative reference for original instruction
> On Jun 1, 2023, at 2:29 AM, Juergen Gross <jgross at suse.com> wrote: > > On 28.04.23 11:50, Hou Wenlong wrote: >> Similar to the alternative patching, use relative reference for original >> instruction rather than absolute one, which saves 8 bytes for one entry >> on x86_64. And it could generate R_X86_64_PC32 relocation instead of >> R_X86_64_64 relocation, which also reduces relocation metadata on >> relocatable builds. And the alignment could be hard coded to be 4 now. >> Signed-off-by: Hou Wenlong <houwenlong.hwl at antgroup.com> >> Cc: Thomas Garnier <thgarnie at chromium.org> >> Cc: Lai Jiangshan <jiangshan.ljs at antgroup.com> >> Cc: Kees Cook <keescook at chromium.org> > > Reviewed-by: Juergen Gross <jgross at suse.com> > > I think this patch should be taken even without the series.It looks good to me, I am just not sure what the alignment is needed at all. Why not to make the struct __packed (like struct alt_instr) and get rid of all the .align directives? Am I missing something?