From nobody Sat Jan 21 02:27:40 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 4NzKyx0WfJz2v1FL for ; Sat, 21 Jan 2023 02:27:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzKyw49ywz4HCD for ; Sat, 21 Jan 2023 02:27:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62d.google.com with SMTP id v6so18317693ejg.6 for ; Fri, 20 Jan 2023 18:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IpG7zkG9Kpcv2CsHPJTi1g8vc3hDj4S9+r7HB/weC5c=; b=YFUI1wT6mwpTDFrCrTaP2DwPD19HULfVQWvtTP7Ue00zlZV4v39weyycvfP4IjhNLr i7FnbFaMpBJeJrZOfO+Q9FV/eSZuObWE47Bt6aQe8hXNnY5Ih4fvdW/eVifSO8b+D3XY gGw7SCfuCeIsAkcNSeOlfo++3oYzBxcc7MM7+ZH0c94I26jNCszw+V0ANuKY9ZDp4sMs K4xZv7cyZfSsM075TgAEgEpPvdE+YkvUhg6hCNkkfkZGStAyZBDejSjp5SptNks9/e2B I0chdDZHpGioakgW3N2GcrnIZ4z4iRumh9eRiYVNfG3ff5h+HRvet7ietZiH+9CeDV+x jc6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IpG7zkG9Kpcv2CsHPJTi1g8vc3hDj4S9+r7HB/weC5c=; b=oiI6VaVuU75iaqBK/rDu9diGdKiwFsFOp1pKz0sFBD1MnADPRbjILEVQJD/Cp8drG0 RTOdENMsq/2vG+ht6qn1ceuEFPsEbaFDvR42VZdN0PgdBKaZpFH0PFtTbNJRkF5H6NiG dEBbi3txW2qAlQvXsQ+5SwrNyrF6X9TE5dQB3IOTKuEY3QMIqcpx5D5BosP+ZaWtNhAK 25GYRZLuNgeq9hs5mb8rdosCSm9f23zpNU6tkP+Ah6BvGAK28+T8t8Gno8DWi1nAg420 laCzPbs2Mq2b/FIJd7jX1GTLSAPNzyfeQL/vAp/2/X8UOxJ2TnoJc/oqvlGvWHNssyMO BW7w== X-Gm-Message-State: AFqh2koVP6qQgL1vtL3VNju8jbMBwDvEE4ZNeSjbIZ3j8fcBMbN2GHgv icm/A7t0RE24SnHpg6x9cjjKzPUPRv0ITm9sZlGY0A== X-Google-Smtp-Source: AMrXdXviWer7M3rueLZrsxei6coCjPGo/MNadvrihM2DG6WqsUT/8HePXvlR8XpVlZl0DjgptZuvLrdhIdot5orHAgI= X-Received: by 2002:a17:906:961a:b0:872:8cb:3d87 with SMTP id s26-20020a170906961a00b0087208cb3d87mr1675655ejx.350.1674268071293; Fri, 20 Jan 2023 18:27:51 -0800 (PST) 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 References: <202301210220.30L2KBQv006863@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 20 Jan 2023 19:27:40 -0700 Message-ID: Subject: Re: git: 34784d17eb2b - main - elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h To: Jessica Clarke Cc: Warner Losh , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000a608e705f2bce91e" X-Rspamd-Queue-Id: 4NzKyw49ywz4HCD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000a608e705f2bce91e Content-Type: text/plain; charset="UTF-8" On Fri, Jan 20, 2023 at 7:22 PM Jessica Clarke wrote: > On 21 Jan 2023, at 02:20, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=34784d17eb2bcdcfaee39f570bff613b4055912d > > > > commit 34784d17eb2bcdcfaee39f570bff613b4055912d > > Author: Warner Losh > > AuthorDate: 2023-01-21 02:15:52 +0000 > > Commit: Warner Losh > > CommitDate: 2023-01-21 02:18:15 +0000 > > > > elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h > > > > FreeBSD defines EF_ARM_EABI_VERSION in a non-standard way (at least > > differently than everybody else). We use this only in elf*machdep.c to > > make sure the image is new enough. Switch to the more standard way of > > defining this and adjust other constants to match. > > > > Fixes: c52c98e69a2e > > Sponsored by: Netflix > > --- > > sys/arm/include/elf.h | 3 +-- > > sys/arm64/arm64/elf32_machdep.c | 3 +-- > > 2 files changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h > > index 35d0fa55ca1a..2ea60e8f10ee 100644 > > --- a/sys/arm/include/elf.h > > +++ b/sys/arm/include/elf.h > > @@ -74,9 +74,8 @@ __ElfType(Auxinfo); > > #define ELF_TARG_VER 1 > > > > /* Defines specific for arm headers */ > > -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) > > #define EF_ARM_EABI_VERSION_UNKNOWN 0 > > Can also use EF_ARM_EABI_UNKNOWN in its place? > I'm not sure I understand the question... In what's place? Warner > Jess > > > -#define EF_ARM_EABI_FREEBSD_MIN 4 > > +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 > > > > #define ET_DYN_LOAD_ADDR 0x01001000 > > > > diff --git a/sys/arm64/arm64/elf32_machdep.c > b/sys/arm64/arm64/elf32_machdep.c > > index f637c5a65c05..627973ecfd3d 100644 > > --- a/sys/arm64/arm64/elf32_machdep.c > > +++ b/sys/arm64/arm64/elf32_machdep.c > > @@ -152,8 +152,7 @@ elf32_arm_abi_supported(struct image_params *imgp, > int32_t *osrel __unused, > > ID_AA64PFR0_EL0_64_32) > > return (FALSE); > > > > -#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) > > -#define EF_ARM_EABI_FREEBSD_MIN 4 > > +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 > > hdr = (const Elf32_Ehdr *)imgp->image_header; > > if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) { > > if (bootverbose) > > --000000000000a608e705f2bce91e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Jan 20, 2023 at 7:22 PM Jessi= ca Clarke <jrtc27@freebsd.org&= gt; wrote:
On 21= Jan 2023, at 02:20, Warner Losh <imp@FreeBSD.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D34784d17eb2bcdcfaee39f570bff613b4055912d<= /a>
>
> commit 34784d17eb2bcdcfaee39f570bff613b4055912d
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2023-01-21 02:15:52 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2023-01-21 02:18:15 +0000
>
>=C2=A0 =C2=A0 elf: Catch up with defining EF_ARM_EABI_VERSION in elf_co= mmon.h
>
>=C2=A0 =C2=A0 FreeBSD defines EF_ARM_EABI_VERSION in a non-standard way= (at least
>=C2=A0 =C2=A0 differently than everybody else). We use this only in elf= *machdep.c to
>=C2=A0 =C2=A0 make sure the image is new enough. Switch to the more sta= ndard way of
>=C2=A0 =C2=A0 defining this and adjust other constants to match.
>
>=C2=A0 =C2=A0 Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 c52c98e69a2e
>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Net= flix
> ---
> sys/arm/include/elf.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| 3 +--<= br> > sys/arm64/arm64/elf32_machdep.c | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h
> index 35d0fa55ca1a..2ea60e8f10ee 100644
> --- a/sys/arm/include/elf.h
> +++ b/sys/arm/include/elf.h
> @@ -74,9 +74,8 @@ __ElfType(Auxinfo);
> #define=C2=A0 =C2=A0 =C2=A0 =C2=A0ELF_TARG_VER=C2=A0 =C2=A0 1
>
> /* Defines specific for arm headers */
> -#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_VERSION(x) (((x) & EF_ARM= _EABIMASK) >> 24)
> #define=C2=A0 =C2=A0 =C2=A0 =C2=A0EF_ARM_EABI_VERSION_UNKNOWN 0

Can also use EF_ARM_EABI_UNKNOWN in its place?

I'm not sure I understand the question...=C2=A0=C2=A0 In what&#= 39;s place?

Warner
=C2=A0
Jess

> -#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_FREEBSD_MIN 4
> +#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4<= br> >
> #define=C2=A0 =C2=A0 =C2=A0 =C2=A0ET_DYN_LOAD_ADDR 0x01001000
>
> diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_m= achdep.c
> index f637c5a65c05..627973ecfd3d 100644
> --- a/sys/arm64/arm64/elf32_machdep.c
> +++ b/sys/arm64/arm64/elf32_machdep.c
> @@ -152,8 +152,7 @@ elf32_arm_abi_supported(struct image_params *imgp,= int32_t *osrel __unused,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ID_AA64PFR0_EL0_64_32)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (FALSE);<= br> >
> -#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_VERSION(x)=C2=A0 (((x) & = EF_ARM_EABIMASK) >> 24)
> -#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_FREEBSD_MIN 4
> +#define=C2=A0 =C2=A0 =C2=A0 EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0hdr =3D (const Elf32_Ehdr *)imgp->image_h= eader;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0if (EF_ARM_EABI_VERSION(hdr->e_flags) <= ; EF_ARM_EABI_FREEBSD_MIN) {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (bootverbose)=

--000000000000a608e705f2bce91e--