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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wg1p87BAj3ebiugG9Q5YaKNUDpEWmjLKam69Ak3g__Aug@mail.gmail.com>
Date:   Fri, 29 Apr 2022 14:30:45 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Peter Zijlstra <peterz@...radead.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 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:

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

> +       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?

            Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ