Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp720666pxk; Thu, 24 Sep 2020 17:22:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLfRMw4FAEFx2hgvGiszRPwN6J5Ivzj2XauSgWVj3nZ17Ir1lZp3oaxfXYEUur5U+nZMj1 X-Received: by 2002:a17:906:af42:: with SMTP id ly2mr195887ejb.362.1600993353546; Thu, 24 Sep 2020 17:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600993353; cv=none; d=google.com; s=arc-20160816; b=EFWuWqLy3m60pRf7FXY+POGKG+iC7P8DNCnt4PsUQJc/X9Em7rvs9zEwCry1PelHt8 sSKVMLzi3v0OghJC97bmpgHwRtMYype7yeRMjS8bKo1gupmzuRvYuH/qY57DDiOUcVp2 rRTxIEq+03yYj8v1NDGfCMQQ3o7UAV7lMaPtmZQXru723h92ulvEiaBVygkTaaUrf0D7 15uRViBxU81bjsdoSQFHkXxHzIbLJxJKGtazsaEB+Inm9d29tu4o2c0CQO1/KPfmkqMZ +fVw6D7Pfxsd1i6ua7KQWszPrNwhha8dmyk6KZsdF8vLO5PfZ32VDbU4wEqSemcL3ANx ugtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=QiKWvNTYK1TYgM0WpMDl/dV8fDrXMwjXv5tzwpjSreg=; b=jZAc/IDDCO/UU0moN+SRVCyiQ+/ZgXf65omsnfgwHVuLqGHx9N4D3a4uiZt8/LfUYv YgmhQKBVk3xWkJSXwUsWCrKMRzfFvXcvlskaAZ3iKHy3l0YpBbCFjkGyKGbsnVnYCn4V x8i4qTG7mXzERX2nt9zem40k4KVTGoLCNofj4t90vtEKdTuupDQl2EiY6PvLstqIIY37 +HrqSSHOb4X5A6BjD3S/AodDwfryZQue4QsJ5jQOmcLSz18F9YF+dxRhxd/j5e9Xh9S1 Gxe8liBZJJhZ3iHyREZDw7zofRWQBmphbcLY1V+zDSPofVTQhYOqE7uE6N7yEGM09/J1 ZoYA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yd22si944132ejb.546.2020.09.24.17.22.10; Thu, 24 Sep 2020 17:22:33 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726827AbgIYAS3 (ORCPT + 99 others); Thu, 24 Sep 2020 20:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbgIYAS3 (ORCPT ); Thu, 24 Sep 2020 20:18:29 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED03CC0613CE; Thu, 24 Sep 2020 17:18:28 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLbR5-005fA1-D2; Fri, 25 Sep 2020 00:18:03 +0000 Date: Fri, 25 Sep 2020 01:18:03 +0100 From: Al Viro To: Jann Horn Cc: Kees Cook , YiFei Zhu , YiFei Zhu , Linux Containers , bpf , kernel list , Aleksa Sarai , Andrea Arcangeli , Andy Lutomirski , Dimitrios Skarlatos , Giuseppe Scrivano , Hubertus Franke , Jack Chen , Josep Torrellas , Tianyin Xu , Tobin Feldman-Fitzthum , Tycho Andersen , Valentin Rothberg , Will Drewry Subject: Re: [PATCH v2 seccomp 2/6] asm/syscall.h: Add syscall_arches[] array Message-ID: <20200925001803.GV3421308@ZenIV.linux.org.uk> References: <202009241658.A062D6AE@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 25, 2020 at 02:15:50AM +0200, Jann Horn wrote: > On Fri, Sep 25, 2020 at 2:01 AM Kees Cook wrote: > > 2) seccomp needs to handle "multiplexed" tables like x86_x32 (distros > > haven't removed CONFIG_X86_X32 widely yet, so it is a reality that > > it must be dealt with), which means seccomp's idea of the arch > > "number" can't be the same as the AUDIT_ARCH. > > Sure, distros ship it; but basically nobody uses it, it doesn't have > to be fast. As long as we don't *break* it, everything's fine. And if > we ignore the existence of X32 in the fastpath, that'll just mean that > syscalls with the X32 marker bit always hit the seccomp slowpath > (because it'll look like the syscall number is out-of-bounds ) - no > problem. You do realize that X32 is amd64 counterpart of mips n32, right? And that's not "basically nobody uses it"...