Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5913803rwp; Mon, 17 Jul 2023 11:26:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlHbWnR12HAA+6Wy5nEwP7aSqAjWER49+ks0BZanLdU44s+Y3kYTiYHW62axcS9VYq2bpQ4U X-Received: by 2002:a05:6a00:a29:b0:675:667c:f261 with SMTP id p41-20020a056a000a2900b00675667cf261mr16980083pfh.2.1689618368869; Mon, 17 Jul 2023 11:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689618368; cv=none; d=google.com; s=arc-20160816; b=VeQnCSpm/MTAmoG/CgGEko4pkEH4NKGxRb9AIyy/XyRmi9N9EPoueX5H0bXVS0/rU8 Iqi36HMkNaMfD0X44KM0pFUveGPqhKmUxGJKLBVH4a6PkyjSkA6UYARpowy4NnUCg1Bt 71fewbV0muGxiJmE/cdDKUVReGyb1DDXRD50DH+RfjGxhMXx/IvcyYDXFeGhnhL3gh4x YaoX8QuCC9YaIwHuFCYetY7vR7nb5GwGwlE9IrUB3fVDhEOFdu53VI5NJ2j9raUQp0Tu YPWt8JTGBz4HrycBIDNYu7rNuV01NbF0AKVMP+8hLHF332i7CQLguAaESN3OHXbSGyn8 rUDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jpnj+Cz5eTe8LVLSv9jAcvV/MnhAoJNPKW2Rsp5j6AI=; fh=Ag0RbRk3LxdpQ9OdMLAf8hbnmFe6FOAHRGAvgVTwgEc=; b=U107XpsBEi7rRnSJnAtreJIN/MTbpwl7atQbUzcmlyjupeKh62Capq3MkRP/9JumU0 t6EsO0l/1aFSMNbUz/fAKMtIlJ5DtvqidI/mmBu0q9ecdVM/a7BOtxH02fk7Q34OszhC hlXn8oMa+T5Go8oarIlJdglxWN0jCsDlL6e0fj/O2npBKLvp4BhNIe5rLRkL1jceMImR uwfodwQqYmBQgNpzDVCvNvfyWPNT4oHDHt+KcVAKWa7rG73haOpUswXPM11YCyAqpq4f sa1FEcBrRu3P2RjZm4yclLohMzeIVs05H5gWSmq+tas2vfDLPprBHZ7bu2N+IcGTyecn RWbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CLMMENSA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cj19-20020a056a00299300b00682689dbdd1si147966pfb.278.2023.07.17.11.25.55; Mon, 17 Jul 2023 11:26:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CLMMENSA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231797AbjGQSSk (ORCPT + 99 others); Mon, 17 Jul 2023 14:18:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231730AbjGQSSf (ORCPT ); Mon, 17 Jul 2023 14:18:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D3B41701; Mon, 17 Jul 2023 11:18:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A1A31611E9; Mon, 17 Jul 2023 18:18:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A8CEC433C8; Mon, 17 Jul 2023 18:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689617903; bh=kOL1Zapyu+0MBMzzQqJDacaa50DKEhK1uQVmnZTCnQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CLMMENSAlauGHHkJchd64UixIimj8OJg9ZLFeIoziZqM3aKwBgkk3OEuhNTxbtRlh dqAGx/9rPN0279PCKUbxno0BSqA/CVNOrvWMBGIm1r2XUr+umK+atSNrov1EiKP5VP DlRaHqW4dztQduvXmWBTX7QasopCbVzfem/fcUwagPF2BKAgHUw/eTcD9dXMedbOHT +8ZbCouvpqRP+zEI+Y10OTRP72eQaigg0DeenPo3Kqk3jmnYBcdYVXk3QtIrZU2HA8 cl7VVKTbVbgvnGvE04TlxKc4pB/STaqf3t1L0pedF6mojy/q/VWCPrVy1iUaFaHvG1 fl2N02j7GZVNg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id AB6ADCE04CD; Mon, 17 Jul 2023 11:18:22 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, "Paul E. McKenney" Subject: [PATCH rcu 2/4] scftorture: Forgive memory-allocation failure if KASAN Date: Mon, 17 Jul 2023 11:18:18 -0700 Message-Id: <20230717181820.1098541-2-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <38be0135-a7a4-4c16-b2c6-1b3817c3067f@paulmck-laptop> References: <38be0135-a7a4-4c16-b2c6-1b3817c3067f@paulmck-laptop> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kernels built with CONFIG_KASAN=y quarantine newly freed memory in order to better detect use-after-free errors. However, this can exhaust memory more quickly in allocator-heavy tests, which can result in spurious scftorture failure. This commit therefore forgives memory-allocation failure in kernels built with CONFIG_KASAN=y, but continues counting the errors for use in detailed test-result analyses. Signed-off-by: Paul E. McKenney --- kernel/scftorture.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/scftorture.c b/kernel/scftorture.c index 5d113aa59e77..83c33ba0ca7e 100644 --- a/kernel/scftorture.c +++ b/kernel/scftorture.c @@ -171,7 +171,8 @@ static void scf_torture_stats_print(void) scfs.n_all_wait += scf_stats_p[i].n_all_wait; } if (atomic_read(&n_errs) || atomic_read(&n_mb_in_errs) || - atomic_read(&n_mb_out_errs) || atomic_read(&n_alloc_errs)) + atomic_read(&n_mb_out_errs) || + (!IS_ENABLED(CONFIG_KASAN) && atomic_read(&n_alloc_errs))) bangstr = "!!! "; pr_alert("%s %sscf_invoked_count %s: %lld resched: %lld single: %lld/%lld single_ofl: %lld/%lld single_rpc: %lld single_rpc_ofl: %lld many: %lld/%lld all: %lld/%lld ", SCFTORT_FLAG, bangstr, isdone ? "VER" : "ver", invoked_count, scfs.n_resched, @@ -323,7 +324,8 @@ static void scftorture_invoke_one(struct scf_statistics *scfp, struct torture_ra preempt_disable(); if (scfsp->scfs_prim == SCF_PRIM_SINGLE || scfsp->scfs_wait) { scfcp = kmalloc(sizeof(*scfcp), GFP_ATOMIC); - if (WARN_ON_ONCE(!scfcp)) { + if (!scfcp) { + WARN_ON_ONCE(!IS_ENABLED(CONFIG_KASAN)); atomic_inc(&n_alloc_errs); } else { scfcp->scfc_cpu = -1; -- 2.40.1