freebsd-dev/lib
Juli Mallett 3dce589cb9 Fix 32-bit libgeom consumers run on 64-bit kernels with COMPAT_FREEBSD32.
Kernel pointer values are used as opaque unique identifiers, which are then
used to reconstruct references between various providers, classes, etc., inside
libgeom from the source XML.  Unfortunately, they're converted to pointer-width
integers (in the form of pointers) to do this, and 32-bit userland pointers
cannot hold sensible representations (however opaque) of 64-bit kernel pointers
on all systems.

In the case where the leading bits are zero and 32 distinct bits of pointer can
be identified, this will happen to work.  On systems where the upper 32-bits of
kernel pointers are non-zero and the same for all kernel pointers, this will
result in double frees and all kinds of bizarre crashes and linkage between
objects inside libgeom.

To mitigate this problem, treat the opaque identifiers in the XML as C strings
instead, and internalize them to give unique and consistent per-object pointer
values in userland for each identifier in the XML.  This allows us to keep the
libgeom logic the same with only minor changes to initial setup and parsing.

It might be more sensible for speed reasons to treat the identifiers as numbers
of a large size (uintmax_t, say) rather than strings, but strings seem fine for
now.

(As an added side-effect, this makes it slightly easier to identify unresolved
 references, but nothing has been added to inform the user of those.)
2012-03-29 03:13:43 +00:00
..
bind Upgrade to BIND version 9.8.1. Release notes at: 2011-09-03 07:13:45 +00:00
clang Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default, 2012-02-05 23:56:22 +00:00
csu Work around a binutils bug on powerpc64 where the TOC would not be 2012-03-13 18:59:19 +00:00
libalias
libarchive Silence alignment warnings from clang in libarchive's ppmd code (which 2012-03-23 11:18:07 +00:00
libauditd
libbegemot
libblocksruntime Import libcompiler_rt into HEAD and add Makefiles. 2010-11-11 15:13:11 +00:00
libbluetooth Add the following Linux BlueZ compatibility macros: htobs(), htobl(), 2010-09-22 23:41:02 +00:00
libbsm
libbsnmp Bump shared libraries version numbers in preparation for 9.0. 2011-08-28 09:26:48 +00:00
libbz2
libc Fix comment to specify correct struct name. 2012-03-28 23:51:06 +00:00
libc++ Make sure libgcc_s is finished building in _startup_libs before 2012-03-17 22:12:09 +00:00
libcalendar
libcam Use snprintf(3) constantly when generating CAM error messages. 2012-03-03 09:19:20 +00:00
libcom_err - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings 2012-03-22 08:48:42 +00:00
libcompat Small style(9) fix: use tabs instead of spaces. 2010-08-08 08:19:23 +00:00
libcompiler_rt Upgrade libcompiler_rt to upstream revision 147390. 2011-12-31 19:01:48 +00:00
libcrypt Remove superfluous paragraph macro. 2012-03-25 12:13:24 +00:00
libcxxrt Import new version of libcxxrt. Now works correctly with libobjc2 to implement 2012-03-20 17:58:15 +00:00
libdevinfo sys/rman.h now requires sys/types.h. Include it to make the API match 2011-02-10 04:53:09 +00:00
libdevstat Globally replace u_int*_t from (non-contributed) man pages. 2012-02-12 18:29:56 +00:00
libdisk Remove an errant `#define dprintf printf'. It seems to be leftover 2012-01-20 06:59:29 +00:00
libdwarf Bump shared libraries version numbers in preparation for 9.0. 2011-08-28 09:26:48 +00:00
libedit Don't use __P(). 2011-12-13 14:53:26 +00:00
libefi Spelling fixes. 2010-08-03 17:40:09 +00:00
libelf Handle MIPS .reginfo section as ELF_T_BYTE 2012-03-26 21:31:57 +00:00
libexpat Fix buildworld -DNO_CLEAN when using with Perforce, which marks files as 2010-08-12 20:46:49 +00:00
libfetch Fix two nits in previous commit pointed out by pjd@. 2012-01-23 09:23:07 +00:00
libgeom Fix 32-bit libgeom consumers run on 64-bit kernels with COMPAT_FREEBSD32. 2012-03-29 03:13:43 +00:00
libgpib Remove superfluous paragraph macro. 2012-03-25 12:13:24 +00:00
libgssapi mdoc: terminate quoted strings. 2012-03-26 15:18:14 +00:00
libiconv Remove redundant assignments to WARNS. 2011-06-06 20:24:17 +00:00
libiconv_modules Add the BSD-licensed Citrus iconv to the base system with default off 2011-02-25 00:04:39 +00:00
libipsec MFp4 204292: 2012-02-11 20:43:01 +00:00
libipx Fix incorrect usage of 'assure' and 'insure'. 2010-08-28 16:32:01 +00:00
libjail Handle the case where a boolean parameter is also a node. 2012-03-01 15:09:41 +00:00
libkiconv Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
libkse
libkvm Try to avoid ambiguity when sysctl returns ENOMEM additionally 2012-02-01 18:02:13 +00:00
liblzma Update xz to git snapshot of v5.0 branch as of 20110711 (post-5.0.3) 2011-07-11 14:15:27 +00:00
libmagic Use CFLAGS and LDFLAGS when compiling mkmagic. This ensures that all the 2010-08-01 12:10:32 +00:00
libmd Rewrite HISTORY: The SHA256 code first appeared in 6.0, and the SHA512 2011-06-27 02:10:10 +00:00
libmemstat Fix various typos in manual pages. 2012-02-25 14:31:25 +00:00
libmilter
libmp Fix whitespace inconsistencies found in homegrown Symbol.maps. 2011-10-07 15:05:24 +00:00
libncp Change ncp_scan_bindery_object() to pass a constant search string. 2011-10-16 08:44:03 +00:00
libnetgraph
libngatm
libopie X11BASE has been deprecated for a long time and will die soon 2012-01-09 00:48:19 +00:00
libpam Use program exit status as pam_exec return code (optional) 2012-03-26 12:18:15 +00:00
libpcap Bump shared libraries version numbers in preparation for 9.0. 2011-08-28 09:26:48 +00:00
libpmc Add software PMC support. 2012-03-28 20:58:30 +00:00
libproc Make libproc compilable for MIPS 2012-03-23 23:07:02 +00:00
libprocstat Unbreak build. 2012-02-10 13:47:40 +00:00
libradius Globally replace u_int*_t from (non-contributed) man pages. 2012-02-12 18:29:56 +00:00
librpcsec_gss Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while 2010-08-16 15:18:30 +00:00
librpcsvc Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor 2012-02-07 09:27:07 +00:00
librt Register signal 33 explicitly as reserved by real-time library, and 2012-03-26 19:12:09 +00:00
librtld_db Bump shared libraries version numbers in preparation for 9.0. 2011-08-28 09:26:48 +00:00
libsbuf Ok, so we use different comment conventions in Symbol.map and Version.def 2011-05-17 19:20:32 +00:00
libsdp Change the SDP_GET* macros to cast to a const buffer. 2011-10-16 08:45:16 +00:00
libsm Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to 2012-02-28 18:30:18 +00:00
libsmb
libsmdb
libsmutil
libstand Replace index() and rindex() calls with strchr() and strrchr(). 2012-01-03 18:51:58 +00:00
libstdthreads Pull up vendor changes to mdoc(7) 2012-01-05 21:36:12 +00:00
libtacplus Remove superfluous paragraph macro. 2012-03-25 12:13:24 +00:00
libtelnet - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings 2012-03-22 08:48:42 +00:00
libthr libthr: In the atfork handlers for signals, do not skip the last signal. 2012-03-26 17:05:26 +00:00
libthread_db Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to 2012-02-28 18:30:18 +00:00
libufs Make berase() work on platforms whose kernel lacks DIOCGDELETE ioctl. 2011-12-08 12:31:47 +00:00
libugidfw Quiet clang warnings by using string literal format strings. 2011-01-04 13:02:52 +00:00
libulog Fix whitespace inconsistencies found in homegrown Symbol.maps. 2011-10-07 15:05:24 +00:00
libusb Minor mdoc fixes. 2012-03-24 15:17:18 +00:00
libusbhid MFprojects/hid: 2011-09-28 14:52:25 +00:00
libutil mdoc: sort prologue macros. 2012-03-26 19:23:57 +00:00
libvgl Fix various typos in manual pages. 2012-02-25 14:31:25 +00:00
libwrap
liby
libypclnt Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor 2012-02-07 09:27:07 +00:00
libz Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to 2012-02-28 18:30:18 +00:00
msun Remove superfluous paragraph macro. 2012-03-25 12:13:24 +00:00
ncurses
Makefile Build libproc and librtld_db for MIPS 2012-03-24 05:18:27 +00:00
Makefile.inc