public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Kees Cook <keescook@chromium.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Jann Horn <jannh@google.com>, Arnd Bergmann <arnd@arndb.de>,
	Petr Mladek <pmladek@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Marco Elver <elver@google.com>, tangmeng <tangmeng@uniontech.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Tiezhu Yang <yangtiezhu@loongson.cn>,
	Stafford Horne <shorne@gmail.com>,
	"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
	John Ogness <john.ogness@linutronix.de>,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] exit: Use READ_ONCE() for all oops/warn limit reads
Date: Mon, 19 Dec 2022 12:39:49 +0100	[thread overview]
Message-ID: <Y6BNhQ2C2huPaOqa@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20221216203024.never.640-kees@kernel.org>

On Fri, Dec 16, 2022 at 12:30:28PM -0800, Kees Cook wrote:
> Use a temporary variable to take full advantage of READ_ONCE() behavior.
> Without this, the report (and even the test) might be out of sync with
> the initial test.
> 
> Reported-by: Peter Zijlstra <peterz@infradead.org>
> Link: https://lore.kernel.org/lkml/Y5x7GXeluFmZ8E0E@hirez.programming.kicks-ass.net
> Fixes: 9fc9e278a5c0 ("panic: Introduce warn_limit")
> Fixes: d4ccd54d28d3 ("exit: Put an upper limit on how often we can oops")

Thanks!

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

      reply	other threads:[~2022-12-19 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 20:30 [PATCH] exit: Use READ_ONCE() for all oops/warn limit reads Kees Cook
2022-12-19 11:39 ` Peter Zijlstra [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=Y6BNhQ2C2huPaOqa@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=ebiederm@xmission.com \
    --cc=elver@google.com \
    --cc=gpiccoli@igalia.com \
    --cc=jannh@google.com \
    --cc=john.ogness@linutronix.de \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=pmladek@suse.com \
    --cc=shorne@gmail.com \
    --cc=tangmeng@uniontech.com \
    --cc=yangtiezhu@loongson.cn \
    /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