From patchwork Mon Jul 10 08:13:53 2023 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: 117702 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4872203vqx; Mon, 10 Jul 2023 01:34:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlFdiNCPMmX7RP7sw0VFBupYL8Z9QbFcXA1lMWGKj2TTH3fvWwzUz/M70XPeuPtrveFMiMA+ X-Received: by 2002:a05:6512:3a1:b0:4f8:5e8b:5ec8 with SMTP id v1-20020a05651203a100b004f85e8b5ec8mr8689090lfp.9.1688978043262; Mon, 10 Jul 2023 01:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688978043; cv=none; d=google.com; s=arc-20160816; b=E9avLaSjCK4qJn82CKbe3Oe7verZeBIFZlyxkujoe5egKV/s44o679f/8UEDxLfDm8 XaFfq+E/XZ1Wp9+srAUWlKnzwxCE4U99uo/c/mw3sK2Qg1f9O89yvfXU1C7176v5xZqG uEQX5X9UuWrY9sX0v5N1YqdG5bhXSbTAsEhS6ET5gNgA4V/iNNIlpWcawu/n5AoiLcbT o39XGpNJDINsVGxyhx/vDGjDGJ5v8fv+JC33o43AQAorDGgt8PxqDvMkjz1i1PAT0q1E WRnz2gse1c2VptPpJAdQpelp3dnMF0eRhpcX0Lv9w51DWm5Gl3jjALQ/IIwn4g8ClbJJ 9wbw== 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:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=3Wa1Pqv6ON1E3f9DZX0FEtBPB2++oZTfb1AAWTXrvaI=; fh=Pl4SawUXn40MXioBu2QSRSVkw+Bhra5qf/nuoJrygTc=; b=vsht2Lnnmg/iLpE0DH/7oVCMy5w3e/ZCJcmyT4EnHokJOGB4TKGbkc0VT676fElUaT 57e6+E7l2Ql8Mrukgd9T7ERF2RVwYK65Pkad0IB0g4sK6OgDUF/Pgkf7we2N7/7BJkQg t35HzgbUfOSVneLQ28saQDTvtX/1mkKzyx7m0tlZ7V3efzcEH33yiqWmIOxh6+j0fRHf Z6Xg69h+QnjqhxqEKe/Oc2Z/BQH9d1vJS1+953Nu9eThqeWbZnPfs/l2a0EMNTjAREhd IgzvYuGd6ffb6f3ktipOtjFis3j52NIuHv2m1PoC8TLgdRlhBf3d2Q/q32lvoJX6BDoI 2dzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MnnGWf+L; 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 w14-20020aa7d28e000000b0051e24907683si8690026edq.321.2023.07.10.01.33.39; Mon, 10 Jul 2023 01:34:03 -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=MnnGWf+L; 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 S232629AbjGJIOb (ORCPT + 99 others); Mon, 10 Jul 2023 04:14:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232742AbjGJIN4 (ORCPT ); Mon, 10 Jul 2023 04:13:56 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70345E7; Mon, 10 Jul 2023 01:13:55 -0700 (PDT) Date: Mon, 10 Jul 2023 08:13:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1688976834; 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: in-reply-to:in-reply-to:references:references; bh=3Wa1Pqv6ON1E3f9DZX0FEtBPB2++oZTfb1AAWTXrvaI=; b=MnnGWf+L6oy9R45dvuPpUJzW3OeVtcegnJgOSR2CcwTsSvVtxr95rKXYv1dCiEr4CPPJsB qilgsz9NtaJJOc0vC/hBeAhZaQQTr8xOz149Dtg7/0x0Y8N3E0UzdPWmY6jnUi3R+zwSR+ NQWOZUJI7Gt2FL6cnNn0QuS6cPe7laz1LYdxmvKf3xkzLlTE9q7EPI6unxJ1ZlIsUUxjpH dz/4xxo3jDs8C3aUudYpZak08XrI7EXwQGTk6jhGL6dvigcvMQ6PWjVOZnl41eCYSi70KZ L2QyO5B2JXbyQYx7mbJ7kEua2i5UesW+vOz6SVaXzTcrv+EGTUk3FbIgerWHcw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1688976834; 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: in-reply-to:in-reply-to:references:references; bh=3Wa1Pqv6ON1E3f9DZX0FEtBPB2++oZTfb1AAWTXrvaI=; b=aL/ha04ZOl8SxxmUdcYHfdKT/kL4m8WIfr8rR9XqhlG/eEPRDg5LdmkBIk7icUZi1xRVq+ Ge+NAJGjmBnU4FBw== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/urgent] iov_iter: Mark copy_iovec_from_user() noclone Cc: "Peter Zijlstra (Intel)" , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230616124354.GD4253@hirez.programming.kicks-ass.net> References: <20230616124354.GD4253@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Message-ID: <168897683354.404.11598434533900577662.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1771021840296186460 X-GMAIL-MSGID: 1771021840296186460 The following commit has been merged into the objtool/urgent branch of tip: Commit-ID: 719a937b7003933de1298ffa4b881dd6a234e244 Gitweb: https://git.kernel.org/tip/719a937b7003933de1298ffa4b881dd6a234e244 Author: Peter Zijlstra AuthorDate: Fri, 16 Jun 2023 14:43:55 +02:00 Committer: Peter Zijlstra CommitterDate: Mon, 10 Jul 2023 09:52:28 +02:00 iov_iter: Mark copy_iovec_from_user() noclone Extend commit 50f9a76ef127 ("iov_iter: Mark copy_compat_iovec_from_user() noinline") to also cover copy_iovec_from_user(). Different compiler versions cause the same problem on different functions. lib/iov_iter.o: warning: objtool: .altinstr_replacement+0x1f: redundant UACCESS disable lib/iov_iter.o: warning: objtool: iovec_from_user+0x84: call to copy_iovec_from_user.part.0() with UACCESS enabled lib/iov_iter.o: warning: objtool: __import_iovec+0x143: call to copy_iovec_from_user.part.0() with UACCESS enabled Fixes: 50f9a76ef127 ("iov_iter: Mark copy_compat_iovec_from_user() noinline") Signed-off-by: Peter Zijlstra (Intel) Tested-by: Borislav Petkov (AMD) Link: https://lkml.kernel.org/r/20230616124354.GD4253@hirez.programming.kicks-ass.net --- lib/iov_iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iov_iter.c b/lib/iov_iter.c index b667b1e..e4dc809 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -1349,7 +1349,7 @@ uaccess_end: return ret; } -static int copy_iovec_from_user(struct iovec *iov, +static __noclone int copy_iovec_from_user(struct iovec *iov, const struct iovec __user *uiov, unsigned long nr_segs) { int ret = -EFAULT;