From patchwork Wed Sep 13 17:14:26 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: 13383614 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 A329EEE01F4 for ; Wed, 13 Sep 2023 17:14:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E3E756B0252; Wed, 13 Sep 2023 13:14:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DC5DA6B0256; Wed, 13 Sep 2023 13:14:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A69AE6B0253; Wed, 13 Sep 2023 13:14:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 926E56B0252 for ; Wed, 13 Sep 2023 13:14:52 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 5ECF71A0DB9 for ; Wed, 13 Sep 2023 17:14:52 +0000 (UTC) X-FDA: 81232224024.14.D1F85E3 Received: from out-213.mta0.migadu.com (out-213.mta0.migadu.com [91.218.175.213]) by imf30.hostedemail.com (Postfix) with ESMTP id 918088002A for ; Wed, 13 Sep 2023 17:14:50 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=NRb1zL10; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf30.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.218.175.213 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=1694625290; 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=BPZVncfru3OabCJHja7OP4R3eLd9HFHgZkZvHal5XZrqeWSdxexfebrdeVYoEr1WBM1rJO bkd0tz5s6tdRwOYxacL34yWVfZK0ORyJ48ThV0Lb8DAhR4KHxHyMq/ykRg9SU3tzCX8jzA PPTjil0+QROPrZoiSzIZvRwbOGP3M8s= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=NRb1zL10; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf30.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.218.175.213 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694625290; a=rsa-sha256; cv=none; b=mqUYCZ0EwOMhqIptYxSTfV3JEtm7xiLMUpqcXn2utKzCZvrJ2NNynq4noxw8WmI94jkKLY G5AVIXRbVpF7p+QSPTRPGLFMdd4aF8bjMTX4X6kafewRtVVn8oCKPDnwVndKcRibJ7eiGG HIFBXpNsbnx58x8gQZmp5q8CuFfC29E= 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=1694625288; 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=NRb1zL107/rDRfFWZsp0fzET+7d1A+RLuXbBLhV7sSeKYAUQEbzOobo5W1rWEVCjdjE0Dd pknESjG2AuY5ulwmpFZM53Irkq/aSdHZnmh8PdDGcyQD9/nZGmn8edi4yz2Zs/OVi2gb63 BiRpglut78hvsz84TfRJUgNxqmxUdqU= 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 v2 01/19] lib/stackdepot: check disabled flag when fetching Date: Wed, 13 Sep 2023 19:14:26 +0200 Message-Id: <66bf1f0ad22d2c49ef500893340c71355b71d092.1694625260.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 918088002A X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: h6ssfo3wen8atg7wwj1o54nq4hhabkrr X-HE-Tag: 1694625290-544829 X-HE-Meta: U2FsdGVkX18eUERSBv7I7I1e2jMrEzLEANeA9HP4EF655WNh91Kq5idDOPZdgh45tG/qMvasKD9aOgR9VZk82/QnJAFduur57ZQw9f/Ux9EC+Fp7LzgORSuDMh/TNxvyNcF+Cc+Q0XH59Tmmv168gDEulCsge0+TKJNSmrhyQwSp/NpiPhgUaWTfPvDYspysj81E5CUnytSQnmWXaihNGhJd4Pwa0BYqk+Er9WXT6+8crM/VnFzjBw7rSl6SsVK7+QUHdqjVAc07IKSWq3P5XWcebRMuvRAWwbj5c9jRcstKchKyyfcxfbYVzumnIHG/N0AeGxu6OXTYad5WYaGQewtOFITMuH5TaUfbI92+YZuuYq0SVTktlbebViT3NOSVCTTfrmfrHJE1GogRDCRUNI7M3dOQWcF+spSnh13U2WncwUosi1bI2BctS+UYGDii9zWqB5H414sbCwPYNHLjRhUIaW5G7H11Q0q9B+q4vu1rhOAg7KFIVOTshXfAsU/LErlCnJhWGzcVXGVsWl/E6rV2SP1Bl3s9Got39Fsvxy0FDMJ//CzZypOgS8CMZiP4eX1ZsTmhO5mBIezKMUzClAm0T7OIhjMCGESCcG2Rva8JJuSnMAUx3NjHeIxOV+XQShVtPKyj8+pvgPhXmMMMQojTTijl+cZZgYtOZuDvQoV4d55OB9Tt2eO/0Ab6lDbQZAAdigqkWaPyK9nvWFZWC1Fj4INwRprBcm1GrMxIvm0gnUxT1QUIpgJWpap6GBPRHmlPRPsOIHgm61V545JXDjYI6ZQb/bMx5vB72vPSFBv++XCGeRvIlgqfr1WiRXM1eQTQRgDeHrZFA22A8qU9dZgfTPJ503j2sKGnebZemzaF8IxcyYlDOZ+ZjlA1ptx5ZkL8RmC0CBFrrftF55dIsGSG3uibYOFykgYeaT63oUnyN8G2CxV+O6cxeixlv41wqT3dSkVTVMZgTkz4+2L vQd9YQHU Q1uxys73w7Br0MyGQNb/yYVUBxkP2LVfRQo30xOTbt0UEu4JbvaZj0YXd62UUsqtv+FbV4eBF2d4s+yluO8GakMwlkQ== 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. 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) {