Re: [PATCH][RFC] 2.5.42: remove capable(CAP_SYS_RAWIO) check from

Olaf Dietsche (olaf.dietsche#list.linux-kernel@t-online.de)
Sun, 13 Oct 2002 17:48:37 +0200


Manfred Spraul <manfred@colorfullife.com> writes:

>> In drivers/char/mem.c there's open_port(), which is used as open_mem()
>> and open_kmem() as well. I don't see the benefit of this, since
>> /dev/mem and /dev/kmem are already protected by filesystem
>> permissions.
>>
> capabilities can be stricter than filesystem permissions

Which means, it prevents me from giving access to /dev/kmem to an
otherwise unprivileged process.

> , and the call
> is needed to update the PF_SUPERPRIV process flag.

What exactly is PF_SUPERPRIV good for? I see no real use in the
source. There is exactly one test for this flag (kernel/acct.c:336),
then sets another flag (ASU), which in turn is used nowhere else.

So, I think we could get rid of this flag as well. Comments?

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