Re: git: 27894e20f140 - main - libgeom: Fix segfault in 32-on-64 case

From: Dag-Erling_Smørgrav <des_at_FreeBSD.org>
Date: Tue, 06 Jan 2026 17:26:33 UTC
John Baldwin <jhb@FreeBSD.org> writes:
> Should we perhaps not use pointers to hold the cookies?  This is going to truncate
> in the lib32 case which will probably still work in practice as the low 32 bits of
> kernel object addresses are probably unique, but isn't foolproof.  Perhaps the cookie
> values should be stored as either kvaddr_t values, or uintmax_t?

Unfortunately this is effectively part of the KBI, these values get
cross-referenced against pointers in struct devstat returned by
kern.devstat.all.  I'm working on fixing that as well.

Also, the way the code works, the “cookies” get stored in pointer
members and then later resolved to the actual pointers to the
corresponding struct, so no, we can't easily not use pointers.

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org