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:	Wed, 29 Jan 2014 09:11:28 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Richard Weinberger <richard@....at>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Kees Cook <keescook@...omium.org>,
	Cong Ding <dinggnu@...il.com>, Ingo Molnar <mingo@...e.hu>,
	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


* Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> On Tue, Jan 28, 2014 at 11:48 AM, Ingo Molnar <mingo@...nel.org> wrote:
> >
> > I really meant it when I said I build without debuginfo! :)
> 
> Ok, but so what?
> 
> As mentioned, nobody sane should build with DEBUG_INFO. But a normal 
> vmlinux file has the symbol information even without it.

So, your mail sure read to me as a rant directed at me, so I thought 
I'd defend myself or something :)

I now realize that the whole episode was caused by me calling the 
vmlinux 'symbol-less':

> > > > AFAICS this won't work in a symbol-less vmlinux. Is there some 
> > > > trick to do it with gdb?

while I should have said 'debuginfo-less'. Mea culpa.

> > So, when I build a kernel, such as with a regular 'make defconfig',
> > the following happens in gdb:
> >
> >   Reading symbols from /home/mingo/tip/vmlinux...(no debugging symbols found)...done.
> >   (gdb) list schedule+0x45
> >   No symbol table is loaded.  Use the "file" command.
> >
> > Is there a way to resolve schedule+0x45 in a regular vmlinux? It 
> > was an honest question.
> 
> That seems to be just a gdb bug (or "UI feature"), in that gdb likes 
> to give misleading error messages and requires odd syntax for some 
> things.

Yeah. Almost as if they worked hard to make annoying users go away or 
something. (LLVM is IMO a blessing because, despite its somewhat 
broken licensing, it cured a similar attitude of the GCC folks. In a 
way competition is more important than licensing details!)

> But you can see that the symbol is perfectly fine:
> 
>   (gdb) list *(schedule+0x45)

Oh, cool. Thanks for that trick - this will save me quite some time in 
the future.

So we can strip absolute addresses just fine from oopses - cool.

I'd even argue to strip the hex on non-randomized kernels as long as 
there's kallsyms around, and only print hex if we don't have any 
symbols.

> So my point is that the hex address doesn't give you *anything* that 
> the symbolic address doesn't give you. [...]

Yeah, and with your trick that's now the case for my debugging as 
well, which is a nice touch.

> [...] Unless you do truly crazy things like actively strip the 
> kernel.

Being crazy is something I try to avoid. (Beyond being a maintainer
of a software project as busy and stressful as the Linux kernel that is.)

Thanks,

	Ingo
--
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