This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [patch] ON_STACK: Warn on buggy Linux i386 kernels


> ________________________________________
> From: Jan Kratochvil [jan.kratochvil@redhat.com]
> Sent: July 3, 2012 10:27 AM
> To: gdb-patches@sourceware.org
> Subject: [patch] ON_STACK: Warn on buggy Linux i386 kernels
> 
> Hi,
> 
> as discussed in:
>         Possible future NX ON_STACk regression Re: [patch 3/3] Use ON_STACK for i386/amd64 (gdb2495.exp regression)
>         http://sourceware.org/ml/gdb-patches/2012-06/msg00568.html
> 
> I have found the problem with ON_STACK inferior calls affects only i386 Linux
> kernels (not x86_64, nor Fedora i386 PAE).  It was fixed/removed in Fedora by
>         commit 88fa1f0332d188795ed73d7ac2b1564e11a0b4cd
>         Author: Dave Jones <davej@redhat.com>
>         Date:   Mon Jun 4 11:56:08 2012 -0400
>             disable 32bit nx, it seems to be broken
>         http://pkgs.fedoraproject.org/gitweb/?p=kernel.git;a=commitdiff;h=88fa1f0332d188795ed73d7ac2b1564e11a0b4cd
>         http://pkgs.fedoraproject.org/gitweb/?p=kernel.git;a=blob_plain;f=linux-2.6-32bit-mmap-exec-randomization.patch;hb=88fa1f0332d188795ed73d7ac2b1564e11a0b4cd
>         http://pkgs.fedoraproject.org/gitweb/?p=kernel.git;a=blob_plain;f=linux-2.6-i386-nx-emulation.patch;hb=88fa1f0332d188795ed73d7ac2b1564e11a0b4cd
>         http://pkgs.fedoraproject.org/gitweb/?p=kernel.git;a=blob_plain;f=nx-emu-remove-cpuinitdata-for-disable_nx-on-x86_32.patch;hb=88fa1f0332d188795ed73d7ac2b1564e11a0b4cd
>         http://pkgs.fedoraproject.org/gitweb/?p=kernel.git;a=blob_plain;f=shlib_base_randomize.patch;hb=88fa1f0332d188795ed73d7ac2b1564e11a0b4cd
> So the last Fedora kernel where it was reproducible is: kernel-3.4.0-1.fc17.i686
> 
> It does not seem to be ever present in upstream ("vanilla") Linux kernels.
> 
> But I have found ubuntu-12.04-dvd-i386.iso (both GA and latest updates) which
> is LTS (=still maintained) is also affected by this problem so I expect there
> maybe vocal feedback.

That's me :)  I'm seeing this warning. IIUC I can safely ignore this warning?
The warning is pretty intimidating:

 (gdb) run
 Starting program: myapp.exe 
 warning: Cannot call inferior functions, you have broken Linux kernel i386 NX (non-executable pages) support!

Thanks for having investigated this.

Marc


> It puts there only a warning.  As it is both off-trunk patch and also the
> patch is present in neither old or new (at least Fedora) kernels and as it
> does not affect the most basic debugging I did not find it worth a workaround.
> Rather Ubuntu should provide a fix IMO.
> 
> 
> Thanks,
> Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]