imgact_elf: Change header_supported to return bool instead of boolean_t.

Reviewed by:	imp, kib, emaste
Differential Revision:	https://reviews.freebsd.org/D39919
This commit is contained in:
John Baldwin 2023-05-04 12:29:29 -07:00
parent b75d7e2cbe
commit 407f675718
5 changed files with 19 additions and 19 deletions

View File

@ -167,17 +167,17 @@ amd64_lower_shared_page(struct sysentvec *sv)
}
}
static boolean_t
static bool
freebsd_brand_info_la57_img_compat(struct image_params *imgp,
int32_t *osrel __unused, uint32_t *fctl0)
{
if ((imgp->proc->p_md.md_flags & P_MD_LA57) != 0)
return (TRUE);
return (true);
if (fctl0 == NULL || (*fctl0 & NT_FREEBSD_FCTL_LA48) != 0)
return (FALSE);
return (false);
if ((imgp->proc->p_md.md_flags & P_MD_LA48) != 0)
return (FALSE);
return (TRUE);
return (false);
return (true);
}
static Elf64_Brandinfo freebsd_brand_info_la48 = {

View File

@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
#include "opt_global.h" /* for OPT_KDTRACE_HOOKS */
#include "opt_stack.h" /* for OPT_STACK */
static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *,
static bool elf32_arm_abi_supported(struct image_params *, int32_t *,
uint32_t *);
u_long elf_hwcap;
@ -125,7 +125,7 @@ SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
(sysinit_cfunc_t) elf32_insert_brand_entry,
&freebsd_brand_info);
static boolean_t
static bool
elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused,
uint32_t *fctl0 __unused)
{
@ -138,9 +138,9 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused,
if (bootverbose)
uprintf("Attempting to execute non EABI binary (rev %d) image %s",
EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname);
return (FALSE);
return (false);
}
return (TRUE);
return (true);
}
void

View File

@ -74,7 +74,7 @@ static void freebsd32_setregs(struct thread *td, struct image_params *imgp,
u_long stack);
static void freebsd32_set_syscall_retval(struct thread *, int);
static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *,
static bool elf32_arm_abi_supported(struct image_params *, int32_t *,
uint32_t *);
extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask);
@ -142,7 +142,7 @@ static Elf32_Brandinfo freebsd32_brand_info = {
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
(sysinit_cfunc_t)elf32_insert_brand_entry, &freebsd32_brand_info);
static boolean_t
static bool
elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused,
uint32_t *fctl0 __unused)
{
@ -151,7 +151,7 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused,
/* Check if we support AArch32 */
if (ID_AA64PFR0_EL0_VAL(READ_SPECIALREG(id_aa64pfr0_el1)) !=
ID_AA64PFR0_EL0_64_32)
return (FALSE);
return (false);
#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4
hdr = (const Elf32_Ehdr *)imgp->image_header;
@ -161,10 +161,10 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused,
"(rev %d) image %s",
EF_ARM_EABI_VERSION(hdr->e_flags),
imgp->args->fname);
return (FALSE);
return (false);
}
return (TRUE);
return (true);
}
static int

View File

@ -149,9 +149,9 @@ struct sysentvec elf64_freebsd_sysvec_v2 = {
.sv_regset_end = SET_LIMIT(__elfN(regset)),
};
static boolean_t ppc64_elfv1_header_match(struct image_params *params,
static bool ppc64_elfv1_header_match(struct image_params *params,
int32_t *, uint32_t *);
static boolean_t ppc64_elfv2_header_match(struct image_params *params,
static bool ppc64_elfv2_header_match(struct image_params *params,
int32_t *, uint32_t *);
static Elf64_Brandinfo freebsd_brand_info_elfv1 = {
@ -227,7 +227,7 @@ ppc64_init_sysvecs(void *arg)
}
SYSINIT(elf64_sysvec, SI_SUB_EXEC, SI_ORDER_ANY, ppc64_init_sysvecs, NULL);
static boolean_t
static bool
ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused,
uint32_t *fctl0 __unused)
{
@ -237,7 +237,7 @@ ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused,
return (abi == 0 || abi == 1);
}
static boolean_t
static bool
ppc64_elfv2_header_match(struct image_params *params, int32_t *osrel __unused,
uint32_t *fctl0 __unused)
{

View File

@ -89,7 +89,7 @@ typedef struct {
const char *interp_newpath;
int flags;
Elf_Brandnote *brand_note;
boolean_t (*header_supported)(struct image_params *,
bool (*header_supported)(struct image_params *,
int32_t *, uint32_t *);
/* High 8 bits of flags is private to the ABI */
#define BI_CAN_EXEC_DYN 0x0001