[lkml]   [2020]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC 1/4] asm-generic/uaccess: don't define inline functions if noinline lib/* in use
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
> reusing asm-generic/uaccess.h for rest of code
> This came up when switching ARC to generic word-at-a-time interface
> Signed-off-by: Vineet Gupta <>

This looks like a useful change, but I think we can do even better: It
seems that
there are no callers of __strnlen_user or __strncpy_from_user in the
kernel today, so these should not be defined either when the Kconfig symbols
are set. Also, I would suggest moving the 'extern' declaration for the two
functions into the #else branch of the conditional so it does not need to be


 \ /
  Last update: 2020-01-14 21:58    [W:0.112 / U:20.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site