Re: [PATCH] Introduce the pkill_on_warn boot parameter
From: Kees Cook <hidden>
Date: 2021-09-30 18:20:44
Also in:
linux-hardening, lkml
From: Kees Cook <hidden>
Date: 2021-09-30 18:20:44
Also in:
linux-hardening, lkml
On Thu, Sep 30, 2021 at 04:55:37PM +0300, Alexander Popov wrote:
The kernel can hit warning and omit calling __warn() that prints the message. But pkill_on_warn action should be taken each time. As I can understand now, include/asm-generic/bug.h defines three warning implementations: 1. CONFIG_BUG=y and the arch provides __WARN_FLAGS. In that case pkill_on_warn should be checked in report_bug() that you mention. 2. CONFIG_BUG=y and the arch doesn't have __WARN_FLAGS. In that case pkill_on_warn should be checked in warn_slowpath_fmt(). 3. CONFIG_BUG is not set. In that case pkill_on_warn should not be considered. Please, correct me if needed.
That looks correct to me, yes. -- Kees Cook