Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Feb 2026 15:56:37 +0000
From:      Minsoo Choo <minsoochoo0122@proton.me>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Konstantin Belousov <kib@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 8f23665fed2f - main - pcb.h: mark struct pcb to be preserved
Message-ID:  <bafAtYtkiQ-8-cLlyxu4WUlhcBp6PPxb6y5XE1KZw-qvN8xi-2wjc8uL_6OZJAW2cg9OqyCorL4knqNazkRt44btbusFZU_I53vAVWlxdKY=@proton.me>
In-Reply-To: <5bec84ad-a01e-4931-98e6-4ba06adb1237@FreeBSD.org>
References:  <69896027.2112e.2852c0dd@gitrepo.freebsd.org> <5bec84ad-a01e-4931-98e6-4ba06adb1237@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

On Monday, February 9th, 2026 at 10:12 AM, John Baldwin <jhb@FreeBSD.org> wrote:

> On 2/8/26 23:18, Konstantin Belousov wrote:
> 
> > The branch main has been updated by kib:
> > 
> > URL: https://cgit.FreeBSD.org/src/commit/?id=8f23665fed2fbaf4481359b4d2fcdd7b9feb40e3
> > 
> > commit 8f23665fed2fbaf4481359b4d2fcdd7b9feb40e3
> > Author: Minsoo Choo minsoochoo0122@proton.me
> > AuthorDate: 2026-02-06 20:03:53 +0000
> > Commit: Konstantin Belousov kib@FreeBSD.org
> > CommitDate: 2026-02-09 04:17:16 +0000
> > 
> > pcb.h: mark struct pcb to be preserved
> > 
> > There are programs that depend on this structure (e.g. kernel debuggers)
> > that breaks when the ABI changes.
> > 
> > Signed-off-by: Minsoo Choo minsoochoo0122@proton.me
> > Reviewed by: kib
> > MFC after: 1 week
> > Differential Revision: https://reviews.freebsd.org/D55149
> 
> 
> Hmmm, I think it is useful to know which fields debuggers use (typically just
> registers) vs which ones can be safely changed without impacting debuggers.
> 
> --
> John Baldwin

In the review, kib said:
> I had to add and preserve the padding fields pcb_pad in the amd64 structure to be compatible with kgdb at least. This makes me sure that the whole pcb layout is fixed by ABI.

I can create a patch to mark fields that are used by kernel debuggers. pcb and trapframe aren't usually used by userland programs, but we have exception for kernel debuggers here. We should have consensus on whether the whole structure should be stable ABI or not.

My preference is that if any of the architectures (e.g. amd64) need the whole pcb structure to be stable, then we should do the same to the others as well to avoid confusion.


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bafAtYtkiQ-8-cLlyxu4WUlhcBp6PPxb6y5XE1KZw-qvN8xi-2wjc8uL_6OZJAW2cg9OqyCorL4knqNazkRt44btbusFZU_I53vAVWlxdKY=>