acrn-kernel/include/uapi/asm-generic
Matthias Goergens 710bb68c2e 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.goergens@gmail.com
Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-10-03 14:02:55 -07:00
..
Kbuild
auxvec.h
bitsperlong.h
bpf_perf_event.h
errno-base.h
errno.h
fcntl.h tools: Fixed MIPS builds due to struct flock re-definition 2022-07-20 12:55:33 +02:00
hugetlb_encode.h hugetlb_encode.h: fix undefined behaviour (34 << 26) 2022-10-03 14:02:55 -07:00
int-l64.h
int-ll64.h
ioctl.h
ioctls.h
ipcbuf.h
kvm_para.h
mman-common.h mm/madvise: introduce MADV_COLLAPSE sync hugepage collapse 2022-09-11 20:25:46 -07:00
mman.h
msgbuf.h
param.h
poll.h
posix_types.h
resource.h
sembuf.h
setup.h
shmbuf.h
siginfo.h signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-04-22 12:14:05 +02:00
signal-defs.h
signal.h
socket.h net: SO_RCVMARK socket option for SO_MARK with recvmsg() 2022-04-28 13:08:15 -07:00
sockios.h
stat.h
statfs.h
swab.h
termbits-common.h serial: Support for RS-485 multipoint addresses 2022-06-27 14:44:20 +02:00
termbits.h termbits.h: Remove posix_types.h include 2022-05-19 18:25:26 +02:00
termios.h
types.h
ucontext.h
unistd.h syscalls: compat: Fix the missing part for __SYSCALL_COMPAT 2022-04-26 13:36:01 -07:00