From nobody Mon Feb 9 04:33:55 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 4f8Wzt4DVMz6SDpJ; Mon, 09 Feb 2026 04:34:02 +0000 (UTC) (envelope-from minsoochoo0122@proton.me) Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) (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 "protonmail.com", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f8Wzt0rPQz3wZx; Mon, 09 Feb 2026 04:34:02 +0000 (UTC) (envelope-from minsoochoo0122@proton.me) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1770611639; x=1770870839; bh=lNEk2itume4Ug1Mny9A9qo1g5iFxUx3U4T9GtT84bAQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=c/FEb712U51nj+u0XAOwGPWtsH5W+BlGA/lhYOZG2El7ZSjkQQ3hozvgDlxRVxN20 sonbLzY2CFPmUTGsZrK40/JJ0qskJ1ud3mH4dlBJSHLB6RT6nVRriYd1OI7csh2iID gmqX8rVoWJUuDck3djvDmkLXrVrd55MzExzW+F+t/6vNYTj+kW9EFAEBrCHF/ilrnR fKYvNl5XsnmHb2Yc7FtSzI/Y62XyMmbtglbJ70Ib/ilpeZ4l9q769+/kiHt6IgVlBQ 9bUwojbppE5wJKY7P+/FJMRUloDE0I2XtYmFCOivfrVMbTc57WEWtfz0Kcaq/ifVea dP9eq8BF0j0fA== Date: Mon, 09 Feb 2026 04:33:55 +0000 To: Konstantin Belousov From: Minsoo Choo Cc: 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: In-Reply-To: <69896027.2112e.2852c0dd@gitrepo.freebsd.org> References: <69896027.2112e.2852c0dd@gitrepo.freebsd.org> Feedback-ID: 45891198:user:proton X-Pm-Message-ID: 09a16f76d1a6abe5f8e2c31de0b5e64ee6b11f56 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/mixed; boundary="b1=_VOEJZjtcnhxdeNUIfVrd5CjZB5vY9oF22GXFHApyQuI" 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:62371, ipnet:185.70.43.0/24, country:CH] X-Rspamd-Queue-Id: 4f8Wzt0rPQz3wZx X-Spamd-Bar: ---- --b1=_VOEJZjtcnhxdeNUIfVrd5CjZB5vY9oF22GXFHApyQuI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ideally this should be applied to sys/mips/include/pcb.h when MFCed to stab= le/13. However, considering that stable/13 EOL is two months away and there= wouldn't be breaking change to mips's pcb.h, it should be fine to ignore i= t. > On Feb 8, 2026, at 23:18, Konstantin Belousov wrote: >=20 > The branch main has been updated by kib: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8f23665fed2fbaf4481359b4d2= fcdd7b9feb40e3 >=20 > commit 8f23665fed2fbaf4481359b4d2fcdd7b9feb40e3 > Author: Minsoo Choo > AuthorDate: 2026-02-06 20:03:53 +0000 > Commit: Konstantin Belousov > CommitDate: 2026-02-09 04:17:16 +0000 >=20 > pcb.h: mark struct pcb to be preserved >=20 > There are programs that depend on this structure (e.g. kernel debugger= s) > that breaks when the ABI changes. >=20 > Signed-off-by: Minsoo Choo > Reviewed by: kib > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D55149 > --- > sys/amd64/include/pcb.h | 21 +++++++++++---------- > sys/arm/include/pcb.h | 4 ++++ > sys/arm64/include/pcb.h | 5 +++++ > sys/i386/include/pcb.h | 17 +++++++++-------- > sys/powerpc/include/pcb.h | 5 +++++ > sys/riscv/include/pcb.h | 5 +++++ > 6 files changed, 39 insertions(+), 18 deletions(-) >=20 > diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h > index 27e1dce08ee1..5a1e8529ad8b 100644 > --- a/sys/amd64/include/pcb.h > +++ b/sys/amd64/include/pcb.h > @@ -44,18 +44,19 @@ >=20 > #ifdef __amd64__ > /* > - * NB: The fields marked with (*) are used by kernel debuggers. Their > - * ABI should be preserved. > + * struct pcb is known to and used by kernel debuggers. Its layout must = be kept > + * stable. When adding extra fields that are accessed by kernel debugger= s, > + * debuggers should be backward compatible by using osreldate. > */ > struct pcb { > -=09register_t=09pcb_r15;=09/* (*) */ > -=09register_t=09pcb_r14;=09/* (*) */ > -=09register_t=09pcb_r13;=09/* (*) */ > -=09register_t=09pcb_r12;=09/* (*) */ > -=09register_t=09pcb_rbp;=09/* (*) */ > -=09register_t=09pcb_rsp;=09/* (*) */ > -=09register_t=09pcb_rbx;=09/* (*) */ > -=09register_t=09pcb_rip;=09/* (*) */ > +=09register_t=09pcb_r15; > +=09register_t=09pcb_r14; > +=09register_t=09pcb_r13; > +=09register_t=09pcb_r12; > +=09register_t=09pcb_rbp; > +=09register_t=09pcb_rsp; > +=09register_t=09pcb_rbx; > +=09register_t=09pcb_rip; > =09register_t=09pcb_fsbase; > =09register_t=09pcb_gsbase; > =09register_t=09pcb_kgsbase; > diff --git a/sys/arm/include/pcb.h b/sys/arm/include/pcb.h > index fd77544c22c1..810b1e665b19 100644 > --- a/sys/arm/include/pcb.h > +++ b/sys/arm/include/pcb.h > @@ -42,6 +42,10 @@ > #include >=20 > /* > + * struct pcb is known to and used by kernel debuggers. Its layout must = be kept > + * stable. When adding extra fields that are accessed by kernel debugger= s, > + * debuggers should be backward compatible by using osreldate. > + * > * WARNING! > * Keep pcb_regs first for faster access in switch.S > */ > diff --git a/sys/arm64/include/pcb.h b/sys/arm64/include/pcb.h > index c0feb1149cf5..9955f5b22714 100644 > --- a/sys/arm64/include/pcb.h > +++ b/sys/arm64/include/pcb.h > @@ -46,6 +46,11 @@ struct trapframe; > #define=09PCB_FP=09=0910 > #define=09PCB_LR=09=0911 >=20 > +/* > + * struct pcb is known to and used by kernel debuggers. Its layout must = be kept > + * stable. When adding extra fields that are accessed by kernel debugger= s, > + * debuggers should be backward compatible by using osreldate. > + */ > struct pcb { > =09uint64_t=09pcb_x[12]; > =09/* These two need to be in order as we access them together */ > diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h > index 1b14efa425b5..1385bfeeef31 100644 > --- a/sys/i386/include/pcb.h > +++ b/sys/i386/include/pcb.h > @@ -44,16 +44,17 @@ > #include >=20 > /* > - * NB: The fields marked with (*) are used by kernel debuggers. Their > - * ABI should be preserved. > + * struct pcb is known to and used by kernel debuggers. Its layout must = be kept > + * stable. When adding extra fields that are accessed by kernel debugger= s, > + * debuggers should be backward compatible by using osreldate. > */ > struct pcb { > -=09int=09pcb_edi;=09/* (*) */ > -=09int=09pcb_esi;=09/* (*) */ > -=09int=09pcb_ebp;=09/* (*) */ > -=09int=09pcb_esp;=09/* (*) */ > -=09int=09pcb_ebx;=09/* (*) */ > -=09int=09pcb_eip;=09/* (*) */ > +=09int=09pcb_edi; > +=09int=09pcb_esi; > +=09int=09pcb_ebp; > +=09int=09pcb_esp; > +=09int=09pcb_ebx; > +=09int=09pcb_eip; > =09struct segment_descriptor pcb_fsd; > =09struct segment_descriptor pcb_gsd; > =09int=09pcb_ds; > diff --git a/sys/powerpc/include/pcb.h b/sys/powerpc/include/pcb.h > index 0230cf78aba7..7ebd13dd0ed1 100644 > --- a/sys/powerpc/include/pcb.h > +++ b/sys/powerpc/include/pcb.h > @@ -41,6 +41,11 @@ > #include >=20 > #ifndef _STANDALONE > +/* > + * struct pcb is known to and used by kernel debuggers. Its layout must = be kept > + * stable. When adding extra fields that are accessed by kernel debugger= s, > + * debuggers should be backward compatible by using osreldate. > + */ > struct pcb { > =09register_t=09pcb_context[20];=09/* non-volatile r12-r31 */ > =09register_t=09pcb_cr;=09=09=09/* Condition register */ > diff --git a/sys/riscv/include/pcb.h b/sys/riscv/include/pcb.h > index bb88516a1385..bcec4c3fd478 100644 > --- a/sys/riscv/include/pcb.h > +++ b/sys/riscv/include/pcb.h > @@ -39,6 +39,11 @@ >=20 > struct trapframe; >=20 > +/* > + * struct pcb is known to and used by kernel debuggers. Its layout must = be kept > + * stable. When adding extra fields that are accessed by kernel debugger= s, > + * debuggers should be backward compatible by using osreldate. > + */ > struct pcb { > =09uint64_t=09pcb_ra;=09=09/* Return address */ > =09uint64_t=09pcb_sp;=09=09/* Stack pointer */ --b1=_VOEJZjtcnhxdeNUIfVrd5CjZB5vY9oF22GXFHApyQuI Content-Type: application/pgp-signature; name=signature.asc Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=signature.asc LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0KaUhVRUFSWUlBQjBXSVFTT09OMUhzcTJE dmFpUGE5d0RCcFYwUWw4enVBVUNhWWxqbVFBS0NSQURCcFYwUWw4eg0KdUJpdEFRRFA5eWFKbGNz MzJPbmFTdkl3b1pOaGorZnA0c0Y2ZVhvN3VzTGVQTUJJVWdEOUVyZ2k0ZjQzZzYzdQ0KYjRDM0U5 MUJzajlucVZldEdtZ3QyZDNpQkxmNm5BWT0NCj1WR0FJDQotLS0tLUVORCBQR1AgU0lHTkFUVVJF LS0tLS0NCg== --b1=_VOEJZjtcnhxdeNUIfVrd5CjZB5vY9oF22GXFHApyQuI--