LSM: Rename .security_initcall section to .lsm_info

In preparation for switching from initcall to just a regular set of
pointers in a section, rename the internal section name.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: James Morris <james.morris@microsoft.com>
Reviewed-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
This commit is contained in:
Kees Cook 2018-10-10 17:18:19 -07:00 committed by James Morris
parent 1e80cd1672
commit b048ae6e6c
3 changed files with 9 additions and 9 deletions

View File

@ -787,14 +787,14 @@
__con_initcall_end = .;
#define SECURITY_INITCALL \
__security_initcall_start = .; \
KEEP(*(.security_initcall.init)) \
__security_initcall_end = .;
__start_lsm_info = .; \
KEEP(*(.lsm_info.init)) \
__end_lsm_info = .;
/* Older linker script style for security init. */
#define SECURITY_INIT \
.security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \
SECURITY_INITCALL \
.lsm_info.init : AT(ADDR(.lsm_info.init) - LOAD_OFFSET) { \
LSM_INFO \
}
#ifdef CONFIG_BLK_DEV_INITRD

View File

@ -133,7 +133,7 @@ static inline initcall_t initcall_from_entry(initcall_entry_t *entry)
#endif
extern initcall_entry_t __con_initcall_start[], __con_initcall_end[];
extern initcall_entry_t __security_initcall_start[], __security_initcall_end[];
extern initcall_entry_t __start_lsm_info[], __end_lsm_info[];
/* Used for contructor calls. */
typedef void (*ctor_fn_t)(void);
@ -236,7 +236,7 @@ extern bool initcall_debug;
static exitcall_t __exitcall_##fn __exit_call = fn
#define console_initcall(fn) ___define_initcall(fn,, .con_initcall)
#define security_initcall(fn) ___define_initcall(fn,, .security_initcall)
#define security_initcall(fn) ___define_initcall(fn,, .lsm_info)
struct obs_kernel_param {
const char *str;

View File

@ -51,9 +51,9 @@ static void __init do_security_initcalls(void)
initcall_t call;
initcall_entry_t *ce;
ce = __security_initcall_start;
ce = __start_lsm_info;
trace_initcall_level("security");
while (ce < __security_initcall_end) {
while (ce < __end_lsm_info) {
call = initcall_from_entry(ce);
trace_initcall_start(call);
ret = call();