[PATCH] mm/mseal: fix mseal documentation for 32-bit kernels

Leon Hwang leon.hwang at linux.dev
Tue Jul 7 06:48:02 PDT 2026


On 2026/7/7 18:01, Pedro Falcato wrote:
> On Fri, Jul 03, 2026 at 10:50:29PM +0800, Leon Hwang wrote:
>> On 2026/7/3 17:44, Pedro Falcato wrote:
[...]
>>>
>>>>  
>>>>    The following architectures currently support this feature: x86-64, arm64,
>>>> -  loongarch and s390.
>>>> +  loongarch, riscv, and s390.
>>>
>>> This is also useless, every 64-bit architecture will support this.
>>
>>
>> Do you mean dropping this sentence, or this change?
> 
> This sentence (this is not architecture specific...).


Got it.

> 
>>
>>>
>>>>  
>>>>    WARNING: This feature breaks programs which rely on relocating
>>>>    or unmapping system mappings. Known broken software at the time
>>>> diff --git a/init/Kconfig b/init/Kconfig
>>>> index 5230d4879b1c..12bb39f637b1 100644
>>>> --- a/init/Kconfig
>>>> +++ b/init/Kconfig
>>>> @@ -2112,7 +2112,7 @@ config ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
>>>>  	  from a kernel perspective.
>>>>  
>>>>  	  After the architecture enables this, a distribution can set
>>>> -	  CONFIG_MSEAL_SYSTEM_MAPPING to manage access to the feature.
>>>> +	  CONFIG_MSEAL_SYSTEM_MAPPINGS to manage access to the feature.
>>>>  
>>>>  	  For complete descriptions of memory sealing, please see
>>>>  	  Documentation/userspace-api/mseal.rst
>>>> diff --git a/mm/mseal.c b/mm/mseal.c
>>>> index 9781647483d1..0464c7b94ab9 100644
>>>> --- a/mm/mseal.c
>>>> +++ b/mm/mseal.c
>>>> @@ -132,8 +132,8 @@ static int mseal_apply(struct mm_struct *mm,
>>>>   *   addr is not a valid address (not allocated).
>>>>   *   end (start + len) is not a valid address.
>>>>   *   a gap (unallocated memory) between start and end.
>>>> - *  -EPERM:
>>>> - *  - In 32 bit architecture, sealing is not supported.
>>>> + *  -EINTR:
>>>> + *   interrupted while waiting for the mmap write lock.
>>>>   * Note:
>>>>   *  user can call mseal(2) multiple times, adding a seal on an
>>>>   *  already sealed memory is a no-action (no error).
>>>
>>> And this whole header needs to be deleted as well. No one's looking at
>>> kernel code for documentation (and if they are, we did a horrendous job
>>> at actually documenting the thing).
>>>
>>
>> Just to confirm, do you mean removing the entire function comment above
>> do_mseal()?
> 
> Yes. Again, not your fault, just old gripes :)
> 

Got it.

Thanks,
Leon





More information about the linux-riscv mailing list