From patchwork Fri Oct 28 06:42:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 12117 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp659825wru; Thu, 27 Oct 2022 23:47:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5eY9wpLdE2mvE7CKzD2nlLBPYPafXy8WUF5amFnqtKLi6gvm9kvi8oe2ZFx18Kb82i+wEQ X-Received: by 2002:a17:90b:1c02:b0:213:17f1:50a7 with SMTP id oc2-20020a17090b1c0200b0021317f150a7mr14227219pjb.138.1666939626096; Thu, 27 Oct 2022 23:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666939626; cv=none; d=google.com; s=arc-20160816; b=EoQLQdXlo4BEk8pUXqe233hLfMn9ouTY15keVkSgsBggRSekgy7hENUrlncJnYkngz ZySBps5rDo8u8cGQ0+VJ6GEOAtWawo/hMn330xtTYv9nSR2+bSTtTv/ZyTYKS+rreZGL jrPpMn6a9OL9gcR9Ng/kgboTshaBSSQDan6dANae+NBCPJA5n9AZwS0d6w0JZUgmtEfU bxmn4du6/NW69qC6m5yeMc0wMvYKlvnS1R8GJp5FD8zIh8F8pxiYX3cORTyb9iXHhvuf IMMUblWvZnFJ2AlnLUGvaQ/qQnio1ydNISfSqBEjLjKD083sY4FAhqjfg5h+rnaityyf J6mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=UvfhjA69pBBZjPlt4RruyUpepFtfZDFG/fA4o0CWAOA=; b=rrEdymsY9vxhzbCepFdj9+T5MjQjrPP+gJR9tYMzseOGUhqI3jHT3Hy1oF8V+9dC8P VH10EO6bkUs/9V3Z+T9VE0B44B12Gvd5rfg4zihB4f9hFIrdWOUh6iHgxt6w5z9c3pQ0 B+QSSZt/Y76xDsCsi6LAqnUkcOAMwEPjy5D8bC8iAzN1FTYW9vOeiqo26y/gBOKj+V6u 5rzFFzCir+qbYPtTqwr55AALPPuHPTX/u69pphmP1C7kpxhr8fLO1alYGI4HQzz7y+6+ BYhAZeK9zFsYlLRcCq2At6mhH7Uu2nt9A0fwiJIkWVmSWASInP71Nv7U7VvrvCJBgv30 mZwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CFOShDiJ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a4-20020a656044000000b00429946b0642si4454239pgp.469.2022.10.27.23.46.52; Thu, 27 Oct 2022 23:47:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CFOShDiJ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbiJ1GqA (ORCPT + 99 others); Fri, 28 Oct 2022 02:46:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbiJ1Gpb (ORCPT ); Fri, 28 Oct 2022 02:45:31 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 339B21BC151; Thu, 27 Oct 2022 23:42:48 -0700 (PDT) Date: Fri, 28 Oct 2022 06:42:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666939365; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UvfhjA69pBBZjPlt4RruyUpepFtfZDFG/fA4o0CWAOA=; b=CFOShDiJUrXieRH+UzopdkA+Diub8JTYqtsuR9HLD7EB4pwfSje5Ii2eyaTolCII3BKsGR nmGA1ywD/v7wkfePKu/WJgmA4gVC3bfbt/x1pnOKKCcWlOwVJ6/3GlJrd6wotnvECNUbvq m6u7/IB2pVq9ZMLdDhkAidYFvnvE64GG47iCYl1r1AohqXI5TmQC225Qx3gJoy9cLmc5Io Mrfdhnlrxhes/NKJ4+fTthWXeRqnwx3Qo/LL3gTgJpvqnWG/8KWU0iKWWpogcGkBTQUINH Z7slNxMJiujhOglc0zjaVafB6dHmx44qsh7hlFDTFrMKlY3Gm5D7bhxBXwZ6uA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666939365; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UvfhjA69pBBZjPlt4RruyUpepFtfZDFG/fA4o0CWAOA=; b=XDZ0fZcenr1/LUPpZqV7jF1Uba1IffSACLiJ6Vv2LTWjkApen1xpXmQCRCsqJWHCp0l89+ nHSanZ9Vs2l367DQ== From: "tip-bot2 for Dan Carpenter" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] x86/retpoline: Fix crash printing warning Cc: Dan Carpenter , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <166693936407.29415.9974572427874008565.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747912885450245778?= X-GMAIL-MSGID: =?utf-8?q?1747912885450245778?= The following commit has been merged into the x86/core branch of tip: Commit-ID: ae25e00ba84073450c07d8ffd2d74f914a027230 Gitweb: https://git.kernel.org/tip/ae25e00ba84073450c07d8ffd2d74f914a027230 Author: Dan Carpenter AuthorDate: Tue, 25 Oct 2022 18:32:49 +03:00 Committer: Dave Hansen CommitterDate: Tue, 25 Oct 2022 12:27:08 -07:00 x86/retpoline: Fix crash printing warning The first argument of WARN() is a condition, so this will use "addr" as the format string and possibly crash. Fixes: 3b6c1747da48 ("x86/retpoline: Add SKL retthunk retpolines") Signed-off-by: Dan Carpenter Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/Y1gBoUZrRK5N%2FlCB@kili/ --- arch/x86/kernel/alternative.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 19221d7..b4ac4e5 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -418,7 +418,7 @@ clang_jcc: break; default: - WARN("%pS %px %*ph\n", addr, addr, 6, addr); + WARN(1, "%pS %px %*ph\n", addr, addr, 6, addr); return -1; }