Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1120813ybz; Fri, 1 May 2020 15:06:29 -0700 (PDT) X-Google-Smtp-Source: APiQypLyAahBoq/t+67nRozWDDfnRSPhAUOA+GR5dj3VbCpTLX8oGdnq5Zh9otj0jTlhybgVch7V X-Received: by 2002:a17:907:2711:: with SMTP id w17mr5257225ejk.116.1588370789191; Fri, 01 May 2020 15:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588370789; cv=none; d=google.com; s=arc-20160816; b=knfMa1GwcbdsjBoqBbXp3qhuTz9mfP67wdCB76JlrjKRUsvKIrMf/qiWmA67giMGmd szFqri9rXh3rL2KTopuGLmhQzbjXV2ZMjmQf8WV794m8QiwJgOX6EiemvN+Se4D8AeqZ CqdluuAlNgFEOvR7dUinu+pFU5X66Setq2rHBOOzAGVa1KGrpB9hhC3wQepky6PwtN4q L7/B0udufnXi9TXers6afCj8bSE4xBvx6rfz0rKn9dCGaJFpr5rCW5aKLy+SqIVUGz6U tsbJ+OE5vdwzf9+/Dk5WoxS2dUNy6TY3dhOnk74GsOXZFvXdprhfMe5djigzuB7uyqmS myig== 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=CH/D4ZOJbtfLog2S9ZgsPl3JnZhPyLEBOTg/2pqHG4s=; b=WQp8j9VCVrAD3gbQFJcw3pRRddXEXG2anpQYDX3pDsAZV+wdOecr80wp9Y78WMQmrS /k6+5VeEvdXjIehbttov09VnRJdgkySjT2Yg+uNSjNItRYUvcLyJ1l7kIrAKMRKvbTMd 90tY+yAtYdmN4atDbEN31uR8dOFnyl5oGzpILQWyGM57W18Ld5Ql4J1X/ljREH4iH/Bt sfiqV+vyYWn0bdTPYBW+TkmfsvSLKHrql9BVkgI41r9HDJchupV6JuduI9R/qn3YtCrg SOslsAU4SBq/EdqfPVNbXEA/qvOX9/MhjBQ/+0Z3TOYVzZSfl/HhqdYKC7S5Yag9gjRe W2aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=UjUbSxR4; 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 p10si2242259edq.609.2020.05.01.15.06.06; Fri, 01 May 2020 15:06:29 -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=UjUbSxR4; 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 S1726435AbgEAWAt (ORCPT + 99 others); Fri, 1 May 2020 18:00:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726344AbgEAWAt (ORCPT ); Fri, 1 May 2020 18:00:49 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37DF4C061A0C for ; Fri, 1 May 2020 15:00:49 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id w29so9121194qtv.3 for ; Fri, 01 May 2020 15:00:49 -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=oBEAIK8QXTZX1dLWqy1VNeMA7BQ8eOwhoj7KI8MDzCug+1Cv2cDleGiee2NbRLknYm +RYEupqNsQ2+e/2f6IgF/mEeb5/5zqxGB7wAhSkspVHP/D4reUeBoHymstWMVGoijyEh 0aS9w7z5xxKS6WCHuvIEI9WY0nkkwRx/+zGX/iDtRdNLwDYoswgMXKHMmgVXRz02wzuj ho3t/sdwtp99gsMx/oPCMKJyHoBKAfIfetvTQQ23pyQ2Mzfu9hRIbb9WLMlJfKO6n3dC 2P3fUEyUAXUHQHwbtDjlnwSUAA82NVm8DN8Y4lRQgaK6hOvfu6WqgsCmqpLaVRGtcaQ6 6uWg== X-Gm-Message-State: AGi0PuaQQzBLhWQXh9L4UI+0UrZoc8IAsZ4UEM8YnVyftLgW0haHvp32 ielTgn0tSE47AtVKTPZaFUGLGg== 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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.=