[PATCH] x86: Remove ARCH_CET_LEGACY_BITMAP [BZ #25397]

Florian Weimer fw@deneb.enyo.de
Sat Mar 7 13:36:11 GMT 2020


* H. J. Lu:

> On Sat, Mar 7, 2020 at 4:08 AM Florian Weimer <fw@deneb.enyo.de> wrote:
>>
>> * H. J. Lu:
>>
>> > +  funcp = mmap (NULL, 0x1000, PROT_EXEC | PROT_READ | PROT_WRITE,
>> > +             MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
>>
>> An alternative approach would automatically allocate a legacy bitmap
>> for RWX mappings under the right circumstances (maybe even looking and
>
> Also mprotect.

Oh, I was wondering if we should piggy-back on the old (non-upstream)
execstack logic, where later mprotect was problematic if the mapping
was created RWX.

>> the caller address in mmap).  Have you considered that?
>
> It can become very complicated since mmap and mprotect can be called
> indirectly.  It is hard to tell if the real user of such memory is
> legacy code or not.

That's true.

>> I'm not question the removal of the legacy bitmap as such.  It looks
>> like the right call.  I just want to collect some thoughts for
>> posterity.
>
> I think we should leave out legacy bitmap in the first phase.   We can
> always put it back later.

Fair point.  Let me review your patch then.

> BTW, now I can boot the updated Fedora 31 in GUI on CET processor with
> CET enabled kernel.

Wow, excellent news!



More information about the Libc-alpha mailing list