Re: objtool clac/stac handling change..

From: Linus Torvalds
Date: Thu Jul 02 2020 - 17:56:30 EST


On Thu, Jul 2, 2020 at 1:59 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> 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 ;-/

Well, the minimal thing to do would probably be to just change that
particular place to use asm_volatile_goto() for the error handling.

Even aside from anything else, it would improve code generation and
avoid that extra "err" variable.

So something like this (ENTIRELY UNTESTED!!).

It removes lines of code, and it must improve code generation too.

And while XSTATE_OP() is still disgusting, it's

(a) slightly less disgusting than it used to be

(b) now easily fixable if we do the "exceptions clear AC" thing.

so it's an improvement all around.

If it works, that is. As mentioned: IT HAS NO TESTING.

Linus

Attachment: patch
Description: Binary data