linux/net/xfrm
Kees Cook 189f164e57 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>
2026-02-22 08:26:33 -08:00
..
espintcp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig pfkey: Deprecate pfkey 2025-10-30 09:03:12 +01:00
Makefile xfrm: iptfs: add new iptfs xfrm mode impl 2024-12-05 10:01:35 +01:00
trace_iptfs.h xfrm: iptfs: add tracepoint functionality 2024-12-05 10:02:36 +01:00
xfrm_algo.c xfrm: ipcomp: Use crypto_acomp interface 2025-03-21 17:36:49 +08:00
xfrm_compat.c xfrm: netlink: add config (netlink) options 2024-12-05 10:01:15 +01:00
xfrm_device.c xfrm: Check inner packet family directly from skb_dst 2025-10-30 11:52:06 +01:00
xfrm_hash.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
xfrm_hash.h xfrm: add state hashtable keyed by seq 2021-05-14 13:52:01 +02:00
xfrm_inout.h xfrm: move xfrm4_extract_header to common helper 2020-05-06 09:40:08 +02:00
xfrm_input.c xfrm: Skip redundant replay recheck for the hardware offload path 2025-10-27 10:35:51 +01:00
xfrm_interface_bpf.c bpf: treewide: Annotate BPF kfuncs in BTF 2024-01-31 20:40:56 -08:00
xfrm_interface_core.c xfrm: interface: fix use-after-free after changing collect_md xfrm interface 2025-07-04 09:25:25 +02:00
xfrm_ipcomp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
xfrm_iptfs.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
xfrm_nat_keepalive.c xfrm: Use nested-BH locking for nat_keepalive_sk_ipv[46] 2025-05-15 15:23:31 +02:00
xfrm_output.c xfrm: Prevent locally generated packets from direct output in tunnel mode 2025-10-30 11:52:38 +01:00
xfrm_policy.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
xfrm_proc.c xfrm: snmp: do not use SNMP_MIB_SENTINEL anymore 2025-09-08 18:06:21 -07:00
xfrm_replay.c ipsec-2025-01-27 2025-01-27 15:15:12 -08:00
xfrm_state.c xfrm: set ipv4 no_pmtu_disc flag only on output sa when direction is set 2025-12-15 11:06:25 +01:00
xfrm_state_bpf.c bpf: xfrm: drop dead NULL check in bpf_xdp_get_xfrm_state() 2026-01-02 12:04:29 -08:00
xfrm_sysctl.c net: Remove ctl_table sentinel elements from several networking subsystems 2024-05-03 13:29:42 +01:00
xfrm_user.c xfrm: fix memory leak in xfrm_add_acquire() 2025-11-14 10:12:36 +01:00