Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2403212rdb; Mon, 20 Nov 2023 09:48:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGUPDQbB+pFsPYPZl6UcjdWnS6vRLkLNh21qqevDOepsjkoTk3a8iGsyTIQOPRlOsAeeBsw X-Received: by 2002:a17:902:e84d:b0:1bc:1e17:6d70 with SMTP id t13-20020a170902e84d00b001bc1e176d70mr252876plg.24.1700502507664; Mon, 20 Nov 2023 09:48:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700502507; cv=none; d=google.com; s=arc-20160816; b=X4Oqiqy5Cw7Zq/WUmpDizxpGrlI1BVLlmumBq5lsh6n3cLdDlx2Bzww26TtFjIEcKL 3FrpzmUc8AMmi8ZikDnYE2U+siV1mrHDxF/VIoq1v/qjeJaxECYAGAhuaWklU83vd7zy se27dd6NL+VSyDiS7Uxfb3IAmh+VwFOSdBvqQButf0nnM1Cx6NOIJZiA7MmQNMH7Nuu3 PxUOt3WY0r3yoLlyxbdL1jpgvTeI3C9jaTVtt+h63Q3CdlVROzQcSK5cZEtYgNFBS1LO mXN7mhvr2JEhbWRIGPD0k/qjEfyLxS3kGoXJprlOQemi9vviRZIepvbc9X5OkdCXO9La 2OXw== 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=4GD92F9WT2lJ15sdFM57D7OnzHXCVz8Opyiuivl9/aY=; fh=qWoxmPN1zRqnLSoCWGpfFsDtzJsx/SGdqx98lbP+Uho=; b=zjNWfFH4LXv5MxpyYLosUdl3XU2Cyi/TJMVKe5ZkesuMavq4QUBWIpVBx+rgXqacMk 1HSefcoags/VViHOovEX7FmRmQZmgLyCgJIpaOP34YZQ+H9O9QGQydfLRpbTaVXOVtz1 z51PvaDPuJtm1TkOxcI/KXVhzWp/USQ5+5yIep38ZJ3TUK5Gl47s4TjoUz+Jxxixf/mB uH8iiDQyn5i9+GlPExR5URYFAxc3v/OxhY6+fB9YVahkOQ6cO1FL7IZxzT86Bj8SpOWR trPueeWsVNfiMCE7npuPBOCWI1aX73A5iZ2lsSAXqo3xanufyvfXD+xQmHNgkon9DG8s NsWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=qyhdPL9y; 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 i18-20020a170902c95200b001cf5d449540si2989725pla.60.2023.11.20.09.48.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 09:48:27 -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=qyhdPL9y; 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 81D7E80A90E7; Mon, 20 Nov 2023 09:48:21 -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 S233858AbjKTRrk (ORCPT + 99 others); Mon, 20 Nov 2023 12:47:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232547AbjKTRrd (ORCPT ); Mon, 20 Nov 2023 12:47:33 -0500 Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B871510E for ; Mon, 20 Nov 2023 09:47:29 -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=1700502447; 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=4GD92F9WT2lJ15sdFM57D7OnzHXCVz8Opyiuivl9/aY=; b=qyhdPL9yHGZwgbX97BEztXeCz1Zt+rIj3RmbbGcjPTQsTwh98G4ATjxhFfnwka3CKqD1b6 x9kwKDWmny/BO2cvVbgqEwg2/wpgt3BzZx3yBf1KxUz7o5wnkBkYXhX4a/sfMby5QWyf2c 4HelafeGlMBXbFW+ItTdiGsKvqfzEZg= 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 02/22] lib/stackdepot: check disabled flag when fetching Date: Mon, 20 Nov 2023 18:47:00 +0100 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.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:48:21 -0800 (PST) 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 0eeaef4f2523..f8a8033e1dc8 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -483,7 +483,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