提交 b048ae6e 编写于 作者: K Kees Cook 提交者: James Morris

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: NKees Cook <keescook@chromium.org>
Reviewed-by: NCasey Schaufler <casey@schaufler-ca.com>
Reviewed-by: NJames Morris <james.morris@microsoft.com>
Reviewed-by: NJohn Johansen <john.johansen@canonical.com>
Signed-off-by: NJames Morris <james.morris@microsoft.com>
上级 1e80cd16
...@@ -787,14 +787,14 @@ ...@@ -787,14 +787,14 @@
__con_initcall_end = .; __con_initcall_end = .;
#define SECURITY_INITCALL \ #define SECURITY_INITCALL \
__security_initcall_start = .; \ __start_lsm_info = .; \
KEEP(*(.security_initcall.init)) \ KEEP(*(.lsm_info.init)) \
__security_initcall_end = .; __end_lsm_info = .;
/* Older linker script style for security init. */ /* Older linker script style for security init. */
#define SECURITY_INIT \ #define SECURITY_INIT \
.security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \ .lsm_info.init : AT(ADDR(.lsm_info.init) - LOAD_OFFSET) { \
SECURITY_INITCALL \ LSM_INFO \
} }
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
......
...@@ -133,7 +133,7 @@ static inline initcall_t initcall_from_entry(initcall_entry_t *entry) ...@@ -133,7 +133,7 @@ static inline initcall_t initcall_from_entry(initcall_entry_t *entry)
#endif #endif
extern initcall_entry_t __con_initcall_start[], __con_initcall_end[]; 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. */ /* Used for contructor calls. */
typedef void (*ctor_fn_t)(void); typedef void (*ctor_fn_t)(void);
...@@ -236,7 +236,7 @@ extern bool initcall_debug; ...@@ -236,7 +236,7 @@ extern bool initcall_debug;
static exitcall_t __exitcall_##fn __exit_call = fn static exitcall_t __exitcall_##fn __exit_call = fn
#define console_initcall(fn) ___define_initcall(fn,, .con_initcall) #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 { struct obs_kernel_param {
const char *str; const char *str;
......
...@@ -51,9 +51,9 @@ static void __init do_security_initcalls(void) ...@@ -51,9 +51,9 @@ static void __init do_security_initcalls(void)
initcall_t call; initcall_t call;
initcall_entry_t *ce; initcall_entry_t *ce;
ce = __security_initcall_start; ce = __start_lsm_info;
trace_initcall_level("security"); trace_initcall_level("security");
while (ce < __security_initcall_end) { while (ce < __end_lsm_info) {
call = initcall_from_entry(ce); call = initcall_from_entry(ce);
trace_initcall_start(call); trace_initcall_start(call);
ret = call(); ret = call();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册