Messages in this thread | | | From | "Edgecombe, Rick P" <> | Subject | Re: [PATCH v3 03/12] x86/alternatives: Disable LASS when patching kernel alternatives | Date | Mon, 31 Jul 2023 22:41:17 +0000 |
| |
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()?
| |