Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1522426pxb; Wed, 20 Oct 2021 06:48:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwellPz3g8pfC7R01/ACxtxKPn1UOE86sS7/lZaBw+R+dES0F2stzLQ48dAjv7NzkAoMZ1d X-Received: by 2002:a17:90a:1b2a:: with SMTP id q39mr80871pjq.219.1634737736022; Wed, 20 Oct 2021 06:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634737736; cv=none; d=google.com; s=arc-20160816; b=L/FYUbrcZnmKGv+0el3ziyZK2qO4C+rEqp3ZKlgi/kekdxXcGEaJy7IvVHbCwhvyCl xSWhwjlfKFM7VORD6tU0Ju45q3VWzykyy57gtH+HFgKdhQ9HMhUMu9a0lyCYZdUR9ZBE zKvfEPl96tqiiAb0Z9c4ts6ciKZ0QVUqY7pFnZGRb4PyOhoHsB0hwYQjlEc3rQCVOrNh GXbsV6wMMQC7rt7xW0uTgA4IH8v36mD16UVgBulxnNKdMKLR8xh4dCNpp9uMPc/yNHvp ajGGW+9A48pMoT5iZGKOxlPKxZ/PbtAe1h+TFON1IURKWZMfSPO6OAnIIjevwkl+cxoY srRg== 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=lOjwZg4zVaj2zYi1pMF+VbI8PGN5fFcd32YxQ4ffHsI=; b=P+woGR4mcim5Ypa7l13p/x4cE1UzYINAmxMSfYUbIl81mt6BGsrIXv1VENv3rc9V9s E3dDqxOUT8YKApeAsq7P0j9l4tSNFtA7tsJ/cIQV2PcyAedMZ9LHz9AJ01CflRxHxItS 7ffKacvCvge1pi0uZ5U8RV0mgx/Y6ADwt1vnk2xKLNjud+P6mI9pFGd/ng/If6GV/KyG 3MDMwWSPjBOucU2p7O2X2dlM0D49LylSgMXNNJObdHAkUtz/1iNWMUCZ4ACubMKx+9ao HmkbLd7svI87WdFJOB6/fVjGiT+lqDc0MWGn/Ta5ta9eE24ZAv6KtgJemvgNs4dq0XOA rxLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ZuyqJtDq; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=lzdHhTiz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si4125710plg.32.2021.10.20.06.48.43; Wed, 20 Oct 2021 06:48:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ZuyqJtDq; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=lzdHhTiz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231355AbhJTNsB (ORCPT + 99 others); Wed, 20 Oct 2021 09:48:01 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:53062 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230379AbhJTNrB (ORCPT ); Wed, 20 Oct 2021 09:47:01 -0400 Date: Wed, 20 Oct 2021 13:44:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1634737486; 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=lOjwZg4zVaj2zYi1pMF+VbI8PGN5fFcd32YxQ4ffHsI=; b=ZuyqJtDqpGGaCO/kKMyT/T/BOuS93/DeRZyTNXKJHELujWdQT81GjB5LKqdCjOQKuPU/9v HiFyIQEYAc+M9fRjKZ3KpFCKsx2Y/tl5ToY5BdP9ytxrGPbbi2BQjnnhxcf/VyjxqM+ReQ K0j9CuLUWhKBFQyiogvHqIhs3C8szuEe4mppIKVObK3WrKH4n6Cf+kqJHe3h3cm+Xoqgi0 bomvR/Ncug8Ay1ZSz1Fh3T+xMVflia8/PCcOsXLYSIP1Z+i14vZ0ORdxzROQsQ7qmWYRli /PSk5VU6/9L7m/C7qBk/zA2Gqqb+pMzh7AAVj1Qp7SxzsEC+8looypf6Vaz76w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1634737486; 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=lOjwZg4zVaj2zYi1pMF+VbI8PGN5fFcd32YxQ4ffHsI=; b=lzdHhTizNtg9Paz+9wJyg/W24hSXx5rmF0WYpu5zldyxCSUoT+ezUJoY+WsoYEtr80GCBv L7IfMo+XcKblRNBA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/fpu] x86/fpu: Update stale comments Cc: Thomas Gleixner , Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20211015011538.493570236@linutronix.de> References: <20211015011538.493570236@linutronix.de> MIME-Version: 1.0 Message-ID: <163473748569.25758.9188796380443901574.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/fpu branch of tip: Commit-ID: d2d926482cdfbd5517826eca4e39dcd8757f04d3 Gitweb: https://git.kernel.org/tip/d2d926482cdfbd5517826eca4e39dcd8757f04d3 Author: Thomas Gleixner AuthorDate: Fri, 15 Oct 2021 03:15:56 +02:00 Committer: Borislav Petkov CommitterDate: Wed, 20 Oct 2021 15:27:25 +02:00 x86/fpu: Update stale comments copy_fpstate_to_sigframe() does not have a slow path anymore. Neither does the !ia32 restore in __fpu_restore_sig(). Update the comments accordingly. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20211015011538.493570236@linutronix.de --- arch/x86/kernel/fpu/signal.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c index 51c4915..e257805 100644 --- a/arch/x86/kernel/fpu/signal.c +++ b/arch/x86/kernel/fpu/signal.c @@ -155,10 +155,8 @@ static inline int copy_fpregs_to_sigframe(struct xregs_state __user *buf) * buf == buf_fx for 64-bit frames and 32-bit fsave frame. * buf != buf_fx for 32-bit frames with fxstate. * - * Try to save it directly to the user frame with disabled page fault handler. - * If this fails then do the slow path where the FPU state is first saved to - * task's fpu->state and then copy it to the user frame pointed to by the - * aligned pointer 'buf_fx'. + * Save it directly to the user frame with disabled page fault handler. If + * that faults, try to clear the frame which handles the page fault. * * If this is a 32-bit frame with fxstate, put a fsave header before * the aligned state at 'buf_fx'. @@ -334,12 +332,7 @@ static bool __fpu_restore_sig(void __user *buf, void __user *buf_fx, } if (likely(!ia32_fxstate)) { - /* - * Attempt to restore the FPU registers directly from user - * memory. For that to succeed, the user access cannot cause page - * faults. If it does, fall back to the slow path below, going - * through the kernel buffer with the enabled pagefault handler. - */ + /* Restore the FPU registers directly from user memory. */ return restore_fpregs_from_user(buf_fx, user_xfeatures, fx_only, state_size); }