Date: Thu, 2 Dec 2021 11:46:48 -0500 From: Shawn Webb <shawn.webb@hardenedbsd.org> To: Stefan Esser <se@freebsd.org> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: [REVIEW] Hide BIT_* macros from userland code Message-ID: <20211202164648.276kuh3blin6b2wp@mutt-hbsd> In-Reply-To: <7d97e129-4aa7-aa98-dc91-e332a3da620f@freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] Hey Stefan, On Thu, Dec 02, 2021 at 05:26:55PM +0100, Stefan Esser wrote: > I have created > > https://reviews.freebsd.org/D33235 > > to remove the BIT_* macros used in the kernel from the userland API. > > They conflict with differing definitions in some 3rd party code and > lead to compile issues in a number of ports (via CPU_* macros based > on the BIT_* macros). > > See PR259787 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259787 > for an example of such a problem. I recently was in a position to evaluate BIT_* macros for userland use. It was around the time when the conversation regarding hiding BIT_* from userland, which conversation caused me to find another solution. I think such an API is incredibly useful, so I wonder if there's a way to satisfy both. For example, maybe prefix the userland side with a USERLAND_ or something similar? Kernel would use BIT_* and userland would use USERLAND_BIT_* (just spitballing, not actually advocating for "USERLAND_BIT_*" but rather just the idea of it.) Thanks, -- Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmGo+HUACgkQ/y5nonf4 4fr6eA//ZcS4ZmNskfxlZ3rciKWU6mWAkmAZ8e4Gt/YHdpziSCIl/zNdEbma1Ohn vcApMcqlZ4/Hwe9IChbyi5V5Luh0RVg418cZ2MyPKuxNWAPh4SxlL+ODhaaZHWif ZOBfbC4QoejinEPgeMgYLxMtdaEBlTB5vnL/e5DkACznmGB5/2W8I00HFUhy15n/ CrnGauN6MYk7aXs5cnXdv96eHwL+dhqYpFvl1wwQReBE5I9hKFkNgs+qYWaUlcpO 5r9OlsGoqeoYuagtzu6vZeIqdbK9G32fE1PGbTBbBYOmVBle2S+4bBZV6nsgbUBX TtHVkVL740/Bh7O8VsmiXfmvu+Cazb+4SaBprCVb5IcS2AWapLrfa08i+oDweLda nggtNwPkioSUwYPGI4DfHTaqnVwc/KZVuxTmfTenrfb66rjtFGfmbyADKpcz5Fi9 22o0eAOt160FBj7Ld635432XjPVapwLvfC84r+nuTpw9HxSgwINicBqMNf5pSdCq CNaLHiVR9v+TnW59GCR538GVyD5TtLAyHZGuwIcsxQrV6YnMoPrKR6j7l06ZWKeH simpqlej4Py4y04ijYNepRQRxZU94yY2CpgEC5vdjuAR2kiZHsVKzf3ibwMR4A0s jkZmPkaNCAqxLq31LBrVNJIllvgVmJkxVa3OHQePzVEyvr+cJZs= =8mR8 -----END PGP SIGNATURE-----help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20211202164648.276kuh3blin6b2wp>
