From patchwork Thu Jan 16 06:24:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Blum X-Patchwork-Id: 13941318 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 37F83C02180 for ; Thu, 16 Jan 2025 06:24:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C0D3B6B007B; Thu, 16 Jan 2025 01:24:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BBBE46B0082; Thu, 16 Jan 2025 01:24:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AAA606B0085; Thu, 16 Jan 2025 01:24:30 -0500 (EST) 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 931936B007B for ; Thu, 16 Jan 2025 01:24:30 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 0DF02A071B for ; Thu, 16 Jan 2025 06:24:30 +0000 (UTC) X-FDA: 83012325900.21.818B83D Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) by imf30.hostedemail.com (Postfix) with ESMTP id 493FE8000E for ; Thu, 16 Jan 2025 06:24:28 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="DV0DSjZ/"; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf30.hostedemail.com: domain of thorsten.blum@linux.dev designates 91.218.175.183 as permitted sender) smtp.mailfrom=thorsten.blum@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737008668; a=rsa-sha256; cv=none; b=RTpMMElm60OAal7jaquD7708eN2EfNZdX/i6fUcbA+wh//g9K0gjs3Y57Iae8CLCHE/Kiz 3Hp4v8gGVd9JpCQNu6/+tZcYmDgZI4BXyHtuvh9DxCUCCm5d9Q+VElA+xQ50UOjMdEUUdj s2N6qz7hu6hes5aAJRP1inB8CKvx8SI= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="DV0DSjZ/"; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf30.hostedemail.com: domain of thorsten.blum@linux.dev designates 91.218.175.183 as permitted sender) smtp.mailfrom=thorsten.blum@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737008668; 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:references:dkim-signature; bh=3FneSeFdw2NxMz2mVRv2+KuvZR12hGarmr8kvBvl/8k=; b=aRDVIkAOlzo+VyylxPlfIkDsq1ldAwl0tFsy7cRybbudadG49b+mF9wTYDNw+UMSINpTSl XduteVKIz7ivUvLoANGupGNRQG07f8oEP8pP0/EygIXzM5GRFctLnRXG7XhdzK317B470A Ru5BMYTMzCT0IXJ2M8zuWatusU32Tdc= 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=1737008661; 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; bh=3FneSeFdw2NxMz2mVRv2+KuvZR12hGarmr8kvBvl/8k=; b=DV0DSjZ/XyGGMtTY9TpfQWQolvviP2p5cH+icslLhHerZVhagf1XnQQ6QBYlb6lnooua8S EOc85p9uzgA3CF/GyrEoqMf7fv+WQq3D+IqlhKjK5Xcc7Dyn96+lT0B7HLhKkE4fSp9riU ljqrL4rBpJEkldtJ/ozNQrG7FDxroZ4= From: Thorsten Blum To: Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Andrew Morton Cc: Thorsten Blum , Anshuman Khandual , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] kasan: sw_tags: Use str_on_off() helper in kasan_init_sw_tags() Date: Thu, 16 Jan 2025 07:24:04 +0100 Message-ID: <20250116062403.2496-2-thorsten.blum@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 493FE8000E X-Stat-Signature: m6zq8t3ecmfrdzg8o8c6uu3zdmetgb4g X-HE-Tag: 1737008668-180460 X-HE-Meta: U2FsdGVkX1+7iTVbckTXPORadhNsvJ+2pd7zUm9Q1ZEAcRqETIq6VOVXvHxWwlZAkm/3NuNQE+Dbe/R51myQSEkW0FJw4fgR9hDMbBUql8ylrbPejpjtYaVc/5i+gsM6Ri+Jh1SnRL8a61WW42Wa8MmnEQ+P2MIpRiZpjF4JufEMu/VtJRFq3/izbpYzhbjlcB8McCzopcyVQnqwFj5qOBEbFtWd9/SDvUkX0/5fcqHUEsJMi6jPqPidfplaRlVzTTS+i7ovJEdYtUtxjsFCveMzaKbnNqdvVbVSHjlW4hzxqPn216KiG3iMB4l3zrSm+8g9jzUb1PVcoIJGF7F9pWl5+0441DvZcz7te0Z/bqIIdyfLiev3jdurmg8m6OKdKLv7om/5I2oFLBHRzGzIdMg285cUrd0oD6tV3sqRU051kmIjSC2t7hsqnOmjyIKupmMFyySBQUgZ/54Nz8E1ffygEtrol0ViMn95GndX3yNPxlIFrvkzXNFUlQk6hfwBEzhuL3K/+CuSVPMhKsdejeiZDk+lUkyEQ7BOvrSvARBRs9OUu8lfX8ok0K7y7fADRBiQCoiYuK4sv3OpUX+znD2EmKdRI2ytRpctZ70t5NiXxlDuHeMSxadnoqLurL3GC2pQ9zUwjkoE+duUZti7YtD3D0x7llhInfUtsz76VF6jfOCK9OFPRP/kfaiipMgG+JgtoJ8N27+z0aXieM9TSRhRzq5eAtGzY7hpzwbqU9KKDLTl7Imx8kVbmNIlP7TfbpyLeh2swfQ8MGDA/WfMOUr1TX7KpE7Hd2tYUggPK5nATfrI69r/GdjhnTDoBOJ4ZqjKwAiIqOxNXYCFSoUxjfQPQviLmlnF0DzvSzk19B0NMVWIQ4+GKv4G1h2ImvJ27Nsd7KCYUtMSJ4TSwh41HtocaT5M8eSVaevr6syVgHNkuWA1lMVE8nSolQI7BHLbkOM2ivt1kY2WEzPxUNE boTHUc/l RGO1aQ6zxn0cELAR6FzrRnR0jOk4uoRiV/XZeNcan7kM9SdyJwgjxn2hXLIASZxeZmQcvDa+ZpewPShALbT/YYm2aQq2GLk5fi7ZVAe4gFxdXKyBUuqeF3qKuNlYnI19K/hRPobbAE37eoNt/8baoEugKJOOxyc6oUOPzevnuJQFY+dNjQaUQ48CKeFZKFpKZ5J/Awhb/ySRTmH1YT3dNUlzfKZxW6GjMNmQDTXM8AvCMDqHHMRGoE8cPKbpuM1wx/whGrusogYomN8+KGEGQR9CgO/NsxbvCXGfFDU7xHayTCt5H4PmgI6bAhGgNPDyXz5j9L9+VBqqsgDny6ZfnRvmbK8DtdiQu8xjhEN7310v2yqUMWo2lw7i94a7qeL6HjaMc 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: Remove hard-coded strings by using the str_on_off() helper function. Suggested-by: Anshuman Khandual Signed-off-by: Thorsten Blum Reviewed-by: Alexander Potapenko --- mm/kasan/sw_tags.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/kasan/sw_tags.c b/mm/kasan/sw_tags.c index 220b5d4c6876..b9382b5b6a37 100644 --- a/mm/kasan/sw_tags.c +++ b/mm/kasan/sw_tags.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,7 @@ void __init kasan_init_sw_tags(void) kasan_init_tags(); pr_info("KernelAddressSanitizer initialized (sw-tags, stacktrace=%s)\n", - kasan_stack_collection_enabled() ? "on" : "off"); + str_on_off(kasan_stack_collection_enabled())); } /*