From nobody Sat Mar 21 18:57:13 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 4fdTFh1d3hz6VsT0; Sat, 21 Mar 2026 18:57:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 4fdTFg213Tz3vxw; Sat, 21 Mar 2026 18:57:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 62LIvDuP014266; Sat, 21 Mar 2026 20:57:16 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 62LIvDuP014266 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 62LIvDhk014265; Sat, 21 Mar 2026 20:57:13 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Mar 2026 20:57:13 +0200 From: Konstantin Belousov To: FreeBSD User 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: References: <69bdcf15.27526.2b5005f0@gitrepo.freebsd.org> <20260321171438.680a77e3@hermann> 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260321171438.680a77e3@hermann> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home 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:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4fdTFg213Tz3vxw X-Spamd-Bar: ---- On Sat, Mar 21, 2026 at 05:15:55PM +0100, FreeBSD User wrote: > On Fri, 20 Mar 2026 22:49:57 +0000 > Konstantin Belousov wrote: > > > The branch main has been updated by kib: > > > > URL: > > https://cgit.FreeBSD.org/src/commit/?id=8cc1c0f35ec8d5a3edb4ee1ede962a3c1f6baef0 > > > > commit 8cc1c0f35ec8d5a3edb4ee1ede962a3c1f6baef0 > > Author: Konstantin Belousov > > AuthorDate: 2026-03-03 06:37:03 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2026-03-20 22:49:03 +0000 > > > > amd64 trap.c: provide tag for the struct sfhandlers definition > > > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > --- > > sys/amd64/amd64/trap.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > 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, struct > > trapframe *frame) /* > > * Table of handlers for various segment load faults. > > */ > > -static const struct { > > +struct sfhandler { > > uintptr_t faddr; > > uintptr_t fhandler; > > -} sfhandlers[] = { > > +}; > > + > > +static const struct sfhandler sfhandlers[] = { > > { > > .faddr = (uintptr_t)ld_ds, > > .fhandler = (uintptr_t)ds_load_fault, > > > > Hello, > > it seems that one of the commits in this vain results in a hard reset of some > CURRENT machine - this taken from some reports on freebsd-current list. > > 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, coredump, simple > nothing. Only hard reset. Same on another box acting as graphical workstation. > As soon the system gets "touch" (login/starting windowmaker) the system goes > nirwana. > > No further information, my boxes do not dump anything useful. Try the following commit 237044fd4d0659ef2799c259b1f1852c00b08b37 Author: Konstantin Belousov Date: Sat Mar 21 20:45:48 2026 +0200 amd64: use IDT trapframe size to calculate location of nmi_pcpu from the IST stack pointer 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); ASSYM(PTI_RDX, offsetof(struct pti_frame, pti_rdx));