[PATCH 5/6] uaccess: add force_uaccess_{begin,end} helpers

Linus Torvalds torvalds at linux-foundation.org
Tue Jul 14 11:29:43 EDT 2020

On Tue, Jul 14, 2020 at 4:08 AM Christoph Hellwig <hch at lst.de> wrote:
> Add helpers to wrap the get_fs/set_fs magic for undoing any damange done
> by set_fs(KERNEL_DS).  There is no real functional benefit, but this
> documents the intent of these calls better, and will allow stubbing the
> functions out easily for kernels builds that do not allow address space
> overrides in the future.

It would perhaps have been nicer to rename the save variabel too
(neither "seg" nor "oldfs" make much sense once you get rid of the old
x86-inspired name).

But from a greppability standpoint and a doc standpoint, I guess just
renaming the function is sufficient (and certainly easier).


More information about the linux-riscv mailing list