Skip to contentSkip to conversation

Question about /proc/kmsg semantics..

DISCUSSION Michael Bacarella 2 participants 2 messages May 1, 2001

lore
Share & tools
lore
#0 lore raw

Two pronged:

I've seen a couple of patches in the archives to make open()/close() on /proc/kmsg do more than NOP. As of 2.4.4, klogd still needs to run as root since access is checked on read() rather than once at open(). I can't find the rationale as to why they're rejected.

Also, why is reading /proc/kmsg a privileged operation, yet dmesg can happily print out the entire ring via (do_)syslog() ?

Thanks

Signature · 3 lines
Michael Bacarella <[email protected]>
Technical Staff / System Development,
New York Connect.Net, Ltd.
#1 lore raw
Followup to:  <[email protected]>
By author:    Michael Bacarella <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 9 lines

I've seen a couple of patches in the archives to make open()/close() on /proc/kmsg do more than NOP. As of 2.4.4, klogd still needs to run as root since access is checked on read() rather than once at open(). I can't find the rationale as to why they're rejected.

Also, why is reading /proc/kmsg a privileged operation, yet dmesg can happily print out the entire ring via (do_)syslog() ?

Probably because reading /proc/kmsg may cause syslogd to miss messages.

-hpa

Signature · 3 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt