From: Greg Kroah-Hartman Date: Tue, 27 Mar 2018 07:51:44 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.15.14~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3e229a41786a73dc83c8c61ddfe212664b518fd;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: perf-x86-intel-don-t-accidentally-clear-high-bits-in-bdw_limit_period.patch --- diff --git a/queue-4.4/perf-x86-intel-don-t-accidentally-clear-high-bits-in-bdw_limit_period.patch b/queue-4.4/perf-x86-intel-don-t-accidentally-clear-high-bits-in-bdw_limit_period.patch new file mode 100644 index 00000000000..145008f0d64 --- /dev/null +++ b/queue-4.4/perf-x86-intel-don-t-accidentally-clear-high-bits-in-bdw_limit_period.patch @@ -0,0 +1,46 @@ +From e5ea9b54a055619160bbfe527ebb7d7191823d66 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Sat, 17 Mar 2018 14:52:16 +0300 +Subject: perf/x86/intel: Don't accidentally clear high bits in bdw_limit_period() + +From: Dan Carpenter + +commit e5ea9b54a055619160bbfe527ebb7d7191823d66 upstream. + +We intended to clear the lowest 6 bits but because of a type bug we +clear the high 32 bits as well. Andi says that periods are rarely more +than U32_MAX so this bug probably doesn't have a huge runtime impact. + +Signed-off-by: Dan Carpenter +Signed-off-by: Peter Zijlstra (Intel) +Cc: Alexander Shishkin +Cc: Arnaldo Carvalho de Melo +Cc: H. Peter Anvin +Cc: Jiri Olsa +Cc: Kan Liang +Cc: Linus Torvalds +Cc: Peter Zijlstra +Cc: Sebastian Andrzej Siewior +Cc: Stephane Eranian +Cc: Thomas Gleixner +Cc: Vince Weaver +Fixes: 294fe0f52a44 ("perf/x86/intel: Add INST_RETIRED.ALL workarounds") +Link: http://lkml.kernel.org/r/20180317115216.GB4035@mwanda +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/cpu/perf_event_intel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kernel/cpu/perf_event_intel.c ++++ b/arch/x86/kernel/cpu/perf_event_intel.c +@@ -2716,7 +2716,7 @@ static unsigned bdw_limit_period(struct + X86_CONFIG(.event=0xc0, .umask=0x01)) { + if (left < 128) + left = 128; +- left &= ~0x3fu; ++ left &= ~0x3fULL; + } + return left; + } diff --git a/queue-4.4/series b/queue-4.4/series index 5ed19166b09..8e88df0fae7 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -36,3 +36,4 @@ kvm-x86-fix-icebp-instruction-handling.patch x86-build-64-force-the-linker-to-use-2mb-page-size.patch x86-boot-64-verify-alignment-of-the-load-segment.patch x86-entry-64-don-t-use-ist-entry-for-bp-stack.patch +perf-x86-intel-don-t-accidentally-clear-high-bits-in-bdw_limit_period.patch