From patchwork Thu Sep 14 07:26:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Yejian X-Patchwork-Id: 139405 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp174117vqi; Thu, 14 Sep 2023 00:35:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGcxpkmDo9T+nwu8FvIItzKcPx4wE//k/Pj7dFasht830u7I06FdvIYXVXexKVHb/TEK/Bp X-Received: by 2002:a17:902:74c2:b0:1c0:e87e:52ab with SMTP id f2-20020a17090274c200b001c0e87e52abmr4401818plt.35.1694676902076; Thu, 14 Sep 2023 00:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694676902; cv=none; d=google.com; s=arc-20160816; b=A97Wgc9gdTSTYtd96yDqKrMsE8WywWdgEFyu1jn68bHmFsvzblkG4ONQuo4Snzy6lf UuLg4CLUPg0pFgDknn1Wdh64r6kfzadL+VcL34ZjP9+mNeUi248L0l6mqNlLtct8BT/i gR58la2D8FIaqj6OHC5iAgl+FEEmOn0gcZnq6GzIcJjPvlN8UJzibbygEau/BgTs6M/J enwO8fXzf9yXzgGZcvqB2jewxj/ZuR7Y/9EREZ85u2IFEA+xl02wRKfWERn3pO8FHERX Zbt6H1le0Uwo2Hb8igJYZZK+G5d2OsUWtqRF5zt6OGNSEdVFWmLr//aRpDv1inEQS2m2 cS7Q== 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 :message-id:date:subject:cc:to:from; bh=8DxyFr5L1qzMP99SiseL02rvZ1tzzcbIRoyNjD2/RHw=; fh=a+IoF6M3pX+Uzl5+zR9p2aXg/Sv3qoHbRqJ1I6YRFYw=; b=d9guZ9EmY8QRdm7wKTsf7T0mTA8x9CYOfnmdQn61D01wkkQvd63/a+Nz4UeQPrEGq7 yPkIJtJrHPJDqgClWSsTPep73FySjtJoLckFqQkhvfQhp51Dgw3fLtsHERzseirJKR6j 5SuQzyoJgwuCipn89e1faF4XMqufp674tLA3quHsBRKtWTxrrfc2I4SvF9f68KiUbyTe FS4F95zguthtTdT3vbO05lTBWQn8agmhawM6RgsT7HkYyAenpLkM7zMO/5BfS9IfGzAx fzmqsaeehYhH7yULXFiHx8yFtbfY8py/+yzNmCNChUYDZCGAw07k9/NEAlnlhvA5Raku IyYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id f18-20020a170902f39200b001befe0ac50csi1043903ple.354.2023.09.14.00.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 00:35:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 60A6D801D480; Thu, 14 Sep 2023 00:26:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233045AbjINH0n (ORCPT + 35 others); Thu, 14 Sep 2023 03:26:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230120AbjINH0m (ORCPT ); Thu, 14 Sep 2023 03:26:42 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFA81CF3; Thu, 14 Sep 2023 00:26:37 -0700 (PDT) Received: from dggpeml500012.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RmTLM07MhzGq08; Thu, 14 Sep 2023 15:22:51 +0800 (CST) Received: from localhost.localdomain (10.67.175.61) by dggpeml500012.china.huawei.com (7.185.36.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Thu, 14 Sep 2023 15:26:34 +0800 From: Zheng Yejian To: , , , , , , CC: , , Subject: [PATCH] livepatch: Fix missing newline character in klp_resolve_symbols() Date: Thu, 14 Sep 2023 15:26:44 +0800 Message-ID: <20230914072644.4098857-1-zhengyejian1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.67.175.61] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500012.china.huawei.com (7.185.36.15) X-CFilter-Loop: Reflected 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 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 00:26:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776997527454388056 X-GMAIL-MSGID: 1776997527454388056 Without the newline character, the log may not be printed immediately after the error occurs. Fixes: ca376a937486 ("livepatch: Prevent module-specific KLP rela sections from referencing vmlinux symbols") Signed-off-by: Zheng Yejian Reviewed-by: Petr Mladek --- kernel/livepatch/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 61328328c474..ecbc9b6aba3a 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -243,7 +243,7 @@ static int klp_resolve_symbols(Elf_Shdr *sechdrs, const char *strtab, * symbols are exported and normal relas can be used instead. */ if (!sec_vmlinux && sym_vmlinux) { - pr_err("invalid access to vmlinux symbol '%s' from module-specific livepatch relocation section", + pr_err("invalid access to vmlinux symbol '%s' from module-specific livepatch relocation section\n", sym_name); return -EINVAL; }