1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 16:06:04 -05:00
linux/scripts
Dan Carpenter d5d6281ae8 checkpatch: check for missing Fixes tags
This check looks for common words that probably indicate a patch
is a fix.  For now the regex is:

	(?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller)/)

Why are stable patches encouraged to have a fixes tag?  Some people mark
their stable patches as "# 5.10" etc.  This is useful but a Fixes tag is
still a good idea.  For example, the Fixes tag helps in review.  It
helps people to not cherry-pick buggy patches without also
cherry-picking the fix.

Also if a bug affects the 5.7 kernel some people will round it up to
5.10+ because 5.7 is not supported on kernel.org.  It's possible the Bad
Binder bug was caused by this sort of gap where companies outside of
kernel.org are supporting different kernels from kernel.org.

Should it be counted as a Fix when a patch just silences harmless
WARN_ON() stack trace.  Yes.  Definitely.

Is silencing compiler warnings a fix?  It seems unfair to the original
authors, but we use -Werror now, and warnings break the build so let's
just add Fixes tags.  I tell people that silencing static checker
warnings is not a fix but the rules on this vary by subsystem.

Is fixing a minor LTP issue (Linux Test Project) a fix?  Probably?  It's
hard to know what to do if the LTP test has technically always been
broken.

One clear false positive from this check is when someone updated their
debug output and included before and after Call Traces.  Or when crashes
are introduced deliberately for testing.  In those cases, you should
just ignore checkpatch.

Link: https://lkml.kernel.org/r/ZmhUgZBKeF_8ixA6@moroto
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Thorsten Leemhuis <linux@leemhuis.info>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-06-24 22:25:09 -07:00
..
atomic locking/atomic: scripts: fix ${atomic}_sub_and_test() kerneldoc 2024-06-05 15:52:34 +02:00
basic
clang-tools
coccinelle Coccinelle: pm_runtime: Fix grammar in comment 2024-05-20 21:31:33 +02:00
dtc dt-bindings: kbuild: Fix dt_binding_check on unconfigured build 2024-05-30 01:15:58 +09:00
dummy-tools
gcc-plugins
gdb kbuild: scripts/gdb: Replace missed $(srctree)/$(src) w/ $(src) 2024-05-29 16:40:03 +09:00
genksyms
kconfig kconfig: remove wrong expr_trans_bool() 2024-06-06 20:09:10 +09:00
ksymoops
mod modpost: do not warn about missing MODULE_DESCRIPTION() for vmlinux.o 2024-06-07 08:42:31 +09:00
package
selinux
tracing
.gitignore
as-version.sh
asn1_compiler.c
bloat-o-meter
bootgraph.pl
bpf_doc.py
cc-can-link.sh
cc-version.sh
check-git
check-sysctl-docs
check-uapi.sh
check-variable-fonts.sh
check_extable.sh
checkdeclares.pl
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl checkpatch: check for missing Fixes tags 2024-06-24 22:25:09 -07:00
checkstack.pl
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
coccicheck
config
const_structs.checkpatch
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-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
extract_xc3028.pl
faddr2line
file-size.sh
find-unused-docs.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen-randstruct-seed.sh
generate_initcall_order.pl
generate_rust_analyzer.py
generate_rust_target.rs RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
get_abi.pl
get_dvb_firmware
get_feat.pl
get_maintainer.pl
gfp-translate
git.orderFile
head-object-list.txt
headerdep.pl
headers_install.sh
insert-sys-cert.c
install.sh
jobserver-exec
kallsyms.c
Kbuild.include
Kconfig.include
kernel-doc The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
ld-version.sh
leaking_addresses.pl
Lindent
link-vmlinux.sh kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh 2024-06-07 08:42:14 +09:00
make_fit.py scripts/make_fit: Drop fdt image entry compatible string 2024-05-29 16:41:21 +09:00
Makefile LoongArch: rust: Switch to use built-in rustc target 2024-05-14 12:24:18 +08:00
Makefile.asm-generic
Makefile.btf
Makefile.build Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
Makefile.clang
Makefile.clean
Makefile.compiler
Makefile.debug
Makefile.defconf
Makefile.dtbinst
Makefile.extrawarn kbuild: enable -Wcast-function-type-strict unconditionally 2024-05-19 14:36:16 -07:00
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host
Makefile.kasan
Makefile.kcov
Makefile.kcsan
Makefile.kmsan
Makefile.lib Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
Makefile.modfinal kbuild: use GCOV_PROFILE and KCSAN_SANITIZE in scripts/Makefile.modfinal 2024-05-14 23:36:12 +09:00
Makefile.modinst
Makefile.modpost Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
Makefile.package
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 Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
Makefile.vmlinux_o
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 The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
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
rust_is_available.sh
rust_is_available_bindgen_libclang.h
rust_is_available_test.py
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
sphinx-pre-install
split-man.pl
stackdelta
stackusage
subarch.include
syscallhdr.sh
syscallnr.sh
syscalltbl.sh
tags.sh
test_fortify.sh
tools-support-relr.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh