Messages in this thread | | | From | Linus Torvalds <> | Date | Wed, 17 Jun 2020 11:11:13 -0700 | Subject | Re: 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
| |