Re: git: 884e1a00151d - main - imgact_elf: Pass program headers to the sv_protect hook

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 25 Nov 2026 15:33:27 UTC
On 11/25/26 10:20, Mark Johnston wrote:
> The branch main has been updated by markj:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=884e1a00151d181e5dd1ba9d83c1adcffd25e5e8
> 
> commit 884e1a00151d181e5dd1ba9d83c1adcffd25e5e8
> Author:     Mark Johnston <markj@FreeBSD.org>
> AuthorDate: 2026-11-25 15:17:44 +0000
> Commit:     Mark Johnston <markj@FreeBSD.org>
> CommitDate: 2026-11-25 15:17:44 +0000
> 
>      imgact_elf: Pass program headers to the sv_protect hook
>      
>      We handle program headers beyond the first page of the file, but
>      arm64_exec_protect() wasn't updated to handle this.  Pass the program
>      header array directly to the sv_protect hook.
>      
>      Also fix a pre-existing bug: imgp->et_dyn_addr isn't the right base
>      address to use for the SV_INTERP case.

Hmm, downstream in CheriBSD when we added program headers beyond the first page,
we changed affected sysent entries to pass a 'const Elf_Phdr *' instead of 'const
void *'.  I think there's no harm in getting a bit more type safety.

-- 
John Baldwin