lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 30 Apr 2022 00:14:28 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Lai Jiangshan <jiangshanlai@...il.com>, X86 ML <x86@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Brian Gerst <brgerst@...il.com>,
        Andrew Cooper <Andrew.Cooper3@...rix.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] x86,entry: Use PUSH_AND_CLEAR_REGS for compat

On Fri, Apr 29, 2022 at 02:30:45PM -0700, Linus Torvalds wrote:
> On Fri, Apr 29, 2022 at 2:13 PM Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > (Linus, can I add your SoB to the thing?)
> 
> If you teste this with some actual old int80 compat syscalls, then absolutely:

I ran tools/testing/selftests/x86/*_32 on it. That definitely tickles
the int80 path. Also, without the off-by-one fixed that gives some
generous helpings of segfault.

>    Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>

Thanks!

> > +       pushq   %rdi                    /* pt_regs->di */
> >         pushq   %rsi                    /* pt_regs->si */
> >         xorl    %esi, %esi              /* nospec   si */
> 
> It would probably make sense to add a comment about why %rdi isn't
> cleared when pushed, like all the other registers are.
> 
> Even if that comment is just "%rdi will be overwritten as arg0 of the
> call to C, so no need to clear it".
> 
> Maybe as part of the PUSH_AND_CLEAR_REGS changes?

I'll stick the comment on.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ