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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03C9AC41513 for ; Wed, 18 Oct 2023 12:45:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:Cc:To:From:Date:References: In-Reply-To:Message-Id:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Sh8jqYZ7Am2qVzevAOLoTVsKN3S+QKJ48yev+y4Zu9w=; b=u00/gc/kHjLsbx MmP4+yN9tsq/R+8pLYrG6dy0y+ZMUxjCO1o1zvsOjsZHd4uzetLpovHY6wP2JGqI5nBffASdTsHJI EeE9kAHqbDTeIaTOMTr4Mw+tNwNmWEvSGpX5+FuNWEP4Cw9GMg59Ji2YULQMhiLivOHtyQt89Kkfa RU1ulvZ9gX5RLSzhd/xTPsgIF8fc6qvyFRdp8H5WUZgmHiHkTydlVafMfuhWIx2NWMMXcli2KDaJ1 UoSEgMtLUvBV3AFEwpcjdmPJ34qDI1XVFzZlEdM/+4ytTOhvKhuc6bJp4D1TyFsDLus9uOKBiTPnx E5JRA3GGhfrD5ok3aNjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt5vD-00EhSy-0z; Wed, 18 Oct 2023 12:45:11 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt5v9-00EhQ4-2h for linux-arm-kernel@lists.infradead.org; Wed, 18 Oct 2023 12:45:09 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0795F5C02E2; Wed, 18 Oct 2023 08:44:58 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Wed, 18 Oct 2023 08:44:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1697633098; x=1697719498; bh=L/ /WJax4brKzE8K7jlKJOqfsX92u6DaWmDWFcr+tAL8=; b=qYyY873Dt2zfjzazma nNumniuOGs+QnE66R8Qw7LXa1+z9SCRvo+dMkr17AHe+reNoSTFV3yo3/TcyH75E qDgQZDtsM008s8kQyV4qV1NuHEC8//U96z/HedW/G78+IMf7sl8dXbWswjhsZELG nebAjcMP8GI8M56Dx0OeC3Nb/HW4Tsi716ecclcRVvRNRTqNFPUt/E9ZtlLmNTCx NGjy3H7ZKZkeEVHBC6NCY2BwIdsacEBM7lKEKYNGAYc+SqRsW1Tw38/k+BARVAQG /A84IRDVI8iKvLnpcJqAV2rexGBogHbezzFIs0Nkt2aXL7+nJyNqSMu6uabRXEA6 Hhiw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1697633098; x=1697719498; bh=L//WJax4brKzE 8K7jlKJOqfsX92u6DaWmDWFcr+tAL8=; b=A/NkEeWRcrtfFAAUpsMK5GrpinDVT eIAmNsl60iPZ2tWGKUnQSriCq3Sg7iRDOpYMnUU5pFR346syIDPWEq6ITbZGDAkb 0oBmatvLu5A39KsvTbEPlt1zJzTaBJF92fMazM15k6IkLWEEUbP1/hk6NNuj1ZcM KHookJ8wMYcnXEYhO9F0eGX+36DvChIhaRd+boLeHfN1ucbaiTHkf0+i32vy1w26 KnsNW0VVCiRlbCIPKIWfPCIoBfudWQNDhJknaoN6mqxu/2JWj+DIm1FPc1BscGzb cb4lnmxXSxqdqqS50gU4l1GD4Py3OQ4OrLA+4qp68lVMAEko1WlVJWykg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeeggdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeevhfffledtgeehfeffhfdtgedvheejtdfgkeeuvefgudffteettdekkeeufeeh udenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id A1D67B60089; Wed, 18 Oct 2023 08:44:57 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1019-ged83ad8595-fm-20231002.001-ged83ad85 MIME-Version: 1.0 Message-Id: In-Reply-To: <20231018122729.GA18556@willie-the-truck> References: <20231018122729.GA18556@willie-the-truck> Date: Wed, 18 Oct 2023 14:44:37 +0200 From: "Arnd Bergmann" To: "Will Deacon" , "Andrea della Porta" Cc: "Catalin Marinas" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, nik.borisov@suse.com, "Kees Cook" Subject: Re: [PATCH 0/4] arm64: Make Aarch32 compatibility enablement optional at boot X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_054507_962300_231F9A71 X-CRM114-Status: GOOD ( 19.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 18, 2023, at 14:27, Will Deacon wrote: > Hi, > > On Wed, Oct 18, 2023 at 01:13:18PM +0200, Andrea della Porta wrote: >> Aarch32 compatibility mode is enabled at compile time through >> CONFIG_COMPAT Kconfig option. This patchset lets 32-bit support >> (for both processes and syscalls) be enabled at boot time using >> a kernel parameter. Also, it provides a mean for distributions >> to set their own default without sacrificing compatibility support, >> that is users can override default behaviour through the kernel >> parameter. > > I proposed something similar in the past: > > https://lkml.kernel.org/linux-fsdevel/20210916131816.8841-1-will@kernel.org/ > > bu the conclusion there (see the reply from Kees) was that it was better > to either use existing seccomp mechanisms or add something to control > which binfmts can be loaded. Right, I was going to reply along the same lines here: x86 is a bit of a special case that needs this, but I believe all the other architectures already guard the compat syscall execution on test_thread_flag(TIF_32BIT) that is only set by the compat binfmt loader. Doing the reverse is something that has however come up in the past several times and that could be interesting: In order to run userspace emulation (qemu-user, fex, ...) we may want to allow calling syscalls and ioctls for foreign ABIs in a native task, and at that point having a mechanism to control this capability globally or per task would be useful as well. The compat mode (arm32 on arm64) is the easiest case here, but the same thing could be done for emulating the very subtle architecture differences (x86-64 on arm64, arm64 on x86_64, arm32 on x86-compat, or any of the above on riscv or loongarch). Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel