lkml.org 
[lkml]   [2023]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 03/12] x86/alternatives: Disable LASS when patching kernel alternatives
Date
On Fri, 2023-06-09 at 21:36 +0300, Alexander Shishkin wrote:
> +/*
> + * poking_init() initializes the text poking address from the lower
> half of the
> + * address space. Relax LASS enforcement when accessing the poking
> address.
> + */
>  static void text_poke_memcpy(void *dst, const void *src, size_t len)
>  {
> -       memcpy(dst, src, len);
> +       stac();
> +       __inline_memcpy(dst, src, len);
> +       clac();
>  }
>  
>  static void text_poke_memset(void *dst, const void *src, size_t len)
>  {
>         int c = *(const int *)src;
>  
> -       memset(dst, c, len);
> +       stac();
> +       __inline_memset(dst, c, len);
> +       clac();
>  }

Why not do stac/clac in a single place inside __text_poke()?
\
 
 \ /
  Last update: 2023-08-01 00:41    [W:0.124 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site