]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lib/buildid: don't limit .note.gnu.build-id to the first page in ELF
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 29 Aug 2024 17:42:29 +0000 (10:42 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 11 Sep 2024 16:58:31 +0000 (09:58 -0700)
commitcdbb44f9a74fe7d01090ae492672e89cf7d83ce5
treea3ed9c4a830d035269c1a187a8bef08d262b5341
parentad41251c290dfe3c01472c94d2439a59de23fe97
lib/buildid: don't limit .note.gnu.build-id to the first page in ELF

With freader we don't need to restrict ourselves to a single page, so
let's allow ELF notes to be at any valid position with the file.

We also merge parse_build_id() and parse_build_id_buf() as now the only
difference between them is note offset overflow, which makes sense to
check in all situations.

Reviewed-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240829174232.3133883-8-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
lib/buildid.c