From patchwork Mon Oct 23 16:22:32 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: 13433181 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 4C59FC004C0 for ; Mon, 23 Oct 2023 16:23:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1D4C36B00F5; Mon, 23 Oct 2023 12:23:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 15E1B6B00F6; Mon, 23 Oct 2023 12:23:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3FF96B00F7; Mon, 23 Oct 2023 12:23:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E443C6B00F5 for ; Mon, 23 Oct 2023 12:23:01 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8CC60120967 for ; Mon, 23 Oct 2023 16:23:01 +0000 (UTC) X-FDA: 81377245362.12.A3BAC5D Received: from out-201.mta0.migadu.com (out-201.mta0.migadu.com [91.218.175.201]) by imf29.hostedemail.com (Postfix) with ESMTP id 9C6CC12002E for ; Mon, 23 Oct 2023 16:22:59 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=CkRusZIQ; spf=pass (imf29.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.218.175.201 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=1698078180; 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=dA6zDrMISQ9ixV+61d0CbJSFq6N+6qPUyMdB5Zjx2Sw=; b=FWT7B0Ux8jaQKnSFTbeLJIpkBb3RGYk97cabsCcEzTUYWROJrvyEmrfNnIlKJ2Ro4pbXUs yFzbC1veU40FW5ZP8ufa3d2M4JuZD0fazfcyPvAo3+UyZY88/wbJwCfgOvqiUEmQSR2Wam AvVA7LXrcHqKtSgM+jvCKcWOSWwQ0CQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698078180; a=rsa-sha256; cv=none; b=5nibMhaIpRYr6ASO2btkyUwGipLIwhTNJn8PsxfvZ3A2exUueIkc2QRxwRMte4pZLhKzW4 1mMZ86R+Mz1cTRLz14BbGcwNfXx5hBR40vp+qU0GuHwxephnChCjTsoH0PC7aJlHj9VLfA wTqpNWZtwmSRWrYaa1zEcoFgU1KEivA= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=CkRusZIQ; spf=pass (imf29.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.218.175.201 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev 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 X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 9C6CC12002E X-Rspam-User: X-Stat-Signature: jzjzgws3w19qtqc3g1ig8nsnoa9q9dku X-Rspamd-Server: rspam03 X-HE-Tag: 1698078179-476159 X-HE-Meta: U2FsdGVkX19bEy91wrCx1LKJgZLFlckU2/l4FaKLYqE9CNskd/+IQ38aT0e0JZ7WmICVSMNkskGpza/INq96DuNmC8kf+Fhr6F0hsZENbXOwVhgC3VPsAWIVDK3rbbg07Egny8AR7082aJNgRWLTgUJlIrVzaI1/IjjGRbiLRrXKpmHBv5WFkzpH3tC+a4I93c2ycofdn0iakHsG22qqnIYTdVO9B790JCOIAzvaW8pY1ky6eZBIX7G6Z9StdRE5rx5eUp68LpddEJ01AIxPS6B1Cd4mQdcZod0msb9wZGl72B3IETGIw0o/LPNJq195wxzWlRKT//KISXrb9Llh8/3ndoj5FkTCJFHQXJBx1CJdyr553AC7hhKRpltIQ+449Pw/NdlmqpJ5y3ej/AQUjht8yBXQB8juX2DmCPPdCI0tmhv7PQkSoXlixQEAwze3zyHiBh+2aJHXas0xkGFv5ljifkEo4TSY7KvowrPgtkOi9aE+eJs9y031LXlr3k+NheFtTsKGrsj3hBT5TULHpjr0ajVs8Qo69g61ylUD+mfSbdD3Pi+9B9jxSqB2NFMGTUyFcHj/r+JSu3ukHQPac+7vL+xdEDG/26M0HP9e6vwSNTFy30ePUGy0/2SUyUXxYBQHpGVxSaqh4g5RsYwS5m6uspe+YUYQqAp/RWhNci2R44AedNXxQ0+CArAToJr+CBimB4JNjkxIdMV645cITn4UeI+6qBbizm9mE3xzZciKYVJ49PpLFDKaautA6E9hAav8kp3hCfdkjIagja7oUjcYStf9kQTDf0mo6OS5MD69iFS3q+MLHQaJkglFbfWufax6x7kQlvfBZk6kFBOp8Xvi/qrkUzcmveb331tqeftPKc0k9y8+o9ctkh5QSo4m2nAy9nIjUXIXb9HgxXE8e5P3aofTi+Tmq6rsxPw3w2x7ahsl8xJftTnnFilyMydFUPb1TDwFDDUJ+7uMtL+ xufNRHnJ DO5U4wV6pinHAmih/bNEkKYyAmMGp8ufANFJLSesMwlob3ZX3DgWe5WVQ75jV3agywOzno8uHwzPJXoEUzvau6G361xUORaIeBEA2 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: List-Subscribe: List-Unsubscribe: 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) {