linux/arch/powerpc/kvm
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
..
book3s.c KVM: PPC: Use kvm_faultin_pfn() to handle page faults on Book3s PR 2024-10-25 13:00:49 -04:00
book3s.h KVM: delete .change_pte MMU notifier callback 2024-04-11 13:18:27 -04:00
book3s_32_mmu.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
book3s_32_mmu_host.c powerpc/vmlinux: Remove etext, edata and end 2025-02-24 12:26:21 +05:30
book3s_32_sr.S KVM: PPC: Book3S PR: Enable MSR_DR for switch_mmu_context() 2022-05-11 23:03:16 +10:00
book3s_64_entry.S docs: move powerpc under arch 2023-10-10 13:35:55 -06:00
book3s_64_mmu.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
book3s_64_mmu_host.c KVM: PPC: Use kvm_faultin_pfn() to handle page faults on Book3s PR 2024-10-25 13:00:49 -04:00
book3s_64_mmu_hv.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
book3s_64_mmu_radix.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
book3s_64_slb.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 266 2019-06-05 17:30:28 +02:00
book3s_64_vio.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
book3s_emulate.c powerpc: rename SPRN_HID2 define to SPRN_HID2_750FX 2024-05-08 00:25:00 +10:00
book3s_exports.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 266 2019-06-05 17:30:28 +02:00
book3s_hv.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
book3s_hv.h KVM: PPC: Book3S HV: Add one-reg interface for HASHPKEYR register 2024-06-06 22:39:04 +10:00
book3s_hv_builtin.c KVM: PPC: Book3S HV: Introduce low level MSR accessor 2023-09-14 22:04:24 +10:00
book3s_hv_hmi.c KVM: PPC: Book3S HV P9: Remove subcore HMI handling 2021-11-24 21:09:03 +11:00
book3s_hv_interrupts.S powerpc: Fix objtool unannotated intra-function call warnings 2022-11-15 20:11:47 +11:00
book3s_hv_nested.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
book3s_hv_nestedv2.c kvm powerpc/book3s-apiv2: Add support for Hostwide GSB elements 2025-04-16 22:16:09 +05:30
book3s_hv_p9_entry.c KVM: PPC: Use accessors for VCPU registers 2023-09-14 22:04:24 +10:00
book3s_hv_p9_perf.c powerpc/kvm: Remove comment related to moving PMU code to perf subsystem 2022-07-20 22:28:31 +10:00
book3s_hv_ras.c KVM: PPC: Use accessors for VCORE registers 2023-09-14 22:04:24 +10:00
book3s_hv_rm_mmu.c KVM: PPC: Always use the GPR accessors 2023-09-14 22:04:23 +10:00
book3s_hv_rm_xics.c genirq: Convert kstat_irqs to a struct 2024-04-12 17:08:05 +02:00
book3s_hv_rmhandlers.S powerpc: Fix 'intra_function_call not a direct call' warning 2025-03-10 10:00:17 +05:30
book3s_hv_tm.c KVM: PPC: Book3S HV Nested: Fix TM softpatch HFAC interrupt emulation 2021-08-25 16:37:17 +10:00
book3s_hv_tm_builtin.c KVM: PPC: Book3S HV: Treat TM-related invalid form instructions on P9 like the valid ones 2020-03-19 16:39:52 +11:00
book3s_hv_uvmem.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
book3s_interrupts.S powerpc: Replace PPC64_ELF_ABI_v{1/2} by CONFIG_PPC64_ELF_ABI_V{1/2} 2022-05-19 23:11:29 +10:00
book3s_mmu_hpte.c KVM: PPC: replace call_rcu by kfree_rcu for simple kmem_cache_free callback 2024-10-16 10:40:31 +11:00
book3s_paired_singles.c KVM: PPC: Make kvmppc_get_last_inst() produce a ppc_inst_t 2023-04-03 15:45:41 +10:00
book3s_pr.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
book3s_pr_papr.c KVM: remove KVM_REQ_UNHALT 2022-09-26 12:37:21 -04:00
book3s_rmhandlers.S KVM: PPC: Enable prefixed instructions for HV KVM and disable for PR KVM 2023-04-03 15:45:59 +10:00
book3s_rtas.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
book3s_segment.S KVM: PPC: Book3S 64: move bad_host_intr check to HV handler 2021-06-10 22:12:12 +10:00
book3s_xics.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
book3s_xics.h KVM: PPC: Book3s: Fix warning about xics_rm_h_xirr_x 2022-06-24 12:58:33 +10:00
book3s_xive.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
book3s_xive.h powerpc/xive: remove unused parameter 2022-11-24 23:12:18 +11:00
book3s_xive_native.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
booke.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
booke.h KVM: PPC: BookE: Fix W=1 warnings 2023-04-03 14:54:20 +10:00
booke_emulate.c KVM: PPC: Clean up redundant 'kvm_run' parameters 2020-05-27 11:39:31 +10:00
booke_interrupts.S powerpc: Remove CONFIG_FSL_BOOKE 2022-09-26 22:47:37 +10:00
bookehv_interrupts.S KVM: PPC: Fetch prefixed instructions from the guest 2023-04-03 15:45:50 +10:00
e500.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
e500.h KVM: e500: track host-writability of pages 2025-01-12 10:35:41 +01:00
e500_emulate.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
e500_mmu.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
e500_mmu_host.c KVM: e500: perform hugepage check after looking up the PFN 2025-01-12 10:53:00 +01:00
e500_mmu_host.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
e500mc.c powerpc/inst: add PPC_TLBILX_LPID 2023-08-16 23:54:48 +10:00
emulate.c KVM: PPC: Fetch prefixed instructions from the guest 2023-04-03 15:45:50 +10:00
emulate_loadstore.c KVM: PPC: Reduce reliance on analyse_instr() in mmio emulation 2023-12-07 23:33:08 +11:00
fpu.S powerpc/32: Fix objtool unannotated intra-function call warnings 2022-11-18 19:00:06 +11:00
guest-state-buffer.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
Kconfig KVM: Make support for kvm_arch_vcpu_async_ioctl() mandatory 2025-11-05 11:03:10 -08:00
Makefile KVM: PPC: Add support for nestedv2 guests 2023-09-14 22:04:24 +10:00
mpic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
powerpc.c KVM: Rename kvm_arch_vcpu_async_ioctl() to kvm_arch_vcpu_unlocked_ioctl() 2025-11-05 11:03:11 -08:00
test-guest-state-buffer.c kvm powerpc/book3s-apiv2: Add kunit tests for Hostwide GSB elements 2025-04-16 22:16:09 +05:30
timing.c KVM: PPC: Merge powerpc's debugfs entry content into generic entry 2022-02-02 20:30:26 +11:00
timing.h KVM: powerpc: Enable commented out BUILD_BUG_ON() assertion 2025-04-16 22:19:38 +05:30
tm.S powerpc: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-16 23:54:48 +10:00
trace.h KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE 2018-11-07 23:04:38 +11:00
trace_book3s.h KVM: PPC: Book3S HV: Add H_VIRT mapping for tracing exits 2025-06-23 09:58:06 +05:30
trace_booke.h KVM: Move arm64's MMU notifier trace events to generic code 2021-04-17 08:30:56 -04:00
trace_hv.h KVM: PPC: Book3S HV: Fix kmv -> kvm typo 2024-11-14 22:22:30 +11:00
trace_pr.h KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE 2018-11-07 23:04:38 +11:00