From nobody Sat Jan 21 02:21:59 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 4NzKrB4dt1z2v0wM for ; Sat, 21 Jan 2023 02:22:02 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 4NzKrB31XXz4GlG for ; Sat, 21 Jan 2023 02:22:02 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f47.google.com with SMTP id m15so5336539wms.4 for ; Fri, 20 Jan 2023 18:22:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fa22s5uaCzPukrVsXGSLc/lGjcfjey/dzjBGJ2Wi9R4=; b=xTRVpD6DUJokpmDhbs0mnKQTZ+P/IFg8A8qiV5wITbxpXq1sTqLUVnhdRpJqwlGKLO IN9zW9qN7zINHv9w8alOEP1bWv6xqH0r/9XN7lYxJapLATiNs9x9Pa32yuMwl/WxRuTX rhR3EbqpCrHu4VNpzPtBIwiwzz3L+d2ojE5hBtx2FZzdagp7vrdXp/Xrtso9b3zcx9Y3 GPddtUfupuvxstmTgaS9BYgrMuXzpC82s5pQgu/bjFCdgKh362xYOqMWrblZSjtRNAdb tGoTQAHy4w7X2u8IwJI9N5dkUpA1CEtvQIRLn8OVh8/gri/6dBwgJ8Q5o6WXj786sTVu YLjw== X-Gm-Message-State: AFqh2krWV4M1jJFCMXsPzcS1+hnTlgP++80qTA3Qjm4IB2kV5dIG1Aee m3hRwOPdPIvRbioXBGQ37zIReg== X-Google-Smtp-Source: AMrXdXsJcGBjcPk+ejaDO3A8H8pvTbcoWMsMa7JgOR9B9vD6BLwrQoTLQrZbi9dXCUciDNCFAffjpw== X-Received: by 2002:a05:600c:1695:b0:3da:f502:83b5 with SMTP id k21-20020a05600c169500b003daf50283b5mr16413586wmn.2.1674267720719; Fri, 20 Jan 2023 18:22:00 -0800 (PST) Received: from smtpclient.apple (global-5-143.n-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id az41-20020a05600c602900b003dab77aa911sm3952701wmb.23.2023.01.20.18.22.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2023 18:22:00 -0800 (PST) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 34784d17eb2b - main - elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h From: Jessica Clarke In-Reply-To: <202301210220.30L2KBQv006863@gitrepo.freebsd.org> Date: Sat, 21 Jan 2023 02:21:59 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202301210220.30L2KBQv006863@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4NzKrB31XXz4GlG X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 21 Jan 2023, at 02:20, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D34784d17eb2bcdcfaee39f570bff613b= 4055912d >=20 > commit 34784d17eb2bcdcfaee39f570bff613b4055912d > Author: Warner Losh > AuthorDate: 2023-01-21 02:15:52 +0000 > Commit: Warner Losh > CommitDate: 2023-01-21 02:18:15 +0000 >=20 > elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h >=20 > 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. >=20 > 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(-) >=20 > 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 >=20 > /* 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? Jess > -#define EF_ARM_EABI_FREEBSD_MIN 4 > +#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 >=20 > #define ET_DYN_LOAD_ADDR 0x01001000 >=20 > 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); >=20 > -#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 =3D (const Elf32_Ehdr *)imgp->image_header; > if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) = { > if (bootverbose)