Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3615661rdb; Wed, 13 Sep 2023 18:46:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnLb0c4R02aY195YyBaYGh7fctB3ALOhLY7bxn55d0tFVF5Sp76CRK9knSLUEbaamZJmdm X-Received: by 2002:a05:6870:a98c:b0:1d0:fa7b:c3f9 with SMTP id ep12-20020a056870a98c00b001d0fa7bc3f9mr4686998oab.30.1694655995082; Wed, 13 Sep 2023 18:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694655995; cv=none; d=google.com; s=arc-20160816; b=pfFsdgHK5b5axyNPjmwNaRG2f0/QRDRWjkUWbFjldOnimG0VQPkMUyRnkXbgi55a7f KSug/D2rx8zazr/T8Wleth+XftMLh+C75U7HkBBDunWa7jgGuCTGvxBdBN3Xtdh0QBdS cTQdISk0OjxlrF0IRso9SVFyK19ZKkvkYXYq6WXRhrAHoQ9jGBeAMouNhvCCSaV6KBht 1SL9K7f8QIEn3cFNMuYy+18hbU8drnUCbzfYOetacEhrdTXIdBTwqDDode63LEnh4uCK bvRZkVVBxWWyTEYBZPkEaraW+MaF97mG5aOFwqHyolCjjOul9UdLw+tBlVwtND9bugOB IytA== 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=DC9UmNBNkxmGXhCZnNWnsoHzitcm2pHd/lCALP3GjjY=; fh=nfQSbTp1dWHt2Ier1Up8UhVNdXOqoJJLNvTrpT3jJEk=; b=Wdub+hsCF5rKtjRVW61KGIs5d6f/1Z5BS/TRNy2+GKLQqndpoEsc0TUdoIluzFR6BX iMLAJSYF804OlU86j/UAOV6sjWGzw4ZEym9bbdf9qKyR39ZgsGP8Di3wLhxUzG2nEsdI DB8LH/V0CXnkjb/Q5qPty9w4eT6/lImU+SpVz7zaDJWy41wlx8Uh8BdvmhuhXlU3pkQt DyJd6y+yf9wBFTtLLg1K0p2uJIBMFXiENbNIvQvpL6uYirg9r4BZSER9mt8l/kxIx7uq kVSh+7DKPeo2uqSwc3hyhFciYZjYDkT/rqGQiZH+aaJBirk5ci4IrPVsfgp2R/S9Seau d++w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=riuufySF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id e66-20020a636945000000b00577a7c39aacsi389054pgc.275.2023.09.13.18.46.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 18:46:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=riuufySF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 4A06282E3328; Wed, 13 Sep 2023 10:17:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231549AbjIMRR2 (ORCPT + 99 others); Wed, 13 Sep 2023 13:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231696AbjIMRRL (ORCPT ); Wed, 13 Sep 2023 13:17:11 -0400 Received: from out-229.mta1.migadu.com (out-229.mta1.migadu.com [95.215.58.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 095181BCD for ; Wed, 13 Sep 2023 10:17:01 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1694625420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DC9UmNBNkxmGXhCZnNWnsoHzitcm2pHd/lCALP3GjjY=; b=riuufySFxtO02s+5vb9CAH57DenGXrZTUkunEd+rXmQlCvLne7cXHWGh8H/JxSrJaHldo1 +Ti+81/7EXiWikASrBXA2uiFwVtaXJN9opiGB+/Z3fX20LDW1ZVMd8ZuCg94ye7sNtPe/p DZTAmOjByDol9k695KLblDDTg6NOK9s= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Oscar Salvador , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH v2 13/19] kmsan: use stack_depot_save instead of __stack_depot_save Date: Wed, 13 Sep 2023 19:14:38 +0200 Message-Id: <7f6b58fda637238ffc0c240e7fd3b3a6673d9d91.1694625260.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Sep 2023 10:17:51 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email From: Andrey Konovalov Make KMSAN use stack_depot_save instead of __stack_depot_save, as it always passes true to __stack_depot_save as the last argument. Signed-off-by: Andrey Konovalov --- Changes v1->v2: - This is a new patch. --- mm/kmsan/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/kmsan/core.c b/mm/kmsan/core.c index 3adb4c1d3b19..5d942f19d12a 100644 --- a/mm/kmsan/core.c +++ b/mm/kmsan/core.c @@ -76,7 +76,7 @@ depot_stack_handle_t kmsan_save_stack_with_flags(gfp_t flags, /* Don't sleep. */ flags &= ~(__GFP_DIRECT_RECLAIM | __GFP_KSWAPD_RECLAIM); - handle = __stack_depot_save(entries, nr_entries, flags, true); + handle = stack_depot_save(entries, nr_entries, flags); return stack_depot_set_extra_bits(handle, extra); } @@ -250,11 +250,10 @@ depot_stack_handle_t kmsan_internal_chain_origin(depot_stack_handle_t id) /* * @entries is a local var in non-instrumented code, so KMSAN does not * know it is initialized. Explicitly unpoison it to avoid false - * positives when __stack_depot_save() passes it to instrumented code. + * positives when stack_depot_save() passes it to instrumented code. */ kmsan_internal_unpoison_memory(entries, sizeof(entries), false); - handle = __stack_depot_save(entries, ARRAY_SIZE(entries), __GFP_HIGH, - true); + handle = stack_depot_save(entries, ARRAY_SIZE(entries), __GFP_HIGH); return stack_depot_set_extra_bits(handle, extra_bits); } -- 2.25.1