From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 847463856DD5 for ; Wed, 20 Apr 2022 16:48:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 847463856DD5 Received: by mail-pf1-x42e.google.com with SMTP id l127so2465004pfl.6 for ; Wed, 20 Apr 2022 09:48:59 -0700 (PDT) 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=Z6hB2Bj1AGN6rM5H5isMQM+PZzDLkaJ71Zh+Ld8XxOkAygu5uoFcwrJ+Hvzb7oBQuc 9FJyGQovQr0NORvbIYoi559VxBmM5Rcq1/5ILzYJbWxF4n0uk3eDpTOMZMAFuHzE3FsD cZ1rTslFGx0POKYH3rMweUqUvmwe3DdpftUPgIvBkQvJMuEs6FmSvsoJqZnf5mRJN0p4 MRcG878V9QTY1dLU5J42mwl4DXExFtE4KTt32oi3TCDl11nIl4gCE8eqnwN5dOM0v1ca HqFPynxFmRwrF2Pjage4jkM87bcjIPsFij27py9balRq8k9tq2ooTLDiH2IX4stY6vdh fOpQ== X-Gm-Message-State: AOAM530B0uvlhT7GRqLXWRlGc66Y5Av/+iZVti+fI/o2fjP5dRiotBnx x6r4D8MP7+LXjiRoPsDdu26XyA== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220420093612.GB6954@willie-the-truck> X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2022 16:49:01 -0000 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