public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: "Petr Mladek" <pmladek@suse.com>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Dan Carpenter" <dan.carpenter@linaro.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Kees Cook <kees@kernel.org>,
	"Gustavo A . R . Silva" <gustavoars@kernel.org>,
	David Gow <davidgow@google.com>, Arnd Bergmann <arnd@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
	Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH 1/3] printk: ringbuffer: Explain why the KUnit test ignores failed writes
Date: Fri, 04 Jul 2025 13:34:23 +0206	[thread overview]
Message-ID: <844ivskxew.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <20250702095157.110916-2-pmladek@suse.com>

On 2025-07-02, Petr Mladek <pmladek@suse.com> wrote:
> The KUnit test ignores prb_reserve() failures on purpose. It tries
> to push the ringbuffer beyond limits.
>
> Note that it is a know problem that writes might fail in this situation.
> printk() tries to prevent this problem by:
>
>   + allocating big enough data buffer, see log_buf_add_cpu().
>
>   + allocating enough descriptors by using small enough average
>     record, see PRB_AVGBITS.
>
>   + storing the record with disabled interrupts, see vprintk_store().
>
> Also the amount of printk() messages is always somehow bound in
> practice. And they are serialized when they are printed from
> many CPUs on purpose, for example, when printing backtraces.
>
> Signed-off-by: Petr Mladek <pmladek@suse.com>

Reviewed-by: John Ogness <john.ogness@linutronix.de>

  reply	other threads:[~2025-07-04 11:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02  9:51 [PATCH 0/3] printk: KUnit: Followup fixes for the new KUnit test Petr Mladek
2025-07-02  9:51 ` [PATCH 1/3] printk: ringbuffer: Explain why the KUnit test ignores failed writes Petr Mladek
2025-07-04 11:28   ` John Ogness [this message]
2025-07-02  9:51 ` [PATCH 2/3] printk: kunit: support offstack cpumask Petr Mladek
2025-07-02 20:28   ` Nathan Chancellor
2025-07-08 14:24     ` Petr Mladek
2025-07-08 14:48       ` Arnd Bergmann
2025-07-09 11:36         ` Petr Mladek
2025-07-09 12:53           ` Thomas Weißschuh
2025-07-10 13:51             ` Petr Mladek
2025-07-10 14:08               ` Arnd Bergmann
2025-09-02 13:55         ` Petr Mladek
2025-07-03 14:36   ` kernel test robot
2025-07-02  9:51 ` [PATCH 3/3] printk: kunit: Fix __counted_by() in struct prbtest_rbdata Petr Mladek
2025-07-04 11:41   ` John Ogness
2025-07-02 15:48 ` [PATCH 0/3] printk: KUnit: Followup fixes for the new KUnit test Thomas Weißschuh
2025-07-10 15:29 ` Petr Mladek

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=844ivskxew.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=davidgow@google.com \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=thomas.weissschuh@linutronix.de \
    /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