mirror-linux/tools/include/uapi/linux
Thomas Weißschuh 70b9c0c11e uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again (2)
BITS_PER_LONG does not exist in UAPI headers, so can't be used by the UAPI
__GENMASK(). Instead __BITS_PER_LONG needs to be used.

When __GENMASK() was introduced in commit 3c7a8e190b ("uapi: introduce uapi-friendly macros for GENMASK"),
the code was fine. A broken revert in 1e7933a575 ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"")
introduced the incorrect usage of BITS_PER_LONG.
That was fixed in commit 11fcf36850 ("uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again").
But a broken sync of the kernel headers with the tools/ headers in
commit fc92099902 ("tools headers: Synchronize linux/bits.h with the kernel sources")
undid the fix.

Reapply the fix and while at it also fix the tools header.

Fixes: fc92099902 ("tools headers: Synchronize linux/bits.h with the kernel sources")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
2025-07-08 10:23:13 -04:00
..
tc_act
bits.h uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again (2) 2025-07-08 10:23:13 -04:00
bpf.h bpf: Fix L4 csum update on IPv6 in CHECKSUM_COMPLETE 2025-05-30 19:53:51 -07:00
bpf_common.h
bpf_perf_event.h
btf.h docs/bpf: Document the semantics of BTF tags with kind_flag 2025-02-05 16:17:59 -08:00
const.h treewide: fix typo 'unsigned __init128' -> 'unsigned __int128' 2025-03-05 12:00:03 -05:00
elf.h tools/include: Add uapi/linux/elf.h 2025-03-03 20:00:12 +01:00
erspan.h
fadvise.h
fanotify.h selftests/fs/mount-notify: build with tools include dir 2025-05-12 11:40:12 +02:00
filter.h
fs.h tools headers UAPI: sync linux/fs.h with the kernel sources 2025-05-11 17:48:16 -07:00
fscrypt.h tools headers: Update the fs headers with the kernel sources 2025-06-16 14:05:10 -03:00
hw_breakpoint.h
if_link.h netkit: Allow for configuring needed_{head,tail}room 2025-01-06 09:48:49 +01:00
if_tun.h
if_xdp.h selftests/bpf: Fix bpf selftest build warning 2025-05-28 10:00:14 +02:00
in.h tools headers: Update the socket headers with the kernel sources 2025-04-10 09:28:24 -07:00
io_uring.h
kcmp.h
kvm.h tools headers UAPI: Sync linux/kvm.h with the kernel sources 2025-06-16 14:05:11 -03:00
memfd.h selftests/mm: fix additional build errors for selftests 2024-04-25 20:56:42 -07:00
mman.h mm: add MAP_DROPPABLE for designating always lazily freeable mappings 2024-07-19 20:22:12 +02:00
mount.h selftests/fs/statmount: build with tools include dir 2025-05-12 11:40:12 +02:00
netdev.h net: devmem: TCP tx netlink api 2025-05-13 11:12:48 +02:00
netlink.h
nsfs.h selftests/fs/statmount: build with tools include dir 2025-05-12 11:40:12 +02:00
perf_event.h perf/uapi: Clean up <uapi/linux/perf_event.h> a bit 2025-05-22 11:03:41 +02:00
pkt_cls.h
pkt_sched.h
prctl.h tools headers: Synchronize prctl.h ABI header 2025-05-21 13:57:41 +02:00
seccomp.h
seg6.h
seg6_local.h
stat.h tools headers: Update the fs headers with the kernel sources 2025-06-16 14:05:10 -03:00
stddef.h stddef: make __struct_group() UAPI C++-friendly 2024-12-20 09:05:53 -08:00
tcp.h
tls.h
types.h tools/include: make uapi/linux/types.h usable from assembly 2025-04-06 12:55:31 -07:00
userfaultfd.h selftests/mm: fix additional build errors for selftests 2024-04-25 20:56:42 -07:00