public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Kees Cook <keescook@chromium.org>,
	crash-utility@redhat.com, linux-kernel@vger.kernel.org,
	Dave Anderson <anderson@redhat.com>,
	Andrew Honig <ahonig@google.com>,
	Eugene Surovegin <surovegin@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Yinghai Lu <yinghai@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH v2] x86, kaslr: export offset in VMCOREINFO ELF notes
Date: Mon, 27 Jan 2014 16:25:57 +0100	[thread overview]
Message-ID: <20140127152557.GA27792@gmail.com> (raw)
In-Reply-To: <52E669F1.9080603@intel.com>


* Adrian Hunter <adrian.hunter@intel.com> wrote:

> On 25/01/14 09:47, Ingo Molnar wrote:
> > 
> > * Kees Cook <keescook@chromium.org> wrote:
> > 
> >> From: Eugene Surovegin <surovegin@google.com>
> >>
> >> Include kASLR offset in VMCOREINFO ELF notes to assist in debugging.
> >>
> >> Signed-off-by: Eugene Surovegin <surovegin@google.com>
> >> Signed-off-by: Kees Cook <keescook@chromium.org>
> >> ---
> >> v2:
> >>  - make sure "From:" got sent correctly
> >> ---
> >>  arch/x86/kernel/machine_kexec_64.c |    2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
> >> index 4eabc160696f..679cef0791cd 100644
> >> --- a/arch/x86/kernel/machine_kexec_64.c
> >> +++ b/arch/x86/kernel/machine_kexec_64.c
> >> @@ -279,5 +279,7 @@ void arch_crash_save_vmcoreinfo(void)
> >>  	VMCOREINFO_SYMBOL(node_data);
> >>  	VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
> >>  #endif
> >> +	vmcoreinfo_append_str("KERNELOFFSET=%lx\n",
> >> +			      (unsigned long)&_text - __START_KERNEL);
> >>  }
> > 
> > I've Cc:-ed Adrian Hunter, who has sent the following kaslr fixes for 
> > perf yesterday:
> > 
> >   http://lkml.org/lkml/2014/1/24/220
> > 
> > Adrian, is this patch the right solution from the perf tooling 
> > perspective?
> 
> perf tools isn't a consumer of VMCOREINFO although I see VMCOREINFO 
> already has _stext which would be enough for many purposes.

Yes - but let me explain where I'm coming from: I'd like the recent 
KASLR related perf /proc/kcore based annotation bug to be fixed 
properly.

Currently I'm not sure about the status of it. In your fixes 
submission:

  Date: Fri, 24 Jan 2014 17:10:10 +0200
  From: Adrian Hunter <adrian.hunter@intel.com>
  Subject: [PATCH 0/8] perf tools: kaslr fixes

you mentioned the following:

    "- mustn't use kcore if the kernel has moved"

Does this that /proc/kcore annotation will not work if KASLR is 
active?

If yes then given that I expect most distros to turn on KASLR this 
would essentially make /proc/kcore useless on a large set of Linux 
systems. That would be suboptimal.

Thanks,

	Ingo

  reply	other threads:[~2014-01-27 15:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 17:31 [PATCH v2] x86, kaslr: export offset in VMCOREINFO ELF notes Kees Cook
2014-01-25  7:47 ` Ingo Molnar
2014-01-27 14:15   ` Adrian Hunter
2014-01-27 15:25     ` Ingo Molnar [this message]
2014-01-27 15:56       ` Adrian Hunter
2014-01-27 16:19         ` Peter Zijlstra
2014-01-27 16:22           ` Peter Zijlstra
2014-01-27 18:41             ` Andrew Honig
2014-01-27 19:33               ` Peter Zijlstra
2014-02-21 20:25 ` Kees Cook
2014-02-26  1:06 ` [tip:x86/urgent] " tip-bot for Eugene Surovegin

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=20140127152557.GA27792@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=adrian.hunter@intel.com \
    --cc=ahonig@google.com \
    --cc=anderson@redhat.com \
    --cc=crash-utility@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=surovegin@google.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=yinghai@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