mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-28 20:11:00 +01:00
imgact_elf: Add const to the header_supported callback arguments
This callback shouldn't be modifying any of the arguments. Reviewed by: imp, kib, emaste, jhb Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D44193
This commit is contained in:
parent
83550d02fe
commit
327ada0b0e
@ -165,8 +165,8 @@ amd64_lower_shared_page(struct sysentvec *sv)
|
||||
}
|
||||
|
||||
static bool
|
||||
freebsd_brand_info_la57_img_compat(struct image_params *imgp,
|
||||
int32_t *osrel __unused, uint32_t *fctl0)
|
||||
freebsd_brand_info_la57_img_compat(const struct image_params *imgp,
|
||||
const int32_t *osrel __unused, const uint32_t *fctl0)
|
||||
{
|
||||
if ((imgp->proc->p_md.md_flags & P_MD_LA57) != 0)
|
||||
return (true);
|
||||
|
@ -54,8 +54,8 @@
|
||||
#include "opt_global.h" /* for OPT_KDTRACE_HOOKS */
|
||||
#include "opt_stack.h" /* for OPT_STACK */
|
||||
|
||||
static bool elf32_arm_abi_supported(struct image_params *, int32_t *,
|
||||
uint32_t *);
|
||||
static bool elf32_arm_abi_supported(const struct image_params *,
|
||||
const int32_t *, const uint32_t *);
|
||||
|
||||
u_long elf_hwcap;
|
||||
u_long elf_hwcap2;
|
||||
@ -121,8 +121,8 @@ SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
|
||||
&freebsd_brand_info);
|
||||
|
||||
static bool
|
||||
elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused,
|
||||
uint32_t *fctl0 __unused)
|
||||
elf32_arm_abi_supported(const struct image_params *imgp,
|
||||
const int32_t *osrel __unused, const uint32_t *fctl0 __unused)
|
||||
{
|
||||
const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header;
|
||||
|
||||
|
@ -76,8 +76,8 @@ static void freebsd32_setregs(struct thread *td, struct image_params *imgp,
|
||||
u_long stack);
|
||||
static void freebsd32_set_syscall_retval(struct thread *, int);
|
||||
|
||||
static bool elf32_arm_abi_supported(struct image_params *, int32_t *,
|
||||
uint32_t *);
|
||||
static bool elf32_arm_abi_supported(const struct image_params *,
|
||||
const int32_t *, const uint32_t *);
|
||||
static void elf32_fixlimit(struct rlimit *rl, int which);
|
||||
|
||||
extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask);
|
||||
@ -167,8 +167,8 @@ register_elf32_brand(void *arg)
|
||||
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, register_elf32_brand, NULL);
|
||||
|
||||
static bool
|
||||
elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused,
|
||||
uint32_t *fctl0 __unused)
|
||||
elf32_arm_abi_supported(const struct image_params *imgp,
|
||||
const int32_t *osrel __unused, const uint32_t *fctl0 __unused)
|
||||
{
|
||||
const Elf32_Ehdr *hdr;
|
||||
|
||||
|
@ -145,10 +145,10 @@ struct sysentvec elf64_freebsd_sysvec_v2 = {
|
||||
.sv_regset_end = SET_LIMIT(__elfN(regset)),
|
||||
};
|
||||
|
||||
static bool ppc64_elfv1_header_match(struct image_params *params,
|
||||
int32_t *, uint32_t *);
|
||||
static bool ppc64_elfv2_header_match(struct image_params *params,
|
||||
int32_t *, uint32_t *);
|
||||
static bool ppc64_elfv1_header_match(const struct image_params *params,
|
||||
const int32_t *, const uint32_t *);
|
||||
static bool ppc64_elfv2_header_match(const struct image_params *params,
|
||||
const int32_t *, const uint32_t *);
|
||||
|
||||
static Elf64_Brandinfo freebsd_brand_info_elfv1 = {
|
||||
.brand = ELFOSABI_FREEBSD,
|
||||
@ -221,8 +221,8 @@ ppc64_init_sysvecs(void *arg)
|
||||
SYSINIT(elf64_sysvec, SI_SUB_EXEC, SI_ORDER_ANY, ppc64_init_sysvecs, NULL);
|
||||
|
||||
static bool
|
||||
ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused,
|
||||
uint32_t *fctl0 __unused)
|
||||
ppc64_elfv1_header_match(const struct image_params *params,
|
||||
const int32_t *osrel __unused, const uint32_t *fctl0 __unused)
|
||||
{
|
||||
const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header;
|
||||
int abi = (hdr->e_flags & 3);
|
||||
@ -231,8 +231,8 @@ ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused,
|
||||
}
|
||||
|
||||
static bool
|
||||
ppc64_elfv2_header_match(struct image_params *params, int32_t *osrel __unused,
|
||||
uint32_t *fctl0 __unused)
|
||||
ppc64_elfv2_header_match(const struct image_params *params,
|
||||
const int32_t *osrel __unused, const uint32_t *fctl0 __unused)
|
||||
{
|
||||
const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header;
|
||||
int abi = (hdr->e_flags & 3);
|
||||
|
@ -86,8 +86,8 @@ typedef struct {
|
||||
const char *interp_newpath;
|
||||
int flags;
|
||||
Elf_Brandnote *brand_note;
|
||||
bool (*header_supported)(struct image_params *,
|
||||
int32_t *, uint32_t *);
|
||||
bool (*header_supported)(const struct image_params *,
|
||||
const int32_t *, const uint32_t *);
|
||||
/* High 8 bits of flags is private to the ABI */
|
||||
#define BI_CAN_EXEC_DYN 0x0001
|
||||
#define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */
|
||||
|
Loading…
Reference in New Issue
Block a user