Re: [PATCH 2/2] arch: Reserve map_shadow_stack() syscall number for all architectures
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "Edgecombe, Rick P" <rick.p.edgecombe@xxxxxxxxx>, "Mehta, Sohil" <sohil.mehta@xxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-arch@xxxxxxxxxxxxxxx" <linux-arch@xxxxxxxxxxxxxxx>, "linux-api@xxxxxxxxxxxxxxx" <linux-api@xxxxxxxxxxxxxxx>
- Subject: Re: [PATCH 2/2] arch: Reserve map_shadow_stack() syscall number for all architectures
- From: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
- Date: Thu, 14 Sep 2023 22:26:47 +1000
- Cc: "svens@xxxxxxxxxxxxx" <svens@xxxxxxxxxxxxx>, "catalin.marinas@xxxxxxx" <catalin.marinas@xxxxxxx>, "schwab@xxxxxxxxxxxxxx" <schwab@xxxxxxxxxxxxxx>, "brgerst@xxxxxxxxx" <brgerst@xxxxxxxxx>, "alexander.shishkin@xxxxxxxxxxxxxxx" <alexander.shishkin@xxxxxxxxxxxxxxx>, "linux-perf-users@xxxxxxxxxxxxxxx" <linux-perf-users@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "monstr@xxxxxxxxx" <monstr@xxxxxxxxx>, "borntraeger@xxxxxxxxxxxxx" <borntraeger@xxxxxxxxxxxxx>, "dave.hansen@xxxxxxxxxxxxxxx" <dave.hansen@xxxxxxxxxxxxxxx>, "christophe.leroy@xxxxxxxxxx" <christophe.leroy@xxxxxxxxxx>, "mark.rutland@xxxxxxx" <mark.rutland@xxxxxxx>, "glaubitz@xxxxxxxxxxxxxxxxxxx" <glaubitz@xxxxxxxxxxxxxxxxxxx>, "dalias@xxxxxxxx" <dalias@xxxxxxxx>, "lukas.bulwahn@xxxxxxxxx" <lukas.bulwahn@xxxxxxxxx>, "rdunlap@xxxxxxxxxxxxx" <rdunlap@xxxxxxxxxxxxx>, "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "hca@xxxxxxxxxxxxx" <hca@xxxxxxxxxxxxx>, "linux@xxxxxxxxxxxxxxx" <linux@xxxxxxxxxxxxxxx>, "sparclinux@xxxxxxxxxxxxxxx" <sparclinux@xxxxxxxxxxxxxxx>, "arnd@xxxxxxxx" <arnd@xxxxxxxx>, "linux-ia64@xxxxxxxxxxxxxxx" <linux-ia64@xxxxxxxxxxxxxxx>, "ebiederm@xxxxxxxxxxxx" <ebiederm@xxxxxxxxxxxx>, "Lutomirski, Andy" <luto@xxxxxxxxxx>, "jolsa@xxxxxxxxxx" <jolsa@xxxxxxxxxx>, "linux-parisc@xxxxxxxxxxxxxxx" <linux-parisc@xxxxxxxxxxxxxxx>, "akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx>, "linux-sh@xxxxxxxxxxxxxxx" <linux-sh@xxxxxxxxxxxxxxx>, "linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>, "geert@xxxxxxxxxxxxxx" <geert@xxxxxxxxxxxxxx>, "hpa@xxxxxxxxx" <hpa@xxxxxxxxx>, "James.Bottomley@xxxxxxxxxxxxxxxxxxxxx" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, "peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>, "ink@xxxxxxxxxxxxxxxxxxxx" <ink@xxxxxxxxxxxxxxxxxxxx>, "linux-m68k@xxxxxxxxxxxxxxxxxxxx" <linux-m68k@xxxxxxxxxxxxxxx>, "tsbogend@xxxxxxxxxxxxxxxx" <tsbogend@xxxxxxxxxxxxxxxx>, "broonie@xxxxxxxxxx" <broonie@xxxxxxxxxx>, "Hunter, Adrian" <adrian.hunter@xxxxxxxxx>, "acme@xxxxxxxxxx" <acme@xxxxxxxxxx>, "ysato@xxxxxxxxxxxxxxxxxxxx" <ysato@xxxxxxxxxxxxx>, "deller@xxxxxx" <deller@xxxxxx>, "debug@xxxxxxxxxxxx" <debug@xxxxxxxxxxxx>, "rmclure@xxxxxxxxxxxxx" <rmclure@xxxxxxxxxxxxx>, "gor@xxxxxxxxxxxxx" <gor@xxxxxxxxxxxxx>, "slyich@xxxxxxxxx" <slyich@xxxxxxxxx>, "npiggin@xxxxxxxxx" <npiggin@xxxxxxxxx>, "agordeev@xxxxxxxxxxxxx" <agordeev@xxxxxxxxxxxxx>, "chris@xxxxxxxxxx" <chris@xxxxxxxxxx>, "mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "linux-mips@xxxxxxxxxxxxxxx" <linux-mips@xxxxxxxxxxxxxxx>, "linux-alpha@xxxxxxxxxxxxxxx" <linux-alpha@xxxxxxxxxxxxxxx>, "mattst88@xxxxxxxxx" <mattst88@xxxxxxxxx>, "linux-s390@xxxxxxxxxxxxxxx" <linux-s390@xxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "jcmvbkbc@xxxxxxxxx" <jcmvbkbc@xxxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>, "richard.henderson@xxxxxxxxxx" <richard.henderson@xxxxxxxxxx>, "irogers@xxxxxxxxxx" <irogers@xxxxxxxxxx>, "namhyung@xxxxxxxxxx" <namhyung@xxxxxxxxxx>, "will@xxxxxxxxxx" <will@xxxxxxxxxx>, "davem@xxxxxxxxxxxxx" <davem@xxxxxxxxxxxxx>
- In-reply-to: <8b7106881fa227a64b4e951c6b9240a7126ac4a2.camel@intel.com>
- References: <20230911180210.1060504-1-sohil.mehta@intel.com> <20230911180210.1060504-3-sohil.mehta@intel.com> <8b7106881fa227a64b4e951c6b9240a7126ac4a2.camel@intel.com>
"Edgecombe, Rick P" <rick.p.edgecombe@xxxxxxxxx> writes:
> On Mon, 2023-09-11 at 18:02 +0000, Sohil Mehta wrote:
>> diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl
>> b/arch/powerpc/kernel/syscalls/syscall.tbl
>> index 20e50586e8a2..2767b8a42636 100644
>> --- a/arch/powerpc/kernel/syscalls/syscall.tbl
>> +++ b/arch/powerpc/kernel/syscalls/syscall.tbl
>> @@ -539,3 +539,4 @@
>> 450 nospu set_mempolicy_home_node sys_set_mempolicy_hom
>> e_node
>> 451 common cachestat sys_cachestat
>> 452 common fchmodat2 sys_fchmodat2
>> +453 common map_shadow_stack sys_map_shadow_stack
>
> I noticed in powerpc, the not implemented syscalls are manually mapped
> to sys_ni_syscall. It also has some special extra sys_ni_syscall()
> implementation bits to handle both ARCH_HAS_SYSCALL_WRAPPER and
> !ARCH_HAS_SYSCALL_WRAPPER. So wondering if it might need special
> treatment. Did you see those parts?
I don't think it needs any special treatment. It's processed by the same
script as other arches (scripts/syscalltbl.sh). So if there's no compat
or native entry it will default to sys_ni_syscall.
I think it's just habit/historical that we always spell out sys_ni_syscall.
cheers
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]