linux/security/ipe
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
..
.gitignore scripts: add boot policy generation program 2024-08-20 14:03:39 -04:00
audit.c ipe: Add AT_EXECVE_CHECK support for script enforcement 2025-12-02 19:37:01 -08:00
audit.h ipe: add permissive toggle 2024-08-20 14:02:27 -04:00
digest.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
digest.h ipe: add support for dm-verity as a trust provider 2024-08-20 14:02:45 -04:00
eval.c ipe: enable support for fs-verity as a trust provider 2024-08-20 14:03:35 -04:00
eval.h ipe: enable support for fs-verity as a trust provider 2024-08-20 14:03:35 -04:00
fs.c ipe: move initcalls to the LSM framework 2025-10-22 19:24:25 -04:00
fs.h ipe: add userspace interface 2024-08-20 14:02:15 -04:00
hooks.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
hooks.h ipe: Add AT_EXECVE_CHECK support for script enforcement 2025-12-02 19:37:01 -08:00
ipe.c ipe/stable-6.19 PR 20251202 2025-12-03 11:19:34 -08:00
ipe.h ipe: move initcalls to the LSM framework 2025-10-22 19:24:25 -04:00
Kconfig ipe: use SHA-256 library API instead of crypto_shash API 2025-07-28 18:54:18 -07:00
Makefile ipe: kunit test for parser 2024-08-20 14:03:43 -04:00
policy.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
policy.h ipe: enable support for fs-verity as a trust provider 2024-08-20 14:03:35 -04:00
policy_fs.c ipe: don't bother with removal of files in directory we'll be removing 2025-06-17 18:10:53 -04:00
policy_parser.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
policy_parser.h ipe: add policy parser 2024-08-20 14:01:00 -04:00
policy_tests.c ipe: Add missing terminator to list of unit tests 2024-09-23 15:53:37 -04:00