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

From: Linus Torvalds
Date: Tue Jul 14 2020 - 11:30:07 EST


On Tue, Jul 14, 2020 at 4:08 AM Christoph Hellwig <hch@xxxxxx> 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).

Linus