From patchwork Fri Oct 6 15:18:43 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: 149303 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp405176vqo; Fri, 6 Oct 2023 08:19:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQ3/5BY+1Wy2InscFB9tH5iHOtIi6eL5o4Lt9dJs9J6CickROVqzV10RY8pNrIDvUTZSZ0 X-Received: by 2002:a17:90a:f289:b0:271:78a0:8ab2 with SMTP id fs9-20020a17090af28900b0027178a08ab2mr6428960pjb.24.1696605573217; Fri, 06 Oct 2023 08:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696605573; cv=none; d=google.com; s=arc-20160816; b=lNOw/mCLMkC9xQ923Ke/Fs738GNE1qesbqLQCu+cbEBD5hsf8Pz7h+OYeEHu9nOzIR eSgpmJ7+iPMsG4cpRclYCPlS5Mkxtyz9x4EWURQwn5TLJ076GpjfHz8lMnHxZ6ulEM7P 8Hx6durjuHhpjr8CLDHKudAbt4nXeR898mrghllSQqHMfEZ8EoBiEzAzZRoRNbMQBZS2 1WPDKKyOd8m+WFi6WkWaE1RLxXxM0IKkxB2aUBt2sPgPQBarcmQo68F8fki4ZI3vrkS4 5hcuCJqA6BTiNkjCXzjZeyMMhbJQsfpSGKM9bKxvJrANPnbdWX1Kq0OS9slg5QEuD4A6 zSJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KpaY5zOxHzDnEKIsjBbAGIMHyxq37tXIib8836JShNo=; fh=MvduW7TtfFJGfZiC/W6aaLQjI7EqApwiKAwimfBfFME=; b=MwRqMGFXKn207k6hwHcJAyAOWUMfYQwxxIq3CrNH/upHYa2klLwE9HyF8IcRfPusF/ 6rq/6xQWhzfaJySsc0vzAqSt7ok6p0gd+JmG4mCCYV5CLUi00ANtHPc4AIcE9d07nUn3 ZiJ0Vvt0YtbNjw0xY2nP6GreXK0aiyQwk6469oSxD8YIpDmxucgelmh/zah1NZh/hOe4 fTllraI2px3kEpAue5M6pCQ8N+Px52PgMG/3JljQoRUdDGoourd/lijuw+n4GiNi+Oqq ZyUHLM/PNuFMzBFLfs6G1/V1nNcQPZ5+0FGNheUR+EmpBmECDDRbIDatW7kxCclYvFyR sy2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=sdj54eOA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id m20-20020a637114000000b00577448019cbsi4022339pgc.841.2023.10.06.08.19.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 08:19:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=sdj54eOA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8677B82F1067; Fri, 6 Oct 2023 08:19:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232820AbjJFPS7 (ORCPT + 18 others); Fri, 6 Oct 2023 11:18:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232823AbjJFPSz (ORCPT ); Fri, 6 Oct 2023 11:18:55 -0400 Received: from out-202.mta0.migadu.com (out-202.mta0.migadu.com [91.218.175.202]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 358D3D8 for ; Fri, 6 Oct 2023 08:18:54 -0700 (PDT) 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=1696605530; 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=KpaY5zOxHzDnEKIsjBbAGIMHyxq37tXIib8836JShNo=; b=sdj54eOAoxvbDjsG1L1LrX4GPNkPYAmSqUqrEs0jwQ6Up2Z+kVeRFW4KN6fxPsOHGg6Ode 5Mx5CSch4p7iY8TzDjBanPYp0/tbMZPIExkiILwYI/bFmaEJrBGJcxjKCCCm/iwBQn+1mb QLA2DRzBrErqtsGV7G6DB5s9bC3YhF4= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH 2/5] kasan: unify printk prefixes Date: Fri, 6 Oct 2023 17:18:43 +0200 Message-Id: <35589629806cf0840e5f01ec9d8011a7bad648df.1696605143.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 06 Oct 2023 08:19:17 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779019885768843296 X-GMAIL-MSGID: 1779019885768843296 From: Andrey Konovalov Unify prefixes for printk messages in mm/kasan/. Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver --- mm/kasan/kasan_test.c | 2 +- mm/kasan/kasan_test_module.c | 2 +- mm/kasan/quarantine.c | 4 +++- mm/kasan/report_generic.c | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mm/kasan/kasan_test.c b/mm/kasan/kasan_test.c index b61cc6a42541..c707d6c6e019 100644 --- a/mm/kasan/kasan_test.c +++ b/mm/kasan/kasan_test.c @@ -5,7 +5,7 @@ * Author: Andrey Ryabinin */ -#define pr_fmt(fmt) "kasan_test: " fmt +#define pr_fmt(fmt) "kasan: test: " fmt #include #include diff --git a/mm/kasan/kasan_test_module.c b/mm/kasan/kasan_test_module.c index 7be7bed456ef..8b7b3ea2c74e 100644 --- a/mm/kasan/kasan_test_module.c +++ b/mm/kasan/kasan_test_module.c @@ -5,7 +5,7 @@ * Author: Andrey Ryabinin */ -#define pr_fmt(fmt) "kasan test: %s " fmt, __func__ +#define pr_fmt(fmt) "kasan: test: " fmt #include #include diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c index 152dca73f398..ca4529156735 100644 --- a/mm/kasan/quarantine.c +++ b/mm/kasan/quarantine.c @@ -8,6 +8,8 @@ * Based on code by Dmitry Chernenkov. */ +#define pr_fmt(fmt) "kasan: " fmt + #include #include #include @@ -414,7 +416,7 @@ static int __init kasan_cpu_quarantine_init(void) ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "mm/kasan:online", kasan_cpu_online, kasan_cpu_offline); if (ret < 0) - pr_err("kasan cpu quarantine register failed [%d]\n", ret); + pr_err("cpu quarantine register failed [%d]\n", ret); return ret; } late_initcall(kasan_cpu_quarantine_init); diff --git a/mm/kasan/report_generic.c b/mm/kasan/report_generic.c index 51a1e8a8877f..99cbcd73cff7 100644 --- a/mm/kasan/report_generic.c +++ b/mm/kasan/report_generic.c @@ -220,7 +220,7 @@ static bool __must_check tokenize_frame_descr(const char **frame_descr, const size_t tok_len = sep - *frame_descr; if (tok_len + 1 > max_tok_len) { - pr_err("KASAN internal error: frame description too long: %s\n", + pr_err("internal error: frame description too long: %s\n", *frame_descr); return false; } @@ -233,7 +233,7 @@ static bool __must_check tokenize_frame_descr(const char **frame_descr, *frame_descr = sep + 1; if (value != NULL && kstrtoul(token, 10, value)) { - pr_err("KASAN internal error: not a valid number: %s\n", token); + pr_err("internal error: not a valid number: %s\n", token); return false; } @@ -323,7 +323,7 @@ static bool __must_check get_address_stack_frame_info(const void *addr, frame = (const unsigned long *)(mem_ptr + KASAN_GRANULE_SIZE); if (frame[0] != KASAN_CURRENT_STACK_FRAME_MAGIC) { - pr_err("KASAN internal error: frame info validation failed; invalid marker: %lu\n", + pr_err("internal error: frame has invalid marker: %lu\n", frame[0]); return false; }