Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1510968

Re: rowhammer protection [was Re: Getting interrupt every million cache misses]

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: rowhammer protection [was Re: Getting interrupt every million cache misses]
Date 2016-10-28 11:00 +0200
Message-ID <sxbb3-5ZM-11@gated-at.bofh.it> (permalink)
References (2 earlier) <swU0z-38X-43@gated-at.bofh.it> <swU0z-38X-55@gated-at.bofh.it> <swZMC-6Nm-71@gated-at.bofh.it> <sx0pj-7fL-1@gated-at.bofh.it> <sx9sB-56a-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri 2016-10-28 09:07:01, Ingo Molnar wrote:
> 
> * Pavel Machek <pavel@ucw.cz> wrote:
> 
> > +static void rh_overflow(struct perf_event *event, struct perf_sample_data *data, struct pt_regs *regs)
> > +{
> > +	u64 *ts = this_cpu_ptr(&rh_timestamp); /* this is NMI context */
> > +	u64 now = ktime_get_mono_fast_ns();
> > +	s64 delta = now - *ts;
> > +
> > +	*ts = now;
> > +
> > +	/* FIXME msec per usec, reverse logic? */
> > +	if (delta < 64 * NSEC_PER_MSEC)
> > +		mdelay(56);
> > +}
> 
> I'd suggest making the absolute delay sysctl tunable, because 'wait 56 msecs' is 
> very magic, and do we know it 100% that 56 msecs is what is needed
> everywhere?

I agree this needs to be tunable (and with the other suggestions). But
this is actually not the most important tunable: the detection
threshold (rh_attr.sample_period) should be way more important.

And yes, this will all need to be tunable, somehow. But lets verify
that this works, first :-).

Thanks and best regards,
								Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Getting interrupt every million cache misses Pavel Machek <pavel@ucw.cz> - 2016-10-27 16:40 +0200
  Re: Getting interrupt every million cache misses Peter Zijlstra <peterz@infradead.org> - 2016-10-27 16:40 +0200
    Re: Getting interrupt every million cache misses Kees Cook <keescook@chromium.org> - 2016-10-27 22:50 +0200
      rowhammer protection [was Re: Getting interrupt every million cache  misses] Pavel Machek <pavel@ucw.cz> - 2016-10-27 23:30 +0200
        Re: rowhammer protection [was Re: Getting interrupt every million  cache misses] Ingo Molnar <mingo@kernel.org> - 2016-10-28 09:10 +0200
          Re: rowhammer protection [was Re: Getting interrupt every million  cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-28 11:00 +0200
            Re: rowhammer protection [was Re: Getting interrupt every million  cache misses] Ingo Molnar <mingo@kernel.org> - 2016-10-28 11:00 +0200
              Re: rowhammer protection [was Re: Getting interrupt every million  cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-28 14:00 +0200
            Re: rowhammer protection [was Re: Getting interrupt every million  cache misses] Peter Zijlstra <peterz@infradead.org> - 2016-10-28 11:10 +0200
              Re: rowhammer protection [was Re: Getting interrupt every million  cache misses] Vegard Nossum <vegard.nossum@gmail.com> - 2016-10-28 11:30 +0200
                Re: rowhammer protection [was Re: Getting interrupt every million  cache misses] Ingo Molnar <mingo@kernel.org> - 2016-10-28 11:40 +0200
                Re: rowhammer protection [was Re: Getting interrupt every million  cache misses] Vegard Nossum <vegard.nossum@gmail.com> - 2016-10-28 11:50 +0200
                Re: [kernel-hardening] Re: rowhammer protection [was Re: Getting  interrupt every million cache misses] Mark Rutland <mark.rutland@arm.com> - 2016-10-28 12:00 +0200
              Re: rowhammer protection [was Re: Getting interrupt every million  cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-28 13:30 +0200
        Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Mark Rutland <mark.rutland@arm.com> - 2016-10-28 12:00 +0200
          Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-28 13:30 +0200
            Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Mark Rutland <mark.rutland@arm.com> - 2016-10-28 16:10 +0200
              Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Peter Zijlstra <peterz@infradead.org> - 2016-10-28 16:20 +0200
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-28 20:40 +0200
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Peter Zijlstra <peterz@infradead.org> - 2016-10-28 20:50 +0200
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-11-02 19:20 +0100
              Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-28 19:30 +0200
                Re: Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Daniel Gruss <daniel@gruss.cc> - 2016-10-29 15:20 +0200
                Re: Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-29 21:50 +0200
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Daniel Gruss <daniel@gruss.cc> - 2016-10-29 22:10 +0200
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-29 23:10 +0200
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Daniel Gruss <daniel@gruss.cc> - 2016-10-29 23:10 +0200
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-29 23:50 +0200
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Daniel Gruss <daniel@gruss.cc> - 2016-10-30 00:00 +0200
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-30 00:10 +0200
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Daniel Gruss <daniel@gruss.cc> - 2016-10-30 00:10 +0200
              Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-31 09:30 +0100
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Mark Rutland <mark.rutland@arm.com> - 2016-10-31 15:50 +0100
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-10-31 22:20 +0100
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Mark Rutland <mark.rutland@arm.com> - 2016-10-31 23:10 +0100
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Ingo Molnar <mingo@kernel.org> - 2016-11-01 07:40 +0100
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Daniel Micay <danielmicay@gmail.com> - 2016-11-01 08:30 +0100
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Daniel Gruss <daniel@gruss.cc> - 2016-11-01 09:00 +0100
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Daniel Gruss <daniel@gruss.cc> - 2016-11-01 09:20 +0100
                Re: [kernel-hardening] rowhammer protection [was Re: Getting  interrupt every million cache misses] Pavel Machek <pavel@ucw.cz> - 2016-11-01 09:20 +0100

csiph-web