From nobody Wed Jul 26 18:06:24 2023 X-Original-To: dev-commits-src-branches@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 4RB20065jxz4pgRk; Wed, 26 Jul 2023 18:06:24 +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 4RB2005GSjz3sHG; Wed, 26 Jul 2023 18:06:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690394784; 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=bv2GqflWqlrYqzeuG07Vs/m6rdpxIlVTbTW5xelKE1I=; b=aYG7U6pFnpJL/BvPSmyo/IFLsUoaUfwGllEEAc5bCJsemoic2kedpL/iQZJ+FblUtklMCI oF5Jry9Ak8aYGkT9q2/Sqe2RecPnyh+ritSit1yvEXwPhU582SyBfGT/yNxTleD+pA65N1 KyQP0e08vmye6hxGAu39oc3vMVMK/6NyTRSRDRaiiJ+q11md2w+nw6ZWK323jHI67lp+nA xKSwS39dJRrU8jBoXgk/5E9ZgdS7tWaL0p7qgFW1eIvlgVWRXq7WTJXQIqX8bSKO6xvWZc 5OV894Q0DDuo/4pMS9w4byCOQ0YAdWgUB+4IBE2+cOJlxr28GNqQyo5mMzS0UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690394784; 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=bv2GqflWqlrYqzeuG07Vs/m6rdpxIlVTbTW5xelKE1I=; b=HfS//0/WYqt74W4Bz38DinDinqNBClEyhhOuDS31oSy+vN2Y0pSLEpw7j0SbVRLHGFRhTa SK7o0shRzIAx09vOmuxd8a7k/GrQ05CI38KjYZlHwRE7FJGJD4eTUfqfdQJMRC8aW87zl8 8o5QO5LjKt0EhRl/4ARNzp5RP6j5AWfHduN2u4VSERB9MDKVuWMqKIa0ZFE4QBzOKZsuZW nC8og0DUH6myqkAmT5Fbazy62E/xIwL3hH3YxuTm8VbPs53kv8Zifr7lqZChe8LTqMyRXq dMsEXKvHC1iuoaRke5mHjv2qM1YBjgyvL4lMcs1APpf8SWW8cQxwf/WwMtXOKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690394784; a=rsa-sha256; cv=none; b=ulM5AIUYOfCaKEffHCW9fRUZLbswrp43s+LzFOwAHwWhM72Np5vD0ORCTs5W7HLSEr40xm 5zBMb27XlHcHooDu4bXbZmRI011azWvJu8BtiKpJCslZ7LLDvhz6lzNW/dJhlXdhzjumCA XWOqsIQ25+56uUpi+cWIEizrZidm8xuRUn/zZ+vyVU4B4f20Z/W/t7Bxwct5enPi9n49hF yvH4sD7ZvHWgSsNcLTexnFywCj1KR00QvAHOSah87YDtMVNhJFJDezUTGBSNXjOnxSQOPA 9wJlO6dF6OFWYx/538sjyMivSWXyhDYzQaIQQT09pRGbrH6clV/xEDV44NeReA== 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 4RB2004490zs8Y; Wed, 26 Jul 2023 18:06:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36QI6OKJ087626; Wed, 26 Jul 2023 18:06:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36QI6O1b087625; Wed, 26 Jul 2023 18:06:24 GMT (envelope-from git) Date: Wed, 26 Jul 2023 18:06:24 GMT Message-Id: <202307261806.36QI6O1b087625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 98e7f836e65e - stable/12 - Work around VNET and DPCPU related panics on aarch64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 98e7f836e65ee413cd0b383371a6aca0115084ed Auto-Submitted: auto-generated The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=98e7f836e65ee413cd0b383371a6aca0115084ed commit 98e7f836e65ee413cd0b383371a6aca0115084ed Author: Dimitry Andric AuthorDate: 2023-07-23 13:48:36 +0000 Commit: Dimitry Andric CommitDate: 2023-07-26 18:03:46 +0000 Work around VNET and DPCPU related panics on aarch64 lld >= 14 and recent GNU ld can relax adrp+add and adrp+ldr instructions, which breaks VNET and DPCPU when used in modules. Until VNET and DPCPU can be fixed to deal with these relaxed instructions, disable linker relaxation for now. PR: 264094 Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41156 (cherry picked from commit 80e4ac2964a11edef456a15b77e43aadeaf273a2) --- sys/conf/kmod.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 610484ba7e36..f67be86eeb73 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -168,6 +168,13 @@ CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer CFLAGS+= -fPIC .endif +.if ${MACHINE_CPUARCH} == "aarch64" +# https://bugs.freebsd.org/264094 +# lld >= 14 and recent GNU ld can relax adrp+add and adrp+ldr instructions, +# which breaks VNET. +LDFLAGS+= --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} == arm