Re: klibc and logging

From: Oliver Xymoron (oxymoron@waste.org)
Date: Fri Aug 16 2002 - 00:05:31 EST


On Tue, Aug 13, 2002 at 10:41:03AM -0700, H. Peter Anvin wrote:
>
> Andrew Morton sent me a proposed patch last night which adds a klogctl
> (a.k.a. sys_syslog) which does a printk() from userspace. It was less
> than 10 lines; i.e. probably worth it. I have hooked this up to
> syslog(3) in klibc, although the code is not checked in yet.

Don't like it. First, it sounds like overkill. Second it's got some
interesting security implications - only root should be able to flood
the kernel message queue, but non-root should be able to syslog, even
from early userspace. Third, if the only user is klibc, then it's
working against the early userspace's concept of simplifying the kernel.

Why not simply create a file on the initramfs, open it append, spool
raw user and kernel messages to it, then copy that file into the real
syslogd's socket when it becomes available? The "hard" part of syslogd
is the filtering, copying raw messages from socket to file is easy..

-- 
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 
-
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/



This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:11 EST