Re: [PATCHv6 03/16] x86/alternatives: Disable LASS when patching kernel alternatives

Kirill A. Shutemov
2025-06-20T17:19:10Z

On Fri, Jun 20, 2025 at 08:33:57AM -0700, Dave Hansen wrote:
> On 6/20/25 06:53, Kirill A. Shutemov wrote:
> > +/*
> > + * poking_init() initializes the text poking address from the lower half of the
> > + * address space. Relax LASS enforcement when accessing the poking address.
> > + */
>
> This does not read quite right. I think there's some unnecessary
> confusiuon about initializing the address versus the contents. But
> either way, how about:
>
> /*
> * Text poking creates and uses a mapping in the lower half of the
> * address space. Relax LASS enforcement when accessing the poking
> * address.
> */

Looks good. Will update, thanks!
>
> > static void text_poke_memset(void *dst, const void *src, size_t len)
> > {
> > int c = *(const int *)src;
> >
> > - memset(dst, c, len);
> > + lass_stac();
> > + __inline_memset(dst, c, len);
> > + lass_clac();
> > }
>
> Yeah, this patch small enough that lass_{stac,clac}() are definitely
> misplaced in this series. Just move them into this patch.

Okay, makes sense.

--
Kiryl Shutsemau / Kirill A. Shutemov