Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2404968rdb; Mon, 20 Nov 2023 09:51:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPNobtO3rpfWK2GYWvaFFGfhQCUxm88EFy9yOdwKoFC0eAydnt8u4NJv2CjHkoNeS+YNaY X-Received: by 2002:a05:6a20:6a0d:b0:180:132:e078 with SMTP id p13-20020a056a206a0d00b001800132e078mr7523020pzk.31.1700502685149; Mon, 20 Nov 2023 09:51:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700502685; cv=none; d=google.com; s=arc-20160816; b=HZsetOHXGCWm3NXypaVz3kIeu7PRjG650lzzco+9nZKWIwrQ3wizq+aIfHvsaL7qZz C7p92zV04+m5t1cRXbXSANdqriVQOyAmJZqAPalZP2AUIvk32ktiL2jkHwmZkyD/4e28 vBdFBo5B9Tjn6wHX+dKlUj/C41hHxhFRdhq++c/Q47QhcnxerneByJXm/ynSPlgPQ8nO +EYIePZvXg80rgJl/ijx9F+g7aDXDsAW/2XbqojICHPC54y8KcCyaEU6TrKrLoSMbrBm MBrNs3r0Op4dOoN7T6WhIWfGWyqBkGxa66GVvymtW28R5G8467+/SPD2ZrLR56ZtR9Rn aAkA== 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=AmubiAZbFJ0d/i3HqBc+VhVD2T8fru9oX5DWKdU3rlA=; fh=qWoxmPN1zRqnLSoCWGpfFsDtzJsx/SGdqx98lbP+Uho=; b=vnjCVTK/429sikC6eCQz6OO2zdSm74Hyum/fX0RyWgtjWY8iAORYZXJD4BqqAwcwc+ Ggd5Dx106SWo0kJ1kUTOjVhmZzvFXtz/DyHwW+iPMiUhQ4/Dc5oKq3IOfNr/SLXuYrpb UcDRobK7B0VNw40GcSgQxk3gZBsRGIa61vK0BGPvU0Nr+9kj4Jr7EKw+hqCDM0q/4uy7 kPBfgZu2xxOKzEKFrSy7Y68RJoVy1JRazqbVpPqVDaCW8y9gnA/t6baO+POMsGDoGm3m N1hydKFUJjDrirCrYHXQtf8NRFsU4vQcYhXBdYS/k3nLBSI6PII9CawdnlqTwm0rEKL6 rlvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=b2OIEP3B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id b7-20020a056a000a8700b0069026fd5a48si8708869pfl.34.2023.11.20.09.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:51:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=b2OIEP3B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id CB8A98080ED2; Mon, 20 Nov 2023 09:50:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230021AbjKTRuK (ORCPT + 99 others); Mon, 20 Nov 2023 12:50:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233605AbjKTRts (ORCPT ); Mon, 20 Nov 2023 12:49:48 -0500 Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [IPv6:2001:41d0:1004:224b::b8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9CEE10DD for ; Mon, 20 Nov 2023 09:49:40 -0800 (PST) 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=1700502578; 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=AmubiAZbFJ0d/i3HqBc+VhVD2T8fru9oX5DWKdU3rlA=; b=b2OIEP3BJYVimjqmep3gX4pnHU69uhP3rz4BbIU0wDtcOHhahRQdj/mDShPRiA2HDFVZhX ObfN7eBTcN91SgmffyLxHsXabiv3RbporAg2HdC9O1DTTM3xtlUsATOXQ2XYASwgncbBwR 7K4umBHx7gSfcQI4eOh8RKYS2iCumFg= From: andrey.konovalov@linux.dev To: Andrew Morton Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Oscar Salvador , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH v4 14/22] kmsan: use stack_depot_save instead of __stack_depot_save Date: Mon, 20 Nov 2023 18:47:12 +0100 Message-Id: <18092240699efdc6acd78b51e41ea782953e6c8d.1700502145.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 09:51:00 -0800 (PST) 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. Reviewed-by: Alexander Potapenko 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 c19f47af0424..cf2d70e9c9a5 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); } @@ -185,11 +185,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