Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1112622ybz; Fri, 1 May 2020 14:56:45 -0700 (PDT) X-Google-Smtp-Source: APiQypKTadPp/lQiHZVzyPTOXGQ756A28xhXkWQaYW7qBTK6lJD3QomvOm4cnbe8oPIfHSvFiSpX X-Received: by 2002:a05:6402:1adc:: with SMTP id ba28mr5362465edb.12.1588370204824; Fri, 01 May 2020 14:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588370204; cv=none; d=google.com; s=arc-20160816; b=pYwthmhCM7wH4+Kmp29aDbqb33JOkxgRjr3eHFOvkrFxW6y5ZKewRl+uLL0iirkYcn uzqqBNro30mzmUHGtwuM+gZjN/pNvLDod0abGisk3Eics4KEAsaokQD9QFS5VsJRONxl k7XV+dPBCbgFCFG9MT4jKBbvb6sO/mzmQJv1zSrlb1bnoCxTDkYm8Y6uz4BTvfeDwQ1+ rjDw9Gujq0V0tJFvwNrMeVfae1nI30oIMu6nGFWQ624Fhsw8+t4U6l57GkWeTnWM3aEc H7B14ImyF/7xJbhohcgs+9jMQBlx09m24j1WKyN9Or256vrKWJ89jF2fPxw5oHklOIjT ebyg== 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=Vqe/h5bIx8Xwds5+Doaeo5m4e7NAmlXMvCMv86v34rc=; b=QmCofB+zC7c0Yd4OR5RwhgorAIYa9cpo32m/rXune0XASxxbhDXw04eYIrTUNOEZPx o8ITFJoZAKLjwmZr07Upa+pGvVjekpw3XvPzYdNzyLGQHRkZMLhPiXPhEe1mYq/MlsG1 rezlCvhcX+kEprS4rQ9pYKuQnFeCee2P1JQpq5AP8R3q0KYN/wLhhuJnU2fQxwCZ+WjZ xqnLI+7kpOiJYO4uYzxAlzR9Qdt2hAH5/Ol+HNEfiOXqXKZ94NU2hh0nMB7DSVKfpopI WVZB0oEN8k5PTGg3cLN58rClmLD94glnpsZNrOnAshmdPrSMIqF6WGrxq2L/FbtQ1ds8 qgVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IwDhz8qF; 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 j9si2396939edn.415.2020.05.01.14.56.22; Fri, 01 May 2020 14:56:44 -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=IwDhz8qF; 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 S1726377AbgEAVyz (ORCPT + 99 others); Fri, 1 May 2020 17:54:55 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:59358 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726045AbgEAVyz (ORCPT ); Fri, 1 May 2020 17:54:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588370093; 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=Vqe/h5bIx8Xwds5+Doaeo5m4e7NAmlXMvCMv86v34rc=; b=IwDhz8qFqZ3P8Ga2hQugrbtYcW+J78pfO9cvPbMOkT2rAZinNz/4xtIRQ0uvgOVXePAlsA Wdc9HX4DAUvE1T2BQqcWU6n0nH3f9fywqbfq2ZQPg09/bLMNlYOESYitMALTiCT3167M/z YpXBLjdbXE42RAXUEiHQJcqqrIGHsnU= 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-443-Qwf3zUiVOfaeAGW9G-6Xxg-1; Fri, 01 May 2020 17:54:49 -0400 X-MC-Unique: Qwf3zUiVOfaeAGW9G-6Xxg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F0EA545F; Fri, 1 May 2020 21:54:46 +0000 (UTC) Received: from optiplex-lnx (unknown [10.3.128.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8BDE36A954; Fri, 1 May 2020 21:54:44 +0000 (UTC) Date: Fri, 1 May 2020 17:54:41 -0400 From: Rafael Aquini To: Qian Cai Cc: Linux-MM , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, iamjoonsoo.kim@lge.com, rientjes@google.com, penberg@kernel.org, cl@linux.com Subject: Re: [PATCH] mm: slub: add panic_on_error to the debug facilities Message-ID: <20200501215441.GE27720@optiplex-lnx> References: <20200501211540.71216-1-aquini@redhat.com> <21CF143C-B9D1-4D3F-A875-370924265593@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21CF143C-B9D1-4D3F-A875-370924265593@lca.pw> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 01, 2020 at 05:29:19PM -0400, Qian Cai wrote: > > > > On May 1, 2020, at 5:15 PM, Rafael Aquini wrote: > > > > 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. > > > > 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. > > 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. > It seems like a good idea which also would required "adding things" elsewhere, but doesn't look mutually exclusive with the approach here. Thanks -- Rafael