[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wijrfU0BN7L5Go1PDZ1NQRgDGnW57EeMXw_qqowMGJZAA@mail.gmail.com>
Date: Sat, 17 Apr 2021 12:51:21 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Eric Dumazet <edumazet@...gle.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/uaccess: small optimization in unsafe_copy_to_user()
On Sat, Apr 17, 2021 at 12:44 PM Eric Dumazet <edumazet@...gle.com> wrote:
>
> I thought put_cmsg() callers were from the kernel, with no possibility
> for user to abuse this interface trying to push GB of data.
My point is that "I thought" is not good enough for the unsafe interfaces.
It needs to be "I can see that the arguments are properly verified".
That is literally why they are called "unsafe". You need to make the
uses obviously safe. Because the functions themselves don't do that.
Linus
Powered by blists - more mailing lists