Re: [PATCHv3 5/8] x86/uaccess: Provide untagged_addr() and remove tags before address check
From: Peter Zijlstra
Date: Thu Jun 16 2022 - 05:34:34 EST
On Mon, Jun 13, 2022 at 05:36:43PM +0000, Edgecombe, Rick P wrote:
> Is this special kernel address handling only needed because
> copy_to_kernel_nofault(), etc call the user helpers?
It is to make absolutely sure we don't need to go audit everything, if
code is correct without untag_pointer() it will still be correct with it
on.
Also avoids future bugs due to being robust in general.