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  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:   Thu, 30 Apr 2020 18:10:08 -0700
From:   Andy Lutomirski <>
To:     Linus Torvalds <>
Cc:     Dan Williams <>,
        "Luck, Tony" <>,
        Andy Lutomirski <>,
        Thomas Gleixner <>,
        Ingo Molnar <>,
        Peter Zijlstra <>,
        Borislav Petkov <>,
        stable <>,
        the arch/x86 maintainers <>,
        "H. Peter Anvin" <>,
        Paul Mackerras <>,
        Benjamin Herrenschmidt <>,
        Erwin Tsaur <>,
        Michael Ellerman <>,
        Arnaldo Carvalho de Melo <>,
        linux-nvdimm <>,
        Linux Kernel Mailing List <>
Subject: Re: [PATCH v2 0/2] Replace and improve "mcsafe" with copy_safe()

> On Apr 30, 2020, at 5:40 PM, Linus Torvalds <> wrote:
> On Thu, Apr 30, 2020 at 5:23 PM Andy Lutomirski <> wrote:
>>> But anyway, I don't hate something like "copy_to_user_fallible()"
>>> conceptually. The naming needs to be fixed, in that "user" can always
>>> take a fault, so it's the _source_ that can fault, not the "user"
>>> part.
>> I don’t like this.  “user” already implied that basically anything can be wrong with the memory
> Maybe I didn't explain.
> "user" already implies faulting. We agree.
> And since we by definition cannot know what the user has mapped into
> user space, *every* normal copy_to_user() has to be able to handle
> whatever faults that throws at us.
> The reason I dislike "copy_to_user_fallible()" is that the user side
> already has that 'fallible".
> If it's the _source_ being "fallible" (it really needs a better name -
> I will not call it just "f") then it should be "copy_f_to_user()".
> That would be ok.
> So "copy_f_to_user()" makes sense. But "copy_to_user_f()" does not.
> That puts the "f" on the "user", which we already know can fault.
> See what I want in the name? I want the name to say which side can
> cause problems!

We are in violent agreement. I’m moderately confident that I never suggested copy_from_user_f(). We appear to agree completely.

Powered by blists - more mailing lists