lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Aug 2015 09:06:32 +0300
From:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...radead.org>
Subject: Re: [PATCH 1/2] perf/x86/intel/ds: Work around BTS leaking kernel addresses

Ingo Molnar <mingo@...nel.org> writes:

> * Alexander Shishkin <alexander.shishkin@...ux.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.

That's what I've been looking for, thanks!

Regards,
--
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ