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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 34C1CC433ED for ; Wed, 12 May 2021 10:31:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E7A9F61106 for ; Wed, 12 May 2021 10:31:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230145AbhELKcE (ORCPT ); Wed, 12 May 2021 06:32:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:50264 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230149AbhELKbN (ORCPT ); Wed, 12 May 2021 06:31:13 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5181CB0BD; Wed, 12 May 2021 10:30:04 +0000 (UTC) Subject: Re: [PATCH v5 2/3] mm/slub, kunit: add a KUnit test for SLUB debugging functionality To: Marco Elver , Oliver Glitta Cc: Brendan Higgins , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , LKML , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Memory Management List , Daniel Latypov References: <20210511150734.3492-1-glittao@gmail.com> <20210511150734.3492-2-glittao@gmail.com> From: Vlastimil Babka Message-ID: <99d79722-ea94-7775-8ac2-5957b42060b2@suse.cz> Date: Wed, 12 May 2021 12:30:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/11/21 5:16 PM, Marco Elver wrote: > On Tue, 11 May 2021 at 17:07, wrote: >> From: Oliver Glitta >> >> SLUB has resiliency_test() function which is hidden behind #ifdef >> SLUB_RESILIENCY_TEST that is not part of Kconfig, so nobody >> runs it. KUnit should be a proper replacement for it. >> >> Try changing byte in redzone after allocation and changing >> pointer to next free node, first byte, 50th byte and redzone >> byte. Check if validation finds errors. >> >> There are several differences from the original resiliency test: >> Tests create own caches with known state instead of corrupting >> shared kmalloc caches. >> >> The corruption of freepointer uses correct offset, the original >> resiliency test got broken with freepointer changes. >> >> Scratch changing random byte test, because it does not have >> meaning in this form where we need deterministic results. >> >> Add new option CONFIG_SLUB_KUNIT_TEST in Kconfig. >> Tests next_pointer, first_word and clobber_50th_byte do not run >> with KASAN option on. Because the test deliberately modifies non-allocated >> objects. >> >> Use kunit_resource to count errors in cache and silence bug reports. >> Count error whenever slab_bug() or slab_fix() is called or when >> the count of pages is wrong. >> >> Signed-off-by: Oliver Glitta Reviewed-by: Vlastimil Babka > I think I had already reviewed v4, and the changes here are fine: > > Reviewed-by: Marco Elver > > Others who had reviewed/acked v4, probably need to re-ack/review. > Note, I think if you addressed the comments and didn't change much > else, you can typically carry the acks/reviews, unless the other > person changed their mind explicitly. FTR, besides me and Marco, v4 had also: Acked-by: Daniel Latypov 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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 C046AC433ED for ; Wed, 12 May 2021 10:30:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 245E9613FE for ; Wed, 12 May 2021 10:30:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 245E9613FE 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 968DD6B0071; Wed, 12 May 2021 06:30:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 93F806B0073; Wed, 12 May 2021 06:30:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7E9126B0071; Wed, 12 May 2021 06:30:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0107.hostedemail.com [216.40.44.107]) by kanga.kvack.org (Postfix) with ESMTP id 6132B6B0071 for ; Wed, 12 May 2021 06:30:06 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2012C8249980 for ; Wed, 12 May 2021 10:30:06 +0000 (UTC) X-FDA: 78132208812.30.F3029C9 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf03.hostedemail.com (Postfix) with ESMTP id 37B08C0007EA for ; Wed, 12 May 2021 10:29:57 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5181CB0BD; Wed, 12 May 2021 10:30:04 +0000 (UTC) Subject: Re: [PATCH v5 2/3] mm/slub, kunit: add a KUnit test for SLUB debugging functionality To: Marco Elver , Oliver Glitta Cc: Brendan Higgins , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , LKML , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development , Linux Memory Management List , Daniel Latypov References: <20210511150734.3492-1-glittao@gmail.com> <20210511150734.3492-2-glittao@gmail.com> From: Vlastimil Babka Message-ID: <99d79722-ea94-7775-8ac2-5957b42060b2@suse.cz> Date: Wed, 12 May 2021 12:30:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 37B08C0007EA Authentication-Results: imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.15 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Rspamd-Server: rspam03 X-Stat-Signature: e5mest55fzeo3i4yr7okb3ifxjx8df89 Received-SPF: none (suse.cz>: No applicable sender policy available) receiver=imf03; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1620815397-401301 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 5/11/21 5:16 PM, Marco Elver wrote: > On Tue, 11 May 2021 at 17:07, wrote: >> From: Oliver Glitta >> >> SLUB has resiliency_test() function which is hidden behind #ifdef >> SLUB_RESILIENCY_TEST that is not part of Kconfig, so nobody >> runs it. KUnit should be a proper replacement for it. >> >> Try changing byte in redzone after allocation and changing >> pointer to next free node, first byte, 50th byte and redzone >> byte. Check if validation finds errors. >> >> There are several differences from the original resiliency test: >> Tests create own caches with known state instead of corrupting >> shared kmalloc caches. >> >> The corruption of freepointer uses correct offset, the original >> resiliency test got broken with freepointer changes. >> >> Scratch changing random byte test, because it does not have >> meaning in this form where we need deterministic results. >> >> Add new option CONFIG_SLUB_KUNIT_TEST in Kconfig. >> Tests next_pointer, first_word and clobber_50th_byte do not run >> with KASAN option on. Because the test deliberately modifies non-allocated >> objects. >> >> Use kunit_resource to count errors in cache and silence bug reports. >> Count error whenever slab_bug() or slab_fix() is called or when >> the count of pages is wrong. >> >> Signed-off-by: Oliver Glitta Reviewed-by: Vlastimil Babka > I think I had already reviewed v4, and the changes here are fine: > > Reviewed-by: Marco Elver > > Others who had reviewed/acked v4, probably need to re-ack/review. > Note, I think if you addressed the comments and didn't change much > else, you can typically carry the acks/reviews, unless the other > person changed their mind explicitly. FTR, besides me and Marco, v4 had also: Acked-by: Daniel Latypov