Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp769010pxy; Wed, 28 Apr 2021 13:54:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRp4+gNtakYFtMM0qXStwImR3e0WNjYSKfIZEpGtnDAdjclJoKhFe7WxkgpnSPcPUNR23K X-Received: by 2002:a17:906:b1d4:: with SMTP id bv20mr31351616ejb.46.1619643294697; Wed, 28 Apr 2021 13:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619643294; cv=none; d=google.com; s=arc-20160816; b=ggUoGR8/J1RiyLsst/XrkEMZebwPJve45P/bjAJjV+PNBn9Svfszp5jtq0ttq2q5T7 CLKDzW2TAaknj4iNVEAP6PrZGsK+nRVBF/btdyV+tZydNax8HkeWtZGMIuEfGYBk893K xhHAB/P+nhtK2uhvHZJwxHjA4gpPereeb6tBNiVgmvKYr/tAG+9U3SKrUPSza1QF3I6j q03X+wReS7TYKsSSlDW65uO0xTh761WxY6DiEJW151lyIrfvLD3ItzaZmH34RJcVPnpV 7RUmduWGfNoGmdtXpIUVXdV+T/JL+zoYLGVQCEtcaulNJxXv22QFp2cZwKdrLfrFHfPd w44w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=HrayqRNczCcPu9+bk0jpm7mJ8w0nq6oxQzLYUtdFM7Y=; b=Yi+RxGTNrCnYqErWiqCvvCStnYTaRfoVQ5eSHj8OkVLlDel1GRokoPvnBI33IfePGH WJym7TCMoc7VD07IV9GrvVJGx3+NZe4BZT1wx51NTZCC3dT0j6qM7/h2B5SEotmGilmZ Z55uAs3FZTcVpJHfc2XiNIXsonBKNaTIPoiK2AcD00NphrB2s7j7UkvJwgW061j4jMll zKFBrL26j/aRiVZRKSOcaZ2+3mNREJkYEyHgT/JjbTe5QbjgtnE4JBWgqHohm2G3MWSC bxWXAcTZqkq2omCgJXjm6d4FXwWiy/7EI2KI7L0oZlzoZd4tFMR/DL1PXEb31fAUAjCT W4Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rIJJ0pPq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si798143edb.599.2021.04.28.13.54.31; Wed, 28 Apr 2021 13:54:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rIJJ0pPq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244067AbhD1Tcg (ORCPT + 99 others); Wed, 28 Apr 2021 15:32:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237050AbhD1TcS (ORCPT ); Wed, 28 Apr 2021 15:32:18 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF81C061574 for ; Wed, 28 Apr 2021 12:31:13 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id n25so3576095edr.5 for ; Wed, 28 Apr 2021 12:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HrayqRNczCcPu9+bk0jpm7mJ8w0nq6oxQzLYUtdFM7Y=; b=rIJJ0pPqtQ9bFZJbxSCEDYKqjAbnJFiaYvtRPj8NncIZTjslSq7FBzkemxQfYClCcA 7+/ixKTKDQyu2pmgxC+YQulXSsognZ6b3bL+/Zjea9GvjAYY3+sEImrt8dT5/jO4CRua 7bGBEEPlkDv35muCNMJ0AtZLw4Ke4aqGghPPLLOJVWVlk/ehmpyMknhNid97qjI0hdH1 yUjXJYVmPvQDcOduozATfh5oREb8wUdWbmiRspvvqy8w63Ly7PWgdU3Jsv6383/umNcV D6Xbj5wRlHICy7j2N+Z6o0cFBi545f7VjPNdghkTRqRWH28hu4oF7XTk6Q3okmsS9TCr Fp9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HrayqRNczCcPu9+bk0jpm7mJ8w0nq6oxQzLYUtdFM7Y=; b=RxwgVk1k9zVTi5M1HvQV8LhZvxrNhPAz2s+ReZIjg1EHmzTQ5ai6oUCe34ujxJjacL iR9WXkTYZLIdFvaZFop3PANMQ0LIdQsJMfXoThzSZxA7kHIaOqt9WpGBMLHf2SM3D9qH Dr5WtdPH6LGtrFjhCP6wczicA6HoRwX+Xy8cd+/0bp9JU5NevVaaslHlcdpD7TYBMn0W L+Wpcy/eRzItQfEayPhrP68g6MkjyhBSxIey9vBse/TYMEPnunSvje07TeqFp1hyiMG5 AtxkTv3cEKVfSZPANO7ndxpqsF+pkjmW0fraMcg7imML20slQ2eJ08A2yQvleDoarxz6 KBIg== X-Gm-Message-State: AOAM530BqUjqdp5ngXyuOhdk4R/snJp982XbH6BANUYggwvU0WvRJf9g TgDPUUJnTjPLBh/DIwm5PwlkcC8l0DKkNng30dgX X-Received: by 2002:a05:6402:3592:: with SMTP id y18mr1115175edc.77.1619638272304; Wed, 28 Apr 2021 12:31:12 -0700 (PDT) MIME-Version: 1.0 References: <20210423205159.830854-1-morbo@google.com> <20210428172847.GC4022@arm.com> <20210428174010.GA4593@sirena.org.uk> In-Reply-To: From: Bill Wendling Date: Wed, 28 Apr 2021 12:31:01 -0700 Message-ID: Subject: Re: [PATCH] arm64/vdso: Discard .note.gnu.property sections in vDSO To: Mark Brown Cc: Catalin Marinas , Kees Cook , Ard Biesheuvel , Will Deacon , LKML , linux-arm-kernel@lists.infradead.org, Szabolcs Nagy , Daniel Kiss Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 28, 2021 at 12:21 PM Bill Wendling wrote: > On Wed, Apr 28, 2021 at 10:40 AM Mark Brown wrote: > > On Wed, Apr 28, 2021 at 06:28:47PM +0100, Catalin Marinas wrote: > > > On Fri, Apr 23, 2021 at 01:51:59PM -0700, Bill Wendling wrote: > > > > > > Since the note.gnu.property section in the vDSO is not checked by the > > > > dynamic linker, discard the .note.gnu.property sections in the vDSO. > > > > > Can we not instead fix the linker script to preserve the > > > .note.gnu.property, correctly aligned? It doesn't take much space and > > > while we don't use it now, it has the BTI information about the binary. > > > > > Cc'ing a few others who were involved in the BTI support. > > > > Not just BTI, we also flag PAC usage in there too and could add other > > extensions going forwards. While the note isn't actively used by > > anything right now due to the kernel mapping the vDSO prior to userspace > > starting it is part of the ABI and something could end up wanting to use > > it and getting confused if it's not there. It would be much better to > > fix the alignment issue. > > If there's only one of the 8-byte aligned sections guaranteed, we > could place it first in the note. Otherwise, we will have to change > the alignment of the note (or somehow merge multiple notes). > I should have clarified that there's only one *entry* in the .note.gnu.properties section, and if not then is it possible to merge multiple entries into one. (Excuse my ignorance if this is already the case.) -bw