lkml.org 
[lkml]   [2023]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCHv15 06/17] x86/uaccess: Provide untagged_addr() and remove tags before address check
On Mon, Jan 23, 2023 at 11:05 PM Kirill A. Shutemov
<kirill.shutemov@linux.intel.com> wrote:
>
> untagged_addr() is a helper used by the core-mm to strip tag bits and
> get the address to the canonical shape based on rules of the current
> thread. It only handles userspace addresses.
>
> The untagging mask is stored in per-CPU variable and set on context
> switching to the task.
>
> The tags must not be included into check whether it's okay to access the
> userspace address. Strip tags in access_ok().
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Alexander Potapenko <glider@google.com>

\
 
 \ /
  Last update: 2023-03-27 00:16    [W:1.832 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site