[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whm66UhcEQgXHr8hPkzyDTOdbGikLbSg0zJ4-b93aSg8w@mail.gmail.com>
Date: Thu, 2 Jul 2020 14:55:19 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Michael Ellerman <mpe@...erman.id.au>,
Christophe Leroy <christophe.leroy@....fr>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: objtool clac/stac handling change..
On Thu, Jul 2, 2020 at 1:59 PM Al Viro <viro@...iv.linux.org.uk> 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
Download attachment "patch" of type "application/octet-stream" (4980 bytes)
Powered by blists - more mailing lists