linux/arch/um/drivers
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
..
chan.h um: chan: use blocking IO for console output for time-travel 2024-07-03 12:18:02 +02:00
chan_kern.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
chan_user.c um: Use os_set_pdeathsig helper in winch thread/process 2024-10-25 11:34:55 +02:00
chan_user.h tty: um: convert to u8/__u8 and size_t 2023-12-08 12:02:38 +01:00
cow.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
cow_sys.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cow_user.c um: ubd: use 64-bit time_t where possible 2019-12-18 18:07:31 +01:00
fd.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
harddog.h um: harddog: fix modular build 2023-05-10 00:21:30 +02:00
harddog_kern.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
harddog_user.c um: harddog: fix modular build 2023-05-10 00:21:30 +02:00
harddog_user_exp.c um: harddog: fix modular build 2023-05-10 00:21:30 +02:00
hostaudio_kern.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig um: virt-pci: Switch to msi_create_parent_irq_domain() 2025-07-11 08:49:01 +02:00
line.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
line.h tty: um: convert to u8/__u8 and size_t 2023-12-08 12:02:38 +01:00
Makefile um: Remove file-based iomem emulation support 2025-10-27 16:37:12 +01:00
mconsole.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
mconsole_kern.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
mconsole_kern.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
mconsole_user.c minmax: make generic MIN() and MAX() macros available everywhere 2024-07-28 15:49:18 -07:00
null.c tty: um: convert to u8/__u8 and size_t 2023-12-08 12:02:38 +01:00
port.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
port_kern.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
port_user.c um: port_user: Improve error handling when port-helper is not found 2022-03-11 10:55:55 +01:00
pty.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
random.c um: Rewrite the sigio workaround based on epoll and tgkill 2025-03-20 09:28:44 +01:00
rtc.h um: add a pseudo RTC 2021-02-12 21:38:52 +01:00
rtc_kern.c um: rtc: use RTC time when calculating the alarm 2025-01-10 13:50:00 +01:00
rtc_user.c um: rtc: Avoid shadowing err in uml_rtc_start() 2025-07-11 08:49:18 +02:00
ssl.c um: Fix help message for ssl-non-raw 2025-09-10 14:23:43 +02:00
stderr_console.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stdio_console.c um: Do not initialise statics to 0. 2022-09-19 23:10:07 +02:00
stdio_console.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
tty.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
ubd.h um: ubd: Switch to the pthread-based helper 2025-03-20 09:26:38 +01:00
ubd_kern.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ubd_user.c um: ubd: Add missing error check in start_io_thread() 2025-06-25 09:25:49 +02:00
vector_kern.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
vector_kern.h um: vector: Replace locks guarding queue depth with atomics 2024-09-12 19:56:05 +02:00
vector_transports.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vector_user.c vector_user: add VDE support 2024-09-12 20:16:42 +02:00
vector_user.h uml: vector: Remove unused definitions VECTOR_{WRITE,HEADERS} 2023-02-13 10:14:32 +01:00
vfio_kern.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
vfio_user.c um: Add VFIO-based virtual PCI driver 2025-05-05 10:25:24 +02:00
vfio_user.h um: Add VFIO-based virtual PCI driver 2025-05-05 10:25:24 +02:00
vhost_user.h um: virtio_uml: query the number of vqs if supported 2024-11-07 18:05:07 +01:00
virt-pci.c um: virt-pci: Switch to msi_create_parent_irq_domain() 2025-07-11 08:49:01 +02:00
virt-pci.h um: virt-pci: Refactor virtio_pcidev into its own module 2025-03-18 11:06:54 +01:00
virtio_pcidev.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
virtio_uml.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
xterm.c um: xterm: Update options for gnome-terminal 2025-05-05 10:21:15 +02:00
xterm.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
xterm_kern.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00