From patchwork Mon Nov 20 17:47:00 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: 13461815 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 AF7CBC5AD4C for ; Mon, 20 Nov 2023 17:47:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CFFA36B0329; Mon, 20 Nov 2023 12:47:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CB03B6B032A; Mon, 20 Nov 2023 12:47:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B77A96B032C; Mon, 20 Nov 2023 12:47:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id A990E6B0329 for ; Mon, 20 Nov 2023 12:47:31 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 70E2C1201BE for ; Mon, 20 Nov 2023 17:47:31 +0000 (UTC) X-FDA: 81479064702.10.E781F50 Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) by imf20.hostedemail.com (Postfix) with ESMTP id 9678F1C0019 for ; Mon, 20 Nov 2023 17:47:29 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=qyhdPL9y; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf20.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.186 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700502449; 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=4GD92F9WT2lJ15sdFM57D7OnzHXCVz8Opyiuivl9/aY=; b=2jG4aj6TokHUpx1ZBUKt51vmWCcF6lE7wt+Az37qIE+IpRjKwUChVMpLfInzewTb2golF7 0eo9qe5frlJfTfiFUdsHALoknOVEZ5AYu5R9OFR70HRcvKRQB7FBCnpuWubw2HWyEeHTLz VJ3EfaxMvvnRuJtLglXc6isTHnpnD0s= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=qyhdPL9y; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf20.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.186 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700502449; a=rsa-sha256; cv=none; b=kT8b0fdASYsNdXa/FzMQoa4wu8tjiWEfl6DPAyKTeL5T+3tArr2ovtFWCcZWHMb2T3VeNi zztFNowUavW7NiV65SNIewSP9WyS91aQNNNLvpVXjjMc1+8n0fE+fZ7IFo9+pguATxd5KB hdtsC16VBu4ljHk0aUUGztA2fHqwuLU= 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 X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 9678F1C0019 X-Stat-Signature: jbippse98e568qyj5qoiejjrarmu9sxu X-HE-Tag: 1700502449-488136 X-HE-Meta: U2FsdGVkX195tQo8ydXNci+n9yr/Zu8jOVX4lrsEUkX401owwyQco5op8cCCMuy4AymmBWT130XplzVw068qone43f+NP17V+c8/G8eStxf4WM+izngoWuMn1JbQRX8iKKScpeIIOrJOs/idWa2Hp2NBfiBA+YiAQ13VyO3umNrwZY8gugSkWVFurog0GetBQOvY4ntPqKXEIxrKHY4cHekcadA+wu2/vjuynKWchYEenJ4iioVfjIaIQ/3+0bjkYtceFm+dZXCi49Dqkr79LPMAdo7z60qd5RFaRZ8gS7D85Pxb1OghsV6yYL6VqcdSmHqhSVq2ND/30pWmWCaWqsYku/dyWwpo/1jbmo7WLusxk2KKMxLmx3Wmc2sQVIHFwNwAwpbS9DUORQLi1Q3aN2Clbar3O1ErjggxnxYZkzbj+2ZdQTHyXdApiRV4BzjpGRksJAKQJnLUilYzVUSwMSK1IrWSHqwqS0HX4ssMy0TaEkmERpyCfnPGkKzOxikr3dDb/1e6R/wjRTdxUZZ6NQrQ/Ow01l/lNAvnq/F+dzCBWiNDHJ291QIYOTKQ2SQOOWf3vmZMWK8vHMExFrRuTc7f41u7gjRcHJ+ERO1bwe7cE6ItzsCuB2rwcItJlh+Bs0LPGYvsHXO2wzUeuDCeNuA5djA1p/z6kPxisij5Z1RWVIqTnY//Z4Cl54IY21rmO9mEy3xO2/8OfWj53INpdBzG7NMUr3JLKMDIj8OsyeA6x0ugMTHDskzV1N9X9Os694IRNVAw1Xp7e/sQ5r5u4nX5W0ENNTHVQ1A53sm2jtADUQCDXt+ja8Af1ojN2P6O6JL9v3iNqN5B7qLobi7CYFxdFMcDnT7EJyxb2+T6BoXyyxFlrXCU7HH4JJFmNN4ut/Ee3lhkV1x4HYQ2j3p6tFyZIT54VleznaM+YRcC8AF3UNuICiPKFsCZaSVBU875Ury+Qhn0f+uHjwPTYat ZCAaXVi8 wGwFDSA/yPj4GmRQS6i63/KlXvFNtrNSRJTIxetlEZ4Mi8z5X6xQ4vyWD3bxTfUKql4Ke 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 Reviewed-by: Oscar Salvador --- 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) {