From patchwork Tue Jan 14 15:09:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Blum X-Patchwork-Id: 13938864 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 E5B36E77188 for ; Tue, 14 Jan 2025 15:10:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 799606B008A; Tue, 14 Jan 2025 10:10:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 749086B008C; Tue, 14 Jan 2025 10:10:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6386A6B0092; Tue, 14 Jan 2025 10:10:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 460506B008A for ; Tue, 14 Jan 2025 10:10:08 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E0677120A92 for ; Tue, 14 Jan 2025 15:10:07 +0000 (UTC) X-FDA: 83006392854.25.2D07FA7 Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) by imf16.hostedemail.com (Postfix) with ESMTP id 1042D180007 for ; Tue, 14 Jan 2025 15:10:05 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=XFnOHu1T; spf=pass (imf16.hostedemail.com: domain of thorsten.blum@linux.dev designates 95.215.58.188 as permitted sender) smtp.mailfrom=thorsten.blum@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=1736867406; 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=D5/zilsgyJRj4sbTAa8LKZAPy1Gx5YuP6bFyTKLkgZ0=; b=LZE2jmVtPIDoBiJkkPzJvLE/cxkkIldwDHjEJZFMglScPxIJfh9DIGNIZHq27trCo56p3X +g/4kPdxbZSqYPsDh6ke++Srq6jMNn/Ga02R35M0Dl68QrL8ZYie/c5ddrd/1DAHQw1kjU 1nJMtgQVk7GkN3vPfiU7yxvh8UM1eL8= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=XFnOHu1T; spf=pass (imf16.hostedemail.com: domain of thorsten.blum@linux.dev designates 95.215.58.188 as permitted sender) smtp.mailfrom=thorsten.blum@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736867406; a=rsa-sha256; cv=none; b=6If1YHidtfIZal0uJAImfVfD0RKnDffl6mGYR9ZPP50Akw2GMgRxGqWUZ/jSh15F+zwkKI J/LgtRqXY3TGYJI/Sj7CeheSAgZEpCqFQNzsy3WRYP/6/sCTGYXlnCcZeF4QDjCmuM70Ha SvD7fhETWgT1KE91Bo1Tl/zOiRt3j2Q= 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=1736867404; 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=D5/zilsgyJRj4sbTAa8LKZAPy1Gx5YuP6bFyTKLkgZ0=; b=XFnOHu1TYO2a5t7IEEUIVd7CSfrJOpAQiEWJJrtnHECRMqs98cCqeOJsmftuKCmG2HTJT6 +2TkyiHuANCxFUbmqcsjb9GwCSRj9GSvZz8oCFBiylb+6BHEZ0oQt19iwEyjIc/mfi6Vxw YX+Y4iLsyYx/xZV010hRAfUa5gVYIDg= 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: hw_tags: Use str_on_off() helper in kasan_init_hw_tags() Date: Tue, 14 Jan 2025 16:09:35 +0100 Message-ID: <20250114150935.780869-2-thorsten.blum@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 1042D180007 X-Stat-Signature: ze7p915h33eccjt3uy4t18tg6xo5s3ke X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1736867405-419919 X-HE-Meta: U2FsdGVkX1/wTnNbPGzti7VZLx9isjmpw0qUzoOZyyKobBRAjDZhKUngNDxnPHwXXWdC/m5AqLb81OvwPwnvKMw6TnEWxWcA5AibNcryIUDO/KOR+xrVOgIj3PU3gl1mYk+1bzXIaR6909gi/LtfQtFsaiNL5J/cJFK+hJfS7KmsfgDIM6Uue5W4eLhIoP7Sy7aDlzpoXABXiyehEGwLLxfXTNsPSPDCnRvnp0ri+n2UpJLcZLt1kC0VLnL665/sw1P/8ETpcfuSVY8SrVaPRu6YUDlu2vSx0+01hr4iCAsw+q4zXE2nvEX3JcO/Q4cQ7BqQDf/E2F1L0MgY2U2TJpECz9w8/9BQhfTbIMj0AKIORnji5K15o9XqQi8l0J8JWBJVgwmlCyuQPbi4FYIzRfF7kc36SYX9mmtyRNAPWqU/O+rD8OW9UVsuXLO6QyKAtV/eynJ1RNbH7/l5TyKZAWxJAtoKCeg/a9d0IYN7oZSi39j7xveQ++dYL3pafAMIM/avq90HwywykUWXvhC63yeLipKA5waFoQ/9mQSBocRCl/vddqz/e3bpyroE2IIsY2QR9pp5qqE570wRWNHHSYJElrgkPIbxhwsHaeVfwwaYatP/V/BL3WeUIaINsAc6eZS2ZF5BjRf4zA8OwGTYfgZucMGORs3j3mpjo9jVwghUUIUPCy4IpHbPkfEU0Q/cS5lMNFFkshvxtqleHgNbX6r72FFeUK3w6T+vjooebi4KMlw+wXwZMZ7w15sptLFi68v0jxqHQ4mFacx8se0tZAgLpGMdF+jg1raKtgtXXW6z5H5CzVm4UJhJsi4DP5+YhWufcKO6KNQIY4pKDoN59hwzNoc2TTVN8EJNMbw43xq+vNdiPDi600bgMuPEJAxOX3WbHXH/VkP16eWjZe2Jh8j3qoP8zCMKZqURjNgvUqAUyiFDnke9nGpvf1etgYpWO/wjJYXl9L/5zfD8eLC 68wsIRWx 4GZm9LIoj/b2MPLN4zGodeaYbBsglPtckSpYsAVLEK7NDey8k2o398Mc6TydeCZnMRCgSZD0c1O+5T3Futu9GtTrupXcnzzy3uoBwvNPifS5E5uNFBpzk5HZUS01ghlbVj0HMHrqFnzWAsJunAIrxMjg6YhOiKhMMNp0GBUmTps9ygehiUWAyt1gmRpEmsBr2bm8rIuEcplbZb6mN7WAKZQ2N1b+cLpknCxKSJrX9VagnYpzNo3BUc28+51pEhs90MNLP2KYbgC1niXpV6dvg1/NeXXZG150OPwUDnFXgWJrO4xZ6qx6ym6KYhTzV7PuZ93cplS7po9gfjOLt39wRADjVU8dv457yWoZi 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: Andrey Konovalov --- mm/kasan/hw_tags.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/kasan/hw_tags.c b/mm/kasan/hw_tags.c index ccd66c7a4081..9a6927394b54 100644 --- a/mm/kasan/hw_tags.c +++ b/mm/kasan/hw_tags.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -263,8 +264,8 @@ void __init kasan_init_hw_tags(void) pr_info("KernelAddressSanitizer initialized (hw-tags, mode=%s, vmalloc=%s, stacktrace=%s)\n", kasan_mode_info(), - kasan_vmalloc_enabled() ? "on" : "off", - kasan_stack_collection_enabled() ? "on" : "off"); + str_on_off(kasan_vmalloc_enabled()), + str_on_off(kasan_stack_collection_enabled())); } #ifdef CONFIG_KASAN_VMALLOC