[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YUnJe6rijGy6q1Cz@hirez.programming.kicks-ass.net>
Date: Tue, 21 Sep 2021 14:00:59 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Ondrej Zary <linux@...y.sk>
Cc: linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org
Subject: Re: [tip: x86/core] x86/iopl: Fake iopl(3) CLI/STI usage
On Tue, Sep 21, 2021 at 01:09:26PM +0200, Ondrej Zary wrote:
> On Tuesday 21 September 2021, tip-bot2 for Peter Zijlstra wrote:
> > The following commit has been merged into the x86/core branch of tip:
> >
> > Commit-ID: 32e1ae626f295152d1fc9a3375214133cbe62878
> > Gitweb: https://git.kernel.org/tip/32e1ae626f295152d1fc9a3375214133cbe62878
> > Author: Peter Zijlstra <peterz@...radead.org>
> > AuthorDate: Fri, 17 Sep 2021 11:20:04 +02:00
> > Committer: Peter Zijlstra <peterz@...radead.org>
> > CommitterDate: Sat, 18 Sep 2021 12:18:32 +02:00
> >
> > x86/iopl: Fake iopl(3) CLI/STI usage
> >
> > 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@...y.sk>
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> > Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
> > Link: https://lkml.kernel.org/r/20210918090641.GD5106@worktop.programming.kicks-ass.net
>
> Could this be backported to 5.10 kernel so it can get into the recently released Debian 11?
Thomas also asked about a stable tag, so I'll rebase and force-push
these commits and add:
Cc: stable@...nel.org # v5.5+
to it.
Powered by blists - more mailing lists