All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug 44211 - /proc/kmsg does not (always) block for 1-byte reads
@ 2012-07-06 17:45 Jukka Ollila
  2012-07-06 17:55 ` Greg KH
  2012-07-06 19:38 ` Regression " Alan Cox
  0 siblings, 2 replies; 14+ messages in thread
From: Jukka Ollila @ 2012-07-06 17:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: kay, jbeulich, alan, greg

Hello,

A few days ago I filed a kernel regression report concerning a change
in /proc/kmsg behaviour with short reads:

https://bugzilla.kernel.org/show_bug.cgi?id=44211

The comments suggest that this is probably intentional, but that it
would be best make sure that the current semantics wrt short reads are
as intended.

The problem appears on a Debian (unstable) system that drains
/proc/kmsg into a separate fifo read by klogd(8):

/bin/dd bs=1 if=/proc/kmsg  of=/var/run/klogd/kmsg

With the recent kernel logging changes this /bin/dd exits immediately,
as 1-byte reads are shorter than any log message could possibly be and
read() returns 0. No dd feeding the fifo results in no logging and a
rather unhappy klogd on the reading end of /var/run/klogd/kmsg.

I suppose a safe solution is to only do reads that are big enough for
any single kernel message, but this is still a change that affects
user space being shipped, so some might find it surprising.

I don't know what other distros do. Is it just Debian being the odd one out?

-J

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-08-10 12:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-06 17:45 Bug 44211 - /proc/kmsg does not (always) block for 1-byte reads Jukka Ollila
2012-07-06 17:55 ` Greg KH
2012-07-06 18:46   ` Jukka Ollila
2012-07-08 12:37   ` Kay Sievers
2012-07-08 12:59     ` Alan Cox
2012-07-08 13:06       ` Kay Sievers
2012-07-06 19:38 ` Regression " Alan Cox
2012-07-06 20:30   ` Linus Torvalds
2012-07-07 21:19     ` Kay Sievers
2012-07-08  2:09       ` Kay Sievers
2012-08-10 12:56       ` Jan Engelhardt
2012-07-06 22:05   ` Jukka Ollila
2012-07-06 22:09     ` Linus Torvalds
2012-07-08  0:33     ` Kay Sievers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.