* Andy Lutomirski <l...@amacapital.net> wrote: > >> Strengthen the SMAP protection by addding the missing ASM_CLAC right at > >> the > >> beginning. > > > > Hmmm... this potentially adds a *lot* of unnecessary cycles to this path. > > Could we reinstate the early uaccess? > > I think that's more trouble than it's worth, and it'll undo a bunch of the > context tracking cleanups that deferring it made possible, especially since > this > only matters in a configuration (32-bit SMAP) that no one uses. [1]
But but ... 'context tracking' is not really something that a regular distro kernel cares about much - it's a nohz-full special AFAICS. So if the only reason to keep this overhead is to simplify context tracking then I'm pretty sure we want to burden context-tracking with that, not the common fast path. Anyway, maybe we are 'lucky': > *However*, I just realized that I have no idea why the 32-bit sysenter > path is safe against NT being set. I fixed it on compat, and now I'm > confused as to the status on 32-bit. If we need to fix up NT, I think > we can fold AC into that. > > Also, I'll try to benchmark this soon. Sounds good, thanks! Ingo