[lkml]   [2019]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 3/3] x86/paravirt: Replace paravirt patch asm magic

* Peter Zijlstra <> wrote:

> > I think these open-coded hexa versions are somewhat fragile as well, how
> > about putting these into a .S file and controlling the sections in an LTO
> > safe manner there?
> >
> > That will also allow us to write proper asm, and global labels can be
> > used to extract the patchlets and their length?
> While I'm not fan either; I think that will be worse still, because it
> splits the information over multiple files.

Yeah, so that's a drawback of the .S files.

> The advantage of this form is that it is clear how long the instructions
> are, which is important for the patching. These immediates have to be
> shorter than 5 bytes because they overwrite the CALL/JMP to the paravirt
> function.
> /me eyes .cpu_usergs_sysret64 and goes wtf..

I just posted a patch that adds an assert to detect too large patching
attempt: we'd silently ignore them before, which isn't healthy.

With the two patches I now like the .c version better.

Thomas, want me to organize all these changes, or do you want to?


 \ /
  Last update: 2019-04-25 11:21    [W:0.099 / U:35.520 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site