Re: [PATCH] x86: Preserve iopl on fork and execve

From: One Thousand Gnomes
Date: Mon May 11 2015 - 17:09:38 EST


On Mon, 11 May 2015 14:49:58 -0600
Alex Henrie <alexhenrie24@xxxxxxxxx> wrote:

> Signed-off-by: Alex Henrie <alexhenrie24@xxxxxxxxx>
> Suggested-by: Doug Johnson <dougvj@xxxxxxxxxx>
> ---
> arch/x86/kernel/process_32.c | 2 +-
> arch/x86/kernel/process_64.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)

This strikes me as insane.

Existing iopl using code does not expect to accidentally pass the keys to
the empire to any helper apps it spawns. We wouldn't add a new feature
that suddenely gave root to tasks forked from a process that was
expecting the rights to be dropped, so we certainly shouldn't add iopl
on this way.

(I agree the behaviour you suggest was probably preferable, it's just 25
years too late to correct that one)

Yes it makes using iopl harder, but if anything that is good. You really
really must know what you are doing to use iopl, and its really something
only hideous things like legacy PC BIOS flash tools should be touching
and even then very very carefully having used mlockall and while making
no syscalls or page faults with interrupts off.

Alan


--
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/