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>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 22 Jan 2015 13:20:15 -0500 (EST)
From:	Vince Weaver <vincent.weaver@...ne.edu>
To:	Stephane Eranian <eranian@...il.com>
cc:	Peter Zijlstra <peterz@...radead.org>,
	Vince Weaver <vincent.weaver@...ne.edu>,
	LKML <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Ingo Molnar <mingo@...nel.org>,
	Paul Mackerras <paulus@...ba.org>, cl@...ux.com
Subject: Re: perf: easily crash kernel with rapl event close

On Thu, 22 Jan 2015, Stephane Eranian wrote:

> Fix looks like this:
> 
> diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c
> b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
> index 6e434f8..c4bb8b8 100644
> --- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c
> +++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
> @@ -142,7 +142,7 @@ static inline u64 rapl_scale(u64 v)
>          * or use ldexp(count, -32).
>          * Watts = Joules/Time delta
>          */
> -       return v << (32 - __this_cpu_read(rapl_pmu->hw_unit));
> +       return v << (32 - __this_cpu_read(rapl_pmu)->hw_unit);
>  }
> 
> 
> Will post the patch shortly.
> Thanks Vince for reporting this issue.

Well that's obviously a classic misplaced-parenthesis bug, but I patched 
and re-ran my tests anyway to make sure this really fixed things.
(It did).  So in case it is useful:

Tested-by: Vince Weaver <vincent.weaver@...ne.edu>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ