freebsd-dev/sys/compat
Brooks Davis c46697b9cb freebsd32_sendmsg: fix control message ABI
When a freebsd32 caller uses all or most allowed space for control
messages (MCLBYTES == 2K) then the message may no longer fit when
the messages are padded for 64-bit alignment.  Historically we've just
shrugged and said there is no ABI guarantee.  We ran into this on
CheriBSD where a capsicumized 64-bit nm would fail when called with more
than 64 files.

Fix this by not gratutiously capping size of mbuf data we'll allocate
to MCLBYTES and let m_get2 allocate up to MJUMPAGESIZE (4K or larger).
Instead of hard-coding a length check, let m_get2 do it and check for a
NULL return.

Reviewed by:	markj, jhb, emaste
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D36322
2022-08-24 18:34:39 +01:00
..
freebsd32 freebsd32_sendmsg: fix control message ABI 2022-08-24 18:34:39 +01:00
ia32 Retire sv_transtrap 2022-05-20 14:54:03 +03:00
lindebugfs lindebugfs: The Linux file operations use negative return values in the kernel. 2022-03-11 17:41:33 +01:00
linprocfs linprocfs: Decode SGX CPU feature in cpuinfo 2022-06-29 10:37:52 +03:00
linsysfs linsysfs: plug set-but-not-used vars. 2022-03-31 23:49:26 +03:00
linux elf_note_prpsinfo: handle more failures from proc_getargv() 2022-08-09 15:44:45 -04:00
linuxkpi linuxkpi: unbreak linux_i2cbb 2022-08-24 16:23:37 +03:00
x86bios Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00