History

Merge tag 'mm-nonmm-stable-2025-10-02-15-29' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull non-MM updates from Andrew Morton: - "ida: Remove the ida_simple_xxx() API" from Christophe Jaillet completes the removal of this legacy IDR API - "panic: introduce panic status function family" from Jinchao Wang provides a number of cleanups to the panic code and its various helpers, which were rather ad-hoc and scattered all over the place - "tools/delaytop: implement real-time keyboard interaction support" from Fan Yu adds a few nice user-facing usability changes to the delaytop monitoring tool - "efi: Fix EFI boot with kexec handover (KHO)" from Evangelos Petrongonas fixes a panic which was happening with the combination of EFI and KHO - "Squashfs: performance improvement and a sanity check" from Phillip Lougher teaches squashfs's lseek() about SEEK_DATA/SEEK_HOLE. A mere 150x speedup was measured for a well-chosen microbenchmark - plus another 50-odd singleton patches all over the place * tag 'mm-nonmm-stable-2025-10-02-15-29' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (75 commits) Squashfs: reject negative file sizes in squashfs_read_inode() kallsyms: use kmalloc_array() instead of kmalloc() MAINTAINERS: update Sibi Sankar's email address Squashfs: add SEEK_DATA/SEEK_HOLE support Squashfs: add additional inode sanity checking lib/genalloc: fix device leak in of_gen_pool_get() panic: remove CONFIG_PANIC_ON_OOPS_VALUE ocfs2: fix double free in user_cluster_connect() checkpatch: suppress strscpy warnings for userspace tools cramfs: fix incorrect physical page address calculation kernel: prevent prctl(PR_SET_PDEATHSIG) from racing with parent process exit Squashfs: fix uninit-value in squashfs_get_parent kho: only fill kimage if KHO is finalized ocfs2: avoid extra calls to strlen() after ocfs2_sprintf_system_inode_name() kernel/sys.c: fix the racy usage of task_lock(tsk->group_leader) in sys_prlimit64() paths sched/task.h: fix the wrong comment on task_lock() nesting with tasklist_lock coccinelle: platform_no_drv_owner: handle also built-in drivers coccinelle: of_table: handle SPI device ID tables lib/decompress: use designated initializers for struct compress_format efi: support booting with kexec handover (KHO) ...

Linus Torvalds committed 1 year ago

Commit e406d572 parents 8804d97 9f1c14c78 files · +1619 −476Browse files

Showing the changes to scripts (3 of 78 files). Show all

Unified · Split

3 files
  1. scripts/checkpatch.pl +9 −5
  2. scripts/coccinelle/api/platform_no_drv_owner.cocci +9 −0
  3. scripts/coccinelle/misc/of_table.cocci +7 −7
scripts/checkpatch.pl+9−5
@@ -2636,6 +2636,11 @@ sub exclude_global_initialisers { · 2635 unmodified lines
26362636 $realfile =~ m@/bpf/.*\.bpf\.c$@;
26372637 }
26382638
2639+sub is_userspace {
2640+ my ($realfile) = @_;
2641+ return ($realfile =~ m@^tools/@ || $realfile =~ m@^scripts/@);
2642+}
2643+
26392644 sub process {
26402645 my $filename = shift;
26412646
@@ -3294,7 +3299,7 @@ sub process { · 652 unmodified lines
32943299 # file delta changes
32953300 $line =~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ ||
32963301 # filename then :
3297− $line =~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags)/i ||
3302+ $line =~ /^\s*(?:Fixes:|https?:|$link_tags_search|$signature_tags)/i ||
32983303 # A Fixes:, link or signature tag line
32993304 $commit_log_possible_stack_dump)) {
33003305 WARN("COMMIT_LOG_LONG_LINE",
@@ -7018,21 +7023,20 @@ sub process { · 3717 unmodified lines
70187023 # }
70197024 # }
70207025 # }
7021−
70227026 # strcpy uses that should likely be strscpy
7023− if ($line =~ /\bstrcpy\s*\(/) {
7027+ if ($line =~ /\bstrcpy\s*\(/ && !is_userspace($realfile)) {
70247028 WARN("STRCPY",
70257029 "Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88\n" . $herecurr);
70267030 }
70277031
70287032 # strlcpy uses that should likely be strscpy
7029− if ($line =~ /\bstrlcpy\s*\(/) {
7033+ if ($line =~ /\bstrlcpy\s*\(/ && !is_userspace($realfile)) {
70307034 WARN("STRLCPY",
70317035 "Prefer strscpy over strlcpy - see: https://github.com/KSPP/linux/issues/89\n" . $herecurr);
70327036 }
70337037
70347038 # strncpy uses that should likely be strscpy or strscpy_pad
7035− if ($line =~ /\bstrncpy\s*\(/) {
7039+ if ($line =~ /\bstrncpy\s*\(/ && !is_userspace($realfile)) {
70367040 WARN("STRNCPY",
70377041 "Prefer strscpy, strscpy_pad, or __nonstring over strncpy - see: https://github.com/KSPP/linux/issues/90\n" . $herecurr);
70387042 }
scripts/coccinelle/api/platform_no_drv_owner.cocci+9−0
@@ -10,12 +10,21 @@ virtual org · 9 unmodified lines
1010 virtual report
1111
1212 @match1@
13+declarer name builtin_i2c_driver;
14+declarer name builtin_platform_driver;
15+declarer name builtin_platform_driver_probe;
1316 declarer name module_i2c_driver;
1417 declarer name module_platform_driver;
1518 declarer name module_platform_driver_probe;
1619 identifier __driver;
1720 @@
1821 (
22+ builtin_i2c_driver(__driver);
23+|
24+ builtin_platform_driver(__driver);
25+|
26+ builtin_platform_driver_probe(__driver, ...);
27+|
1928 module_i2c_driver(__driver);
2029 |
2130 module_platform_driver(__driver);
scripts/coccinelle/misc/of_table.cocci+7−7
@@ -1,5 +1,5 @@
11 // SPDX-License-Identifier: GPL-2.0
2−/// Make sure (of/i2c/platform)_device_id tables are NULL terminated
2+/// Make sure (of/i2c/platform/spi)_device_id tables are NULL terminated
33 //
44 // Keywords: of_table i2c_table platform_table
55 // Confidence: Medium
@@ -15,14 +15,14 @@ identifier var, arr; · 9 unmodified lines
1515 expression E;
1616 @@
1717 (
18−struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
18+struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = {
1919 ...,
2020 {
2121 .var = E,
2222 * }
2323 };
2424 |
25−struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
25+struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = {
2626 ...,
2727 * { ..., E, ... },
2828 };
@@ -33,7 +33,7 @@ identifier var, arr; · 4 unmodified lines
3333 expression E;
3434 @@
3535 (
36−struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
36+struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = {
3737 ...,
3838 {
3939 .var = E,
@@ -42,7 +42,7 @@ struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = { · 2 unmodified lines
4242 + { }
4343 };
4444 |
45−struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
45+struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = {
4646 ...,
4747 { ..., E, ... },
4848 + { },
@@ -55,7 +55,7 @@ identifier var, arr; · 6 unmodified lines
5555 expression E;
5656 @@
5757 (
58−struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
58+struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = {
5959 ...,
6060 {
6161 .var = E,
@@ -63,7 +63,7 @@ struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = { · 1 unmodified line
6363 @p1
6464 };
6565 |
66−struct \(of_device_id \| i2c_device_id \| platform_device_id\) arr[] = {
66+struct \(of_device_id \| i2c_device_id \| platform_device_id \| spi_device_id\) arr[] = {
6767 ...,
6868 { ..., E, ... }
6969 @p1