From nobody Sun Jul 23 22:48:00 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 4R8JNc6MWMz4pbJF for ; Sun, 23 Jul 2023 22:48:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.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 4R8JNc4fMCz4Q9m for ; Sun, 23 Jul 2023 22:48:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-31438512cafso3304073f8f.2 for ; Sun, 23 Jul 2023 15:48:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690152495; x=1690757295; 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=mRLWaA2EVwGIBoGRm2/BjN+smyBDDAwXshotycUgbt8=; b=Q0xk8lp4g6IooeSRK2SvVcsJO++KQAMYCdZz36OVkO3vLvg55VT6Yvqup6KE/5HcYN D4v9rQl0bZ+FoRjGQ3DcMrzRHl1Mna8IGGRog9BaowZJzJElEoaDMDhKlrXUWLTQw93c /4bFlLDd5qoVg4u/qE8ra7xOKGGdTUEqsgy4aJr5XMyERgwmdr43VMC7bGse9Aoq5NVx 6YGaLWiVafHxnja/wsF3yzBCPBg71xNmC+A5ma47fSo/oUSZy2chBlFOvk9MxUUnoJe3 CRfkrLBtXy4nE3U5tpUoO/zLvA81xU1HVbYTUEZ8+MEVLd9BMpW39WxcPcIk1G+QBgpi VwrQ== X-Gm-Message-State: ABy/qLaiIH3IYFRoRvQgAHmIS32xRq1cwIei4aFW9y4YdIpcTRakNjjd CAsqE8ykjfsJLvegiv0CLwOaLw== X-Google-Smtp-Source: APBJJlEdxvSQiGEYwVsAU2yuyCabvghaNXREqShfm4wMNE1yJ6HqsgNk1yfdgv8LTlr8SLFkEXTiXw== X-Received: by 2002:a05:6000:c:b0:317:ef6:89a7 with SMTP id h12-20020a056000000c00b003170ef689a7mr6230062wrx.27.1690152494644; Sun, 23 Jul 2023 15:48:14 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id l7-20020a05600012c700b0031755da6a8asm3570921wrx.33.2023.07.23.15.48.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Jul 2023 15:48:14 -0700 (PDT) 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 \(3731.600.7\)) Subject: Re: git: 80e4ac2964a1 - main - Work around VNET and DPCPU related panics on aarch64 From: Jessica Clarke In-Reply-To: <202307232238.36NMcBxN074108@gitrepo.freebsd.org> Date: Sun, 23 Jul 2023 23:48:00 +0100 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: <202307232238.36NMcBxN074108@gitrepo.freebsd.org> To: Dimitry Andric X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4R8JNc4fMCz4Q9m 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 On 23 Jul 2023, at 23:38, Dimitry Andric wrote: >=20 > The branch main has been updated by dim: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D80e4ac2964a11edef456a15b77e43aad= eaf273a2 >=20 > commit 80e4ac2964a11edef456a15b77e43aadeaf273a2 > Author: Dimitry Andric > AuthorDate: 2023-07-23 13:48:36 +0000 > Commit: Dimitry Andric > CommitDate: 2023-07-23 22:35:04 +0000 >=20 > Work around VNET and DPCPU related panics on aarch64 >=20 > lld >=3D 14 and recent GNU ld can relax adrp+add and adrp+ldr > instructions, which breaks VNET and DPCPU when used in modules. Thanks for committing the workaround. This will need some kind of EN for 13.2 given LLVM 14 was merged in time for that and arm64 is a Tier 1 architecture in 13. There perhaps also needs to be some serious thought into our testing and release procedures given we allowed a Tier 1 architecture to have VNET and DPCU be totally broken in a point release for any kernel module. Especially when the bug was known, open against -CURRENT and triaged all before the MFC to stable/13; there needs to be better tracking of toolchain release blockers. Jess > Until VNET and DPCPU can be fixed to deal with these relaxed > instructions, disable linker relaxation for now. >=20 > PR: 264094 > Reviewed by: markj > MFC after: 3 days > Differential Revision: https://reviews.freebsd.org/D41156 > --- > sys/conf/kmod.mk | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk > index a83d64eb8bf7..be571c2bcf10 100644 > --- a/sys/conf/kmod.mk > +++ b/sys/conf/kmod.mk > @@ -170,6 +170,13 @@ CFLAGS+=3D -fno-omit-frame-pointer = -mno-omit-leaf-frame-pointer > CFLAGS+=3D -fPIC > .endif >=20 > +.if ${MACHINE_CPUARCH} =3D=3D "aarch64" > +# https://bugs.freebsd.org/264094 > +# lld >=3D 14 and recent GNU ld can relax adrp+add and adrp+ldr = instructions, > +# which breaks VNET. > +LDFLAGS+=3D --no-relax > +.endif > + > # Temporary workaround for PR 196407, which contains the fascinating = details. > # Don't allow clang to use fpu instructions or registers in kernel = modules. > .if ${MACHINE_CPUARCH} =3D=3D arm