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 5037CC433EF for ; Wed, 20 Apr 2022 16:50:12 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vgEihypJRvESMCqgKaPwhtzqP3xKZayEHcPUFmmaekY=; b=BnGINOqPgRsJ9e ENLElBIZcsW151/HZP8PoS7Jawe+RvAeJb2vlyoGhpyw+5DbQ0WVpJ4QDJoB/bu+gQOIAZXY4qsfv IKrVfZUlWrkWFid6ciS5tusMA5WcOHevP7OIJWq6nCdLg5oTjtGOyE76hBRpSvcB0B0yR3Di/Inda U/l7KhMG4EfoA3UpL7w038hEyqlFPdbch4ZcQ7HPyn6RDlldU5V6CNsJ79ME7ZZkaNTgAubJZYMkZ DyS4KCP6neyPCP/qBKmxJ6ewk3vv/qq+X+w2Vq8GEm1VnID/OTysPiVbbIDx1zaqmQ95S8KqfP6sE WVQH/Pxl9fC7Y+kAZFvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhDVp-009jZ6-My; Wed, 20 Apr 2022 16:49:05 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhDVm-009jXJ-7f for linux-arm-kernel@lists.infradead.org; Wed, 20 Apr 2022 16:49:04 +0000 Received: by mail-pf1-x434.google.com with SMTP id x80so2486889pfc.1 for ; Wed, 20 Apr 2022 09:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=R/fi1SRkDqiUkxZol4SjwZWcZTpEli35mQJt0vyOur0=; b=Kk5fPbS0zm4FMP+eBPzfBSMQk7k9oI+B5J3rRBWLm+ph+/RN2Jg+2IIeuaMW4BqINO eCCLQAhAk206DsyacsRQH4EyQnpKel4VPaJ45b9x6RaAqhJ4ePGuqfS2st9TkDLH4u0q Mjimyb8cA40GoiOx+MA2kM8hTwEIXI0A/8xdU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=R/fi1SRkDqiUkxZol4SjwZWcZTpEli35mQJt0vyOur0=; b=BE4TD0Jz2EDEaK1E+gY9cXTkFgAP8wfB9Xc5lkMbtu7NnovI5jtv6Vo1ISHvFAwhCZ ZUeS2y6o6QjATdL7uuoUCYWiH0qX6N/7vAi7QWKLoYtrb2K0dSbERexZoxptCnmdk5DV v+lbsllvWGg/lcgqK8hRGNCf3sMnH5Or+GBRCgUXpE8/tF0VVUAIEaMAiueC0fVvejaj 0R5jvyYJ5ZM+O4r3A7ytqQzB7cfYx+jHc1W54R0Ihj4t1kPbpYfyiJoIAIlLFfTk6bUi BfAqD6oniL+vdv4Lxue8GVhdVFwANs914bY/ayT25NjCoHJru19O/vTgVpZig0bwuCkO wBuA== X-Gm-Message-State: AOAM5321Qt6i0qUR2PvwA2+/0yL42Yp8Mf8hTPOIF8FUfIBgxHy0jj5+ oNFnbI2v7/k6HK/NxBDcyKg8pw== X-Google-Smtp-Source: ABdhPJwurf26N7fVAiEXm7TpZEdfSHTuxnMwLUBDSeGQvWPvKjDjdGT4MFkI9cmqEOXOsH8y7tgRLQ== X-Received: by 2002:a65:4108:0:b0:399:1f0e:50da with SMTP id w8-20020a654108000000b003991f0e50damr20583633pgp.2.1650473338612; Wed, 20 Apr 2022 09:48:58 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z16-20020a637e10000000b00382b21c6b0bsm20654702pgc.51.2022.04.20.09.48.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 09:48:58 -0700 (PDT) Date: Wed, 20 Apr 2022 09:48:57 -0700 From: Kees Cook To: Will Deacon Cc: broonie@kernel.org, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, jeremy.linton@arm.com, hjl.tools@gmail.com, libc-alpha@sourceware.org, szabolcs.nagy@arm.com, yu-cheng.yu@intel.com, ebiederm@xmission.com, linux-arch@vger.kernel.org Subject: Re: [PATCH v13 0/2] arm64: Enable BTI for the executable as well as the interpreter Message-ID: <202204200948.21173429E@keescook> References: <20220419105156.347168-1-broonie@kernel.org> <165043278356.1481705.13924459838445776007.b4-ty@chromium.org> <20220420093612.GB6954@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220420093612.GB6954@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220420_094902_298102_958256EE X-CRM114-Status: GOOD ( 17.27 ) 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, Apr 20, 2022 at 10:36:13AM +0100, Will Deacon wrote: > On Tue, Apr 19, 2022 at 10:33:06PM -0700, Kees Cook wrote: > > On Tue, 19 Apr 2022 11:51:54 +0100, Mark Brown wrote: > > > Deployments of BTI on arm64 have run into issues interacting with > > > systemd's MemoryDenyWriteExecute feature. Currently for dynamically > > > linked executables the kernel will only handle architecture specific > > > properties like BTI for the interpreter, the expectation is that the > > > interpreter will then handle any properties on the main executable. > > > For BTI this means remapping the executable segments PROT_EXEC | > > > PROT_BTI. > > > > > > [...] > > > > Applied to for-next/execve, thanks! > > > > [1/2] elf: Allow architectures to parse properties on the main executable > > https://git.kernel.org/kees/c/b2f2553c8e89 > > [2/2] arm64: Enable BTI for main executable as well as the interpreter > > https://git.kernel.org/kees/c/b65c760600e2 > > Kees, please can you drop this series while Catalin's alternative solution > is under discussion (his Reviewed-by preceded the other patches)? > > https://lore.kernel.org/r/20220413134946.2732468-1-catalin.marinas@arm.com > > Both series expose new behaviours to userspace and we don't need both. Ah-ha! I wasn't sure if they were solving the same problem or not. -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel