Skip to content

Commit a7ee58a

Browse files
committed
Rebuild centos8 with kernel-4.18.0-532.el8
Rebuild_History BUILDABLERebuilding Kernel from rpm changelog with Fuzz Limit: 87.50% Number of commits in upstream range v4.18~1..master: 488125 Number of commits in rpm: 118 Number of commits matched with upstream: 116 (98.31%) Number of commits in upstream but not in rpm: 488010 Number of commits NOT found in upstream: 2 (1.69%) Rebuilding Kernel on Branch centos8_rebuild_kernel-4.18.0-532.el8 for kernel-4.18.0-532.el8 Clean Cherry Picks: 89 (76.72%) Empty Cherry Picks: 26 (22.41%) _______________________________ Full Details Located here: ciq/ciq_backports/kernel-4.18.0-532.el8/rebuild.details.txt Includes: * git commit header above * Empty Commits with upstream SHA * RPM ChangeLog Entries that could not be matched Individual Empty Commit failures contained in the same containing directory. The git message for empty commits will have the path for the failed commit. File names are the first 8 characters of the upstream SHA
1 parent c462d30 commit a7ee58a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+930
-50267
lines changed

Documentation/admin-guide/pm/intel_idle.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ and ``idle=nomwait``. If any of them is present in the kernel command line, the
168168
``MWAIT`` instruction is not allowed to be used, so the initialization of
169169
``intel_idle`` will fail.
170170

171-
Apart from that there are four module parameters recognized by ``intel_idle``
171+
Apart from that there are five module parameters recognized by ``intel_idle``
172172
itself that can be set via the kernel command line (they cannot be updated via
173173
sysfs, so that is the only way to change their values).
174174

@@ -212,6 +212,21 @@ are ignored).
212212
The idle states disabled this way can be enabled (on a per-CPU basis) from user
213213
space via ``sysfs``.
214214

215+
The ``ibrs_off`` module parameter is a boolean flag (defaults to
216+
false). If set, it is used to control if IBRS (Indirect Branch Restricted
217+
Speculation) should be turned off when the CPU enters an idle state.
218+
This flag does not affect CPUs that use Enhanced IBRS which can remain
219+
on with little performance impact.
220+
221+
For some CPUs, IBRS will be selected as mitigation for Spectre v2 and Retbleed
222+
security vulnerabilities by default. Leaving the IBRS mode on while idling may
223+
have a performance impact on its sibling CPU. The IBRS mode will be turned off
224+
by default when the CPU enters into a deep idle state, but not in some
225+
shallower ones. Setting the ``ibrs_off`` module parameter will force the IBRS
226+
mode to off when the CPU is in any one of the available idle states. This may
227+
help performance of a sibling CPU at the expense of a slightly higher wakeup
228+
latency for the idle CPU.
229+
215230

216231
.. _intel-idle-core-and-package-idle-states:
217232

Makefile.rhelver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RHEL_MINOR = 10
1212
#
1313
# Use this spot to avoid future merge conflicts.
1414
# Do not trim this comment.
15-
RHEL_RELEASE = 531
15+
RHEL_RELEASE = 532
1616

1717
#
1818
# ZSTREAM

arch/x86/include/asm/mwait.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,32 @@ static inline void __sti_mwait(unsigned long eax, unsigned long ecx)
110110
static inline void mwait_idle_with_hints(unsigned long eax, unsigned long ecx)
111111
{
112112
if (static_cpu_has_bug(X86_BUG_MONITOR) || !current_set_polling_and_test()) {
113+
bool ibrs_disabled = false;
114+
u64 spec_ctrl;
115+
113116
if (static_cpu_has_bug(X86_BUG_CLFLUSH_MONITOR)) {
114117
mb();
115118
clflush((void *)&current_thread_info()->flags);
116119
mb();
117120
}
118121

122+
if (irqs_disabled() &&
123+
cpu_feature_enabled(X86_FEATURE_KERNEL_IBRS)) {
124+
/* NMI always enable IBRS on exception entry */
125+
ibrs_disabled = true;
126+
spec_ctrl = spec_ctrl_current();
127+
__this_cpu_write(x86_spec_ctrl_current, 0);
128+
native_wrmsrl(MSR_IA32_SPEC_CTRL, 0);
129+
}
130+
119131
__monitor((void *)&current_thread_info()->flags, 0, 0);
120132
if (!need_resched())
121133
__mwait(eax, ecx);
134+
135+
if (ibrs_disabled) {
136+
native_wrmsrl(MSR_IA32_SPEC_CTRL, spec_ctrl);
137+
__this_cpu_write(x86_spec_ctrl_current, spec_ctrl);
138+
}
122139
}
123140
current_clr_polling();
124141
}

arch/x86/kernel/cpu/bugs.c

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/prctl.h>
1717
#include <linux/sched/smt.h>
1818
#include <linux/bpf.h>
19+
#include <linux/debugfs.h>
1920

2021
#include <asm/spec-ctrl.h>
2122
#include <asm/cmdline.h>
@@ -1856,6 +1857,84 @@ void cpu_bugs_smt_update(void)
18561857
mutex_unlock(&spec_ctrl_mutex);
18571858
}
18581859

1860+
#ifdef CONFIG_DEBUG_FS
1861+
/*
1862+
* Provide a debugfs file to dump SPEC_CTRL MSRs of all the CPUs
1863+
* Consecutive MSR values are collapsed together if they are the same.
1864+
*/
1865+
static ssize_t spec_ctrl_msrs_read(struct file *file, char __user *user_buf,
1866+
size_t count, loff_t *ppos)
1867+
{
1868+
int bufsiz = min(count, PAGE_SIZE);
1869+
int cpu, prev_cpu, len, cnt = 0;
1870+
u64 val, prev_val;
1871+
char *buf;
1872+
1873+
/*
1874+
* The MSRs info should be small enough that the whole buffer is
1875+
* copied out in one call. However, user space may read it again
1876+
* to see if there is any data left. Rereading the cached SPEC_CTRL
1877+
* MSR values may produce a different result causing corruption in
1878+
* output data. So skipping the call if *ppos is not starting from 0.
1879+
*/
1880+
if (*ppos)
1881+
return 0;
1882+
1883+
buf = kmalloc(bufsiz, GFP_KERNEL);
1884+
if (!buf)
1885+
return -ENOMEM;
1886+
1887+
for_each_possible_cpu(cpu) {
1888+
val = per_cpu(x86_spec_ctrl_current, cpu);
1889+
1890+
if (!cpu)
1891+
goto next;
1892+
1893+
if (val == prev_val)
1894+
continue;
1895+
1896+
if (prev_cpu == cpu - 1)
1897+
len = snprintf(buf + cnt, bufsiz - cnt, "CPU %d: 0x%llx\n",
1898+
prev_cpu, prev_val);
1899+
else
1900+
len = snprintf(buf + cnt, bufsiz - cnt, "CPUs %d-%d: 0x%llx\n",
1901+
prev_cpu, cpu - 1, prev_val);
1902+
1903+
cnt += len;
1904+
if (!len)
1905+
break; /* Out of buffer */
1906+
next:
1907+
prev_cpu = cpu;
1908+
prev_val = val;
1909+
}
1910+
1911+
if (prev_cpu == cpu - 1)
1912+
cnt += snprintf(buf + cnt, bufsiz - cnt, "CPU %d: 0x%llx\n",
1913+
prev_cpu, prev_val);
1914+
else
1915+
cnt += snprintf(buf + cnt, bufsiz - cnt, "CPUs %d-%d: 0x%llx\n",
1916+
prev_cpu, cpu - 1, prev_val);
1917+
1918+
count = simple_read_from_buffer(user_buf, count, ppos, buf, cnt);
1919+
kfree(buf);
1920+
return count;
1921+
}
1922+
1923+
static const struct file_operations fops_spec_ctrl = {
1924+
.read = spec_ctrl_msrs_read,
1925+
.llseek = default_llseek,
1926+
};
1927+
1928+
static int __init init_spec_ctrl_debugfs(void)
1929+
{
1930+
if (!debugfs_create_file("spec_ctrl_msrs", 0400, arch_debugfs_dir,
1931+
NULL, &fops_spec_ctrl))
1932+
return -ENOMEM;
1933+
return 0;
1934+
}
1935+
fs_initcall(init_spec_ctrl_debugfs);
1936+
#endif
1937+
18591938
#undef pr_fmt
18601939
#define pr_fmt(fmt) "Speculative Store Bypass: " fmt
18611940

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Rebuild_History BUILDABLERebuilding Kernel from rpm changelog with Fuzz Limit: 87.50%
2+
Number of commits in upstream range v4.18~1..master: 488125
3+
Number of commits in rpm: 118
4+
Number of commits matched with upstream: 116 (98.31%)
5+
Number of commits in upstream but not in rpm: 488010
6+
Number of commits NOT found in upstream: 2 (1.69%)
7+
8+
Rebuilding Kernel on Branch centos8_rebuild_kernel-4.18.0-532.el8 for kernel-4.18.0-532.el8
9+
Clean Cherry Picks: 89 (76.72%)
10+
Empty Cherry Picks: 26 (22.41%)
11+
_______________________________
12+
13+
__EMPTY COMMITS__________________________
14+
175c241288c09f81eb7b44d65c1ef6045efa4d1a igc: Fix TX Hang issue when QBV Gate is closed
15+
25102893e409bc02761ab82dbcfa092006404790 igc: Include the length/type field and VLAN tag in queueMaxSDU
16+
8046063df887bee35c002224267ba46f41be7cf6 igc: Rename qbv_enable to taprio_offload_enable
17+
82ff5f29b7377d614f0c01fd74b5d0cb225f0adc igc: Do not enable taprio offload for invalid arguments
18+
92272ec4107ef4f826b694a1338562c007e09821 eth: add missing xdp.h includes in drivers
19+
06b412589eef780b792e73df131d35dc43cc4a49 igc: Add lock to safeguard global Qbv variables
20+
37b61cda9c1606cd8b6445d900ca9dc03185e8b6 bnxt: don't handle XDP in netpoll
21+
2b56b3d9924160d84c37d085628525666e3b1cea eth: bnxt: handle invalid Tx completions more gracefully
22+
d08076678ce72140a40553d226f90d189fbe06d1 ipmi:ssif: Drop if blocks with always false condition
23+
d639b9d13a39cf15639cbe6e8b2c43eb60148a73 bpf: Introduce composable reg, ret and arg types.
24+
48946bd6a5d695c50b34546864b79c1f910a33c1 bpf: Replace ARG_XXX_OR_NULL with ARG_XXX | PTR_MAYBE_NULL
25+
3c4807322660d4290ac9062c034aed6b87243861 bpf: Replace RET_XXX_OR_NULL with RET_XXX | PTR_MAYBE_NULL
26+
c25b2ae136039ffa820c26138ed4a5e5f3ab3841 bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL
27+
20b2aff4bc15bda809f994761d5719827d66c0b4 bpf: Introduce MEM_RDONLY flag
28+
cf9f2f8d62eca810afbd1ee6cc0800202b000e57 bpf: Convert PTR_TO_MEM_OR_NULL to composable types.
29+
34d3a78c681e8e7844b43d1a2f4671a04249c821 bpf: Make per_cpu_ptr return rdonly PTR_TO_MEM.
30+
216e3cd2f28dbbf1fe86848e0e29e6693b9f0a20 bpf: Add MEM_RDONLY for helper args that are pointers to rdonly mem.
31+
45ce4b4f9009102cd9f581196d480a59208690c1 bpf: Fix crash due to out of bounds access into reg2btf_ids.
32+
97e6d7dab1ca4648821c790a2b7913d6d5d549db bpf: Check PTR_TO_MEM | MEM_RDONLY in check_helper_mem_access
33+
be80a1d3f9dbe5aee79a325964f7037fe2d92f30 bpf: Generalize check_ctx_reg for reuse with other types
34+
6788ab23508bddb0a9d88e104284922cb2c22b77 bpf: Generally fix helper register offset check
35+
64620e0a1e712a778095bd35cbb277dc2259281f bpf: Fix out of bounds access for ringbuf helpers
36+
aa1567a7e6440b8c3af4b0d8a8219d8fc5028c5f intel_idle: Add ibrs_off module parameter to force-disable IBRS
37+
f4f8a7803119005e87b716874bec07c751efafec netfilter: nfnetlink_osf: avoid OOB read
38+
71bb5c82aaaea007167f3ba68d3a669c74d7d55d cpufreq: intel_pstate: Add Tigerlake support in no-HWP mode
39+
691a637123470bfe63bccf5836ead40fac4c7fab ACPI: cpufreq: Use platform devices to load ACPI PPC and PCC drivers
40+
41+
__CHANGES NOT IN UPSTREAM________________
42+
x86/speculation: Provide a debugfs file to dump SPEC_CTRL MSRs
43+
x86/idle: Disable IBRS entering mwait idle and enable it on wakeup

0 commit comments

Comments
 (0)