diff options
| author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2018-08-22 00:56:13 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-22 13:52:47 -0400 |
| commit | 1b1eeca7e4c19fa76d409d4c7b338dba21f2df45 (patch) | |
| tree | 6443f1ee2cdc661123076f02bda70dc25852045e /security | |
| parent | 7290d58095712a89f845e1bca05334796dd49ed2 (diff) | |
init: allow initcall tables to be emitted using relative references
Allow the initcall tables to be emitted using relative references that
are only half the size on 64-bit architectures and don't require fixups
at runtime on relocatable kernels.
Link: http://lkml.kernel.org/r/20180704083651.24360-5-ard.biesheuvel@linaro.org
Acked-by: James Morris <james.morris@microsoft.com>
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Petr Mladek <pmladek@suse.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morris <jmorris@namei.org>
Cc: Jessica Yu <jeyu@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Nicolas Pitre <nico@linaro.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Garnier <thgarnie@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security')
| -rw-r--r-- | security/security.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/security/security.c b/security/security.c index 47cfff01d7ec..736e78da1ab9 100644 --- a/security/security.c +++ b/security/security.c | |||
| @@ -48,14 +48,17 @@ static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1] = | |||
| 48 | static void __init do_security_initcalls(void) | 48 | static void __init do_security_initcalls(void) |
| 49 | { | 49 | { |
| 50 | int ret; | 50 | int ret; |
| 51 | initcall_t *call; | 51 | initcall_t call; |
| 52 | call = __security_initcall_start; | 52 | initcall_entry_t *ce; |
| 53 | |||
| 54 | ce = __security_initcall_start; | ||
| 53 | trace_initcall_level("security"); | 55 | trace_initcall_level("security"); |
| 54 | while (call < __security_initcall_end) { | 56 | while (ce < __security_initcall_end) { |
| 55 | trace_initcall_start((*call)); | 57 | call = initcall_from_entry(ce); |
| 56 | ret = (*call) (); | 58 | trace_initcall_start(call); |
| 57 | trace_initcall_finish((*call), ret); | 59 | ret = call(); |
| 58 | call++; | 60 | trace_initcall_finish(call, ret); |
| 61 | ce++; | ||
| 59 | } | 62 | } |
| 60 | } | 63 | } |
| 61 | 64 | ||
