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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 4E19DC433E1 for ; Mon, 8 Jun 2020 16:59:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1C4852053B for ; Mon, 8 Jun 2020 16:59:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C4852053B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9D0E86B0005; Mon, 8 Jun 2020 12:59:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9816B6B0007; Mon, 8 Jun 2020 12:59:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 896976B0008; Mon, 8 Jun 2020 12:59:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 72C326B0005 for ; Mon, 8 Jun 2020 12:59:00 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 30FFB184EBCE7 for ; Mon, 8 Jun 2020 16:59:00 +0000 (UTC) X-FDA: 76906654440.05.dime04_1c0a70b26dbb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id EFD11184EACF0 for ; Mon, 8 Jun 2020 16:58:59 +0000 (UTC) X-HE-Tag: dime04_1c0a70b26dbb X-Filterd-Recvd-Size: 2964 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Mon, 8 Jun 2020 16:58:59 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 91F6DAAE8; Mon, 8 Jun 2020 16:59:00 +0000 (UTC) Subject: Re: [RFC PATCH 1/5] mm, slub: extend slub_debug syntax for multiple blocks To: Kees Cook Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@android.com, vinmenon@codeaurora.org, Matthew Garrett , Jann Horn , Vijayanand Jitta References: <20200602141519.7099-1-vbabka@suse.cz> <20200602141519.7099-2-vbabka@suse.cz> <202006051401.9AB3D2CAD@keescook> From: Vlastimil Babka Message-ID: Date: Mon, 8 Jun 2020 18:58:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <202006051401.9AB3D2CAD@keescook> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: EFD11184EACF0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 6/5/20 11:06 PM, Kees Cook wrote: >> @@ -83,6 +88,18 @@ in low memory situations or if there's high fragmentation of memory. To >> >> slub_debug=O >> >> +You can apply different options to different list of slab names, using blocks >> +of options. This will enable red zoning for dentry and user tracking for >> +kmalloc. All other slabs will not get any debugging enabled:: >> + >> + slub_debug=Z,dentry;U,kmalloc-* >> + >> +You can also enable options (e.g. sanity checks and poisoning) for all caches >> +except some that are deemed too performance critical and don't need to be >> +debugged:: > > Just for more clarity, how about: > > ... debugged by starting the list with "-" (to mean "all except the > following"):: Hmm, "-" is not exactly "all except the following", but "no debugging", as explained in the list of debug options earlier in the file. So I'm updating it to this: You can also enable options (e.g. sanity checks and poisoning) for all caches except some that are deemed too performance critical and don't need to be debugged by specifying global debug options followed by a list of slab names with "-" as options:: slub_debug=FZ;-,zs_handle,zspage >> + >> + slub_debug=FZ;-,zs_handle,zspage >> + >> In case you forgot to enable debugging on the kernel command line: It is >> possible to enable debugging manually when the kernel is up. Look at the >> contents of:: > > Everything else looks great; very nice! :) > > Reviewed-by: Kees Cook Thanks!