From patchwork Tue Aug 29 17:11:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 13369230 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78A9DC83F14 for ; Tue, 29 Aug 2023 17:11:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E15368E0029; Tue, 29 Aug 2023 13:11:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DC4218E002F; Tue, 29 Aug 2023 13:11:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C95608E0029; Tue, 29 Aug 2023 13:11:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id B986A8E0029 for ; Tue, 29 Aug 2023 13:11:39 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 599D28024E for ; Tue, 29 Aug 2023 17:11:39 +0000 (UTC) X-FDA: 81177783918.11.E84B519 Received: from out-244.mta1.migadu.com (out-244.mta1.migadu.com [95.215.58.244]) by imf23.hostedemail.com (Postfix) with ESMTP id 7D8D714001B for ; Tue, 29 Aug 2023 17:11:37 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=DeG8gVsP; spf=pass (imf23.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.244 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693329097; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Gxqstvn+9KrGAurRzEA5+xZd4FpeRy2hmiRTg5iKOfw=; b=MpK2AihyULpZ0WSv5Ae+vSYjGGWHFv4T8M8Kl2s7O1QH+10WGf2ItxHCuNx8glcn9B+4s9 00IQ+am/qL8mxkPrJOYyvlFnMPzYg16cACiq9WN2ctH2SEHzWnu1q7mOK8q3V9Ew08WUoL qIhIt936E35izVLJOSZnCyDGXJrVqaw= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=DeG8gVsP; spf=pass (imf23.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.244 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693329097; a=rsa-sha256; cv=none; b=VrCoTZqIkIqszzPBmf0QnetPoi9l2XkwsO6gSS4mOFLX4r7Bva0BrZoerO5zRTte2WrWm+ Lp7fdiyCBc9KD8Pkw8mcawQ9ZYUadUCGcgle6166WMXzAqYC3DAgWM5MadjFfV93oHDMju R5IgnChNPnxMJzjTlj7AyS9EaYOO+3I= 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=1693329095; 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=Gxqstvn+9KrGAurRzEA5+xZd4FpeRy2hmiRTg5iKOfw=; b=DeG8gVsPVA6eHp6GYAtPbcN1W4Kc4hW54VJN2cPa1oAVV0Vtv+XvIoxvZ1he5+lPDyKPzU jVtmhpgvmpCpTClSH2nhy/NQ4GtPpio2EnuYBWWAcI0xhaei4Zp0zBBpeO5Q7FjGGTEUej XwtRIWiCy9Atd2ddYEKCng61HMvXEZ8= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH 01/15] stackdepot: check disabled flag when fetching Date: Tue, 29 Aug 2023 19:11:11 +0200 Message-Id: <43b26d397d4f0d76246f95a74a8a38cfd7297bbc.1693328501.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 7D8D714001B X-Rspam-User: X-Stat-Signature: 7cqepu4w4bj83qe3kcie93y9smubopqc X-Rspamd-Server: rspam01 X-HE-Tag: 1693329097-414465 X-HE-Meta: U2FsdGVkX191QRbY/g8v0nf+yQ0hqBSEyCFfb8zmx0Pvvzo784lH++XTBXTvwUNFAdZyhKf7EurS0Eprt3LE2RFlD2cFgGpfdh/mkBGiXkmjHcabCwJicdNnSeJ4PMbbvOdV7wKto747NoHv+8CkIvZgAyutiP6qVMmQSmoEYS64N6OsLa56Q2jqolLedrMHygg3NMSEONXS6rM+Uq4DDKwElP3IZu00nKqUfsTO+BJeBCp6iKStPNCqTkL13BBORFisMd4uL2Zt0v/aALqkTz8JUm8GKWUbPIZSvh9hb/CXWgxDOpv1gpc1kOjNJbJD1fDE6u89ilIHa7+K7U5G5f/R/YZMU2IhigkxpkmigxiiPzUaqQVrOQdN8d4vPhw7+qwqJmhbh/pYJLe2xSXQOamIMXhwazAkvhRPNuRYz0D5JbP8cSv6m4V/1O1rHMJDLtUL39dLwMlsIkHJ8EVwdxCP9BVkrMe9wKV7g2Na64T5h8LDjG2LQsMbF3Y1n3NOMD4/gE6PYsTFFWVQTfz4HP/YdLIfCutAC6XWbfPkvYmoHJNn3t0AXNGYUE++cNfauqzjNvQ4qWBvE9ErQUMMuU1npisJfX1VaXPDqepLfg+s2AfEpt6TfQE8IPhXYIhnn3j7Y/i4csAwRUfcBedZQubgCL/6kJs3baO6a6s7kvg0/OEn7LX/T2eX13dpuCv7poyLT23VArUoUa20a/cCq2s9JhNaSzzSQoM1gVs9Rl+UjZ/Lhm7nt+BYD1qlw6pzI8rVRUViYS/yJmwSWtthnfWeRbocge7oq3vISekyqTXUzH8D3KlwhHvGPOM5/zHxbXBOtuc9IzPY5hRFvAXj8aE6zLhvuETd/D53oenkUNeLQyn/0ndL/nlQ8kM9GFR+/pV3Ta2o+IJc4ZR4Vohd2UN+pJKg5aNVno8uMCA2SBFe4EfliZKS8I3Jtkb0ouphSBRCPtOCGXt6pfeUXXO 3bwk7VUg pkR0jlf0oYTeRo0UBW258yOwlxXcR7sUR7ffLxTxJdNEMHtaZSKu/kfPYNiMDPe7dqe9xsM0c1M3FsiPQ3Tuvqjzd0V2/vC+nwtpZ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andrey Konovalov Do not try fetching a stack trace from the stack depot if the stack_depot_disabled flag is enabled. Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko --- 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) {