Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3582988rdb; Wed, 13 Sep 2023 17:20:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGK6jhsb0lkuYYt14V7NvLRqY/I/jWw2Py5eQUSnZaRQ1fBUpQE8Mgme/p7YlbKd9f48khh X-Received: by 2002:a05:6870:32ca:b0:1ba:bb13:d007 with SMTP id r10-20020a05687032ca00b001babb13d007mr4449312oac.5.1694650812792; Wed, 13 Sep 2023 17:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694650812; cv=none; d=google.com; s=arc-20160816; b=dZscTFjBGVxtlWBz2yusIqei+lLxJLTeeJm1/h+Q1OjNzsgsPYISwf9RzG+kTrGLq1 Hd0DYCNc96bzYszkjeSO4/orub7/tJgjQl8FhpFz6d102aj4YuESwZLLeqix91MRfoIG R8dsI/Rp0QxvlMJojow98Z5zmz4OkRN/ihKXTH/JW3IYJ5q83IakTU/cZ6tdmDNGqluQ e30Qr+b8INUI9U1iGhcefwWQau7aGY5ma5/kk0g100KUtZQc+tLudj7vPqPdTphKQmYB OQnQCUWcHJHdfjKfc3U1y0lajQkksg+qzlz0SXqnKMGiM0j7sdEwJyLFwOwJQO9z9ptQ mHjA== 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=dA6zDrMISQ9ixV+61d0CbJSFq6N+6qPUyMdB5Zjx2Sw=; fh=nfQSbTp1dWHt2Ier1Up8UhVNdXOqoJJLNvTrpT3jJEk=; b=hAaT8CRAzV47eBs1R7WV1wNrM+Z/xbjcPcFc+tNqtmNIltTjoycW39iKynsLV+pLVf FD+ITJHwSipy+pyfzoAn/tDvmkLP2cR3DZ22dX6g3ltZYoPW/q38yCVWJp2Asd6j0FWK RtNxdcKzd6sDuFQ2CpHPhfgk6e7NWW+D/oHkDTWdJM/a++CIYNatjnU/dyXkkZYSpnr6 7EVsbv4PMY3RjMCmdWIBsAOoZpDx/THEswaYIlaQB5Eb7VNs9Am6GBZJnSx3YAogcOk9 G+sueo/mmw7+vi64tb+SOIyLcTA/XAqTAwfyUQUyG7sLWNjJoUe9BFU83NVqlKqC7GSR 8IEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=NRb1zL10; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id n29-20020a635c5d000000b00564a5b8937asi267455pgm.341.2023.09.13.17.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 17:20:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=NRb1zL10; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 0E95C80740F8; Wed, 13 Sep 2023 10:15:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230331AbjIMRPA (ORCPT + 99 others); Wed, 13 Sep 2023 13:15:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjIMRO4 (ORCPT ); Wed, 13 Sep 2023 13:14:56 -0400 Received: from out-220.mta0.migadu.com (out-220.mta0.migadu.com [91.218.175.220]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37E0598 for ; Wed, 13 Sep 2023 10:14:52 -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=1694625288; 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=dA6zDrMISQ9ixV+61d0CbJSFq6N+6qPUyMdB5Zjx2Sw=; b=NRb1zL107/rDRfFWZsp0fzET+7d1A+RLuXbBLhV7sSeKYAUQEbzOobo5W1rWEVCjdjE0Dd pknESjG2AuY5ulwmpFZM53Irkq/aSdHZnmh8PdDGcyQD9/nZGmn8edi4yz2Zs/OVi2gb63 BiRpglut78hvsz84TfRJUgNxqmxUdqU= 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 01/19] lib/stackdepot: check disabled flag when fetching Date: Wed, 13 Sep 2023 19:14:26 +0200 Message-Id: <66bf1f0ad22d2c49ef500893340c71355b71d092.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 (groat.vger.email [0.0.0.0]); Wed, 13 Sep 2023 10:15:39 -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 groat.vger.email From: Andrey Konovalov Do not try fetching a stack trace from the stack depot if the stack_depot_disabled flag is enabled. Reviewed-by: Alexander Potapenko Signed-off-by: Andrey Konovalov --- lib/stackdepot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index 2f5aa851834e..3a945c7206f3 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -477,7 +477,7 @@ unsigned int stack_depot_fetch(depot_stack_handle_t handle, */ kmsan_unpoison_memory(entries, sizeof(*entries)); - if (!handle) + if (!handle || stack_depot_disabled) return 0; if (parts.pool_index > pool_index_cached) { -- 2.25.1