lkml.org 
[lkml]   [2020]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/6] uaccess: add force_uaccess_{begin,end} helpers
On Mon, Jul 13, 2020 at 03:19:42PM +0200, Geert Uytterhoeven wrote:
> > This used to set KERNEL_DS, and now it sets USER_DS, which looks wrong
> > superficially.
>
> Thanks for noticing, and sorry for missing that myself.
>
> The same issue is present for SuperH:
>
> - set_fs(KERNEL_DS);
> + oldfs = force_uaccess_begin();
>
> So the patch description should be:
>
> "Add helpers to wraper the get_fs/set_fs magic for undoing any damage
> done by set_fs(USER_DS)."
>
> and leave alone users setting KERNEL_DS?

Yes, this was broken. Fixed for the next version.

> > If the new behaviour is fine it suggests that the old behaviour was
> > wrong, or that this is superfluous and could go entirely.
> >
> > Geert?
>
> Nope, on m68k, TLB cache operations operate on the current address space.
> Hence to flush a kernel TLB entry, you have to switch to KERNEL_DS first.
>
> If we're guaranteed to be already using KERNEL_DS, I guess the
> address space handling can be removed. But can we be sure?

We can't be sure yet. But with a lot of my pending work we should be
able to get there in the not too far future.

\
 
 \ /
  Last update: 2020-07-14 09:12    [W:0.043 / U:1.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site