From: Greg KH <gregkh@linuxfoundation.org>
To: Borislav Petkov <bp@suse.de>
Cc: luto@kernel.org, contact@lsferreira.net, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] x86/ptrace: Fix xfpregs_set()'s incorrect xmm clearing" failed to apply to 5.15-stable tree
Date: Wed, 23 Feb 2022 19:18:52 +0100 [thread overview]
Message-ID: <YhZ6jODFkliLkpSG@kroah.com> (raw)
In-Reply-To: <YhNWY9Cc04ZDvvGH@zn.tnic>
On Mon, Feb 21, 2022 at 10:07:47AM +0100, Borislav Petkov wrote:
> On Mon, Feb 21, 2022 at 07:57:39AM +0100, gregkh@linuxfoundation.org wrote:
> >
> > The patch below does not apply to the 5.15-stable tree.
> > If someone wants it applied there, or to any other stable or longterm
> > tree, then please email the backport, including the original git commit
> > id to <stable@vger.kernel.org>.
>
> ---
> >From b0535322d006c7f49e7fca3485991c5f88a5e7cb Mon Sep 17 00:00:00 2001
> From: Andy Lutomirski <luto@kernel.org>
> Date: Mon, 14 Feb 2022 13:05:49 +0100
> Subject: [PATCH] x86/ptrace: Fix xfpregs_set()'s incorrect xmm clearing
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Commit 44cad52cc14ae10062f142ec16ede489bccf4469 upstream.
>
> xfpregs_set() handles 32-bit REGSET_XFP and 64-bit REGSET_FP. The actual
> code treats these regsets as modern FX state (i.e. the beginning part of
> XSTATE). The declarations of the regsets thought they were the legacy
> i387 format. The code thought they were the 32-bit (no xmm8..15) variant
> of XSTATE and, for good measure, made the high bits disappear by zeroing
> the wrong part of the buffer. The latter broke ptrace, and everything
> else confused anyone trying to understand the code. In particular, the
> nonsense definitions of the regsets confused me when I wrote this code.
>
> Clean this all up. Change the declarations to match reality (which
> shouldn't change the generated code, let alone the ABI) and fix
> xfpregs_set() to clear the correct bits and to only do so for 32-bit
> callers.
>
> Fixes: 6164331d15f7 ("x86/fpu: Rewrite xfpregs_set()")
> Reported-by: Luís Ferreira <contact@lsferreira.net>
> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: <stable@vger.kernel.org>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=215524
> Link: https://lore.kernel.org/r/YgpFnZpF01WwR8wU@zn.tnic
> ---
> arch/x86/kernel/fpu/regset.c | 9 ++++-----
> arch/x86/kernel/ptrace.c | 4 ++--
> 2 files changed, 6 insertions(+), 7 deletions(-)
Now queued up,t hanks.
greg k-h
prev parent reply other threads:[~2022-02-23 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 6:57 FAILED: patch "[PATCH] x86/ptrace: Fix xfpregs_set()'s incorrect xmm clearing" failed to apply to 5.15-stable tree gregkh
2022-02-21 9:07 ` Borislav Petkov
2022-02-23 18:18 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YhZ6jODFkliLkpSG@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bp@suse.de \
--cc=contact@lsferreira.net \
--cc=luto@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.