Re: [RFC][CFT][PATCHSET v1] uaccess unification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 29, 2017 at 1:29 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> BTW, I wonder if inlining all of the copy_{to,from}_user() is actually a win.

I would suggest against it.

The only part I think is worth inlining is the compile time size
checks for kasan - and that only because of the obvious "sizes are
constant only when inlining" issue.

We used to inline a *lot* of user accesses historically, pretty much
all of them were bogus.

The only ones that really want inlining are the non-checking ones that
people should never use directly, but that are just helper things used
by other routines (ie the "unsafe_copy_from_user()" kind of things
that are designed for strncpy_from_user()).

Once you start checking access ranges, and have might_fault debugging
etc, it shouldn't be inlined.

              Linus



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux