Re: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-16 Thread Arnd Bergmann
On Thu, Jan 16, 2020 at 12:02 AM Vineet Gupta wrote: > On 1/14/20 12:57 PM, Arnd Bergmann wrote: > > On Tue, Jan 14, 2020 at 9:08 PM Vineet Gupta > > wrote: > >> There are 2 generic varaints of strncpy_from_user() / strnlen_user() > >> (1). inline version in asm-generic/uaccess.h > >> (2). opt

Re: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-15 Thread Vineet Gupta
On 1/14/20 12:57 PM, Arnd Bergmann wrote: > On Tue, Jan 14, 2020 at 9:08 PM Vineet Gupta > wrote: >> There are 2 generic varaints of strncpy_from_user() / strnlen_user() >> (1). inline version in asm-generic/uaccess.h >> (2). optimized word-at-a-time version in lib/* >> >> This patch disables #

Re: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-15 Thread Arnd Bergmann
On Wed, Jan 15, 2020 at 3:12 PM Al Viro wrote: > > On Wed, Jan 15, 2020 at 10:08:31AM +0100, Arnd Bergmann wrote: > > > > I would suggest that anybody who uses asm-generic/uaccess.h needs to > > > simply use the generic library version. > > > > Or possibly just everybody altogether: the remaining

Re: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-15 Thread Al Viro
On Wed, Jan 15, 2020 at 10:08:31AM +0100, Arnd Bergmann wrote: > > I would suggest that anybody who uses asm-generic/uaccess.h needs to > > simply use the generic library version. > > Or possibly just everybody altogether: the remaining architectures that > have a custom implementation don't seem

Re: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-15 Thread Arnd Bergmann
On Tue, Jan 14, 2020 at 10:33 PM Linus Torvalds wrote: > > On Tue, Jan 14, 2020 at 12:09 PM Vineet Gupta > wrote: > > > > There are 2 generic varaints of strncpy_from_user() / strnlen_user() > > (1). inline version in asm-generic/uaccess.h > > I think we should get rid of this entirely. It's jus

Re: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-14 Thread Linus Torvalds
On Tue, Jan 14, 2020 at 12:09 PM Vineet Gupta wrote: > > There are 2 generic varaints of strncpy_from_user() / strnlen_user() > (1). inline version in asm-generic/uaccess.h I think we should get rid of this entirely. It's just a buggy garbage implementation that nobody should ever actually use.

Re: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-14 Thread Arnd Bergmann
On Tue, Jan 14, 2020 at 9:08 PM Vineet Gupta wrote: > > There are 2 generic varaints of strncpy_from_user() / strnlen_user() > (1). inline version in asm-generic/uaccess.h > (2). optimized word-at-a-time version in lib/* > > This patch disables #1 if #2 selected. This allows arches to continue >

[RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use

2020-01-14 Thread Vineet Gupta
There are 2 generic varaints of strncpy_from_user() / strnlen_user() (1). inline version in asm-generic/uaccess.h (2). optimized word-at-a-time version in lib/* This patch disables #1 if #2 selected. This allows arches to continue reusing asm-generic/uaccess.h for rest of code This came up when