From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ondrej Zary <linux@zary.sk>
Cc: Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] v5.10 backport of x86/iopl: Fake iopl(3) CLI/STI usage
Date: Fri, 19 Nov 2021 14:34:41 +0100 [thread overview]
Message-ID: <YZen8SiRcsTVU6e8@kroah.com> (raw)
In-Reply-To: <20211116191514.17854-1-linux@zary.sk>
On Tue, Nov 16, 2021 at 08:15:14PM +0100, Ondrej Zary wrote:
> Backport of the following patch for 5.10-stable:
>
> >>>From b968e84b509da593c50dc3db679e1d33de701f78 Mon Sep 17 00:00:00 2001
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Fri, 17 Sep 2021 11:20:04 +0200
>
> Since commit c8137ace5638 ("x86/iopl: Restrict iopl() permission
> scope") it's possible to emulate iopl(3) using ioperm(), except for
> the CLI/STI usage.
>
> Userspace CLI/STI usage is very dubious (read broken), since any
> exception taken during that window can lead to rescheduling anyway (or
> worse). The IOPL(2) manpage even states that usage of CLI/STI is highly
> discouraged and might even crash the system.
>
> Of course, that won't stop people and HP has the dubious honour of
> being the first vendor to be found using this in their hp-health
> package.
>
> In order to enable this 'software' to still 'work', have the #GP treat
> the CLI/STI instructions as NOPs when iopl(3). Warn the user that
> their program is doing dubious things.
>
> Fixes: a24ca9976843 ("x86/iopl: Remove legacy IOPL option")
> Reported-by: Ondrej Zary <linux@zary.sk>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
> Link: https://lkml.kernel.org/r/20210918090641.GD5106@worktop.programming.kicks-ass.net
> Signed-off-by: Ondrej Zary <linux@zary.sk>
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2021-11-19 13:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 19:15 [PATCH] v5.10 backport of x86/iopl: Fake iopl(3) CLI/STI usage Ondrej Zary
2021-11-19 13:34 ` Greg Kroah-Hartman [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=YZen8SiRcsTVU6e8@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@zary.sk \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/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.