Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2622786pxb; Tue, 21 Sep 2021 04:11:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuac7ZQGhx0wR4cwGsJil20tp46o2Rf8b7mdZH6xjWJsVQH7E1fJqWI8LlMaRgnYK6TRry X-Received: by 2002:a17:907:7856:: with SMTP id lb22mr33780075ejc.264.1632222691665; Tue, 21 Sep 2021 04:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632222691; cv=none; d=google.com; s=arc-20160816; b=jQk6+uatEEdV6M8riaHx6MKTdJloxIzJ2F4LoWvahosNI62Dfb3M9uxvYtskrkVh4z 7hpIhSRFCAC7Xhq/HG62r0N2/5JaWT7ZmmG+8avFa10ok6WHOjHWksRTXrmnZ2VO+ugO qsQzuK8sYr+2eTR2XmGGgw19fLxOSTPRyOkENcTDGwYFbkElKJz4wKWFXtqoInhODVrS dGDZ4iIx3PSBqKrvrzPsyeSP+qIA4A5weQvQyVnHXKrLcFtpqLIBzVEJb7X8fBLmfGpY N2J+J9XRw2mZ5+E0urkrwKW09DmkbbKnwZcBaPa8+GPFWzRWVrn3Dk8qX203Eil4l+iI tDbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:content-disposition :content-transfer-encoding:mime-version:in-reply-to:references:cc :user-agent:date:subject:to:from; bh=kqfPKV8uLfCAB7tEkyD23oQihrt7wAm2VhR5MEUyjIs=; b=nrJwK/U5YQOnTboPE/0gK8aPAX1aYTbacqezSzPQDtFRkIe7xH9wwL5c3BDhpcTnuU AgcAYpB4Whvq8vZWpnWk5ZUIHoxVHG47aGa9/Rr4C2I5HHO2RCfJJbP2kgL8hE5S28zx 5QS610Fd8/DC9SWyFJfImAmsznN5hfSzTqFNgh687Bx1owD7fZYjwzepNy6/mN/ETYTx fc3tn+qrGjyJkx0Kg58U+vKyf54/2ohCEXiWiNeaoMuiz2tLOvz2ONcPpHg+L0DctPnn 4aWQQhUyRCue7VIIY6TTp7MlR/3artFuUmuEJ1KVKXS/gpgqpmNSUfLiq09tLwSKxA8K gtMw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si3428777edq.233.2021.09.21.04.11.03; Tue, 21 Sep 2021 04:11:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232194AbhIULK7 (ORCPT + 99 others); Tue, 21 Sep 2021 07:10:59 -0400 Received: from hosting.gsystem.sk ([212.5.213.30]:38256 "EHLO hosting.gsystem.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231956AbhIULK7 (ORCPT ); Tue, 21 Sep 2021 07:10:59 -0400 Received: from [192.168.1.3] (ns.gsystem.sk [62.176.172.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 733C07A0222; Tue, 21 Sep 2021 13:09:29 +0200 (CEST) From: Ondrej Zary To: linux-kernel@vger.kernel.org Subject: Re: [tip: x86/core] x86/iopl: Fake iopl(3) CLI/STI usage Date: Tue, 21 Sep 2021 13:09:26 +0200 User-Agent: KMail/1.9.10 Cc: linux-tip-commits@vger.kernel.org, "Peter Zijlstra (Intel)" , Thomas Gleixner , x86@kernel.org References: <20210918090641.GD5106@worktop.programming.kicks-ass.net> <163220928593.25758.16098239507716851071.tip-bot2@tip-bot2> In-Reply-To: <163220928593.25758.16098239507716851071.tip-bot2@tip-bot2> X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <202109211309.26518.linux@zary.sk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > AuthorDate: Fri, 17 Sep 2021 11:20:04 +02:00 > Committer: Peter Zijlstra > 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 > Signed-off-by: Peter Zijlstra (Intel) > Reviewed-by: Thomas Gleixner > 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? -- Ondrej Zary