freebsd-src/sys
Zhenlei Huang 5be5d0d5cb geom_part: Check number of GPT entries and size of GPT entry
Current specification does not have upper limit of the number of
partition entries and the size of partition entry. In
799eac8c3d Andrey V. Elsukov introduced a
limit maximum number of GPT entries to 4k, but that is for write routine
(gpart create) only. When attaching disks that have large number of GPT
entries exceeding the limit, or disks with large size of partition
entry, it is still possible to exhaust kernel memory.

1. Reuse the limit of the maximum number of partition entries.
2. Limit the maximum size of GPT entry to 1k.

In current specification (2.10) the size of GPT entry is 128 *
2^n while n >= 0, and the size - 128 is reserved. 1k should be
sufficient enough for foreseen future.

PR:		266548
Discussed with:	imp
Reviewed by:	markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D36717
2022-10-18 11:03:02 -04:00
..
amd64 amd64: Add FIRECRACKER kernel configuration 2022-10-17 23:02:22 -07:00
arm ofw: add BUS_GET_DEVICE_PATH interface to openfirm/fdt, somewhat incomplete. 2022-10-18 16:55:47 +09:00
arm64 ofw: add BUS_GET_DEVICE_PATH interface to openfirm/fdt, somewhat incomplete. 2022-10-18 16:55:47 +09:00
bsm
cam cam: Use FreeBSD standard copyright 2022-10-07 23:37:46 -06:00
cddl kinst: Clarify a comment in the trampoline allocator 2022-10-14 11:32:47 -04:00
compat linuxkpi: retire now-unused MIPS support 2022-10-17 16:31:20 -04:00
conf x86: Add MPTABLE_LINUX_BUG_COMPAT option 2022-10-17 23:02:22 -07:00
contrib zfs: mix mismerge in zfs_znode_free 2022-10-08 20:43:33 +00:00
crypto Fix the IV length in the armv8 AES GCM code 2022-09-06 13:11:04 +01:00
ddb Fix kernel build after 754cb545b6 . 2022-10-04 17:13:17 +02:00
dev ofw: add BUS_GET_DEVICE_PATH interface to openfirm/fdt, somewhat incomplete. 2022-10-18 16:55:47 +09:00
dts
fs fusefs: After successful F_GETLK, l_whence should be SEEK_SET 2022-10-17 07:09:50 -06:00
gdb
geom geom_part: Check number of GPT entries and size of GPT entry 2022-10-18 11:03:02 -04:00
gnu
i386 sys: Consolidate common implementation details of PV entries. 2022-10-07 10:14:03 -07:00
isa
kern kern: Support duplicate variables in early kenv 2022-10-17 23:02:20 -07:00
kgssapi
libkern qdivrem: Predict division by zero as false. 2022-10-04 13:51:06 +02:00
modules dpaa2: fix standalone module build 2022-10-17 22:38:24 -07:00
net iflib: Introduce v2 of TX Queue Select Functionality 2022-10-17 14:59:55 -07:00
net80211 net80211: move IEEE80211_F_WME check to vap for consistency 2022-09-29 12:54:23 +00:00
netgraph Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
netinet pf: apply the network stack's ICMP rate limiting to ICMP errors sent by pf 2022-10-14 10:36:16 +02:00
netinet6 carp: fix regression panic from ccd69bd573 2022-10-17 11:39:40 -07:00
netipsec tcp: remove INP_TIMEWAIT flag 2022-10-06 19:24:37 -07:00
netlink netlink: make it working without INET6 2022-10-04 14:39:49 -07:00
netpfil pf: fix LINT-NOINET6 build 2022-10-15 10:02:35 +02:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed ibcore: The use of IN_LOOPBACK() now requires a valid VNET context. 2022-09-23 13:42:03 +02:00
opencrypto opencrypto: mark INVARIANTS variables as __diagused 2022-08-10 15:35:29 -04:00
powerpc powerpc: slb_alloc_user_cache: fix missing uma_zalloc wait flag 2022-10-03 20:56:41 -03:00
riscv riscv: handle misaligned address exceptions 2022-10-11 10:39:50 -03:00
rpc clnt_vc.c: Replace msleep() with pause() to avoid assert panic 2022-10-14 15:46:55 -07:00
security Bump MAC_VERSION to 5 2022-10-07 15:24:32 +00:00
sys ofw: add BUS_GET_DEVICE_PATH interface to openfirm/fdt, somewhat incomplete. 2022-10-18 16:55:47 +09:00
teken
tests
tools Make #if and #endif do what people expect in *_if.m 2022-10-06 14:35:31 +01:00
ufs Updates to UFS/FFS superblock integrity checks when reading a superblock. 2022-10-03 05:53:10 -07:00
vm vm_page: Fix a logic error in the handling of PQ_ACTIVE operations 2022-10-05 15:12:46 -04:00
x86 PVH: Set bootmethod to PVH 2022-10-17 23:02:22 -07:00
xdr
xen
Makefile