lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-e5ea9b54a055619160bbfe527ebb7d7191823d66@git.kernel.org>
Date:   Tue, 20 Mar 2018 04:15:36 -0700
From:   tip-bot for Dan Carpenter <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     hpa@...or.com, peterz@...radead.org, linux-kernel@...r.kernel.org,
        dan.carpenter@...cle.com, alexander.shishkin@...ux.intel.com,
        tglx@...utronix.de, acme@...hat.com, eranian@...gle.com,
        kan.liang@...ux.intel.com, vincent.weaver@...ne.edu,
        torvalds@...ux-foundation.org, mingo@...nel.org,
        bigeasy@...utronix.de, jolsa@...hat.com
Subject: [tip:perf/urgent] perf/x86/intel: Don't accidentally clear high
 bits in bdw_limit_period()

Commit-ID:  e5ea9b54a055619160bbfe527ebb7d7191823d66
Gitweb:     https://git.kernel.org/tip/e5ea9b54a055619160bbfe527ebb7d7191823d66
Author:     Dan Carpenter <dan.carpenter@...cle.com>
AuthorDate: Sat, 17 Mar 2018 14:52:16 +0300
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 20 Mar 2018 08:53:31 +0100

perf/x86/intel: Don't accidentally clear high bits in bdw_limit_period()

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 <dan.carpenter@...cle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Kan Liang <kan.liang@...ux.intel.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Vince Weaver <vincent.weaver@...ne.edu>
Fixes: 294fe0f52a44 ("perf/x86/intel: Add INST_RETIRED.ALL workarounds")
Link: http://lkml.kernel.org/r/20180317115216.GB4035@mwanda
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/events/intel/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 56457cb73448..9b18a227fff7 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -3194,7 +3194,7 @@ static unsigned bdw_limit_period(struct perf_event *event, unsigned left)
 			X86_CONFIG(.event=0xc0, .umask=0x01)) {
 		if (left < 128)
 			left = 128;
-		left &= ~0x3fu;
+		left &= ~0x3fULL;
 	}
 	return left;
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ