From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: Bill Wendling <morbo@google.com>
Cc: Mark Brown <broonie@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Kees Cook <keescook@google.com>, Ard Biesheuvel <ardb@kernel.org>,
Will Deacon <will@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-arm-kernel@lists.infradead.org,
Daniel Kiss <Daniel.Kiss@arm.com>
Subject: Re: [PATCH] arm64/vdso: Discard .note.gnu.property sections in vDSO
Date: Fri, 30 Apr 2021 09:16:33 +0100 [thread overview]
Message-ID: <20210430081632.GS9028@arm.com> (raw)
In-Reply-To: <CAGG=3QW9t2zUPYLt_La=qQTZeHzfLBCXgZRbiia8T6K7n=YrdQ@mail.gmail.com>
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.
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.)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-04-30 8:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 20:51 [PATCH] arm64/vdso: Discard .note.gnu.property sections in vDSO Bill Wendling
2021-04-27 22:58 ` Kees Cook
2021-04-28 8:51 ` Ard Biesheuvel
2021-04-28 17:28 ` Catalin Marinas
2021-04-28 17:40 ` Mark Brown
2021-04-28 19:21 ` Bill Wendling
2021-04-28 19:31 ` Bill Wendling
2021-04-29 7:54 ` Szabolcs Nagy
2021-04-29 9:23 ` Bill Wendling
2021-04-29 9:50 ` Szabolcs Nagy
2021-04-29 18:52 ` Bill Wendling
2021-04-30 8:16 ` Szabolcs Nagy [this message]
2021-04-30 8:29 ` Bill Wendling
2021-04-30 17:57 ` Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210430081632.GS9028@arm.com \
--to=szabolcs.nagy@arm.com \
--cc=Daniel.Kiss@arm.com \
--cc=ardb@kernel.org \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=keescook@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=morbo@google.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).