From nobody Sun Mar 22 10:13:03 2026 X-Original-To: dev-commits-src-all@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 4fdsZl5D8Xz6WJZm; Sun, 22 Mar 2026 10:13:35 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp052.goneo.de (smtp052.goneo.de [85.220.129.60]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4fdsZl4HGnz3tng; Sun, 22 Mar 2026 10:13:35 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub2.goneo.de (hub2.goneo.de [85.220.129.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp5.goneo.de (Postfix) with ESMTPS id 83A5F240204; Sun, 22 Mar 2026 11:13:33 +0100 (CET) Received: from hub2.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPS id A325A240255; Sun, 22 Mar 2026 11:13:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1774174411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=M2DNomxl9tW+6+g5JOSZ+hTYC22+AA2hscembENvKJI=; b=nV/w6OIXvq7xNpraxDKi7HpfdZl46ZdtWLl1evYVln8jb+IiziYdMUzRVI+w4ui3pSOGPw XTBNU0EVNt3MOfOK7pd4lNRTeP2t8JDr3rpTA7Ziz03VSHoN1hGTEOsoKq+nwy6y/mIPTI PawJAhrUF+ke1hGgUe6x68EsIp0PbqwcFN9USYinwJFGgOxFelGMKrCCIzJUaBOT8LjskB vgpaN0EAwGEwMAYvsi32bBtOCgu2I8AZxFSHzJCE48utbd4tSJsUsq+BquJlBUjXo+ggG6 4W+2862vbiHt9rKrluCf/J05g8AL1wkp4d78UD3waQxqTBdPOK9+zKwMd24Q+g== Received: from thor.sb211.local (dynamic-2a02-3100-1969-3f02-fc6b-82fb-c0d4-3b70.310.pool.telefonica.de [IPv6:2a02:3100:1969:3f02:fc6b:82fb:c0d4:3b70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPSA id 55CC32400D4; Sun, 22 Mar 2026 11:13:31 +0100 (CET) Date: Sun, 22 Mar 2026 11:13:03 +0100 From: A FreeBSD User To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8cc1c0f35ec8 - main - amd64 trap.c: provide tag for the struct sfhandlers definition Message-ID: <20260322111330.6c1a3249@thor.sb211.local> In-Reply-To: References: <69bdcf15.27526.2b5005f0@gitrepo.freebsd.org> <20260321171438.680a77e3@hermann> <20260321224023.002fcb9b@hermann> X-Mailer: Claws Mail 3.21.0 (GTK+ 2.24.33; amd64-portbld-freebsd16.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/JysLqpcdcrhS9sJONH3mPO5"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Rspamd-UID: bdb463 X-Rspamd-UID: 7faea2 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:25394, ipnet:85.220.128.0/17, country:DE] X-Rspamd-Queue-Id: 4fdsZl4HGnz3tng X-Spamd-Bar: ---- --Sig_/JysLqpcdcrhS9sJONH3mPO5 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Tage des Herren Sat, 21 Mar 2026 23:58:37 +0200 Konstantin Belousov schrieb: > On Sat, Mar 21, 2026 at 10:40:23PM +0100, FreeBSD User wrote: > > On Sat, 21 Mar 2026 20:57:13 +0200 > > Konstantin Belousov wrote: > > =20 > > > On Sat, Mar 21, 2026 at 05:15:55PM +0100, FreeBSD User wrote: =20 > > > > On Fri, 20 Mar 2026 22:49:57 +0000 > > > > Konstantin Belousov wrote: > > > > =20 > > > > > The branch main has been updated by kib: > > > > >=20 > > > > > URL: > > > > > https://cgit.FreeBSD.org/src/commit/?id=3D8cc1c0f35ec8d5a3edb4ee1= ede962a3c1f6baef0 > > > > >=20 > > > > > commit 8cc1c0f35ec8d5a3edb4ee1ede962a3c1f6baef0 > > > > > Author: Konstantin Belousov > > > > > AuthorDate: 2026-03-03 06:37:03 +0000 > > > > > Commit: Konstantin Belousov > > > > > CommitDate: 2026-03-20 22:49:03 +0000 > > > > >=20 > > > > > amd64 trap.c: provide tag for the struct sfhandlers definition > > > > > =20 > > > > > Sponsored by: The FreeBSD Foundation > > > > > MFC after: 1 week > > > > > --- > > > > > sys/amd64/amd64/trap.c | 6 ++++-- > > > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > >=20 > > > > > diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c > > > > > index 8a1d1528e6da..359b3dfe3609 100644 > > > > > --- a/sys/amd64/amd64/trap.c > > > > > +++ b/sys/amd64/amd64/trap.c > > > > > @@ -319,10 +319,12 @@ trap_check_intr_kernel(struct thread *td, s= truct > > > > > trapframe *frame) /* > > > > > * Table of handlers for various segment load faults. > > > > > */ > > > > > -static const struct { > > > > > +struct sfhandler { > > > > > uintptr_t faddr; > > > > > uintptr_t fhandler; > > > > > -} sfhandlers[] =3D { > > > > > +}; > > > > > + > > > > > +static const struct sfhandler sfhandlers[] =3D { > > > > > { > > > > > .faddr =3D (uintptr_t)ld_ds, > > > > > .fhandler =3D (uintptr_t)ds_load_fault, > > > > > =20 > > > >=20 > > > > Hello, > > > >=20 > > > > it seems that one of the commits in this vain results in a hard res= et of > > > > some CURRENT machine - this taken from some reports on freebsd-curr= ent list. > > > >=20 > > > > In my case, two Zen5 based boxes, bott as usual, but when touch the= system > > > > with "make buildworld buildkernel" or any single make build on the = acting > > > > server box, the system reboots immediately - no trace of a log, cor= edump, > > > > simple nothing. Only hard reset. Same on another box acting as grap= hical > > > > workstation. As soon the system gets "touch" (login/starting window= maker) > > > > the system goes nirwana. > > > >=20 > > > > No further information, my boxes do not dump anything useful. =20 > > >=20 > > > Try the following > > >=20 > > > commit 237044fd4d0659ef2799c259b1f1852c00b08b37 > > > Author: Konstantin Belousov > > > Date: Sat Mar 21 20:45:48 2026 +0200 > > >=20 > > > amd64: use IDT trapframe size to calculate location of nmi_pcpu f= rom the > > > IST stack pointer > > >=20 > > > diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S > > > index babfbacf92ef..5bf9a12e1bf5 100644 > > > --- a/sys/amd64/amd64/exception.S > > > +++ b/sys/amd64/amd64/exception.S > > > @@ -341,7 +341,7 @@ IDTVEC(dblfault) > > > pushfq > > > andq $~(PSL_D | PSL_AC),(%rsp) > > > popfq > > > - movq TF_SIZE(%rsp),%rdx > > > + movq TF_SIZE_HW(%rsp),%rdx > > > movl %edx,%eax > > > shrq $32,%rdx > > > movl $MSR_GSBASE,%ecx > > > @@ -661,7 +661,7 @@ IDTVEC(dbg) > > > shlq $32,%rdx > > > orq %rdx,%r12 > > > /* Retrieve and load the canonical value for GS.base. */ > > > - movq TF_SIZE(%rsp),%rdx > > > + movq TF_SIZE_HW(%rsp),%rdx > > > movl %edx,%eax > > > shrq $32,%rdx > > > wrmsr > > > @@ -798,7 +798,7 @@ IDTVEC(nmi) > > > shlq $32,%rdx > > > orq %rdx,%r12 > > > /* Retrieve and load the canonical value for GS.base. */ > > > - movq TF_SIZE(%rsp),%rdx > > > + movq TF_SIZE_HW(%rsp),%rdx > > > movl %edx,%eax > > > shrq $32,%rdx > > > wrmsr > > > @@ -1002,7 +1002,7 @@ IDTVEC(mchk) > > > shlq $32,%rdx > > > orq %rdx,%r12 > > > /* Retrieve and load the canonical value for GS.base. */ > > > - movq TF_SIZE(%rsp),%rdx > > > + movq TF_SIZE_HW(%rsp),%rdx > > > movl %edx,%eax > > > shrq $32,%rdx > > > wrmsr > > > diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c > > > index 2716784ee871..762c850c1df1 100644 > > > --- a/sys/amd64/amd64/genassym.c > > > +++ b/sys/amd64/amd64/genassym.c > > > @@ -185,6 +185,7 @@ ASSYM(TF_FS, offsetof(struct trapframe, tf_fs)); > > > ASSYM(TF_GS, offsetof(struct trapframe, tf_gs)); > > > ASSYM(TF_FLAGS, offsetof(struct trapframe, tf_flags)); > > > ASSYM(TF_SIZE, sizeof(struct trapframe)); > > > +ASSYM(TF_SIZE_HW, sizeof(struct trapframe) - 2 * 8); > > > ASSYM(TF_HASSEGS, TF_HASSEGS); > > > =20 > > > ASSYM(PTI_RDX, offsetof(struct pti_frame, pti_rdx)); > > > =20 > >=20 > > Just gave the patch of yours a chance before sleeping time on the GUI b= ox of > > mine: after reboot, starting GUI (windowmaker) a total freeze of the sy= stem > > immediately. > > I'll check on the other machine without burden of GUI tomorrow morning. > >=20 > > Still it seems the box isn't dumping/reporting anything, this time jus= t frozen. =20 >=20 > Instead of the patch I posted above, try the following: > diff --git a/sys/x86/include/frame.h b/sys/x86/include/frame.h > index 7da1fff03aec..1560983addfa 100644 > --- a/sys/x86/include/frame.h > +++ b/sys/x86/include/frame.h > @@ -153,8 +153,10 @@ struct trapframe { > uint16_t tf_fred_evinfo1; > uint32_t tf_fred_evinfo2; > /* two long words added by FRED */ > +#if 0 > uint64_t tf_fred_evdata; > uint64_t tf_fred_zero1; > +#endif > }; > =20 > #define TF_FRED_EVDATA_B0 0x0000000000000001ull /* %dr6 B0 */ >=20 > BTW, did you rebuild the drm kmod with any of the kernel updates? >=20 Good things first: latest sources with your commit 1ba29614c4ce5e261ade0bd7= def94079b7b9647a fixes my issues. Just for the record: applied the patch on the other box as, it freezes immediately when trying to login or, in single user, when confirming the sh= ell at the beginning. And: yes, I try to build on every buildworld/buildkernel cycle ports essent= ial to kernel dependencies (especially kernel modules like GPU driver) I'm aware of.=20 Thank you for taking your time and fixing the problem! Best regards Oliver =20 --=20 A FreeBSD user --Sig_/JysLqpcdcrhS9sJONH3mPO5 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRQheDybVktG5eW/1Kxzvs8OqokrwUCab/AygAKCRCxzvs8Oqok rxaBAP4h4A/yw1yyQZZaPwlgreRSfTq6BDyXKp41ZRlWyKSYUAD/WyQeIItPKa55 dYkYTRZVhgYjiCp5Ap6+QFS+oMXhJAc= =XDXA -----END PGP SIGNATURE----- --Sig_/JysLqpcdcrhS9sJONH3mPO5--