[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <53400e91-cf51-1bff-c5e4-0a02cd9c2290@virtuozzo.com>
Date: Mon, 17 Oct 2016 12:14:19 +0300
From: Andrey Ryabinin <aryabinin@...tuozzo.com>
To: Dmitry Vyukov <dvyukov@...gle.com>, <glider@...gle.com>,
<akpm@...ux-foundation.org>
CC: <kasan-dev@...glegroups.com>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] kasan: support panic_on_warn
On 10/17/2016 11:59 AM, Dmitry Vyukov wrote:
> If user sets panic_on_warn, he wants kernel to panic if there is
> anything barely wrong with the kernel. KASAN-detected errors
> are definitely not less benign than an arbitrary kernel WARNING.
>
> Panic after KASAN errors if panic_on_warn is set.
>
> We use this for continuous fuzzing where we want kernel to stop
> and reboot on any error.
>
> Signed-off-by: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: kasan-dev@...glegroups.com
> Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
> Cc: Alexander Potapenko <glider@...gle.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: linux-mm@...ck.org
> Cc: linux-kernel@...r.kernel.org
>
Acked-by: Andrey Ryabinin <aryabinin@...tuozzo.com>
> ---
>
> Changes from v1:
> - don't reset panic_on_warn before calling panic()
> ---
> mm/kasan/report.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/kasan/report.c b/mm/kasan/report.c
> index 24c1211..0ee8211 100644
> --- a/mm/kasan/report.c
> +++ b/mm/kasan/report.c
> @@ -133,6 +133,8 @@ static void kasan_end_report(unsigned long *flags)
> pr_err("==================================================================\n");
> add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
> spin_unlock_irqrestore(&report_lock, *flags);
> + if (panic_on_warn)
> + panic("panic_on_warn set ...\n");
> kasan_enable_current();
> }
>
>
Powered by blists - more mailing lists