mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Mukesh Ojha <quic_mojha@quicinc.com>, linux-kernel@vger.kernel.org
Cc: rostedt@goodmis.org, senozhatsky@chromium.org, pmladek@suse.com,
	Mukesh Ojha <quic_mojha@quicinc.com>
Subject: Re: [PATCH] printk: Fix seq check inside devkmsg_read()
Date: Tue, 18 Jan 2022 14:26:34 +0106	[thread overview]
Message-ID: <874k61xjrx.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <1642505688-1194-1-git-send-email-quic_mojha@quicinc.com>

On 2022-01-18, Mukesh Ojha <quic_mojha@quicinc.com> wrote:
> prb_read_valid() could return a record whose seq number can be
> newer than the requested one. In that case, we allow the reading
> of the data instead of erroring out.

The EPIPE error is intentional. It informs the devkmsg reader that a
record was missed.

For simple readers, like cat(1), this means that the kernel messages
cannot be read completely reliably. We talked about this a while back
[0] because initially I wanted to do what your patch does. In the end it
was agreed that readers of /dev/kmsg must implement EPIPE handling for
missed records.

John Ogness

[0] https://lore.kernel.org/all/87pneiyv12.fsf@linutronix.de

      reply	other threads:[~2022-01-18 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 11:34 Mukesh Ojha
2022-01-18 13:20 ` John Ogness [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874k61xjrx.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=quic_mojha@quicinc.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®