From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DC54C072A2 for ; Wed, 15 Nov 2023 20:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235060AbjKOU4a (ORCPT ); Wed, 15 Nov 2023 15:56:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343800AbjKOU42 (ORCPT ); Wed, 15 Nov 2023 15:56:28 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 541B0BC for ; Wed, 15 Nov 2023 12:56:25 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEFB2C4E777; Wed, 15 Nov 2023 20:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700081785; bh=PuMLFGqqOj5GGa8emYDNgBUIF6FSLRMvThbu+XG+Yv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ffTQUTrU8R9fnSt1i0S9HfkCANwjHpjlofaReuJCu5K3jGfEgt9wUGV4IvJ5n4i2h mvTI2iIvasMMRBZbsMw4/Maq1NcuoSK4MHKjHezrNHIyBnKlQQVdSY/+w2zk8NSCip BNZSxsTYuVRDxVWvJ6cB71Uzw/CvKvsxnOb07RVE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zheng Yejian , Petr Mladek , Sasha Levin Subject: [PATCH 5.10 123/191] livepatch: Fix missing newline character in klp_resolve_symbols() Date: Wed, 15 Nov 2023 15:46:38 -0500 Message-ID: <20231115204651.914239470@linuxfoundation.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231115204644.490636297@linuxfoundation.org> References: <20231115204644.490636297@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zheng Yejian [ Upstream commit 67e18e132f0fd738f8c8cac3aa1420312073f795 ] 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 Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230914072644.4098857-1-zhengyejian1@huawei.com Signed-off-by: Sasha Levin --- 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 e8bdce6fdd647..f5faf935c2d8f 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -245,7 +245,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; } -- 2.42.0