All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Peter Zijlstra <peterz@infradead.org>, X86 ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] x86/Kconfig: Disable KASLR on debug builds
Date: Mon, 4 Dec 2023 10:42:15 +0000	[thread overview]
Message-ID: <ZW2tBy_8U5cfEkmk@FVFF77S0Q05N> (raw)
In-Reply-To: <20231130124909.GEZWiExTP4J1pjNxPq@fat_crate.local>

On Thu, Nov 30, 2023 at 01:49:09PM +0100, Borislav Petkov wrote:
> On Thu, Nov 30, 2023 at 01:08:31PM +0100, Peter Zijlstra wrote:
> > Works for me, but I have "nokaslr no_hash_pointers" on all my machines
> > by now. It goes right along with "debug ignore_loglevel
> > sysrq_always_enabled earlyprintk=serial,ttyS0,115200" :-)
> 
> Bah, there's cmdline switches. Lemme add them to all my scripts starting
> guests and grub too. Thanks for the hint!
> 
> I guess we could still do the Kconfig dependency when we're on new
> machines, without the scripts.
> 
> Btw, I'm not the only one who's walked right into this one:
> 
> config KCOV
>         bool "Code coverage for fuzzing"
> 
> 	...
> 
>           If RANDOMIZE_BASE is enabled, PC values will not be stable across
>           different machines and across reboots. If you need stable PC values,
>           disable RANDOMIZE_BASE.

IIUC that's no longer necessary, and the Kconfig.debug wording is stale.

That wording was introduced in March 2016 as part of the original KCOV support
in commit:

  5c9a8750a6409c63 ("kernel: add kcov code coverage")

Later, in December 2016 we made KCOV adjust the address to remove the KASLR
offset in commit:

  4983f0ab7ffaad1e ("kcov: make kcov work properly with KASLR enabled")

... so I think that's been stale for ~7 years, and we just forgot to clean up
the Kconfig.debug text.

Mark.

  reply	other threads:[~2023-12-04 10:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 12:05 [RFC PATCH] x86/Kconfig: Disable KASLR on debug builds Borislav Petkov
2023-11-30 12:08 ` Peter Zijlstra
2023-11-30 12:49   ` Borislav Petkov
2023-12-04 10:42     ` Mark Rutland [this message]
2023-12-04 15:49       ` Borislav Petkov
2023-12-04 17:20         ` Mark Rutland
2023-11-30 18:10 ` Nathan Chancellor
2023-11-30 19:34   ` Borislav Petkov
2023-12-01 16:16     ` Nathan Chancellor
2023-12-01 16:24       ` Borislav Petkov
2023-12-01 16:58         ` Nathan Chancellor

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=ZW2tBy_8U5cfEkmk@FVFF77S0Q05N \
    --to=mark.rutland@arm.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.