Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jan 2026 08:39:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-arm@FreeBSD.org
Subject:   [Bug 292195] arm64: panic on coredump with sve instructions
Message-ID:  <bug-292195-7@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292195

            Bug ID: 292195
           Summary: arm64: panic on coredump with sve instructions
           Product: Base System
           Version: 16.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: arm
          Assignee: freebsd-arm@FreeBSD.org
          Reporter: william.a@carrel.org

Created attachment 266838
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=266838&action=edit
vfp.c.patch

When trying to reproduce bug 292177 on 16-CURRENT I unexpectedly encountered a
kernel panic. It looks like the panic was unique to coredumping in SVE code.

The coredump logic calls get_arm64_sve twice: once to get the note size, and
once to get the data. The note size calculation depended on the volatile
PCB_FP_SVEVALID flag. If this flag was cleared between the two calls (e.g., due
to a context switch clearing the flag to comply with the ABI), the second call
would expect a smaller buffer size than the first, triggering the KASSERT panic
("invalid size").

Fix this by:
1. Using pcb->pcb_svesaved != NULL (a stable indicator of SVE usage) to
determine the note size.
2. Calling vfp_to_sve_sync() if SVE is not currently valid but SVE state is
saved, ensuring the SVE buffer in the core dump contains the most up-to-date
register values.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-292195-7>