lkml.org 
[lkml]   [2020]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] uaccess: user_access_begin_after_access_ok()
On Thu, Jun 04, 2020 at 02:10:27PM +0800, Jason Wang wrote:

> > > get_user(flags, desc->flags)
> > > smp_rmb()
> > > if (flags & VALID)
> > > copy_from_user(&adesc, desc, sizeof adesc);
> > >
> > > this would be a good candidate I think.
> > Perhaps, once we get stac/clac out of raw_copy_from_user() (coming cycle,
> > probably). BTW, how large is the structure and how is it aligned?
>
>
> Each descriptor is 16 bytes, and 16 bytes aligned.

Won't it be cheaper to grap the entire thing unconditionally? And what does
that rmb order, while we are at it - won't all coherency work in terms of
entire cachelines anyway?

Confused...

\
 
 \ /
  Last update: 2020-06-04 16:59    [W:0.102 / U:1.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site