Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1215100
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] perf/x86/intel/ds: Work around BTS leaking kernel addresses |
| Date | 2015-08-28 07:40 +0200 |
| Message-ID | <q2kym-2kM-7@gated-at.bofh.it> (permalink) |
| References | <q2785-8ds-11@gated-at.bofh.it> <q2786-8ds-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
* Alexander Shishkin <alexander.shishkin@linux.intel.com> wrote:
> + for (at = base; at < top; at++) {
> + /*
> + * Note that right now *this* BTS code only works if
> + * attr::exclude_kernel is set, but let's keep this extra
> + * check here in case that changes.
> + */
> + if (event->attr.exclude_kernel &&
> + (at->from >= PAGE_OFFSET || at->to >= PAGE_OFFSET))
> + skip++;
Yeah, so that only works on 32-bit kernels, on 64-bit kernels the check for kernel
addresses is to see whether it's a negative address. PAGE_OFFSET points to above
any hypervisor's address, so even with your fix we could still leak hypervisor
addresses.
I.e. use the kernel_ip() primitive instead.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] perf/x86/intel/ds: Work around BTS leaking kernel addresses Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-27 17:20 +0200
Re: [PATCH 1/2] perf/x86/intel/ds: Work around BTS leaking kernel addresses Ingo Molnar <mingo@kernel.org> - 2015-08-28 07:40 +0200
Re: [PATCH 1/2] perf/x86/intel/ds: Work around BTS leaking kernel addresses Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2015-08-28 08:10 +0200
csiph-web