Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1334719rda; Mon, 23 Oct 2023 09:23:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRUwYg0b87XfrUbJmX0DYkpjP46PJTY1kQxBqZtFXV+V6Qyel401oOQFv8l59cNyVrQ/pL X-Received: by 2002:a17:902:dac5:b0:1c0:cbaf:6954 with SMTP id q5-20020a170902dac500b001c0cbaf6954mr14136894plx.25.1698078199011; Mon, 23 Oct 2023 09:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698078198; cv=none; d=google.com; s=arc-20160816; b=FWCIKpkS11J1wkgrETsrPRvAoh5WZJAjCikp69l+jz17NDJ7TmFXTze3DUm93W+Zpc nNdU5eOFsDEW1LnW72FW7Nwmg5uthRcHV9BLrLz58/Dd9Gf6y+ILqFNB/AyI6+GHXSh8 UQn7ftWTkjHbimbAq15TcfB3jBPiSowAOdEZktk5EjFc2hD5+AJNE/X1Br/t+YkF3h1t ukzgT/QHhOaSAh9nzY2WQU4OUTa+jQ+8bBkIvKh9w9QdnbJ/YMqoOfQ/xBYoipuaG0jU sO1wzWAKoxEYwuVXswLScCKuLhekQJxijrH5ArrcAZzBtOMoT6Cek4pIv5BA6tv9XuK4 t8ow== 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=HhZHXxPFy+2abR7mGVlrX1rq0Jb2H95SwNHeVEaFrfhrmQ+HaCPuQ2dUCJM5RoAjVH 4GIYUIYx8DcCfqGa90MW6YDCLn+vm77SvLU9iElFz4ap+fTGV63BzxplEJzuSfTORerw 4ztqRJxjdPHHhkDz01CFB1lBocQp27EHIiYtawmEPcLIg+fxt/Jssvkb/XrgeDaOJNsN U2eLRuYWWHgTiRuaYqijX0QXRifSihLOdljGGihutRxX+YRH+8upjiVttxUpJ46M9mxv QHT5h6OE7sG0idfUZNdM2aaHJ4AgTaXdjGr6TZWg3d+oKSdUcijqqREs9RrsECEI1XLM xhVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=CkRusZIQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id d12-20020a170902cecc00b001b9ffda162csi6648921plg.441.2023.10.23.09.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 09:23:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=CkRusZIQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 6D3D4805AA31; Mon, 23 Oct 2023 09:23:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231827AbjJWQXJ (ORCPT + 99 others); Mon, 23 Oct 2023 12:23:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230255AbjJWQXF (ORCPT ); Mon, 23 Oct 2023 12:23:05 -0400 Received: from out-208.mta0.migadu.com (out-208.mta0.migadu.com [91.218.175.208]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CFE810C for ; Mon, 23 Oct 2023 09:23:00 -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=1698078178; 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=CkRusZIQKT1eG4Gl5cCrRUWt5DUG+IA1Am7cKqEhxJvtxvEOtNHOGfa8oOTjOvRtsLmZuh DIpreTOPrJBHIpWysqvlzeB2EOS4cbEOWO+vFGBjLCZ+m4G6B8FIZg7ByX7aEIEwmgDxIB IhsqPDQSxHpXeKy5blW2EyaMIQyiiKs= 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 01/19] lib/stackdepot: check disabled flag when fetching Date: Mon, 23 Oct 2023 18:22:32 +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 agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 23 Oct 2023 09:23:16 -0700 (PDT) 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