Commit 189f164
Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Conversion performed via this Coccinelle script:
// SPDX-License-Identifier: GPL-2.0-only
// Options: --include-headers-for-types --all-includes --include-headers --keep-comments
virtual patch
@gfp depends on patch && !(file in "tools") && !(file in "samples")@
identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
kzalloc_obj,kzalloc_objs,kzalloc_flex,
kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
@@
ALLOC(...
- , GFP_KERNEL
)
$ make coccicheck MODE=patch COCCI=gfp.cocci
Build and boot tested x86_64 with Fedora 42's GCC and Clang:
Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 32a92f8 commit 189f164
415 files changed
Lines changed: 612 additions & 833 deletions
File tree
- arch
- arm/probes/kprobes
- mips/kernel
- powerpc
- kvm
- perf
- platforms
- cell/spufs
- powernv
- pseries
- riscv
- kernel
- kvm
- s390/kernel
- um/drivers
- x86
- events/intel
- kvm/vmx
- block
- drivers
- accel
- habanalabs
- common
- gaudi2
- gaudi
- goya
- rocket
- acpi
- riscv
- x86
- android
- atm
- base
- block
- rnbd
- bus/mhi/ep
- clk
- aspeed
- clocksource
- comedi/drivers
- crypto/intel/qat/qat_common
- edac
- extcon
- firewire
- gpu/drm
- amd
- amdgpu
- amdkfd
- display
- amdgpu_dm
- dc/resource
- dcn20
- dcn21
- dcn30
- dcn314
- dcn31
- dcn32
- modules/color
- pm
- legacy-dpm
- powerplay/hwmgr
- swsmu/smu13
- display
- i915
- display
- gt/uc
- nouveau
- omapdrm
- panthor
- qxl
- radeon
- v3d
- vmwgfx
- xen
- hid
- hv
- hwmon
- iio
- adc
- dac
- infiniband
- core
- hw
- bnxt_re
- cxgb4
- hfi1
- hns
- mana
- mlx4
- mlx5
- mthca
- usnic
- vmw_pvrdma
- ulp
- isert
- iser
- rtrs
- iommu
- amd
- arm/arm-smmu-v3
- irqchip
- md
- dm-pcache
- media
- pci/tw686x
- usb/pvrusb2
- v4l2-core
- memstick/core
- message/fusion
- mtd
- chips
- nand
- onenand
- raw
- parsers
- net
- can/usb
- dsa
- mv88e6xxx
- sja1105
- ethernet
- amd/pds_core
- broadcom
- bnx2x
- bnxt
- brocade/bna
- cavium/liquidio
- chelsio/cxgb4
- cisco/enic
- engleder
- freescale
- dpaa2
- enetc
- google/gve
- hisilicon/hns3
- huawei/hinic3
- ibm
- intel
- e1000e
- e1000
- i40e
- ice
- devlink
- idpf
- igb
- ixgbe
- libie
- marvell
- octeontx2/nic
- prestera
- mellanox
- mlx4
- mlx5/core
- en
- esw
- lib
- steering
- hws
- sws
- mlxsw
- netronome/nfp
- bpf
- flower
- qlogic
- qede
- qed
- qlcnic
- renesas
- sfc
- falcon
- siena
- spacemit
- stmicro/stmmac
- synopsys
- toshiba
- via
- wangxun/libwx
- netdevsim
- phy
- pse-pd
- wireless
- ath
- ath11k
- ath12k
- ath5k
- wil6210
- broadcom
- b43legacy
- brcm80211/brcmfmac
- intel
- ipw2x00
- iwlwifi
- dvm
- mld
- mvm
- pcie/gen1_2
- intersil/p54
- marvell/mwifiex
- quantenna/qtnfmac
- nvme
- host
- target
- parisc
- platform/x86
- amd
- dell
- dell-wmi-sysman
- hp/hp-bioscfg
- intel
- int1092
- speed_select_if
- powercap
- resctrl
- s390/crypto
- scsi
- aacraid
- be2iscsi
- csiostor
- esas2r
- ibmvscsi
- lpfc
- megaraid
- mpi3mr
- mpt3sas
- qedi
- qla2xxx
- smartpqi
- soundwire
- staging
- greybus
- media/atomisp/pci
- tee/qcomtee
- thermal
- intel/int340x_thermal
- testing
- tty/serial
- usb
- gadget
- function
- isp1760
- storage
- vdpa
- mlx5/net
- vdpa_sim
- vhost
- virt/nitro_enclaves
- xen
- events
- fs
- afs
- btrfs
- ceph
- erofs
- ext4
- isofs
- jffs2
- nfsd
- nfs
- pstore
- smb/client
- squashfs
- udf
- kernel
- bpf
- events
- locking
- rcu
- sched
- time
- trace
- lib
- mm/damon
- tests
- net
- bridge
- core
- ipv4
- ipv6
- mac80211
- netfilter
- ipvs
- sched
- smc
- unix
- wireless
- xdp
- xfrm
- security
- integrity/ima
- selinux/ss
- sound
- core/seq/oss
- firewire
- pci/emu10k1
- soc
- codecs
- qcom/qdsp6
- sof
- synth/emux
- usb/qcom
- xen
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
767 | | - | |
| 767 | + | |
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
372 | | - | |
| 371 | + | |
373 | 372 | | |
374 | 373 | | |
375 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
916 | | - | |
917 | | - | |
| 916 | + | |
918 | 917 | | |
919 | 918 | | |
920 | 919 | | |
921 | 920 | | |
922 | 921 | | |
923 | 922 | | |
924 | 923 | | |
925 | | - | |
926 | | - | |
| 924 | + | |
927 | 925 | | |
928 | 926 | | |
929 | 927 | | |
930 | 928 | | |
931 | | - | |
932 | | - | |
| 929 | + | |
933 | 930 | | |
934 | 931 | | |
935 | 932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1699 | 1699 | | |
1700 | 1700 | | |
1701 | 1701 | | |
1702 | | - | |
1703 | | - | |
| 1702 | + | |
1704 | 1703 | | |
1705 | 1704 | | |
1706 | 1705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2282 | 2282 | | |
2283 | 2283 | | |
2284 | 2284 | | |
2285 | | - | |
| 2285 | + | |
2286 | 2286 | | |
2287 | 2287 | | |
2288 | 2288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | | - | |
| 317 | + | |
319 | 318 | | |
320 | 319 | | |
321 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
| 757 | + | |
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
| 356 | + | |
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
| 285 | + | |
287 | 286 | | |
288 | 287 | | |
289 | 288 | | |
| |||
0 commit comments