All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] lkdtm: avoid printk() in recursive_loop()
Date: Thu,  7 Oct 2021 09:59:27 -0700	[thread overview]
Message-ID: <163362596339.2313433.1892710945535449841.b4-ty@chromium.org> (raw)
In-Reply-To: <20211007081235.382697-1-ardb@kernel.org>

On Thu, 7 Oct 2021 10:12:35 +0200, Ard Biesheuvel wrote:
> The recursive_loop() function is intended as a diagnostic to ensure that
> exhausting the stack is caught and mitigated. Currently, it uses
> pr_info() to ensure that the function has side effects that the compiler
> cannot simply optimize away, so that the stack footprint does not get
> reduced inadvertently.
> 
> The typical mitigation for stack overflow is to kill the task, and this
> overflow may occur inside the call to pr_info(), which means it could be
> holding the console lock when this happens. This means that the console
> lock is never going to be released again, preventing the diagnostic
> prints related to the stack overflow handling from being visible on the
> console.
> 
> [...]

Applied to for-next/lkdtm, thanks!

[1/1] lkdtm: avoid printk() in recursive_loop()
      https://git.kernel.org/kees/c/700fa7d22233

-- 
Kees Cook


  reply	other threads:[~2021-10-07 17:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07  8:12 [PATCH] lkdtm: avoid printk() in recursive_loop() Ard Biesheuvel
2021-10-07 16:59 ` Kees Cook [this message]
2021-12-16 11:16   ` Ard Biesheuvel
2021-12-17  0:02     ` Kees Cook

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=163362596339.2313433.1892710945535449841.b4-ty@chromium.org \
    --to=keescook@chromium.org \
    --cc=ardb@kernel.org \
    --cc=linux-kernel@vger.kernel.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 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.