integ/kernel-std/centos/patches/cpuidle-menu-stop-seeking-deeper-idle-if-current-sta.patch
Jim Somerville 50a9ff6df4 Kernel Upgrades for Meltdown and Spectre
The kernel is moved ahead to version 3.10.0-693.21.1.el7

To summarize:

CVE-2017-5753 [bounds check bypass] aka 'Spectre Variant 1'
This is fixed by load fences and is "baked in" and cannot
be turned off.

CVE-2017-5715 [branch target injection] aka 'Spectre Variant 2'
This is fixed by a combination of retpolines and IBPB, or
IBRS+IBPB if on skylake.  This requires a microcode change in
the processors.  This feature, if on, has a significant performance
impact.  It is assumed on unless turned off via the
"nospectre_v2" bootarg.

CVE-2017-5754 [rogue data cache load] aka 'Meltdown' aka 'Variant 3'
This is fixed by page table isolation using the Kaiser patches.
This feature is assumed on unless turned off via the
"nopti" bootarg.

As of the commit date, we have changed the installer kickstarts
to issue both "nopti nospectre_v2" bootargs to minimize realtime
impacts by default.  The customer will be able to optionally
sacrifice performance for extra security at datafill time.

Change-Id: Id7c99923f2ee2ee91f77c7bd9940e684eff8b476
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
2018-06-22 12:53:11 -04:00

53 lines
2.0 KiB
Diff

From 6b776fab264499662c594fbd7d0f41524ee3981a Mon Sep 17 00:00:00 2001
Message-Id: <6b776fab264499662c594fbd7d0f41524ee3981a.1522097754.git.Jim.Somerville@windriver.com>
In-Reply-To: <f4706beaf86081b0890ea616082913f8f51823ff.1522097754.git.Jim.Somerville@windriver.com>
References: <f4706beaf86081b0890ea616082913f8f51823ff.1522097754.git.Jim.Somerville@windriver.com>
From: Alex Shi <alex.shi@linaro.org>
Date: Thu, 12 Jan 2017 21:27:02 +0800
Subject: [PATCH 19/27] cpuidle/menu: stop seeking deeper idle if current state
is deep enough
[ commit 8e37e1a2a3295f5d99e6dbe99eca24eca7a034ef from linux-stable ]
Obsolete commit 71abbbf856a0 (cpuidle: extend cpuidle and menu
governor to handle dynamic states) wanted to introduce dynamic C-states, but
that idea was dropped long ago. The nonsense deeper C-state checking
remained, though.
Since both target_residency and exit_latency are longer for deeper
idle state, there's no need to waste CPU time on useless checks.
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Acked-by: Rik van Riel <riel@redhat.com>
[ rjw: Subject & changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Alex Kozyrev <alex.kozyrev@windriver.com>
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
drivers/cpuidle/governors/menu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index c99fee9..eb9fb0e 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -323,11 +323,11 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
if (s->disabled || su->disable)
continue;
if (s->target_residency > data->predicted_us)
- continue;
+ break;
if (s->exit_latency > latency_req)
- continue;
+ break;
if (s->exit_latency * multiplier > data->predicted_us)
- continue;
+ break;
data->last_state_idx = i;
data->exit_us = s->exit_latency;
--
1.8.3.1