[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161027091543.GJ3102@twins.programming.kicks-ass.net>
Date: Thu, 27 Oct 2016 11:15:43 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Pavel Machek <pavel@....cz>
Cc: acme@...hat.com, kernel list <linux-kernel@...r.kernel.org>,
mingo@...hat.com, alexander.shishkin@...ux.intel.com
Subject: Re: Getting interrupt every million cache misses
On Thu, Oct 27, 2016 at 10:46:38AM +0200, Pavel Machek wrote:
> And actually, printk() is not needed, udelay(50msec) is. Reason is,
> that DRAM becomes unreliable if about milion cache misses happen in
> under 64msec -- so I'd like to slow the system down in such cases to
> prevent bug from biting me.
>
> (Details are here
> https://googleprojectzero.blogspot.cz/2015/03/exploiting-dram-rowhammer-bug-to-gain.html
> ). Bug is exploitable to get local root; it is also exploitable to
> gain local code execution from javascript... so it is rather severe.
Cute, a rowhammer defence.
So we can do in-kernel perf events too, see for example
kernel/watchdog.c:wd_hw_attr and its users.
I suppose you want PERF_COUNT_HW_CACHE_MISSES as config, although
depending on platform you could use better (u-arch specific) events.
Powered by blists - more mailing lists