Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp370950ybj; Wed, 6 May 2020 20:25:08 -0700 (PDT) X-Google-Smtp-Source: APiQypJ/vuEANuVOiCZdUDiCHWDmo7RV4Cq1BoPpxOl9SLFtNq5FvhNTvhPT0b8rT+14hbqJsJXP X-Received: by 2002:aa7:dcc3:: with SMTP id w3mr9416636edu.231.1588821908204; Wed, 06 May 2020 20:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588821908; cv=none; d=google.com; s=arc-20160816; b=iVgWsRDaAnVCq1e39bkXf2MFos86kDsFA+GZsQhsBPiFnEpjSfICib8eWxxX8AKUii FcnieTKLcP0RSoWoMhy2ULlTQlUTNQci82wYemr6JpCKWeqTazdaV94o8MCtQBdCXTHy nuGJxUTKytCyZrGaZfru4A5+FuvUkBbtApYCu1J/tEjEuDo+IKv+FSM7aPyxInDiGWG5 KrCZZzaz0P4ZsViIN49f2TeoO6KAnwPUwz6XxmxXfSNi6dwraWvSmtXnHrvP8/9OWoir GTcic1uTJ1jmGTB65xRxpDwYKVxVI/DYex6MOmdAOhaIHotuxwRLzcZnSy8uB8snR2TB AvyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=v5p4G137YuitFnxAdjJGDeWrlR5PjlajIuvgc0Izz2k=; b=J2VdLi9wzLcOlHRs3ACmvZoMpYVnmBcBdLNdypKw8hGPlxatA+JHXywbjARD3vQdBb 2dOPZrNUh7fpaxO/xlir6SDBNCE8ZBmodb4vt+urayks5oASwJg3858aCk2Q+mUg+xf+ w0FJ5JEFHuPfIT65vReuD2l4xp7CH405pIvvAAFNYoFWlnISmSUpXE2q9pvfvRxiIW7L +T4+e9Qp8gZ/6T0C/mZIz4xCB7OPNQbXYl2N7A9mw93+BssaqoT171nm1K25+tIny0EK AGENLPYozg/kUmeItRWZu0rAPJJ7enHNIEL4TIVneU6tPu1X8lhg1DzCbIOw0Z0UJ+KY 7ORA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=p750SKit; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c61si2232558edf.53.2020.05.06.20.24.45; Wed, 06 May 2020 20:25:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=p750SKit; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728298AbgEGCuX (ORCPT + 99 others); Wed, 6 May 2020 22:50:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727954AbgEGCuW (ORCPT ); Wed, 6 May 2020 22:50:22 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D73DEC061A10 for ; Wed, 6 May 2020 19:50:21 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id w29so3557122qtv.3 for ; Wed, 06 May 2020 19:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=v5p4G137YuitFnxAdjJGDeWrlR5PjlajIuvgc0Izz2k=; b=p750SKit8Chs8O2JezORAPJP4t47zmSpkpleyDhzPywZlEJsAjOgD1QOW2EMlvn+BU uUhq4taDMrPJ9oMxWXeeGRQmFme0e56qiaJtXl1HeHxNKv5VSarf8JeQy8150L7SOMcQ N6ggNiN+Ch3wUcnHtpQhOBQc6Dao+VF13YpZDf5joeWA7yujT6zP4AUdBvGwTkL5O2W/ WNuDFPqSWKDMBboXLDy5YrC08br3dkGkUDFV8/wuR5nQ/jVvlGBukgFucJT7oiWO9twE f8BaYKqyQI547ysjYYYd0UldV8tUpnUIi0NDYTZWPxM/bAYwmkPA8f+jUiufYRfJkjXk HKCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=v5p4G137YuitFnxAdjJGDeWrlR5PjlajIuvgc0Izz2k=; b=IDqWvi2LGiIExSg8Jg9kIaMWCQTXtINPcyISa3jiQNqXCXSIIirp/hO2+/b8DhgB1p wc5YKdGDYoqZo8X14Do3EZb4OLw7jmKdfXtPhjUygipcjzYJCLaq4/Wm2AqpOAl4xtoP sDBlimxKfv3AwSXamvVpTEtZgpmwU/DLC6CQDkjVtE4wYR6tskkgt27nNDE3sYAHrU7Z YSMBd7SzfZf+UEBfdzTzBtLAEp62u+eFF+gPO6MWYE/FFr1YrAJ48u5xceeYluz9oeQV R4OXHIhrNakcD20xpcVx401dYNkplKciF/EODBXkK34tGp4+d25obU8xmvTSjaCc/aDC S9iw== X-Gm-Message-State: AGi0PuZnt/ABSdMx9yG0lhgGvEv/Px1JlFgVArwlLtSLt7Zgke7OvFam YtEgeuXNJrD61HZdX0ql1Kp0NA== X-Received: by 2002:aed:3ffd:: with SMTP id w58mr11966424qth.21.1588819821027; Wed, 06 May 2020 19:50:21 -0700 (PDT) Received: from [192.168.1.153] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id y18sm3363851qty.41.2020.05.06.19.50.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 May 2020 19:50:20 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH] kernel: add panic_on_taint From: Qian Cai In-Reply-To: <20200506222815.274570-1-aquini@redhat.com> Date: Wed, 6 May 2020 22:50:19 -0400 Cc: LKML , linux-doc@vger.kernel.org, kexec@lists.infradead.org, linux-fsdevel@vger.kernel.org, dyoung@redhat.com, Baoquan He , Jonathan Corbet , Luis Chamberlain , Kees Cook , Rafael Aquini Content-Transfer-Encoding: quoted-printable Message-Id: References: <20200506222815.274570-1-aquini@redhat.com> To: Andrew Morton X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 6, 2020, at 6:28 PM, Rafael Aquini wrote: >=20 > Analogously to the introduction of panic_on_warn, this patch > introduces a kernel option named panic_on_taint in order to > provide a simple and generic way to stop execution and catch > a coredump when the kernel gets tainted by any given taint flag. >=20 > This is useful for debugging sessions as it avoids rebuilding > the kernel to explicitly add calls to panic() or BUG() into > code sites that introduce the taint flags of interest. > Another, perhaps less frequent, use for this option would be > as a mean for assuring a security policy (in paranoid mode) > case where no single taint is allowed for the running system. Andrew, you can drop the patch below from -mm now because that one is = now obsolete, mm-slub-add-panic_on_error-to-the-debug-facilities.patch=