2.6.37 patch on i686

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

2.6.37 patch on i686

Postby arekm » Thu Jan 20, 2011 2:57 am

Does 2.6.37 patch (inital and current one) work for anyone on i686? I'm getting instant reboots so even serial console doesn't see anything. x86_64 works fine.
arekm
 
Posts: 23
Joined: Mon Mar 30, 2009 5:30 am

Re: 2.6.37 patch on i686

Postby PaX Team » Thu Jan 20, 2011 9:14 am

arekm wrote:Does 2.6.37 patch (inital and current one) work for anyone on i686? I'm getting instant reboots so even serial console doesn't see anything. x86_64 works fine.
does vanilla .37 work? i saw a patch go into .38 that fixes a similar issue that i'll include in the next patch, maybe it's your issue as well: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7b698ea377e10b074ceef0d79218e6622d618421. if that's not your case, can you send me the usual files please?
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: 2.6.37 patch on i686

Postby mike33 » Thu Jan 20, 2011 10:21 am

I get instant reboots too.
mike33
 
Posts: 15
Joined: Tue Jan 18, 2011 9:53 am

Re: 2.6.37 patch on i686

Postby arekm » Thu Jan 20, 2011 5:50 pm

PaX Team wrote:does vanilla .37 work? i saw a patch go into .38 that fixes a similar issue that i'll include in the next patch, maybe it's your issue as well: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7b698ea377e10b074ceef0d79218e6622d618421. if that's not your case, can you send me the usual files please?


Will check vanilla with my config (because I know vanilla with some other config works fine on .37 final) but the patch you mention is to fix oops while booting. Here I'm not even getting that phase. I actually don't see any kernel message, even on earlyprintk=serial. It reboots very early.
arekm
 
Posts: 23
Joined: Mon Mar 30, 2009 5:30 am

Re: 2.6.37 patch on i686

Postby arekm » Fri Jan 21, 2011 6:38 am

The same kernel + all additional patches but no grsecurity boots fine here on i686, so the bug is somewhere in grsec/pax patch.

ftp://ftp1.pld-linux.org/dists/th/test/ ... 1.i686.rpm (vmlinuz)
ftp://ftp1.pld-linux.org/dists/th/test/ ... 1.i686.rpm (vmlinux)
ftp://ftp1.pld-linux.org/dists/th/test/ ... 1.i686.rpm (config in config-dist file)

Are these fine for you or do you need these files in already extracted form?

If I don't load initrd in grub it also reboots instantly, so initrd doesn't matter.
arekm
 
Posts: 23
Joined: Mon Mar 30, 2009 5:30 am

Re: 2.6.37 patch on i686

Postby PaX Team » Fri Jan 21, 2011 11:11 am

arekm wrote:ftp://ftp1.pld-linux.org/dists/th/test/i686/RPMS/kernel-2.6.37-1.1.i686.rpm (vmlinuz)
ftp://ftp1.pld-linux.org/dists/th/test/ ... 1.i686.rpm (vmlinux)
ftp://ftp1.pld-linux.org/dists/th/test/ ... 1.i686.rpm (config in config-dist file)

Are these fine for you or do you need these files in already extracted form?
yeah i got it all except i don't see any config-dist file anywhere ;). what's weird is that i crashes indeed very early even under qemu, but i don't see it get even to the bzImage boot code... besides your config, what's the toolchain you used to build this image?
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: 2.6.37 patch on i686

Postby arekm » Fri Jan 21, 2011 2:42 pm

Should be
ftp://ftp1.pld-linux.org/dists/th/test/ ... 1.i686.rpm (config in config-dist file)

gcc-4.5.2-2.i686 (it's final 4.5.2 + branch diff as of 20110108)
binutils-2.21.51.0.6-1.i686
arekm
 
Posts: 23
Joined: Mon Mar 30, 2009 5:30 am

Re: 2.6.37 patch on i686

Postby minipli » Tue Jan 25, 2011 3:23 pm

My attempts booting a 2.6.37 PaX kernel (KERNEXEC + UDEREF) only end up in a tripple fault. Here is the qemu register dump:

qemu: fatal: Trying to execute code outside RAM or ROM at 0x0000000002032ec3

EAX=80000011 EBX=00000000 ECX=00000000 EDX=00000000
ESI=00020800 EDI=c2301000 EBP=02900063 ESP=0208db80
EIP=01032ec3 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0018 00000000 ffffffff 00cf9300 DPL=0 DS [-WA]
CS =0010 01000000 ffffffff 01cf9b00 DPL=0 CS32 [-RA]
SS =0018 00000000 ffffffff 00cf9300 DPL=0 DS [-WA]
DS =0018 00000000 ffffffff 00cf9300 DPL=0 DS [-WA]
FS =0018 00000000 ffffffff 00cf9300 DPL=0 DS [-WA]
GS =0018 00000000 ffffffff 00cf9300 DPL=0 DS [-WA]
LDT=0000 00000000 00000000 00008200 DPL=0 LDT
TR =0020 00001000 00000067 00008900 DPL=0 TSS32-avl
GDT= 0180d140 0000001f
IDT= 00000000 00000000
CR0=80000011 CR2=00000000 CR3=01c933c0 CR4=00000000
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000
DR6=ffff0ff0 DR7=00000400
CCS=00005800 CCD=80000011 CCO=LOGICL
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000

EIP is at the long jump in arch/x86/kernel/head_32.S:417, objdump vmlinux:
01032e90 <startup_32_smp>:
...
1032ec3: ea ca 2e 03 01 10 00 ljmp $0x10,$0x1032eca

It looks like the machine doesn't like the reloading of the CS segment selector. ... __BOOT_CS broken? :/
minipli
 
Posts: 21
Joined: Mon Jan 03, 2011 6:39 pm

Re: 2.6.37 patch on i686

Postby PaX Team » Tue Jan 25, 2011 3:30 pm

minipli wrote:EIP is at the long jump in arch/x86/kernel/head_32.S:417, objdump vmlinux:
01032e90 <startup_32_smp>:
...
1032ec3: ea ca 2e 03 01 10 00 ljmp $0x10,$0x1032eca

It looks like the machine doesn't like the reloading of the CS segment selector. ... __BOOT_CS broken? :/
it's already fixed in the latest patch ;).
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: 2.6.37 patch on i686

Postby minipli » Tue Jan 25, 2011 3:38 pm

PaX Team wrote:
minipli wrote:EIP is at the long jump in arch/x86/kernel/head_32.S:417, objdump vmlinux:
01032e90 <startup_32_smp>:
...
1032ec3: ea ca 2e 03 01 10 00 ljmp $0x10,$0x1032eca

It looks like the machine doesn't like the reloading of the CS segment selector. ... __BOOT_CS broken? :/
it's already fixed in the latest patch ;).


Indeed, it is! Applying the interdiff from test5 to test8 to the latest grsec patch fixes the issue for me :)
Thanks!
minipli
 
Posts: 21
Joined: Mon Jan 03, 2011 6:39 pm

Re: 2.6.37 patch on i686

Postby arekm » Wed Jan 26, 2011 7:44 am

Works here, too. Thanks!
arekm
 
Posts: 23
Joined: Mon Mar 30, 2009 5:30 am


Return to grsecurity support

cron