Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp690195pxk; Wed, 23 Sep 2020 13:26:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxQKBcbAq7ov+2YU/USHet8OB5DjRXrfM+VsN3yBefLdiBacEd77oJSW8K/02gmNu9wZtt X-Received: by 2002:a17:906:4c51:: with SMTP id d17mr1395835ejw.28.1600892818045; Wed, 23 Sep 2020 13:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600892818; cv=none; d=google.com; s=arc-20160816; b=A3JdHPPxA6KvY5S0B5KgfSmRbTFSvS1QSBhaFz4GLqKQVpJZw6Nx2GQ8GGlod3UIpN 2CH+Up5wljrvSOtZOQmR3cnp2a0PQ9UYNXHupodfztqCZPPMUi6o/TPSlp0nfGH1vYi9 1TmeATwnmYb+z/7mY4qt9b64rRipz1RhG7YSfiuiDeBy2Yb2HkwHEOmxsHsQSiAyErEB 0Vb/heu7oIt+mTpJu2gACOJg4qqSGAgRni7Wcr9TcUAKgmhR/dFcpRYzlyfTGYbcITMm RpGcahRcf00O2QgwracBzJWEFqqmPzNLkbY35PumZe6NDiuoZOJ79p5bKGBSD2jQPleY VCNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:organization:subject:cc:to:from; bh=B0PhX1tukuyLR/+8NU8y2rPbdQPFlXN55hM1+ZiJXfU=; b=VXpZFygKzWqRjV+kglK9JE/g+7X5J1pWjXOg1MjYPRg33OzlOtxw4OfijeZqAfIBtt pjOkCBhvpawgq0SjZD5KCrDInkGCZgkel8UFcDsQglxXtVhD6I6ydhW8Zsk4IAFNTJEz WmREjGIMTFSn3ao8PKthc1Ud5Ro8+nZD0zIYMglM5s9rND1m/hsh3elU39FedhyCnQs0 ZROwg4MhY8aUnF+BGK+bJBhge5XIaJzNicaJoKF5wsXIQHbzT3IfSFKqyENyU5lkwKNu Gt5KbVN5u94En5XoEMF25wchM3+HGSx+cx2dyfPELM6sUw3n4oQC78HmVDWGAg3z/Bto DZoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si688372edr.460.2020.09.23.13.26.34; Wed, 23 Sep 2020 13:26:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726643AbgIWUXe (ORCPT + 99 others); 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