supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* runit-init and PAX MPROTECT
@ 2010-10-24 11:44 Alex Efros
  0 siblings, 0 replies; only message in thread
From: Alex Efros @ 2010-10-24 11:44 UTC (permalink / raw)
  To: supervision

Hi!

I'm not sure is it runit issue or is it possible to fix in runit source,
but, thing is, it's already second time when runit-init conflict with
PAX MPROTECT.

Short story:
1.5 years ago, after upgrading (Gentoo Linux)
    from sys-kernel/hardened-sources-2.6.28-r6
    to   sys-kernel/hardened-sources-2.6.28-r7
kernel hangs while boot when tried to start /sbin/runit-init.
Actual reason was segfault in runit-init because of PAX MPROTECT,
which can be worked around by completely switching off PAX MPROTECT in
kernel or switching it off individually for /sbin/runit by
    paxctl -m /sbin/runit-init
In some later kernel this was fixed.
But yesterday it happens again after upgrading
    from sys-kernel/hardened-sources-2.6.32-r9
    to   sys-kernel/hardened-sources-2.6.32-r22
As far as I understood, this doesn't mean it's 100% bug in PAX - I think
PAX protection was improved, become more strict, and so disallow some
operations which was accepted by older PAX.

Long story:
http://www.mail-archive.com/gentoo-hardened@lists.gentoo.org/msg02464.html
http://www.linux-archive.org/gentoo-hardened/443398-2-6-28-hardened-r7-hangs-before-starting-sbin-init.html

I think this is critical enough issue because kernel hang after upgrade
while booting remote servers is very bad. If there any chance to fix this
issue in runit source, that would be best.

Probably if it was possible to run runit-init under strace, it become
clear which syscall is now disallowed by PAX MPROTECT. But runit-init
behave differently when it executed not as process N1 (and doesn't trigger
PAX MPROTECT in this case), so it's impossible to run it under strace.
Maybe if runit will be patched to fork `strace -p 1` right after starting
as process N1 this helps. If Gerrit provide such runit version to me - I
will test it with that kernel.

-- 
			WBR, Alex.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-24 11:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-24 11:44 runit-init and PAX MPROTECT Alex Efros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).