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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 ADF41C433E0 for ; Tue, 9 Mar 2021 18:14:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4E2BA65229 for ; Tue, 9 Mar 2021 18:14:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E2BA65229 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D56F08D012F; Tue, 9 Mar 2021 13:14:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D04D18D012A; Tue, 9 Mar 2021 13:14:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B7DDF8D012F; Tue, 9 Mar 2021 13:14:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id 9BB648D012A for ; Tue, 9 Mar 2021 13:14:45 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 526B31E1D for ; Tue, 9 Mar 2021 18:14:45 +0000 (UTC) X-FDA: 77901136530.28.5264412 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by imf29.hostedemail.com (Postfix) with ESMTP id 060F5DE for ; Tue, 9 Mar 2021 18:14:35 +0000 (UTC) Received: by mail-wr1-f54.google.com with SMTP id 7so17588341wrz.0 for ; Tue, 09 Mar 2021 10:14:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:cc:references:from:subject:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=YWRjKT60IEBhulpbgMdBcOEwMVDBc2QXRWkm6ND2LTY=; b=TIEoH2DNa8qRSYBVWnaxdsJQ+Zi7/GF7DRltAHbqpXoGbdlc4MMGMaFnIT5Z/TDUed g2vR7gAaFTAWUjUXilU5pBFbGW9EG3//W7O8fZaeeG4tcect3Fsol1/ba3c/o+kirWB5 ar/BGkbk2+hGs5A1gXnGUmWjt9d00gZLL0f7EfWZbVnXFYBKmSOYIlkGPTavpkYTkN5j W8ezlpofISU+eEFENaF7FA2pR1kOchhiwnhdULUQJsCifMLBuhCFfk0G8qPBX5YaQc0C x+0NsKHpTJ11I4dxLOZ4AJbF/Sq6uvbC48s9f83qtPF5LcRTwvDsDreoFhfpPezIdx0M +rOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:subject:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YWRjKT60IEBhulpbgMdBcOEwMVDBc2QXRWkm6ND2LTY=; b=FQJcXgyNlByM84tzKe6l8PBM3fqlQo5dIZIsbZMD5aLvauVCZHVbPVwd5v8fvtdKkT Y15U+Gby2VrSBSMEmvdymV3h25gFckN0qw8uFQJjteG4le+4/HOr5qWlpcOlC9wZx0bH LXk2ZDXOelN7duQpv5J/jYhGCbor0pICeMR5mACI5Fx/wlWY8Y0FydGVWdNXFkQ1Db7l dKTdsmJ2+1r9jBLq3gHDF1dJ1ZxsER1myqvocCu3Efr6ZFDaByGp5v7PZLfLjXFS+V7e oZpFekdvThg+xjfGq4YdI/ALS9p5tg1foBpnt0/IXKTAx7bgFL8MYHV5NO4hh9x6f7oC 4tRQ== X-Gm-Message-State: AOAM532/svnVfstf8TxQbObMSAf8EyP9ns/yk2dxS/MPeplVj/97ZVIM VtdkjDAtwxhzfpovE5W1NWX+pg== X-Google-Smtp-Source: ABdhPJyPRsdzft5PXcEJd8oZLDku0oji0/0KIglu9HmYJeRoMykTORGWU7luuklo2QcxwLm/nPzLpg== X-Received: by 2002:adf:e38f:: with SMTP id e15mr28608333wrm.321.1615313671893; Tue, 09 Mar 2021 10:14:31 -0800 (PST) Received: from [10.44.66.8] ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id x8sm24791935wru.46.2021.03.09.10.14.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Mar 2021 10:14:31 -0800 (PST) To: Vlastimil Babka , linux-mm@kvack.org, akpm@linux-foundation.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com Cc: corbet@lwn.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210309134720.29052-1-georgi.djakov@linaro.org> <390d8a2f-ead9-48a9-99eb-65c73bd18422@suse.cz> From: Georgi Djakov Subject: Re: [PATCH] mm/slub: Add slub_debug option to panic on memory corruption Message-ID: <6bfebf01-5f52-49bd-380b-04785c474c81@linaro.org> Date: Tue, 9 Mar 2021 20:14:30 +0200 MIME-Version: 1.0 In-Reply-To: <390d8a2f-ead9-48a9-99eb-65c73bd18422@suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 060F5DE X-Stat-Signature: pfcnu7ssbjgk6bp8g9bwhx1p3ci1bkek Received-SPF: none (linaro.org>: No applicable sender policy available) receiver=imf29; identity=mailfrom; envelope-from=""; helo=mail-wr1-f54.google.com; client-ip=209.85.221.54 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615313675-970044 Content-Transfer-Encoding: quoted-printable 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: Hi Vlastimil, Thanks for the comment! On 3/9/21 17:09, Vlastimil Babka wrote: > On 3/9/21 2:47 PM, Georgi Djakov wrote: >> Being able to stop the system immediately when a memory corruption >> is detected is crucial to finding the source of it. This is very >> useful when the memory can be inspected with kdump or other tools. >=20 > Is this in some testing scenarios where you would also use e.g. panic_o= n_warn? > We could hook to that. If not, we could introduce a new > panic_on_memory_corruption that would apply also for debug_pagealloc an= d whatnot? I would prefer that we not tie it with panic_on_warn - there might be lot= s of new code in multiple subsystems, so hitting some WARNing while testing is= not something unexpected. Introducing an additional panic_on_memory_corruption would work, but i no= ticed that we already have slub_debug and thought to re-use that. But indeed, =D0= =B0dding an option to panic in for example bad_page() sounds also useful, if that'= s what you suggest. Thanks, Georgi