Page 1 of 1

Binary compatibility

PostPosted: Sun Jun 15, 2008 3:29 pm
by evilangel
HI all,

A very n00b question: when getting a grsecurity patched kernel, are the distro precompiled binaries (Debian in this case) able to run on my kernel ?
Or do i have to grab the source and recompile every package in order to be compatible with the patched kernel ?

Thanks

Re: Binary compatibility

PostPosted: Sun Jun 15, 2008 6:16 pm
by cormander
evilangel wrote:are the distro precompiled binaries (Debian in this case) able to run on my kernel ?


Yes.

The only time you might have to recompile something is if you were using a debian system with an old 2.4.x kernel and wanted to use a 2.6.x grsecurity kernel, or vice-versa.

Re: Binary compatibility

PostPosted: Mon Jun 16, 2008 3:41 am
by evilangel
OK

Thanks

Re: Binary compatibility

PostPosted: Mon Jun 16, 2008 1:56 pm
by evilangel
Just to be sure:
On a blank HDD, I can install my system as usually, and when it is over, i can subsitute the distro kernel package with mine and reboot ?
Thanks

Re: Binary compatibility

PostPosted: Mon Jun 16, 2008 2:29 pm
by cormander
Yep.

Re: Binary compatibility

PostPosted: Mon Jun 16, 2008 2:45 pm
by evilangel
OK
Thanks a lot :D

Re: Binary compatibility

PostPosted: Wed Jun 18, 2008 6:56 am
by PaX Team
evilangel wrote:A very n00b question: when getting a grsecurity patched kernel, are the distro precompiled binaries (Debian in this case) able to run on my kernel ?
depending in which PaX features you enable, you can run into troubles with text relocations in libraries and GNU_STACK markings. check the forum, it was discussed a few times.
Or do i have to grab the source and recompile every package in order to be compatible with the patched kernel ?
recompiling won't help text relocations but it may help the lack of GNU_STACK markings, depends on the toolchain.

Re: Binary compatibility

PostPosted: Wed Jul 23, 2008 5:07 am
by evilangel
So GCC hardening (PIE, StackGuard, read-only of parts of ELF...) comes in addition to the kernel patch ?
I read that you need to compile with GCC PIE flag to fully enable ASLR.

Thanks

Re: Binary compatibility

PostPosted: Wed Jul 23, 2008 8:30 am
by PaX Team
evilangel wrote:So GCC hardening (PIE, StackGuard, read-only of parts of ELF...) comes in addition to the kernel patch ?
yes, except for PIE, they're all independent changes in userland.
I read that you need to compile with GCC PIE flag to fully enable ASLR.
ASLR is always enabled once you configure it in the kernel, however the main executable randomization feature doesn't actually kick in until your userland binaries are recompiled/linked as a PIE (ET_DYN ELF files).

Re: Binary compatibility

PostPosted: Wed Jul 23, 2008 9:41 am
by evilangel
OK.

Thanks !