]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
uma: Make the cache alignment mask unsigned
authorOlivier Certner <olce.freebsd@certner.fr>
Fri, 13 Oct 2023 12:49:11 +0000 (14:49 +0200)
committerOlivier Certner <olce@FreeBSD.org>
Thu, 21 Dec 2023 13:39:53 +0000 (14:39 +0100)
commit9121202fcb27e981bc4d2a7695fbba463361df93
treed5e71b125ce19583cb8805daceb38276ba8fb264
parentf056e19abe20d14234e24d927a847ea6e2a90c42
uma: Make the cache alignment mask unsigned

In uma_set_align_mask(), ensure that the passed value doesn't have its
highest bit set, which would lead to problems since keg/zone alignment
is internally stored as signed integers.  Such big values do not make
sense anyway and indicate some programming error.  A future commit will
introduce checks for this case and other ones.

Reviewed by:            kib, markj
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D42262

(cherry picked from commit 3d8f548b9e5772ff6890bdc01f7ba7b76203857d)

Approved by:    markj (mentor)
sys/arm/arm/cpufunc.c
sys/vm/uma.h
sys/vm/uma_align_mask.h
sys/vm/uma_core.c