On Tue, Jun 18, 2024 at 06:37:29PM +0200, Florian Weimer wrote: > The reason is that the kernel changed the definition of MAP_HUGE_16GB. > Older UAPI headers use an undefined expression which is treated by > compilers as a signed int, hence t he discrepancy. > > This was fixed on the kernel side in this commit: > > commit 710bb68c2e3a24512e2d2bae470960d7488e97b1 > Author: Matthias Goergens <matthias.goerg...@gmail.com> > Date: Mon Sep 5 11:19:04 2022 +0800 > > hugetlb_encode.h: fix undefined behaviour (34 << 26) > > Left-shifting past the size of your datatype is undefined behaviour in C. > The literal 34 gets the type `int`, and that one is not big enough to be > left shifted by 26 bits. > > An `unsigned` is long enough (on any machine that has at least 32 bits for > their ints.) > > For uniformity, we mark all the literals as unsigned. But it's only > really needed for HUGETLB_FLAG_ENCODE_16GB. > > Thanks to Randy Dunlap for an initial review and suggestion. > > Link: > https://lkml.kernel.org/r/20220905031904.150925-1-matthias.goerg...@gmail.com > Signed-off-by: Matthias Goergens <matthias.goerg...@gmail.com> > Acked-by: Randy Dunlap <rdun...@infradead.org> > Cc: Mike Kravetz <mike.krav...@oracle.com> > Cc: Muchun Song <songmuc...@bytedance.com> > Signed-off-by: Andrew Morton <a...@linux-foundation.org> >
This patch is now queued up for stable trees, from v4.19 and up. Thanks, Carlos Llamas _______________________________________________ linaro-toolchain mailing list -- linaro-toolchain@lists.linaro.org To unsubscribe send an email to linaro-toolchain-le...@lists.linaro.org