From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13172C4727D for ; Wed, 23 Sep 2020 20:23:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B8550206DB for ; Wed, 23 Sep 2020 20:23:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726672AbgIWUXe (ORCPT ); Wed, 23 Sep 2020 16:23:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726460AbgIWUXe (ORCPT ); Wed, 23 Sep 2020 16:23:34 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C666C0613CE; Wed, 23 Sep 2020 13:23:34 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id E869829C1E8 From: Gabriel Krisman Bertazi To: Kees Cook Cc: luto@kernel.org, tglx@linutronix.de, x86@kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, willy@infradead.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, kernel@collabora.com Subject: Re: [PATCH v6 7/9] x86: Enable Syscall User Dispatch Organization: Collabora References: <20200904203147.2908430-1-krisman@collabora.com> <20200904203147.2908430-8-krisman@collabora.com> <202009221236.04AA334C2@keescook> Date: Wed, 23 Sep 2020 16:23:26 -0400 In-Reply-To: <202009221236.04AA334C2@keescook> (Kees Cook's message of "Tue, 22 Sep 2020 12:37:02 -0700") Message-ID: <87zh5g5jk1.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kees Cook 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 >> --- >> 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