Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1335928rda; Mon, 23 Oct 2023 09:25:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTUbLGQKM5S+ythwNl1U7PGfSDPenkylpenMR5LQn4K1YwxV2K2bkjXbEvzYj79KpVMxiv X-Received: by 2002:a17:90a:d995:b0:27d:4901:b0b7 with SMTP id d21-20020a17090ad99500b0027d4901b0b7mr6354533pjv.30.1698078329430; Mon, 23 Oct 2023 09:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698078329; cv=none; d=google.com; s=arc-20160816; b=Y0xHn9UB/ww/ZG+SHODWNmE1iRFG6avzqn5U3nS00b7LUZ01d6W3bEt/Xl4JiEeUvk I6Nc9v+ZLzYWWDYlwBRkoFJLzCwSgIF8bJzKjszb7srTtCh8jpVvs8uaO71fXhkCcEgd 2fk/8ls973QnRR1IHNRzdSXlKyAhtdHWRMCjPjKwO42mExPhuBdse1/mspjKxWa1aXDy 10CoDxTus6fvu79K+Qadbe96LN2gTjtxths2lhVsWOxxbyCqQDRORrUufiq2OtmaSHcH PHn6KXqmdOxuorg20IeYaZp6WoRG995Ma1YDQtmTmagDeySPQ+V1cc5LEO3jmCwCkhBp owEg== 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=EAtH6mtyDDwPJA3G1u2tEpoRGlDDlV29Wi3V3trZXF4=; fh=nfQSbTp1dWHt2Ier1Up8UhVNdXOqoJJLNvTrpT3jJEk=; b=RbYrqXM2nOf4FCPt1o+ulXtbZafZIr0VTGppV++IWfIgHfMbfPMc6WSt4bFmyjY3Qg OtZ2xPStjNrfk8X9HIa73ACx1K39d+2+BiugSf3PLpERgbkawoMLAwgy8p+QdC0bnLS/ KagyxixTB48wuyarluVBO1rr4YNA9eHp0Oz0dLjQzOjKcaEz6+rS2PbQ+M7zgyKw1ktl /6xqT028U2rbv+swgtjFolseT7F/dsuQBHFYCc3p3oun0fPD2lBWSdhipfOVvwdimlpA 6z30MJDCZDd2cMyQvva3Kxi6hy2Ewq56SeU1JpS1G0YKVU1JAxohG/SOgHSeHZ9NasC2 3+pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=kPoNUZX0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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. [23.128.96.36]) by mx.google.com with ESMTPS id ls11-20020a17090b350b00b0027d09bab505si9730452pjb.66.2023.10.23.09.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 09:25:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=kPoNUZX0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 9378D805BCB8; Mon, 23 Oct 2023 09:25:22 -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 S233385AbjJWQZO (ORCPT + 99 others); Mon, 23 Oct 2023 12:25:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbjJWQZM (ORCPT ); Mon, 23 Oct 2023 12:25:12 -0400 Received: from out-201.mta0.migadu.com (out-201.mta0.migadu.com [91.218.175.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63872E4 for ; Mon, 23 Oct 2023 09:25:10 -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=1698078308; 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=EAtH6mtyDDwPJA3G1u2tEpoRGlDDlV29Wi3V3trZXF4=; b=kPoNUZX00gmVx2jTNWUBw1MnjfYZ+Ih+Xex2SmhQ0zyGsX2Ioeza+QBykBxwXLreMwqivE M2aRr8G1yeGyH9/IfvhHARI9SQY8lVb/5X48pbhNEAEo4GD626fn7sdXdC2E92CjCX+Meu xIXcm3bRhi2HV2gkZQpZtoUQzaGzoec= 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 v3 13/19] kmsan: use stack_depot_save instead of __stack_depot_save Date: Mon, 23 Oct 2023 18:22:44 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.8 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 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]); Mon, 23 Oct 2023 09:25:23 -0700 (PDT) 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 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