[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whR90bEKrOKmk0O8KtX77bTFQGu3ykDDRhTGwmAw8HzYg@mail.gmail.com>
Date: Tue, 27 Jun 2023 13:49:12 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Noah Goldstein <goldstein.w.n@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
x86-ml <x86@...nel.org>, lkml <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] x86/misc for 6.5
On Tue, 27 Jun 2023 at 13:38, Borislav Petkov <bp@...en8.de> wrote:
>
> And there's a third kind who relax by the pool with a nice drink,
> *while* playing around with inline asm. ;-P
That explains a lot.
> Btw, I'll send you a new version of this pull request with this patch
> dropped to let folks experiment with it more.
Oh, I already merged it. I don't hate the change, I just looked at it
and went "I would have done that differently" and started playing
around with it.
There's nothing hugely *wrong* with the code I merged, but I do think
that it did too much inside the inline asm (ie looping inside the asm,
but also initializing values that could have - and should have - just
been given as inputs to the asm).
And the whole "why have two different versions for 40-byte and 64-byte
areas, when you _could_ just do it with one 40-byte one that you then
also just unroll".
So I _think_ my version is nicer and shorter - assuming it works and
there are no other bugs than the one I already noticed - but I don't
think it's a huge deal.
Anyway, before I throw my patch away, I'll just post it with the
trivial fixes to use "+r", and with the "volatile" removed (I add
"volatile" to asms by habit, but this one really isn't volatile).
I just checked that both gcc and clang seem to be happy with it, but
that's the only testing this patch has gotten: it compiles for me.
Do with it what you will.
Linus
View attachment "patch.diff" of type "text/x-patch" (2869 bytes)
Powered by blists - more mailing lists