Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751688AbdCVTzj (ORCPT ); Wed, 22 Mar 2017 15:55:39 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:36064 "EHLO mail-it0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293AbdCVTz2 (ORCPT ); Wed, 22 Mar 2017 15:55:28 -0400 MIME-Version: 1.0 In-Reply-To: <9cb537f0-bae3-3c64-dab0-c0484694876f@linux.intel.com> References: <1488827386-87193-1-git-send-email-keescook@chromium.org> <1488827386-87193-6-git-send-email-keescook@chromium.org> <9cb537f0-bae3-3c64-dab0-c0484694876f@linux.intel.com> From: Kees Cook Date: Wed, 22 Mar 2017 12:55:00 -0700 X-Google-Sender-Auth: KRw52vHQouYFLuf3V4zCCoKB9XE Message-ID: Subject: Re: [PATCH 5/6] notifiers: Use CHECK_DATA_CORRUPTION() on checks To: Arjan van de Ven Cc: Andrew Morton , Rik van Riel , "Paul E. McKenney" , Jakub Kicinski , Viresh Kumar , Ingo Molnar , Thomas Gleixner , Dmitry Vyukov , Olof Johansson , Peter Zijlstra , Josh Poimboeuf , LKML , "kernel-hardening@lists.openwall.com" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 906 Lines: 28 On Wed, Mar 22, 2017 at 12:32 PM, Arjan van de Ven wrote: > On 3/22/2017 12:29 PM, Kees Cook wrote: >>> >>> When performing notifier function pointer sanity checking, allow >>> CONFIG_BUG_ON_DATA_CORRUPTION to upgrade from a WARN to a BUG. >>> Additionally enables CONFIG_DEBUG_NOTIFIERS when selecting >>> CONFIG_BUG_ON_DATA_CORRUPTION. > > >> Any feedback on this change? By default, this retains the existing >> WARN behavior... > > > if you're upgrading, is the end point really a panic() ? > e.g. do you assume people to also set panic-on-oops? That's one option, yes. With the BUG, the process associated is killed (which is the first level of defense upgrade), and if a system is also set to panic-on-oops, the entire system will panic (and usually such systems also retain their crash consoles in some fashion for later analysis, etc). -Kees -- Kees Cook Pixel Security