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
Makefile um: Add initial SMP support 2025-10-27 16:41:15 +01:00
asm-offsets.c Address various objtool scalability bugs/inefficiencies exposed by 2025-12-06 11:56:51 -08:00
config.c.in
dtb.c um: Add missing trailing newline to help messages 2025-09-10 14:23:37 +02:00
dyn.lds.S
early_printk.c
exec.c um: Stop tracking stub's PID via userspace_pid[] 2025-07-13 19:42:49 +02:00
exitcode.c
gprof_syms.c
initrd.c
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
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
reboot.c
sigio.c
signal.c
smp.c um: Add initial SMP support 2025-10-27 16:41:15 +01:00
stacktrace.c
sysrq.c
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
umid.c
uml.lds.S
vmlinux.lds.S