Skip to content

security: Split out hook definitions into lsm_hook_types.h

Sargun Dhillon linux-security-module lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4security: Move hook definitions from lsm_hooks.h to lsm_hook_types.hinclude/linux/lsm_hook_types.h include/linux/lsm_hooks.h+1670 -16990 replies
2/4security: Refactor security hooks into structured hooksinclude/linux/lsm_hook_types.h include/linux/lsm_hooks.h+266 -2620 replies
3/4security: Make security_hook_heads use definitions in lsm_hook_types.hinclude/linux/lsm_hooks.h+5 -2250 replies
4/4security: generated security hook initialization based on lsm_hook_types.hscripts/gcc-plugins/randomize_layout_plugin.c security/security.c+12 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] security: Split out hook definitions into lsm_hook_types.h

This moves all of the LSM hooks type information into a separate file, lsm_hook_types.h. This enables us to use this file, along with macros to generate the security_hook_heads struct, as well as the security hooks union without having to duplicate definitions.

This will be useful for further datastructures which want to use the set of security hooks in a completely unrolled way, along with the type information there within.

A couple uses are already taken into account:
* initialization of security_hook_heads
* generation of the security_hook_heads datastructure

There are a few things we can follow up with, including:
* generation of security.h
* generation of datastructures such as static_keys for performance enhancement

Sargun Dhillon (4):
security: Move hook definitions from lsm_hooks.h to lsm_hook_types.h
security: Refactor security hooks into structured hooks
security: Make security_hook_heads use definitions in lsm_hook_types.h
security: generated security hook initialization based on
lsm_hook_types.h

 include/linux/lsm_hook_types.h                | 1669 +++++++++++++++++++++
 include/linux/lsm_hooks.h                     | 1934 +------------------------
 scripts/gcc-plugins/randomize_layout_plugin.c |    2 -
 security/security.c                           |   17 +-
 4 files changed, 1691 insertions(+), 1931 deletions(-)
 create mode 100644 include/linux/lsm_hook_types.h
Signature · 6 lines
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html