From: Ingo Molnar <mingo@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
Kees Cook <keescook@chromium.org>, x86-ml <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v1.1] x86/mm/ASLR: Propagate ASLR status to kernel proper
Date: Thu, 2 Apr 2015 13:07:13 +0200 [thread overview]
Message-ID: <20150402110713.GA29311@gmail.com> (raw)
In-Reply-To: <20150402040352.GA3483@pd.tnic>
* Borislav Petkov <bp@alien8.de> wrote:
> --- a/arch/x86/kernel/module.c
> +++ b/arch/x86/kernel/module.c
> @@ -33,6 +33,7 @@
>
> #include <asm/page.h>
> #include <asm/pgtable.h>
> +#include <asm/setup.h>
>
> #if 0
> #define DEBUGP(fmt, ...) \
> @@ -47,21 +48,13 @@ do { \
>
> #ifdef CONFIG_RANDOMIZE_BASE
> static unsigned long module_load_offset;
> -static int randomize_modules = 1;
>
> /* Mutex protects the module_load_offset. */
> static DEFINE_MUTEX(module_kaslr_mutex);
>
> -static int __init parse_nokaslr(char *p)
> -{
> - randomize_modules = 0;
> - return 0;
> -}
> -early_param("nokaslr", parse_nokaslr);
So doesn't a 'nokaslr' boot option still make sense, to be able to
debug KASLR failures and such?
> + if (kaslr_enabled())
> + pr_emerg("Kernel Offset: 0x%lx from 0x%lx (relocation range: 0x%lx-0x%lx)\n",
> + (unsigned long)&_text - __START_KERNEL,
> + __START_KERNEL,
> + __START_KERNEL_map,
> + MODULES_VADDR-1);
> + else
> + pr_emerg("Kernel Offset: disabled\n");
Nit: curly braces for multi-line statements and so.
Thanks,
Ingo
next prev parent reply other threads:[~2015-04-02 11:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 10:59 [PATCH] x86/mm/ASLR: Propagate ASLR status to kernel proper Borislav Petkov
2015-04-02 4:03 ` [PATCH v1.1] " Borislav Petkov
2015-04-02 11:07 ` Ingo Molnar [this message]
2015-04-02 11:19 ` Borislav Petkov
2015-04-02 11:29 ` Ingo Molnar
2015-04-02 11:50 ` Borislav Petkov
2015-04-13 23:18 ` Yinghai Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150402110713.GA29311@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox