freebsd-nq/sys
Zbigniew Bodek 9ba30bcb42 Avoid sign extension of value passed to kva_alloc from uma_zone_reserve_kva
Fixes "panic: vm_radix_reserve_kva: unable to reserve KVA" caused by sign
extention of "pages * UMA_SLAB_SIZE" value passed to kva_alloc() which
takes unsigned long argument.

In the erroneus case that triggered this bug, the number of pages
to allocate in uma_zone_reserve_kva() was 0x8ebe6, that gave the
total number of bytes to allocate equal to 0x8ebe6000 (int).
This was then sign extended in kva_alloc() to 0xffffffff8ebe6000
(unsigned long).

Reviewed by:   alc, kib
Submitted by:  Zbigniew Bodek <zbb@semihalf.com>
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3346
2015-08-10 17:16:49 +00:00
..
amd64 Remove some more vestiges of the Xen PV domu support. Specifically, 2015-08-06 17:07:21 +00:00
arm Rationalize BSD license on sys/*/include/float.h 2015-08-05 17:05:35 +00:00
arm64 Add support for external PCIe (PEM) on Cavium's ThunderX 2015-08-08 21:32:03 +00:00
boot Remove guards around overwriting loader.rc and menu.rc 2015-08-06 16:07:27 +00:00
bsm
cam Remove verbose CTL messages. 2015-08-09 09:54:29 +00:00
cddl MFV r277430: 5313 Allow I/Os to be aggregated across ZIO priority classes 2015-08-10 12:39:10 +00:00
compat Add file_open(): the underlying system call of openat(). 2015-08-06 06:47:28 +00:00
conf Fix a comment for iwm. 2015-08-10 16:32:47 +00:00
contrib Import OpenBSD's iwm WiFi driver for Intel 3160/7260/7265. 2015-08-08 06:06:48 +00:00
crypto const'ify an arg that we don't update... 2015-07-29 23:37:15 +00:00
ddb Various changes to the registers displayed in DDB for x86. 2015-07-22 01:09:02 +00:00
dev Remove mps_request_polled(), it's redundant to mps_wait_command() 2015-08-10 09:02:34 +00:00
fs The changes that introduced fo_mmap() treated all character device 2015-08-06 16:50:37 +00:00
gdb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
geom Make some debug printf's into DPRINTF's to reduce noise on attach/detahh 2015-08-09 06:58:06 +00:00
gnu The GNU Amlogic DTS files have some errors (e.g. bad register 2015-04-11 08:17:39 +00:00
i386 Remove unused i386 header privatespace.h. For the native kernel, its 2015-08-07 05:59:58 +00:00
isa
kern Add const-qualifiers for source mbuf argument in m_dup(), m_copym(), 2015-08-08 15:50:46 +00:00
kgssapi
libkern Remove checks for __ARM_EABI__, we only build for EABI now. 2015-07-09 21:02:40 +00:00
mips Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
modules Build the iwm and iwmfw modules by default on x86. 2015-08-08 21:09:41 +00:00
net Partially merge r274887,r275334,r275577,r275578,r275586 to minimize 2015-08-10 12:03:59 +00:00
net80211 Revert the wifi ifnet changes until things are more baked and tested. 2015-08-08 01:10:17 +00:00
netgraph * Address review (and add a bit myself). 2015-07-12 18:14:38 +00:00
netinet Partially merge r274887,r275334,r275577,r275578,r275586 to minimize 2015-08-10 12:03:59 +00:00
netinet6 Partially merge r274887,r275334,r275577,r275578,r275586 to minimize 2015-08-10 12:03:59 +00:00
netipsec Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
netnatm
netpfil Reduce overhead of ipfw's me6 opcode. 2015-07-29 10:53:42 +00:00
netsmb
nfs
nfsclient Remove some oldnfs remnants. 2015-04-18 16:08:06 +00:00
nfsserver
nlm
ofed ipv4_is_zeronet() and ipv4_is_loopback() expect an address in network 2015-08-07 18:30:11 +00:00
opencrypto Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
pc98 Remove unused i386 header privatespace.h. For the native kernel, its 2015-08-07 05:59:58 +00:00
powerpc Correct return type of booke_init() prototype. 2015-08-08 23:13:53 +00:00
rpc Remove useless acquire semantic from the atomic_add operation before 2015-07-28 06:58:10 +00:00
security fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
sparc64 Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
sys cdefs: reduce code duplication 2015-08-09 15:38:32 +00:00
teken
tools
ufs - Make 'struct buf *buf' private to vfs_bio.c. Having a global variable 2015-07-29 02:26:57 +00:00
vm Avoid sign extension of value passed to kva_alloc from uma_zone_reserve_kva 2015-08-10 17:16:49 +00:00
x86 Formally pair store_rel(&smp_started) with load_acq(&smp_started). 2015-08-06 18:02:54 +00:00
xdr
xen Add support for Xen blkif indirect segment I/Os. This makes it possible for 2015-07-30 03:50:01 +00:00
Makefile Kill EoL whitespace. 2015-05-29 14:03:07 +00:00