Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp119796pxy; Fri, 30 Apr 2021 01:33:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoXqh+3ky+Ug7wtLRi8bxPWqXa+W8Saw6boE/JSx64eCreYgVdSAjklf4Rzvci1bx9/C/h X-Received: by 2002:a17:906:82c9:: with SMTP id a9mr3218131ejy.58.1619771584676; Fri, 30 Apr 2021 01:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619771584; cv=none; d=google.com; s=arc-20160816; b=iN6e2JD2O9pkW5IvIAF7Pcoa66xdzi4pHN9riDeOoii86PP2Q3iP7Jt27KyGPwTxp3 WagrtmE1NEcChfmcY7zcAxE3IuD4wsd0qZB8Nu1/1Dc5qoycYSNAR/H6SFePd5yLkdmI blL8ciILndJ4BU/I+1BlWA2m1rPZRAHWRE8Nk4pvG2/+37HMqHEGQd1s5SH/mNW6fwcp 65Egv3/8FaXZ1BpwF3D4QtOwNgCRC4TuAeevDkOraeHTuRylgM1nLvX+hV4Vrv/0AVxB 66bVefyLqfCSgwnvYjrsMfnp13G8XMqFta/hgy0elcaK5ZFq59aZGXeRFNCgMOTL+2O4 ynGQ== 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=xiDthqOA1PKLysyz3wEBzr+UCVf/K0s/TKR2SGLkpIA=; b=pn9gic8lpk01ZqRAkZfoXWhB8AygblPGTUqqUoU/hYWcraGE7FbyG2pg7AnHtzjEXM je88IEy0skOgaGEj2bcAhC7f8LeT6Jh5iElj0B20fOZFOVgby/VjnlD4wH1YA2Vdc3nj aqdhnra9MwslQ4tFNkbDFZiPhFaAFjYShAjwP6RVQt+GzlVBgGC1EPuChRu/v7skJn8V pTlCRT8Iz2I+1nk/Y9ASqvixSSX1Z1KxMOu7kwCiljskpPoP2DMS4Zkr9bT2csZ9q61A ZSBca2OWTkmuf/wMva91Z99rR+NRfsxC89/zadXyvQ6lenoekpSxH6heA5l+uCz8h1+K vuag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=GruLo53y; 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 w11si1462019ede.590.2021.04.30.01.32.41; Fri, 30 Apr 2021 01:33:04 -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=GruLo53y; 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 S231193AbhD3IaP (ORCPT + 99 others); Fri, 30 Apr 2021 04:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229657AbhD3IaO (ORCPT ); Fri, 30 Apr 2021 04:30:14 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7F54C06174A for ; Fri, 30 Apr 2021 01:29:24 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id g10so13700786edb.0 for ; Fri, 30 Apr 2021 01:29:24 -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=xiDthqOA1PKLysyz3wEBzr+UCVf/K0s/TKR2SGLkpIA=; b=GruLo53yNG6MBZKgHZj1JzSTn7ZktLWswSqtU0vQNU7BxStGMebOufdzCpM5uP0egC tNSv+jkPs6o0V4dPXsBqFk8U1Aijbqt7G2T+9zhjUxam3hY6xQP7wHZ8xwolmVNanx97 /SFJmsRgrPi5tyDssGFTMw1dTKihSHwT3AKZa63d3F6JiHG1Il9GrjPh7ITJjOzh44tP M6kGpN3PW442oBNXVIt9IL/02b9C+ENV2bgY6LXgCyIlLUaTI9k6v2dj6SlfZXDwKnd/ CQFIBicgBNMDso79g4c/Gy9lOhjhuq43EYPXYMDa3cm04EBuEhFYUw1gzbWJLO5f99D7 2VrQ== 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=xiDthqOA1PKLysyz3wEBzr+UCVf/K0s/TKR2SGLkpIA=; b=I0cs8l5pP4Bat0DaTZEkR52Aoy70T7ZI6qeEjQ9WoYt1CgdVE+C0nge5uE6avi0Jvz WwB6weCA70A51MftdIpI+ElIpT2/pzK57qA2PvSHEp2ruSUZjRyla9wpxagotrOQpZNs 9lZVH/JR5LPCSD08N5SqQosnGOQJyiktraYmNKTRAG1JrDUvIqSWdpu38UufahMfHC9t E5AgzpEzJ4GQrUkKEQ8wvLBHjRz1Dy7fcR54GkvZwxdnSYdT6/xGxlmDop1tPPPeuKJp lT7uA5oBdteXu1IRUxNVYLFhTN0u+YfKDGp5D146FjzufaiuX8aFepbxPhizTBQC6oZy C9bQ== X-Gm-Message-State: AOAM532WIRE00zx3bavhbJpA0Jes8D55RdmYYdVea4eLy+z4C3NzGKRW ABKy/vg0cUy/mRT+xVKTgcCB5sifVSl74JIJF8UA X-Received: by 2002:a05:6402:1255:: with SMTP id l21mr4337362edw.362.1619771363167; Fri, 30 Apr 2021 01:29:23 -0700 (PDT) MIME-Version: 1.0 References: <20210423205159.830854-1-morbo@google.com> <20210428172847.GC4022@arm.com> <20210428174010.GA4593@sirena.org.uk> <20210429075454.GQ9028@arm.com> <20210429095027.GR9028@arm.com> <20210430081632.GS9028@arm.com> In-Reply-To: <20210430081632.GS9028@arm.com> From: Bill Wendling Date: Fri, 30 Apr 2021 01:29:12 -0700 Message-ID: Subject: Re: [PATCH] arm64/vdso: Discard .note.gnu.property sections in vDSO To: Szabolcs Nagy Cc: Mark Brown , Catalin Marinas , Kees Cook , Ard Biesheuvel , Will Deacon , LKML , linux-arm-kernel@lists.infradead.org, Daniel Kiss Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 30, 2021 at 1:17 AM Szabolcs Nagy wrote: > The 04/29/2021 11:52, Bill Wendling wrote: > > $ readelf -lW arch/arm64/kernel/vdso/vdso.so > > > > Elf file type is DYN (Shared object file) > > Entry point 0x300 > > There are 4 program headers, starting at offset 64 > > > > Program Headers: > > Type Offset VirtAddr PhysAddr > > FileSiz MemSiz Flg Align > > LOAD 0x000000 0x0000000000000000 0x0000000000000000 > > 0x000968 0x000968 R E 0x8 > > DYNAMIC 0x0008a8 0x00000000000008a8 0x00000000000008a8 > > 0x0000c0 0x0000c0 R 0x8 > > NOTE 0x000288 0x0000000000000288 0x0000000000000288 > > 0x000074 0x000074 R 0x8 > > GNU_EH_FRAME 0x0008a4 0x00000000000008a4 0x00000000000008a4 > > 0x000000 0x000000 R E 0x1 > > this is wrong because the abi specifically says properties > are in PT_GNU_PROPERTY, not in PT_NOTE. > Right. The issue is more complex than this fix is meant for, to be honest. That is, it seems that there needs to be a generalized way of handling the different .note sections. -bw > so the original patch that removes them from notes is fine, > but ideally they should be readded under PT_GNU_PROPERTY. > > (x86 needs it there too, but also needs it under PT_NOTE for > historical reasons. ideally the section would have been named > other than .note and was not marked as SHF_NOTE, because > properties are merged completely differently by the linker > than notes, so now linkers have to special case it by section > name. properties should have been designed like the > .ARM.attributes section except that is not in a load segment > and thus has no runtime semantics while the key feature of > properties is the runtime semantics. however accessing the > program headers of the vdso is not trivial at runtime from > user code so dropping the properties might work too, but can > bite us in the future depending on how they evolve: the ld.so > can look at vdso program headers.)