[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjrogXehrGA8zymnyhD8OLWu9i7r46BgfuqJ28b9Ke-VQ@mail.gmail.com>
Date: Wed, 17 Jun 2020 11:11:13 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Christoph Hellwig <hch@....de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: rename probe_kernel_* and probe_user_*
On Wed, Jun 17, 2020 at 12:38 AM Christoph Hellwig <hch@....de> wrote:
>
> Feel free to directly apply these patches.
Ok, locally applied to a separate branch, will merge once I've done
more testing.
HOWEVER.
As I applied this, I noticed that we have a lot of code of the pattern
copy_from_kernel_nofault(&x, y, sizeof(x));
which is just an inconvenient and less readable way to write that
get_kernel_nofault(x, y);
Also, some of the places that *do* use get_kernel_nofault() seem
questionable, and use a cast on 'x'.
I'm actually a bit surprised that we don't even get a warning for that
horrible pattern that smells a bit like the gcc 'cast as lvalue'
thing.
Linus
Powered by blists - more mailing lists