[lkml]   [2020]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: mmotm 2020-05-13-20-30 uploaded (objtool warnings)
On Thu, May 28, 2020 at 07:20:05PM +0200, Peter Zijlstra wrote:
> > on x86_64:
> >
> > arch/x86/lib/csum-wrappers_64.o: warning: objtool: csum_and_copy_from_user()+0x2a4: call to memset() with UACCESS enabled
> > arch/x86/lib/csum-wrappers_64.o: warning: objtool: csum_and_copy_to_user()+0x243: return with UACCESS enabled
> Urgh, that's horrible code. That's got plain stac()/clac() calls on
> instead of the regular uaccess APIs.

Does it? If this is from the code in linux-next, then the code does a
user_access_begin/end in csum_and_copy_{from,to}_user, then uses
unsafe_{get,put}_user inside those function itself. But then they call
csum_partial_copy_generic with the __user casted away, but without any
comment on why this is safe.

 \ /
  Last update: 2020-05-29 15:58    [W:0.139 / U:1.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site