Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1054860ybj; Thu, 7 May 2020 13:46:38 -0700 (PDT) X-Google-Smtp-Source: APiQypJXtrnDsPeGbUrfheJrkJI4PV6XfJVrnHpOkzqrJVz7KZYn19/1pGaLUPcqJRVgm4Za7Dis X-Received: by 2002:a05:6402:1773:: with SMTP id da19mr13642920edb.2.1588884398558; Thu, 07 May 2020 13:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588884398; cv=none; d=google.com; s=arc-20160816; b=algfugfj4XLI85UYys2p/DOdiIxiObdauyVKEBCkbkQaOXw8QoDwMR9KGin21vrzvd tBTXBet+SS8Z04vRsh28YW0dLbrprRyxNOhSb7tf2tQeV/C8Oiics39JyoETP4+Dl2hC hmy9IoT4Vz/t4K/mgb5CICffNLudKDsAeB6InvRrIyi+lwcd0jsQ7zi2Bbd59TYNuNkZ cRxGr5SXZKt/Nc+2DXPpwvH6F/aL8Ests1jX29fq903GTSrfuWE5U7m8bUPx9W/yeS4Q SF3lk0IXPD6UopxOmiDbdbNfZIcD8y9lhncxs9iINaF3O9aAEiWBnqljFrZGk6y9/2vy SfEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=b8a0Z2antnJYCUF8WBh734GS5zKFlaHhrNwslLNb//k=; b=IEsz7C+IFhzkRtGStvLdSoPr7S1VNueCHo7kMJe8HFlgYsa5wY4Ex/HUxU54vtcDZO +kHEnJcB3zyaQyuVfYBcd9I7LX2Pus5zxqaP9b7Q7kRpf/r/Mz3J2/Kr5UL+eL1GS0CP b3Pk/v960YRSBjtVGwEZ3vcVkLMygia0M4vBwRwMB5qNriPdEgM5pgSYOHDS8bt933gs oO6+x/75YK44v+1yC4rbqd4JdUkP5LuFqR8teclPpTAyIDR+X4TBtJA5pGtY3sNBDBX2 p/vEfXi2PH0Ea4+3GcPR60oBkSA9J7Uan+/RVfjpJQ/IBAoV2zBNW7I2nY6fqg3YwM09 9W2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bgfGZvWu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si3850655ejb.521.2020.05.07.13.46.14; Thu, 07 May 2020 13:46:38 -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=@redhat.com header.s=mimecast20190719 header.b=bgfGZvWu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726580AbgEGUmd (ORCPT + 99 others); Thu, 7 May 2020 16:42:33 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46579 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726093AbgEGUmd (ORCPT ); Thu, 7 May 2020 16:42:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588884153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b8a0Z2antnJYCUF8WBh734GS5zKFlaHhrNwslLNb//k=; b=bgfGZvWu9ezgraIcODPKZsR9e9Eq+EcgfkxfnPImg+w5Csx1RKlAKL87+iZSip976aTmPJ yezRI0K9c4bMumgIM41Pl3evXmp3GkMcu34BirTuyWFUCN3r7kydbnTRcRHcGHDa/NsHlR eZjLTM2OG2ioT4Cfk105palrif0UBhE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-150-AT7T8A5AMTS2CeTivjxVYw-1; Thu, 07 May 2020 16:42:31 -0400 X-MC-Unique: AT7T8A5AMTS2CeTivjxVYw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0944580183C; Thu, 7 May 2020 20:42:29 +0000 (UTC) Received: from optiplex-lnx (unknown [10.3.128.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63D8019C4F; Thu, 7 May 2020 20:42:22 +0000 (UTC) Date: Thu, 7 May 2020 16:42:19 -0400 From: Rafael Aquini To: Qian Cai Cc: Andrew Morton , 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 Subject: Re: [PATCH] kernel: add panic_on_taint Message-ID: <20200507204219.GJ205881@optiplex-lnx> References: <20200506222815.274570-1-aquini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 06, 2020 at 10:50:19PM -0400, Qian Cai wrote: > > > > On May 6, 2020, at 6:28 PM, Rafael Aquini wrote: > > > > 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. > > > > 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 > Please, don't drop it yet. I'll send a patch to get rid of the bits, once this one gets accepted, if it gets accepted. -- Rafael