lkml.org 
[lkml]   [2020]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: rename probe_kernel_* and probe_user_*
On Wed, Jun 17, 2020 at 12:38 AM Christoph Hellwig <hch@lst.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

\
 
 \ /
  Last update: 2020-06-17 20:12    [W:0.532 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site