lkml.org 
[lkml]   [2002]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: klibc and logging
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/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.071 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site