Re: [announce] [patch] NX (No eXecute) support for x86, 2.6.7-rc2-bk2

From: Linus Torvalds
Date: Fri Jun 04 2004 - 11:08:38 EST




On Fri, 4 Jun 2004, Arjan van de Ven wrote:
>
> I know that in a FC1 full install there are less than 5 binaries that don't
> run with NX. (one uses nested functions in C and passes function pointers to
> the inner function around which causes gcc to emit a stack trampoline, and
> gcc then marks the binary as non-NX, the others have asm in them that we
> didn't fix in time to be properly marked).

If things are really that good, why are we even worrying about this?

It sounds like we should just have NX on by default even for executables
that don't have any NX info records, and have some way of marking the
(very few) executables that don't want it. Maybe have the NX fault print a
warning when it happens for an executable that defaulted to NX on.

I think most people have seen the security disaster that causes most of
the emails on the net to be spam. So this should be _trivial_ to explain
to people when they complain about default behaviour breaking their
strange legacy app. Especially if there's a trivial tool to add an elf
section to make it work again.

So instead of having complex things to try to turn NX on for suid, we
should aim to turn ot on as widely as possible, _even_if_ that means that
people who upgrade hardware might have to do some trivial MIS stuff.

Make a kernel bootup option to default to legacy mode if somebody
literally has trouble booting and fixing their thing due to "init" or
similar being one of the problematic cases. Together with a printk() that
says which executable triggered, it should be trivial to clean up a
system.

No?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/