[PATCH v6 0/9] Add support for memory sealing

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Oct 13 15:08:46 GMT 2025



On 13/10/25 12:00, Florian Weimer wrote:
> * Adhemerval Zanella Netto:
> 
>>>> There are two solutions for such a case in the future:
>>>> 1. Do not turn on sealing when building the main binary.
>>>> 2. Use the .gnu.mutable solution to mark specific areas/variables to
>>>> be not sealable.
>>>
>>> (1) does not work if we are dealing with code that is usually loaded
>>> through dlopen (such as userspace graphics drivers and Python modules).
>>>
>>> (2) does not really apply here because this would have to be done during
>>> the glibc build.
>>
>> This (2) can be done at glibc build to make _dl_debug_update mutable, and
>> that's the idea of adding the mutable.
> 
> We only learned about _dl_debug_update because of the patching failure.
> There are probably other examples.  And I'm not sure if using GCC's
> section attribute is sufficient to achieve suitable placement of all the
> functions we know about—so we might have to write more functions in
> assembler for predictable outcomes.

The underlying question is whether this patching is really required and
expected. But I think we make an opt-out libc sealing with a tunable if the
bianry requires such patching; this enable make it the default.



More information about the Libc-alpha mailing list