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 63B78C433EF for ; Wed, 20 Apr 2022 16:54:10 +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=KRuc++7/PI0TKeZaohL/qqkaBbELcxbBlKh1aGPaxZA=; b=IpcjkIMFy1RzoM K5x2TKi7GSvJBM4VcIwrOv8B42KHvq27eCQO04CK38dGiTiC/WoDdBSEgrO7ud1t1ONj1f81u63pT Yyl2HNHUc3tD6pv14a3AOnMiavbBsm26Q7xmWFr1Grt9OBSfdKEdV8EohjWgyh/jdRQYJA8ccRUnY bcy19DF7pN9+I3dk8PGbIFy2C/ernPmOD++5nqN5YRwbjaECvhnIVcZlaGZT7V1ZY4QOcDSKgMXx4 ZDdMHEkrRxe5hfYcq5TDUOZy+57TxI9xEIccQIOrmcU6bsjbEAMocctPbA+oEn1eAqY8en3+ATKo/ S/C7sTvyXj+PYtrafQ6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhDZZ-009lM0-BL; Wed, 20 Apr 2022 16:52:57 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhDXo-009kQo-LL for linux-arm-kernel@lists.infradead.org; Wed, 20 Apr 2022 16:51:10 +0000 Received: by mail-pl1-x635.google.com with SMTP id v12so2317934plv.4 for ; Wed, 20 Apr 2022 09:51:06 -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=W+pAHZ/PIPE0DKbOw9kKGPFs28GbCHt7IPyK4IQ+geg=; b=iv48MygQl8ASnZAdOhP8w9xfqCrxsUYO2woNAOjT2gnh731P0cx/zggDl0yiVx+Y3X GWqrpBglTZvDUAKUvwQfgIzp5kqefDaGzR8p22S1jBuEkyNIsbJpkVWmHwEvfpMRgXpt 9i35fae3ZuflrzPpBJoUzl5+AdfspcduaRbiw= 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=W+pAHZ/PIPE0DKbOw9kKGPFs28GbCHt7IPyK4IQ+geg=; b=W+reRRs/ju2yLXJKuDXrqQLyWB2uDbc+AtVVKE33zKTSF5JXYCPDJ2F2oaVJfXbnEe hxul9ZYTGt/RpA4K/P0VrrkeIgpcm2AOJINCwQisFY01K+O5fmyq53fKum5ho8daAu4w hxwQkCJND3nSBEmqlkfi/9h7Y5gmaSfxk1yfDoOgfdIHKT33lu0Vwanvhfrly26P8lTW rND2UsOOrIIrd3qc6VMAnU3vFRU0dhQ4a+UL33FLnPADQoCgUorBcZwccUrpGIREXyAT pyQs7dC4kZ1sfnUtOK9AZEY+48K3RUe7SBATthCJG7HGgLldZ/aaPCbUNr2MNIErthtl L2Tg== X-Gm-Message-State: AOAM532z/j2rGyVdYfHFAP4emtbZA2V2s/NoGbqFoJFV1RQcq95xR005 OcJdL0KqoDdGxhNu6vt5Sr0Yyw== X-Google-Smtp-Source: ABdhPJyGpUSxKI3QmXGliTSRS9PFUS/7qr8Bl7Zp7Gb7+JaxuDL7MsUE2PzfC7EPLyEG7NNEjIzScQ== X-Received: by 2002:a17:902:744a:b0:158:9b85:192e with SMTP id e10-20020a170902744a00b001589b85192emr21525578plt.96.1650473466332; Wed, 20 Apr 2022 09:51:06 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z13-20020a17090a468d00b001c7db8e6ac7sm240425pjf.40.2022.04.20.09.51.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 09:51:06 -0700 (PDT) Date: Wed, 20 Apr 2022 09:51:05 -0700 From: Kees Cook To: Jeremy Linton Cc: Mark Brown , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, 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: <202204200950.C70BFB3@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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220420_095108_752140_43E07D2B X-CRM114-Status: GOOD ( 34.41 ) 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 08:39:14AM -0500, Jeremy Linton wrote: > On 4/20/22 06:57, Mark Brown wrote: > > On Wed, Apr 20, 2022 at 10:57:30AM +0100, Catalin Marinas wrote: > > > On Wed, Apr 20, 2022 at 10:36:13AM +0100, Will Deacon wrote: > > > > > > 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. > > > > > I agree. Even though the patches have my reviewed-by, I think we should > > > postpone them until we figure out a better W^X solution that does not > > > affect BTI (and if we can't, we revisit these patches). > > > > Indeed. I had been expecting this to follow the pattern of the previous > > nine months or so and be mostly ignored for the time being while > > Catalin's new series goes forward. Now that it's applied it might be > > worth keeping the first patch still in case someone else needs it but > > the second patch can probably wait. > > > > > Arguably, the two approaches are complementary but the way this series > > > turned out is for the BTI on main executable to be default off. I have a > > > worry that the feature won't get used, so we just carry unnecessary code > > > in the kernel. Jeremy also found this approach less than ideal: > > > > > https://lore.kernel.org/r/59fc8a58-5013-606b-f544-8277cda18e50@arm.com > > > > I'm not sure there was a fundamental concern with the approach there but > > rather some pushback on the instance on turning it off by default. > > Right, this one seems to have the smallest impact on systemd as it exists > today. I would have expected the default to be on, because IMHO this set > corrects what at first glance just looks like a small oversight. I find the > ABI questions a bit theoretical, given that this should only affect > environments that don't exist outside of labs/development orgs at this point > (aka systemd services on HW that implements BTI). > > > The other approach works, and if the systemd folks are on board with it also > should solve the underlying problem, but it creates a bit of a compatibility > problem with existing containers/etc that might exist today (although > running systemd/services in a container is itself a discussion). > > So, frankly, I don't see why they aren't complementary. This fixes a bug we > have today, the other set creates a generic mechanism for the future. Okay, well, how about I drop this for now, and I'll Ack the ELF loader changes so this can go through the arm64 tree if there is consensus. -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel