linux/arch/um/kernel
Kees Cook 69050f8d6d treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-21 01:02:28 -08:00
..
skas um: Fix incorrect __acquires/__releases annotations 2026-01-05 16:43:32 +01:00
asm-offsets.c Address various objtool scalability bugs/inefficiencies exposed by 2025-12-06 11:56:51 -08:00
config.c.in um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
dtb.c um: Add missing trailing newline to help messages 2025-09-10 14:23:37 +02:00
dyn.lds.S um: move thread info into task 2024-11-12 14:50:31 +01:00
early_printk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
exec.c um: Stop tracking stub's PID via userspace_pid[] 2025-07-13 19:42:49 +02:00
exitcode.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
gprof_syms.c um: Add SPDX headers to files in arch/um/kernel/ 2019-09-15 21:37:17 +02:00
initrd.c um: Do not propagate initrd parameter to kernel 2024-10-23 09:52:49 +02:00
irq.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
kmsg_dump.c arch: um: kmsg_dump: Use console_is_usable 2025-11-27 15:54:50 +01:00
ksyms.c um: Turn signals_* into thread-local variables 2025-10-27 16:41:15 +01:00
load_file.c mm/memblock: add memblock_alloc_or_panic interface 2025-01-25 20:22:38 -08:00
Makefile um: Add initial SMP support 2025-10-27 16:41:15 +01:00
mem.c arch, mm: consolidate initialization of nodes, zones and memory map 2026-01-26 20:02:18 -08:00
physmem.c um: Remove file-based iomem emulation support 2025-10-27 16:37:12 +01:00
process.c um: Add initial SMP support 2025-10-27 16:41:15 +01:00
ptrace.c um/ptrace: Implement HAVE_SYSCALL_TRACEPOINTS 2025-07-11 08:49:02 +02:00
reboot.c um: Remove unused mm_fd field from mm_id 2024-09-12 20:36:22 +02:00
sigio.c um: Rewrite the sigio workaround based on epoll and tgkill 2025-03-20 09:28:44 +01:00
signal.c um: Drop support for hosts without SYSEMU_SINGLESTEP support 2024-01-04 23:29:11 +01:00
smp.c um: Add initial SMP support 2025-10-27 16:41:15 +01:00
stacktrace.c UML: add support for KASAN under x86_64 2022-07-17 23:35:22 +02:00
sysrq.c um: Always dump trace for specified task in show_stack 2024-11-07 18:05:22 +01:00
time.c um: Define timers on a per-CPU basis 2025-10-27 16:41:15 +01:00
tlb.c um: Add initial SMP support 2025-10-27 16:41:15 +01:00
trap.c um: Add initial SMP support 2025-10-27 16:41:15 +01:00
um_arch.c um: Add initial SMP support 2025-10-27 16:41:15 +01:00
um_arch.h um: Move declarations to proper headers 2024-04-22 21:58:48 +02:00
umid.c uml: Remove the initialization of statics to 0 2022-09-19 23:10:07 +02:00
uml.lds.S um: move thread info into task 2024-11-12 14:50:31 +01:00
vmlinux.lds.S UML: define RUNTIME_DISCARD_EXIT 2023-02-13 10:14:31 +01:00