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 X-Spam-Level: X-Spam-Status: No, score=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E0DFC433B4 for ; Wed, 28 Apr 2021 08:53:41 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B321761154 for ; Wed, 28 Apr 2021 08:53:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B321761154 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9AIGBlAxo/jd80U36NaiqWCtISxxXhmuHkqJ+g8R624=; b=XVc65yMrVg3w1V/LdsNjyA6Qx 44J27inOTfG3AwpsLHJCAgh9NRtHABcdgpoAlNthviZGR98v/4trfcoyAYbEAABkvJet4t3tjd27u uEcTL9NRWTTZWeMqrL2DQ/fIGGpzGIinXfQENY2AYF0E8IcrSGzVrXQWPGNYSsS4mIdzPmWdYD2+s 52dnK4S7nm/8Ct3mr3JaUU2JW2j9PNUmD3FHo+wtA5qzLGfsvIj5+KHY7OqwEIp631rXMVFcDp5OW 2hqHYIpLY5/B+rYl/3NQ6wkYWy7PfJ1x57w9JNN9BtzMen89Adu6bzSq+udzUngt1SAMCVio64/BX E80IwuMYw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbfvJ-003A1Q-FG; Wed, 28 Apr 2021 08:51:57 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbfvG-003A1G-1K for linux-arm-kernel@desiato.infradead.org; Wed, 28 Apr 2021 08:51:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=tVN9f9JUXKLjcXiALvY3oz9EgauDC1lk0x0jH21ydLQ=; b=j1GozGVpSl3qQLDtsO1uEr8Tol 3Wk3RBT+OkvzdcA8PhR5mvRR7zaoVPC5OI6NAMCRys+DdUkHwfUhijc/WpF1aKo2WBe+JeroK+/aQ H7CoK5Irh8JE1OzP7chRyq4mA+wAEGKe/D0mda/Ftee+gJdexS6njsLcDieR6gD1g7TzAmwITNL/H 5oesDLYzskl5hfx2jY0CNhD1enwvxVyuQkkkc++lmHnw307De8dC8yNJwQOMSMaRq5oZ++zCukNd3 yPQf/OxPSOYTIaoitA9rTYh1nnMOgKr4FHbD5IQnimioN7tl2/LDfUxCDf7K341paypoRwE0qWeKJ BzoqVPmQ==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbfvD-00HIR4-HZ for linux-arm-kernel@lists.infradead.org; Wed, 28 Apr 2021 08:51:52 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id DE1746141F for ; Wed, 28 Apr 2021 08:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619599910; bh=DwC5HXGO+SMcxoToQXvRD9FRL1XMAMGE30AHfo+wM5w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TAs9plRb6NQSmWN05MVLB1ZoXs3NdyjMcxsnCi7PJ154aKb1fBLlVuoNgTg/g9ts3 vsyYfgxButiqJU+vrITsNfIIeqmb9dudGijLTro3DoFUmb+a4DCJqfG0y/zgM8EUYb vehaJMYRWdtC9zQhH9CMxbioP93Fj0z8DDxYjNQw/q+hl2P1Uaf5E+UoTG5Kzr/X5W GKOUIwPiqtLyv486Oddz5/44uAPW2dEDBtGP+/OfMpTEC4JiXxXoGbaKYNjjEDWGyw mgldd94fD08PnEfvzhzSGpu3ulZp2MlhqMEkGwKWanG4QbmmgUc3qS13tHbrt42JZP ql40+rbc6NVtg== Received: by mail-ot1-f42.google.com with SMTP id f75-20020a9d03d10000b0290280def9ab76so52644656otf.12 for ; Wed, 28 Apr 2021 01:51:50 -0700 (PDT) X-Gm-Message-State: AOAM533ThwSWDj0unjsxmEDnWJtr6Kf1mswLX7w5vtJ9UV2MlETgm8c0 Na3JuYqnEXXTKMNgG8h2Z/H0QNKwz1s+CAqo3Eo= X-Google-Smtp-Source: ABdhPJzQdhdfR7hl9GS/+BN8nNAkCne6d9vHOW2kGmVMdLhDbOmWhIDAR0Hrl+u9Om22RRH9wejf0vcOt8LdWD122hg= X-Received: by 2002:a9d:311:: with SMTP id 17mr22887790otv.77.1619599910047; Wed, 28 Apr 2021 01:51:50 -0700 (PDT) MIME-Version: 1.0 References: <20210423205159.830854-1-morbo@google.com> <202104271557.412DD365A@keescook> In-Reply-To: <202104271557.412DD365A@keescook> From: Ard Biesheuvel Date: Wed, 28 Apr 2021 10:51:38 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64/vdso: Discard .note.gnu.property sections in vDSO To: Kees Cook Cc: Bill Wendling , Catalin Marinas , Will Deacon , Linux Kernel Mailing List , Linux ARM X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210428_015151_642452_8BFA450D X-CRM114-Status: GOOD ( 18.72 ) 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, 28 Apr 2021 at 00:58, Kees Cook wrote: > > On Fri, Apr 23, 2021 at 01:51:59PM -0700, Bill Wendling wrote: > > The arm64 assembler in binutils 2.32 and above generates a program > > property note in a note section, .note.gnu.property, to encode used x86 > > ISAs and features. But the kernel linker script only contains a single > > NOTE segment: > > > > PHDRS > > { > > text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */ > > dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ > > note PT_NOTE FLAGS(4); /* PF_R */ > > } > > > > The NOTE segment generated by the vDSO linker script is aligned to 4 bytes. > > But the .note.gnu.property section must be aligned to 8 bytes on arm64. > > > > $ readelf -n vdso64.so > > > > Displaying notes found in: .note > > Owner Data size Description > > Linux 0x00000004 Unknown note type: (0x00000000) > > description data: 06 00 00 00 > > readelf: Warning: note with invalid namesz and/or descsz found at offset 0x20 > > readelf: Warning: type: 0x78, namesize: 0x00000100, descsize: 0x756e694c, alignment: 8 > > > > 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. > > > > Similar to commit 4caffe6a28d31 ("x86/vdso: Discard .note.gnu.property > > sections in vDSO"), but for arm64. > > > > Signed-off-by: Bill Wendling > > Seems good to me. If we ever need the BTI markings, etc, for the vDSO, > we can revisit it then. > > Reviewed-by: Kees Cook > Acked-by: Ard Biesheuvel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel