linux/scripts
Marc Zyngier a3f6a89c83 scripts: fix gfp-translate after ___GFP_*_BITS conversion to an enum
Richard reports that since 772dd03427 ("mm: enumerate all gfp flags"),
gfp-translate is broken, as the bit numbers are implicit, leaving the
shell script unable to extract them.  Even more, some bits are now at a
variable location, making it double extra hard to parse using a simple
shell script.

Use a brute-force approach to the problem by generating a small C stub
that will use the enum to dump the interesting bits.

As an added bonus, we are now able to identify invalid bits for a given
configuration.  As an added drawback, we cannot parse include files that
predate this change anymore.  Tough luck.

Link: https://lkml.kernel.org/r/20240823163850.3791201-1-maz@kernel.org
Fixes: 772dd03427 ("mm: enumerate all gfp flags")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reported-by: Richard Weinberger <richard@nod.at>
Cc: Petr Tesařík <petr@tesarici.cz>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-09-01 17:59:01 -07:00
..
atomic locking/atomic: scripts: fix ${atomic}_sub_and_test() kerneldoc 2024-06-05 15:52:34 +02:00
basic
clang-tools
coccinelle
dtc Devicetree updates for v6.11: 2024-07-17 18:07:31 -07:00
dummy-tools
gcc-plugins gcc-plugins: randstruct: Remove GCC 4.7 or newer requirement 2024-08-05 14:34:23 -07:00
gdb - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
genksyms
include kbuild: move some helper headers from scripts/kconfig/ to scripts/include/ 2024-07-21 23:10:43 +09:00
kconfig scripts: kconfig: merge_config: config files: add a trailing newline 2024-08-06 14:02:12 +09:00
ksymoops
mod Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
package kbuild: rpm-pkg: ghost modules.weakdep file 2024-07-28 17:07:03 +09:00
selinux
tracing
.gitignore
as-version.sh
asn1_compiler.c
bloat-o-meter
bootgraph.pl
bpf_doc.py
build-version kbuild: move init/build-version to scripts/ 2024-07-16 01:08:37 +09:00
cc-can-link.sh
cc-version.sh
check_extable.sh
check-git
check-sysctl-docs
check-uapi.sh
check-variable-fonts.sh
checkdeclares.pl
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl net: drop special comment style 2024-08-23 10:21:02 +01:00
checkstack.pl
checksyscalls.sh
checktransupdate.py scripts: add scripts/checktransupdate.py 2024-06-12 15:24:11 -06:00
checkversion.pl
cleanfile
cleanpatch
coccicheck
config
const_structs.checkpatch sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
decode_stacktrace.sh scripts/decode_stacktrace.sh: better support to ARM32 module stack trace 2024-06-24 22:25:00 -07:00
decodecode
depmod.sh
dev-needs.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract_xc3028.pl
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line scripts/faddr2line: Check only two symbols when calculating symbol size 2024-07-02 23:38:37 -07:00
file-size.sh
find-unused-docs.sh
gcc-x86_32-has-stack-protector.sh kbuild: Fix '-S -c' in x86 stack protector scripts 2024-07-29 03:47:00 +09:00
gcc-x86_64-has-stack-protector.sh kbuild: Fix '-S -c' in x86 stack protector scripts 2024-07-29 03:47:00 +09:00
gen-randstruct-seed.sh
generate_initcall_order.pl
generate_rust_analyzer.py rust: Support latest version of rust-analyzer 2024-08-07 01:16:52 +02:00
generate_rust_target.rs rust: x86: remove -3dnow{,a} from target features 2024-08-10 00:05:10 +02:00
get_abi.pl
get_dvb_firmware
get_feat.pl
get_maintainer.pl
gfp-translate scripts: fix gfp-translate after ___GFP_*_BITS conversion to an enum 2024-09-01 17:59:01 -07:00
git.orderFile
head-object-list.txt powerpc: Remove core support for 40x 2024-06-28 22:28:47 +10:00
headerdep.pl
headers_install.sh
insert-sys-cert.c
install.sh kbuild: Create INSTALL_PATH directory if it does not exist 2024-07-20 13:34:54 +09:00
jobserver-exec
kallsyms.c kallsyms: Do not cleanup .llvm.<hash> suffix before sorting symbols 2024-08-15 09:33:34 -07:00
Kbuild.include kbuild: raise the minimum GNU Make requirement to 4.0 2024-07-16 16:07:14 +09:00
Kconfig.include x86/kconfig: Add as-instr64 macro to properly evaluate AS_WRUSS 2024-06-20 19:48:18 +02:00
kernel-doc mm/slab: Plumb kmem_buckets into __do_kmalloc_node() 2024-07-03 12:24:19 +02:00
ld-version.sh kbuild: Make ld-version.sh more robust against version string changes 2024-07-15 03:13:32 +09:00
leaking_addresses.pl
Lindent
link-vmlinux.sh Kbuild fixes for v6.11 (2nd) 2024-08-23 07:43:15 +08:00
make_fit.py scripts/make_fit: Support decomposing DTBs 2024-07-16 01:08:37 +09:00
Makefile arch: um: rust: Add i386 support for Rust 2024-07-03 12:22:22 +02:00
Makefile.asm-headers kbuild: fix rebuild of generic syscall headers 2024-07-18 10:01:55 -07:00
Makefile.btf kbuild,bpf: Add module-specific pahole flags for distilled base BTF 2024-06-21 14:45:07 -07:00
Makefile.build kbuild: fix typos "prequisites" to "prerequisites" 2024-08-23 02:41:02 +09:00
Makefile.clang
Makefile.clean
Makefile.compiler
Makefile.debug
Makefile.defconf
Makefile.dtbinst kbuild: Install dtb files as 0644 in Makefile.dtbinst 2024-06-26 00:18:57 +09:00
Makefile.extrawarn
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host kbuild: Use $(obj)/%.cc to fix host C++ module builds 2024-06-26 00:18:57 +09:00
Makefile.kasan
Makefile.kcov
Makefile.kcsan
Makefile.kmsan
Makefile.lib kbuild: clean up code duplication in cmd_fdtoverlay 2024-08-06 13:58:28 +09:00
Makefile.modfinal kbuild: fix typos "prequisites" to "prerequisites" 2024-08-23 02:41:02 +09:00
Makefile.modinst
Makefile.modpost
Makefile.package kbuild: add script and target to generate pacman package 2024-07-22 01:24:22 +09:00
Makefile.randstruct
Makefile.ubsan
Makefile.userprogs
Makefile.vdsoinst more s390 updates for 6.10 merge window 2024-05-21 12:09:36 -07:00
Makefile.vmlinux kbuild: fix typos "prequisites" to "prerequisites" 2024-08-23 02:41:02 +09:00
Makefile.vmlinux_o kbuild: fix typos "prequisites" to "prerequisites" 2024-08-23 02:41:02 +09:00
makelst
markup_oops.pl
min-tool-version.sh
misc-check
mkcompile_h
mksysmap kbuild: change scripts/mksysmap into sed script 2024-05-29 16:40:03 +09:00
mkuboot.sh
module.lds.S
modules-check.sh
nsdeps
objdiff
objdump-func
orc_hash.sh
pahole-version.sh
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl
relocs_check.sh
remove-stale-files kbuild: clean up scripts/remove-stale-files 2024-07-20 16:33:45 +09:00
rust_is_available_bindgen_0_66.h rust: warn about bindgen versions 0.66.0 and 0.66.1 2024-07-10 10:28:52 +02:00
rust_is_available_bindgen_libclang.h
rust_is_available_test.py rust: warn about bindgen versions 0.66.0 and 0.66.1 2024-07-10 10:28:52 +02:00
rust_is_available.sh rust: warn about bindgen versions 0.66.0 and 0.66.1 2024-07-10 10:28:52 +02:00
rustdoc_test_builder.rs
rustdoc_test_gen.rs
setlocalversion
show_delta
sign-file.c
sorttable.c
sorttable.h
spdxcheck-test.sh
spdxcheck.py
spdxexclude
spelling.txt kernel-wide: fix spelling mistakes like "assocative" -> "associative" 2024-06-28 19:36:28 -07:00
sphinx-pre-install
split-man.pl
stackdelta
stackusage
subarch.include
syscall.tbl syscalls: add back legacy __NR_nfsservctl macro 2024-08-06 08:57:02 +02:00
syscallhdr.sh
syscallnr.sh
syscalltbl.sh x86/syscall: Mark exit[_group] syscall handlers __noreturn 2024-06-28 15:23:38 +02:00
tags.sh
test_fortify.sh
tools-support-relr.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh