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]
Date:   Mon, 23 Mar 2020 11:53:39 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH 13/22] x86: ia32_setup_sigcontext(): lift
 user_access_{begin,end}() into the callers

On Mon, Mar 23, 2020 at 11:39 AM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> -static int ia32_setup_sigcontext(struct sigcontext_32 __user *sc,
> +static __always_inline int ia32_setup_sigcontext(struct sigcontext_32 __user *sc,

Please rename this at the same time (to "unsafe_ia32_setup_sigcontext()").

I absolutely _hate_ how we have historically split the "__get_user()"
calls from the "access_ok()" calls, and then have had bugs when we had
ways to reach the user access without checking it.

Yes, we have static checking for the unsafe stuff in objtool now, but
I still want this to be explicit on the source level too: if you do
unsafe user accesses, you make it very very explicit in the naming, so
that you can't possibly even by mistake have a "let's call this
function withou having done the user_access_begin()" calls.

             Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ