lkml.org 
[lkml]   [2020]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: objtool clac/stac handling change..
On Thu, Jul 02, 2020 at 01:32:34PM -0700, Linus Torvalds wrote:

> Ugh, the above is bad anyway.
>
> It doesn't use _ASM_EXTABLE_UA, so it won't warn about the noncanonical cases.

FWIW, the address is inside a sigframe we decided to build, so noncanonical
addresses shouldn't occur in practice.

> Yeah, it would need to be turned into a "jump out" instead of just "jump over".
>
> Which it damn well should do anyway.,
>
> That code should be taken behind a shed and shot. It does so many
> things wrong that it's not even funny. It shouldn't do stac/clac on
> its own.
>
> At least it could use the "user_insn()" helper, which does it inside
> the asm itself, has the right might_fault() marking (but not the
> address check), and which can be trivially changed to have the fixup
> jump be to after the "ASM_CLAC".

I'm not sure it's the right solution in this case. Look at the call chain
and the stuff done nearby (that __clear_user(), for example)...

I'm not saying that this code is not awful - it certainly is. But it's
not that simple, unfortunately ;-/

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