From nobody Thu May 04 19:34:18 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 4QC3sl1rskz49Rm2; Thu, 4 May 2023 19:34:19 +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 4QC3sl1LQXz4PZ4; Thu, 4 May 2023 19:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228859; 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=0OO9Uh+shcU2NSSHOZigJyTPVDCgRRS/z6y889OtUwI=; b=HNwO0EdR79m+11KQHxaZQlt0Lr4ua9yqU8mkWtrIwbEz+ZSaQhH+6C1lUPzLOzCIO+uKao radKVd+LZwVsRWL8Ui9WYOnJIGJkUkFEV24QPAfp+MkwCzMZRk6r7YDG4wnem78MCmPC6h J2mfQEMfbmpRkZKTnr93S9nt99+W3fjBUdF0od57nX60rI+kzllFhh3SMc1gwfE2qumZS1 jGROnmdc6b5YmDZlOG2pAfLewwT+8neahbtmjfcLCQ3pp+1W7anrTISlnhMwoJEKodHTSD fSdVyQpboxQemhQciYpd7DNfJzaCZMTKn5KhItf5JFzrAm8tY+XOXFV9ReK31w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228859; 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=0OO9Uh+shcU2NSSHOZigJyTPVDCgRRS/z6y889OtUwI=; b=nB51LJ3dHVBrdkknXSinxtd+KxlFTmvXjndG1c8plLsvkmShNNnkCMRZO11HEfQqZ8UZgu 4qWrMyJr+YvV/I7l5bnAPDIhwTYVm/qHtdVLEEFwYxhWY8wj8hrlaisQKwjnNtSdSi9e5k lTmyRq9vihHCGiRXcckPMaRZwWlZrko+HHLt31n6omfq+6Mbd6vRucu5lsmbBR8Fvm27yM q2Ycppn3VMOoEk0SvbAIzB8ejmtDJNOkNO4w5zHocfIqihmrKKB7O0WhzUlJG0qqWNYwaJ Y2CghRHxCo5phbYe+S2AYW9b9YtjQNIDT/u3x4JkkVK+FASWDUW3ZcUZ4DRlxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228859; a=rsa-sha256; cv=none; b=QTo/8UOC5qbVx8bAxeZ0EBSMj+c9shtAM2P7r6XYD2f3aiLZ+z7KnRdzWGqSx5RE1esdPQ aiso+Jtv8unqPb6kxYkVgRNi4D+znBmiVn/OC46YuzstmfJO6ZL9m9IzshyDyBv9GQac3N mLP+2fhPnd69+GJjkJfPy3OVSa7c/aev6lTS9+SSVBzt0qzejaxzNqiRYA6kIIucCRlRhD 7KxX+dn+ZIu3UF+EUUdbhd4Ozi7XnNcz8hGS6a9nW0CppKfE4hhA7KAvgJ2Az+k8O2okAe rCdtXeF9+NXX8rL6Wod9qjxiQueyFUedTcuf037ESKWj+FvaqBBpBzss/Kn7Ng== 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 4QC3sl0Q2lzPwn; Thu, 4 May 2023 19:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYIOY049296; Thu, 4 May 2023 19:34:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYIK8049295; Thu, 4 May 2023 19:34:18 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:18 GMT Message-Id: <202305041934.344JYIK8049295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 407f675718aa - main - imgact_elf: Change header_supported to return bool instead of boolean_t. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 407f675718aaf3dfed4795746b41c946ced47209 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=407f675718aaf3dfed4795746b41c946ced47209 commit 407f675718aaf3dfed4795746b41c946ced47209 Author: John Baldwin AuthorDate: 2023-05-04 19:29:29 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:29:29 +0000 imgact_elf: Change header_supported to return bool instead of boolean_t. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D39919 --- sys/amd64/amd64/elf_machdep.c | 10 +++++----- sys/arm/arm/elf_machdep.c | 8 ++++---- sys/arm64/arm64/elf32_machdep.c | 10 +++++----- sys/powerpc/powerpc/elf64_machdep.c | 8 ++++---- sys/sys/imgact_elf.h | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/elf_machdep.c b/sys/amd64/amd64/elf_machdep.c index 3dc606edc04d..afb30a1751b2 100644 --- a/sys/amd64/amd64/elf_machdep.c +++ b/sys/amd64/amd64/elf_machdep.c @@ -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 = { diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index 724b3437458e..3580d399ff56 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -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 diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 7b346ed81b2c..e57ae0e35fa1 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -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 diff --git a/sys/powerpc/powerpc/elf64_machdep.c b/sys/powerpc/powerpc/elf64_machdep.c index a247a2c51ad6..3d39ba40b898 100644 --- a/sys/powerpc/powerpc/elf64_machdep.c +++ b/sys/powerpc/powerpc/elf64_machdep.c @@ -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) { diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 6890df5c1500..21f52ccb6c05 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -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