[lkml]   [2020]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: objtool clac/stac handling change..
On Thu, Jul 2, 2020 at 6:32 AM Michael Ellerman <> wrote:
> Probably the simplest option for us is to just handle it in our
> unsafe_op_wrap(). I'll try and come up with something tomorrow.

IMy suggestion was to basically just always handle it in all exception cases.

And note that IU don't mean the fault handler: obviously page faults
(or unaligned faults or whatever) can happen while in a user access

But I mean any time fixup_exception() triggers.

For x86, this is in fact particularly natural: it involves just always
clearing the AC bit in the "struct pt_regs" that fixup_exception()
gets anyway. We can do it without even bothering with checking for
CLAC/STAC support, since without it, AC is meaningless in kernel mode
anyway, but also because doing "user_access_end()" in the exception
would be pointless: AC is restored by the exception routine, so on x86
you *have* to do it by just modifying the return state.


 \ /
  Last update: 2020-07-02 21:52    [W:0.063 / U:2.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site