[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H5Oc4vwwp-BACNim8EJspQb5fB0+LS7nJ_z39Rsc1uqyg@mail.gmail.com>
Date: Wed, 16 Apr 2025 17:17:15 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: akpm@...ux-foundation.org, WangYuli <wangyuli@...ontech.com>, corbet@....net,
kernel@...0n.name, jeffxu@...omium.org, Liam.Howlett@...cle.com,
kees@...nel.org, hca@...ux.ibm.com, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, loongarch@...ts.linux.dev, xry111@...111.site,
tglx@...utronix.de, thomas.weissschuh@...utronix.de, Jason@...c4.com,
zhanjun@...ontech.com, niecheng1@...ontech.com, guanwentao@...ontech.com
Subject: Re: [PATCH v2] mseal sysmap: enable LoongArch
On Wed, Apr 16, 2025 at 5:14 PM Lorenzo Stoakes
<lorenzo.stoakes@...cle.com> wrote:
>
> Hi Andrew - can we drop this from mm so it can go through the arch tree? I think
> this is more appropriate, thanks!
>
> On Wed, Apr 16, 2025 at 05:11:20PM +0800, Huacai Chen wrote:
> [snip]
> > In V1 you suggested this patch to go through the arch tree. But I saw
> > Andrew has already taken it, what should I do now?
>
> Can you take in your tree please? Andrew should drop, I really feel the arch
> tree is the appropriate place, as this is purely an arch change.
I will take it, but modify the title. Thanks.
Huacai
>
> Thanks!
>
> >
> >
> > Huacai
> >
> > >
> > > Thanks, Lorenzo
> > >
> > > >
> > > > Huacai
> > > >
> > > > >
> > > > > >
> > > > > > Link: https://lore.kernel.org/all/25bad37f-273e-4626-999c-e1890be96182@lucifer.local/
> > > > > > Tested-by: Yuli Wang <wangyuli@...ontech.com>
> > > > > > Signed-off-by: Yuli Wang <wangyuli@...ontech.com>
> > > > >
> > > > > LGTM,
> > > > >
> > > > > Acked-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> > > > >
> > > > > But let's get some R-b's from the arch people please!
> > > > >
> > > > > > ---
> > > > > > Changelog:
> > > > > > *v1->v2: Modify mseal_sys_mappings/arch-support.txt.
> > > > > > ---
> > > > > > .../features/core/mseal_sys_mappings/arch-support.txt | 2 +-
> > > > > > Documentation/userspace-api/mseal.rst | 2 +-
> > > > > > arch/loongarch/Kconfig | 1 +
> > > > > > arch/loongarch/kernel/vdso.c | 4 +++-
> > > > > > 4 files changed, 6 insertions(+), 3 deletions(-)
> > > > > >
> > > > > > diff --git a/Documentation/features/core/mseal_sys_mappings/arch-support.txt b/Documentation/features/core/mseal_sys_mappings/arch-support.txt
> > > > > > index c6cab9760d57..a3c24233eb9b 100644
> > > > > > --- a/Documentation/features/core/mseal_sys_mappings/arch-support.txt
> > > > > > +++ b/Documentation/features/core/mseal_sys_mappings/arch-support.txt
> > > > > > @@ -12,7 +12,7 @@
> > > > > > | arm64: | ok |
> > > > > > | csky: | N/A |
> > > > > > | hexagon: | N/A |
> > > > > > - | loongarch: | TODO |
> > > > > > + | loongarch: | ok |
> > > > > > | m68k: | N/A |
> > > > > > | microblaze: | N/A |
> > > > > > | mips: | TODO |
> > > > > > diff --git a/Documentation/userspace-api/mseal.rst b/Documentation/userspace-api/mseal.rst
> > > > > > index 1dabfc29be0d..ef733f69003d 100644
> > > > > > --- a/Documentation/userspace-api/mseal.rst
> > > > > > +++ b/Documentation/userspace-api/mseal.rst
> > > > > > @@ -144,7 +144,7 @@ Use cases
> > > > > > architecture.
> > > > > >
> > > > > > The following architectures currently support this feature: x86-64, arm64,
> > > > > > - and s390.
> > > > > > + loongarch and s390.
> > > > > >
> > > > > > WARNING: This feature breaks programs which rely on relocating
> > > > > > or unmapping system mappings. Known broken software at the time
> > > > > > diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> > > > > > index 067c0b994648..54ed5b59a690 100644
> > > > > > --- a/arch/loongarch/Kconfig
> > > > > > +++ b/arch/loongarch/Kconfig
> > > > > > @@ -69,6 +69,7 @@ config LOONGARCH
> > > > > > select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
> > > > > > select ARCH_SUPPORTS_LTO_CLANG
> > > > > > select ARCH_SUPPORTS_LTO_CLANG_THIN
> > > > > > + select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
> > > > > > select ARCH_SUPPORTS_NUMA_BALANCING
> > > > > > select ARCH_SUPPORTS_RT
> > > > > > select ARCH_USE_BUILTIN_BSWAP
> > > > > > diff --git a/arch/loongarch/kernel/vdso.c b/arch/loongarch/kernel/vdso.c
> > > > > > index 10cf1608c7b3..7b888d9085a0 100644
> > > > > > --- a/arch/loongarch/kernel/vdso.c
> > > > > > +++ b/arch/loongarch/kernel/vdso.c
> > > > > > @@ -105,7 +105,9 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
> > > > > >
> > > > > > vdso_addr = data_addr + VVAR_SIZE;
> > > > > > vma = _install_special_mapping(mm, vdso_addr, info->size,
> > > > > > - VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC,
> > > > > > + VM_READ | VM_EXEC |
> > > > > > + VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC |
> > > > > > + VM_SEALED_SYSMAP,
> > > > > > &info->code_mapping);
> > > > > > if (IS_ERR(vma)) {
> > > > > > ret = PTR_ERR(vma);
> > > > > > --
> > > > > > 2.49.0
> > > > > >
Powered by blists - more mailing lists