[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52DE8989.1010208@zytor.com>
Date: Tue, 21 Jan 2014 06:51:53 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Ingo Molnar <mingo@...nel.org>
CC: Peter Zijlstra <peterz@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Cong Ding <dinggnu@...il.com>,
"H. Peter Anvin" <hpa@...ux.intel.com>,
Ingo Molnar <mingo@...e.hu>, Kees Cook <keescook@...omium.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mathias Krause <minipli@...glemail.com>,
Michael Davidson <md@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
Subject: Re: [GIT PULL] x86/kaslr for v3.14
On 01/21/2014 06:39 AM, Ingo Molnar wrote:
>>
>> Now this is tricky... if this offset is too easy to get it
>> completely defeats kASLR. On the other hand, I presume that if we
>> are exporting /proc/kcore we're not secure anyway. Kees, I assume
>> that in "secure" mode perf annotations simply wouldn't work anyway?
>
> So /proc/kcore is:
>
> aldebaran:~> ls -l /proc/kcore
> -r-------- 1 root root 140737486266368 Jan 21 15:35 /proc/kcore
>
> i.e. root only.
>
Yes, I mean if we want to be sealed against user space intrusion I'm
assuming /proc/kcore is unavailable, but that we don't
> The thing is, one of my first remarks on this whole KASLR series was
> that tooling needs to work. I suggested that the kernel should only
> expose non-randomized addresses and that all facilities need to
> continue to 'just work' with those. That argument was ignored AFAICS
> and the problem still isn't solved.
>
> I'd argue that solving it in the kernel instead of making all tooling
> variants aware of KASLR one by one is a far more intelligent and
> efficient solution ...
Not ignored, but found not to really work all that well (we had that
discussion in the context of relocated kernels, too.) The problem you
end up with is that as soon as you run into situations where you have to
deal with pointers during debugging, be it using kgdb, stack dumps or
whatever, all the work that you have done in the kernel to try to hide
relocation from the debug infrastructure all of a sudden becomes a huge
liability, and ends up backfiring in a horrific way.
-hpa
--
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