diff mbox series

[v6,7/9] x86: Enable Syscall User Dispatch

Message ID 20200904203147.2908430-8-krisman@collabora.com
State Superseded
Headers show
Series [v6,1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag | expand

Commit Message

Gabriel Krisman Bertazi Sept. 4, 2020, 8:31 p.m. UTC
Syscall User Dispatch requirements are fully supported in x86. This
patch flips the switch, marking it as supported.  This was tested
against Syscall User Dispatch selftest.

Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
---
 arch/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Kees Cook Sept. 22, 2020, 7:37 p.m. UTC | #1
On Fri, Sep 04, 2020 at 04:31:45PM -0400, Gabriel Krisman Bertazi wrote:
> Syscall User Dispatch requirements are fully supported in x86. This

> patch flips the switch, marking it as supported.  This was tested

> against Syscall User Dispatch selftest.

> 

> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>

> ---

>  arch/x86/Kconfig | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig

> index 7101ac64bb20..56ac8de99021 100644

> --- a/arch/x86/Kconfig

> +++ b/arch/x86/Kconfig

> @@ -150,6 +150,7 @@ config X86

>  	select HAVE_ARCH_COMPAT_MMAP_BASES	if MMU && COMPAT

>  	select HAVE_ARCH_PREL32_RELOCATIONS

>  	select HAVE_ARCH_SECCOMP_FILTER

> +	select HAVE_ARCH_SYSCALL_USER_DISPATCH


Is this needed at all? I think simply "the architecture uses the generic
entry code" is sufficient to enable it. (Especially since there's a top
level config for SYSCALL_USER_DISPATCH, it feels like overkill).

-- 
Kees Cook
Gabriel Krisman Bertazi Sept. 23, 2020, 8:23 p.m. UTC | #2
Kees Cook <keescook@chromium.org> writes:

> On Fri, Sep 04, 2020 at 04:31:45PM -0400, Gabriel Krisman Bertazi wrote:

>> Syscall User Dispatch requirements are fully supported in x86. This

>> patch flips the switch, marking it as supported.  This was tested

>> against Syscall User Dispatch selftest.

>> 

>> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>

>> ---

>>  arch/x86/Kconfig | 1 +

>>  1 file changed, 1 insertion(+)

>> 

>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig

>> index 7101ac64bb20..56ac8de99021 100644

>> --- a/arch/x86/Kconfig

>> +++ b/arch/x86/Kconfig

>> @@ -150,6 +150,7 @@ config X86

>>  	select HAVE_ARCH_COMPAT_MMAP_BASES	if MMU && COMPAT

>>  	select HAVE_ARCH_PREL32_RELOCATIONS

>>  	select HAVE_ARCH_SECCOMP_FILTER

>> +	select HAVE_ARCH_SYSCALL_USER_DISPATCH

>

> Is this needed at all? I think simply "the architecture uses the generic

> entry code" is sufficient to enable it. (Especially since there's a top

> level config for SYSCALL_USER_DISPATCH, it feels like overkill).


Maybe it is not necessary.  The reason I have this is to prevent
architectures migrating to the generic entry code from inadvertently
starting to support this feature, without thinking in advance whether
arch_syscall_is_vdso_sigreturn is needed.  If that is not a good reason,
I'm happy to drop it.

-- 
Gabriel Krisman Bertazi
diff mbox series

Patch

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 7101ac64bb20..56ac8de99021 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -150,6 +150,7 @@  config X86
 	select HAVE_ARCH_COMPAT_MMAP_BASES	if MMU && COMPAT
 	select HAVE_ARCH_PREL32_RELOCATIONS
 	select HAVE_ARCH_SECCOMP_FILTER
+	select HAVE_ARCH_SYSCALL_USER_DISPATCH
 	select HAVE_ARCH_THREAD_STRUCT_WHITELIST
 	select HAVE_ARCH_STACKLEAK
 	select HAVE_ARCH_TRACEHOOK