From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 843F2C47256 for ; Fri, 1 May 2020 22:00:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4009220857 for ; Fri, 1 May 2020 22:00:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="UjUbSxR4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4009220857 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E68A58E000A; Fri, 1 May 2020 18:00:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E3F628E0001; Fri, 1 May 2020 18:00:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D2E1D8E000A; Fri, 1 May 2020 18:00:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0185.hostedemail.com [216.40.44.185]) by kanga.kvack.org (Postfix) with ESMTP id B87208E0001 for ; Fri, 1 May 2020 18:00:49 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 79C915DF8 for ; Fri, 1 May 2020 22:00:49 +0000 (UTC) X-FDA: 76769520618.07.mass68_415ef7f935f4d X-HE-Tag: mass68_415ef7f935f4d X-Filterd-Recvd-Size: 4709 Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Fri, 1 May 2020 22:00:49 +0000 (UTC) Received: by mail-qt1-f193.google.com with SMTP id b1so9115888qtt.1 for ; Fri, 01 May 2020 15:00:48 -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=CH/D4ZOJbtfLog2S9ZgsPl3JnZhPyLEBOTg/2pqHG4s=; b=UjUbSxR4CkN0dsMB4lUnUbpCfb/B83H/J96d7x6w6a+orTJZzQuZGtWc5bX6scCV6K j1wL/cfYp/JZKfXoT/LUQDjgWlKAdizAv1eYmsQWL5yLrRVW3rSCjkCc/KBvQYejwpH9 fwRSvAP3VpqDTWhvFeG1eYyu8GfI62Hm9FgkPNENHKif9OS2KkNjQPDDsShTpok4tmh3 o0fddNDxJLMqDl9JlEaxQ/zEjDVpJF7GWg0mzxPVzQgnA9VpC87yZoLOGtF2LASuoLOD Tgfou3UJWsp2nFIQ8tT+hMygZ1NtEqCN7nyq0XdpI31yqmcqXolqZIbkUrCHX9WnAf5d yLww== 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=CH/D4ZOJbtfLog2S9ZgsPl3JnZhPyLEBOTg/2pqHG4s=; b=q7n1Utwli6Gsv5sLxT7bdLXmFEDBbUgtNfyk47F2/NdBz5RWhv8sGbLbW56tEKZMXE pdD6knJwIBbYKIsPUGOafpA2+xKcc/HYiUl2C6AQzX7chshY1yWDG18y+TPjxYsFWDBX a0qXMUngRFh07Mjh7kwYeJSS7FausinS6MRSD6JfwGN6xKb0zjIBVk3UtiIIcrjsvHsl Ihfspr/dfcWnH2sZ05xH6qULXoAwDfRPr0hJT+98iwL5rTqnpUN769KFt2E6doqV9MpF 8vkwdvZOagR7kkRwhgEIXs7nln1HTAtJ2kjHkEarCvWGy98+wKCT6Rx5OUSNzCpsN15+ 2BRQ== X-Gm-Message-State: AGi0PubRAMh6VTLxKc3EVYbJ6FwbzwMHm/rQ4WnFF9NbywQTgnVeDr/c LJiAfhAWFb9q5bWeCmyDsNAXZw== X-Google-Smtp-Source: APiQypLtgqTqjWBD0ylKQTcpVr2rnu/Xgi4jxQWDf5+wA1VDmBV/4/IQUAbN9+zwVLeFI6Zfb+V2nA== X-Received: by 2002:ac8:4c8d:: with SMTP id j13mr5953950qtv.142.1588370448431; Fri, 01 May 2020 15:00:48 -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 c11sm3622843qkj.78.2020.05.01.15.00.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2020 15:00:47 -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] mm: slub: add panic_on_error to the debug facilities From: Qian Cai In-Reply-To: <20200501215441.GE27720@optiplex-lnx> Date: Fri, 1 May 2020 18:00:45 -0400 Cc: Linux-MM , LKML , Andrew Morton , Joonsoo Kim , David Rientjes , Pekka Enberg , cl@linux.com Content-Transfer-Encoding: quoted-printable Message-Id: <995A3749-4BC9-4217-8BAF-F10A13208F63@lca.pw> References: <20200501211540.71216-1-aquini@redhat.com> <21CF143C-B9D1-4D3F-A875-370924265593@lca.pw> <20200501215441.GE27720@optiplex-lnx> To: Rafael Aquini X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > On May 1, 2020, at 5:54 PM, Rafael Aquini wrote: >=20 > On Fri, May 01, 2020 at 05:29:19PM -0400, Qian Cai wrote: >>=20 >>=20 >>> On May 1, 2020, at 5:15 PM, Rafael Aquini wrote: >>>=20 >>> Sometimes it is desirable to override SLUB's debug facilities >>> default behavior upon stumbling on a cache or object error >>> and just stop the execution in order to grab a coredump, at >>> the error-spotting time, instead of trying to fix the issue >>> and report in an attempt to keep the system rolling. >>>=20 >>> This patch introduces a new debug flag SLAB_PANIC_ON_ERROR, >>> along with its related SLUB-machinery, in order to extend >>> current slub_debug facilites and provide the aforementioned >>> behavior override. >>=20 >> Instead of adding those things everywhere. How about adding something = like panic_on_taint? Then, you could write specific taint flags you are = interested in to that file because slab_bug() will taint it = TAINT_BAD_PAGE. >>=20 > It seems like a good idea which also would required "adding things" > elsewhere, but doesn't look mutually exclusive with the approach here. No, it is mutually exclusive because panic_on_taint would do this same = thing but saner. The thing is that this request came up over and over again where people = may want to panic the kernel because of TAINT_BAD_PAGE or some other = places due to tainted.=