From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 413823857365 for ; Wed, 20 Apr 2022 16:51:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 413823857365 Received: by mail-pl1-x62f.google.com with SMTP id n8so2328570plh.1 for ; Wed, 20 Apr 2022 09:51:07 -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=W+pAHZ/PIPE0DKbOw9kKGPFs28GbCHt7IPyK4IQ+geg=; b=UEVSIu/OnK3D+JKFkJAFgES9A3JD9sJrWr+PTRA70vhqmPSaAtPa4Byu3r+Z8hYdSS TwuHcc0kBF6FaWHYlYmeiPNEaj2q41dU23ZJbchU0p2czGIZkw0n+E0AavL2VLYDfq8q 3v/VoUbtwaHUKggNbfVhDEjHWiIJCDqndpQNHYG4exM2O2rTal1drK7Q6O+9EVAYxxNg CogBDyHl5hjMj3XN3foOXn7+6TDR3YnGPS/HTc1qmMhaMjQI8zkzUS+R3+YBJJJXTebQ Gd2hEWJolTb2pAS6yqilrNdqzS5eD6X7kLe7bi0CB7a88HGgyX5gOtXKbypvhJvaTe13 pH+A== X-Gm-Message-State: AOAM532onwvCL9MGdhADgXMnLrdJ+AR8DlXhe36Csr4XqMBtU8gbuI14 3lsddrQNZaI/O6o1vI20c2EKXw== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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:51:08 -0000 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