linux/drivers/hv
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
..
channel.c Drivers: hv: fix missing kernel-doc description for 'size' in request_arr_init() 2025-11-15 06:18:16 +00:00
channel_mgmt.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
connection.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
hv.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
hv_balloon.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
hv_common.c mshv: Handle insufficient root memory hypervisor statuses 2026-02-19 06:42:11 +00:00
hv_debugfs.c hv_debugfs: Make hv_debug_root static 2020-04-04 17:47:43 +01:00
hv_kvp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hv_proc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hv_snapshot.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hv_trace.c hv: add SPDX license to trace 2018-03-28 13:24:56 +02:00
hv_trace.h Drivers: hv: vmbus: Drivers: hv: vmbus: Introduce CHANNELMSG_MODIFYCHANNEL_RESPONSE 2021-04-18 13:03:11 +00:00
hv_trace_balloon.h hv_balloon: trace post_status 2018-03-06 09:57:17 -08:00
hv_util.c Drivers: hv: use kmalloc_array() instead of kmalloc() 2025-12-05 23:16:49 +00:00
hv_utils_transport.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hv_utils_transport.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 280 2019-06-05 17:36:36 +02:00
hyperv_vmbus.h mshv: Use try_cmpxchg() instead of cmpxchg() 2026-02-18 23:27:20 +00:00
Kconfig mshv: Add support for movable memory regions 2025-12-05 23:20:49 +00:00
Makefile mshv: Add debugfs to view hypervisor statistics 2026-02-04 06:17:05 +00:00
mshv.h mshv: Use common "entry virt" APIs to do work in root before running guest 2025-09-30 22:50:48 +00:00
mshv_common.c mshv: hide x86-specific functions on arm64 2025-12-17 18:04:15 +00:00
mshv_debugfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mshv_debugfs_counters.c mshv: Add data for printing stats page counters 2026-02-04 06:17:05 +00:00
mshv_eventfd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mshv_eventfd.h mshv: clear eventfd counter on irqfd shutdown 2026-02-04 06:36:19 +00:00
mshv_irq.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
mshv_portid_table.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_regions.c mshv: make field names descriptive in a header struct 2026-02-06 07:03:35 +00:00
mshv_root.h mshv: make field names descriptive in a header struct 2026-02-06 07:03:35 +00:00
mshv_root_hv_call.c mshv: Introduce hv_deposit_memory helper functions 2026-02-19 06:38:48 +00:00
mshv_root_main.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mshv_synic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mshv_vtl.h Drivers: hv: Introduce mshv_vtl driver 2025-12-05 23:16:26 +00:00
mshv_vtl_main.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ring_buffer.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
vmbus_drv.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00