Re: [PATCH v7 6/7] mseal, system mappings: uprobe mapping
From: Oleg Nesterov
Date: Wed Feb 26 2025 - 11:40:51 EST
On 02/24, jeffxu@xxxxxxxxxxxx wrote:
>
> Unlike other system mappings, the uprobe mapping is not
> established during program startup. However, its lifetime is the same
> as the process's lifetime. It could be sealed from creation.
Agreed, VM_SEALED should be always for the "[uprobes]" vma, regardless
of config options.
ACK,
but can't we do
#ifdef CONFIG_64BIT
/* VM is sealed, in vm_flags */
#define VM_SEALED _BITUL(63)
+ #else
+ #define VM_SEALED 0
#endif
and then simply
vma = _install_special_mapping(mm, area->vaddr, PAGE_SIZE,
- VM_EXEC|VM_MAYEXEC|VM_DONTCOPY|VM_IO,
+ VM_EXEC|VM_MAYEXEC|VM_DONTCOPY|VM_IO|VM_SEALED,
?
But I am fine either way, feel free to ignore.
Oleg.