From nobody Fri Nov 10 10:06:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SRZHQ3FX1z501M6; Fri, 10 Nov 2023 10:06:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SRZHQ2KNDz3Jpp; Fri, 10 Nov 2023 10:06:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699610818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aehq8A3QmxzETB7FrTfto6mHd0aMZzX16yUKPVchuyo=; b=oUizgEw6DHjhH1EZQr2EfMkphtM/Lcn9T1WaTBJBk67QHt5omUKLN0zsIsWhluIk+r6D6b V2B/a1K/E5ZqPNp+PL1GNGMwKzPfTwxjPnXurabxSkKT0JcK6a4xRrWVBCIwEmg8EeuBUs 3gZtoibFdUsY3yskSC+UxpSCh/bIkFcgVWN0jahrFYrTaM/AgIl/AjrhezuyP0tA59BO4D kVOuBuFsHEbtxz8njxPdp0aqJlqEtb8VUGh5/cq1MOYUQDupoGVnmuHJs+Zkja1rxUbevE 0dFKcwrnmoppM7NccDXhYrruYlqEmWJFSoe6Xzl8TJETI1PZUuvh9egZpkLXtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699610818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aehq8A3QmxzETB7FrTfto6mHd0aMZzX16yUKPVchuyo=; b=PhTftSjCkF7ihDAPxt8wA1SlW1acq5XhxHYHr/raT5KQk7wXU0EWtKyAVyBde690MVtigd YAceqQAHTipueZ2DKS7OaZCCwV6SY7ab8wxZV/JMP6mNIYOrCFdy5Vx5VSnAzMDKcbVNj/ HGYY4wtcNfjJeY9DrJAu/aJBYm8cgyFs4Q8r+MBGXOxHvJtZivYP668GBnzNBtRFMdr1KX /I8+7Vv3RhALRti9FiXsdkfUwirU/RTKkNj/71aICWYsvWWdrAKWZClw6Sd3aqt4d4l9n+ SzLeUMmf1a+ouP3XItAev1WXu/7YkP1Fovvjycszx9f3YaoGTvkraqBp0avW4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699610818; a=rsa-sha256; cv=none; b=ElgiTXtzzYAVWLOuqW6vltq/0TMokUF/UrHgDFCt0oxFHClYHHWvx83vYNnGPr2Mk9YQWF aNW1YVQZagTf+xf1pJkRgXFFTYj5BdLZFcfSEoIEn+inN+d8c6Tiho1w4LrimCwYd+QTOe PKhEk6tMzdZ3nqr3iscRWQC9v9Z/bAhkV/8VDpXi8oX9RRiEzW4FcqbAH4aMrlA/FpycFK 8LW8Mw8GuQofT+VT9AfMXovJIhJOgZaaYC6+yU6mta2XRcP+wGvpxrM7Q1KOp/Y7gMy3c0 w9BEe+ztLgAB6RIMMfXk12rYid0yar9B8VuoBycTSezU9zbziXkvnbjvBub10g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SRZHQ1NPlztkv; Fri, 10 Nov 2023 10:06:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AAA6w3R016714; Fri, 10 Nov 2023 10:06:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AAA6wcE016711; Fri, 10 Nov 2023 10:06:58 GMT (envelope-from git) Date: Fri, 10 Nov 2023 10:06:58 GMT Message-Id: <202311101006.3AAA6wcE016711@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a04633cef81e - main - imgact_elf: Export __elfN(parse_notes) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a04633cef81e3b29da4eb214331bd472fc2e9238 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a04633cef81e3b29da4eb214331bd472fc2e9238 commit a04633cef81e3b29da4eb214331bd472fc2e9238 Author: Andrew Turner AuthorDate: 2023-11-01 15:18:12 +0000 Commit: Andrew Turner CommitDate: 2023-11-10 09:57:45 +0000 imgact_elf: Export __elfN(parse_notes) This is useful to check if a note is present and contains an expected value, e.g. to read NT_GNU_PROPERTY_TYPE_0 on arm64 to see if we should enable BTI. Reviewed by: kib, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42439 --- sys/kern/imgact_elf.c | 2 +- sys/sys/imgact_elf.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index e03527f6a873..f361920e16d5 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2704,7 +2704,7 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) } } -static bool +bool __elfN(parse_notes)(struct image_params *imgp, Elf_Note *checknote, const char *note_vendor, const Elf_Phdr *pnote, bool (*cb)(const Elf_Note *, void *, bool *), void *cb_arg) diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 7210fc2187a9..51e149476a28 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -123,6 +123,9 @@ void __elfN(prepare_notes)(struct thread *, struct note_info_list *, void __elfN(size_segments)(struct thread *, struct sseg_closure *, int); size_t __elfN(register_note)(struct thread *, struct note_info_list *, int, outfunc_t, void *); +bool __elfN(parse_notes)(struct image_params *, Elf_Note *, const char *, + const Elf_Phdr *, bool (*)(const Elf_Note *, void *, bool *), + void *); /* Machine specific function to dump per-thread information. */ void __elfN(dump_thread)(struct thread *, void *, size_t *);