<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/nmi.c, branch linux-4.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-05-14T17:18:43Z</updated>
<entry>
<title>x86/speculation/mds: Clear CPU buffers on exit to user</title>
<updated>2019-05-14T17:18:43Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-02-18T22:42:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bfa08d23f92e839b9de8e85f3643b8516d49f861'/>
<id>urn:sha1:bfa08d23f92e839b9de8e85f3643b8516d49f861</id>
<content type='text'>
commit 04dcbdb8057827b043b3c71aa397c4c63e67d086 upstream

Add a static key which controls the invocation of the CPU buffer clear
mechanism on exit to user space and add the call into
prepare_exit_to_usermode() and do_nmi() right before actually returning.

Add documentation which kernel to user space transition this covers and
explain why some corner cases are not mitigated.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Borislav Petkov &lt;bp@suse.de&gt;
Reviewed-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Reviewed-by: Jon Masters &lt;jcm@redhat.com&gt;
Tested-by: Jon Masters &lt;jcm@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>x86/nmi: Use raw lock</title>
<updated>2017-08-16T18:40:09Z</updated>
<author>
<name>Scott Wood</name>
</author>
<published>2017-07-24T21:32:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c455fd9235b6bd2802db86109cfa0ec105992f68'/>
<id>urn:sha1:c455fd9235b6bd2802db86109cfa0ec105992f68</id>
<content type='text'>
register_nmi_handler() can be called from PREEMPT_RT atomic context
(e.g. wakeup_cpu_via_init_nmi() or native_stop_other_cpus()), and thus
ordinary spinlocks cannot be used.

Signed-off-by: Scott Wood &lt;swood@redhat.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Don Zickus &lt;dzickus@redhat.com&gt;
Link: http://lkml.kernel.org/r/20170724213242.27598-1-swood@redhat.com

</content>
</entry>
<entry>
<title>Merge tag 'edac_for_4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp</title>
<updated>2017-05-01T18:36:00Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-05-01T18:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89d1cf89c88f4684a51bd1f3e3aff0ae32572292'/>
<id>urn:sha1:89d1cf89c88f4684a51bd1f3e3aff0ae32572292</id>
<content type='text'>
Pull EDAC updates from Borislav Petkov:

 - an EDAC driver for Cavium ThunderX RAS IP (Sergey Temerkhanov)

 - removal of DRAM error reporting through PCI SERR NMI (Borislav
   Petkov)

 - misc small fixes (Jan Glauber, Thor Thayer)

* tag 'edac_for_4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  EDAC, ghes: Do not enable it by default
  EDAC: Rename report status accessors
  EDAC: Delete edac_stub.c
  EDAC: Update Kconfig help text
  EDAC: Remove EDAC_MM_EDAC
  EDAC: Issue tracepoint only when it is defined
  ACPI/extlog: Add EDAC dependency
  EDAC: Move edac_op_state to edac_mc.c
  EDAC: Remove edac_err_assert
  EDAC: Get rid of edac_handlers
  x86/nmi, EDAC: Get rid of DRAM error reporting thru PCI SERR NMI
  EDAC, highbank: Align Makefile directives
  EDAC, thunderx: Remove unused code
  EDAC, thunderx: Change LMC index calculation
  EDAC, altera: Fix peripheral warnings for Cyclone5
  EDAC, thunderx: Fix L2C MCI interrupt disable
  EDAC, thunderx: Add Cavium ThunderX EDAC driver
</content>
</entry>
<entry>
<title>x86/nmi, EDAC: Get rid of DRAM error reporting thru PCI SERR NMI</title>
<updated>2017-04-10T15:13:48Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2017-01-25T19:30:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db47d5f856467ce0dd3af7e20a33df3d901266df'/>
<id>urn:sha1:db47d5f856467ce0dd3af7e20a33df3d901266df</id>
<content type='text'>
Apparently, some machines used to report DRAM errors through a PCI SERR
NMI. This is why we have a call into EDAC in the NMI handler. See

  c0d121720220 ("drivers/edac: add new nmi rescan").

From looking at the patch above, that's two drivers: e752x_edac.c and
e7xxx_edac.c. Now, I wanna say those are old machines which are probably
decommissioned already.

Tony says that "[t]the newest CPU supported by either of those drivers
is the Xeon E7520 (a.k.a. "Nehalem") released in Q1'2010. Possibly some
folks are still using these ... but people that hold onto h/w for 7
years generally cling to old s/w too ... so I'd guess it unlikely that
we will get complaints for breaking these in upstream."

So even if there is a small number still in use, we did load EDAC with
edac_op_state == EDAC_OPSTATE_POLL by default (we still do, in fact)
which means a default EDAC setup without any parameters supplied on the
command line or otherwise would never even log the error in the NMI
handler because we're polling by default:

  inline int edac_handler_set(void)
  {
         if (edac_op_state == EDAC_OPSTATE_POLL)
                 return 0;

         return atomic_read(&amp;edac_handlers);
  }

So, long story short, I'd like to get rid of that nastiness called
edac_stub.c and confine all the EDAC drivers solely to drivers/edac/. If
we ever have to do stuff like that again, it should be notifiers we're
using and not some insanity like this one.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
<entry>
<title>x86/platform: Remove warning message for duplicate NMI handlers</title>
<updated>2017-03-13T19:45:18Z</updated>
<author>
<name>Mike Travis</name>
</author>
<published>2017-03-07T21:08:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d443b70cc92d741cbc1dcbf1079897b3d8bc3cc'/>
<id>urn:sha1:0d443b70cc92d741cbc1dcbf1079897b3d8bc3cc</id>
<content type='text'>
Remove the WARNING message associated with multiple NMI handlers as
there are at least two that are legitimate.  These are the KGDB and the
UV handlers and both want to be called if the NMI has not been claimed
by any other NMI handler.

Use of the UNKNOWN NMI call chain dramatically lowers the NMI call rate
when high frequency NMI tools are in use, notably the perf tools.  It is
required on systems that cannot sustain a high NMI call rate without
adversely affecting the system operation.

Signed-off-by: Mike Travis &lt;mike.travis@hpe.com&gt;
Reviewed-by: Dimitri Sivanich &lt;dimitri.sivanich@hpe.com&gt;
Cc: Don Zickus &lt;dzickus@redhat.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Russ Anderson &lt;russ.anderson@hpe.com&gt;
Cc: Frank Ramsay &lt;frank.ramsay@hpe.com&gt;
Cc: Tony Ernst &lt;tony.ernst@hpe.com&gt;
Link: http://lkml.kernel.org/r/20170307210841.730959611@asylum.americas.sgi.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>sched/headers: Prepare for new header dependencies before moving code to &lt;linux/sched/debug.h&gt;</title>
<updated>2017-03-02T07:42:34Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2017-02-08T17:51:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b17b01533b719e9949e437abf66436a875739b40'/>
<id>urn:sha1:b17b01533b719e9949e437abf66436a875739b40</id>
<content type='text'>
We are going to split &lt;linux/sched/debug.h&gt; out of &lt;linux/sched.h&gt;, which
will have to be picked up from other headers and a couple of .c files.

Create a trivial placeholder &lt;linux/sched/debug.h&gt; file that just
maps to &lt;linux/sched.h&gt; to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched/headers: Prepare for new header dependencies before moving code to &lt;linux/sched/clock.h&gt;</title>
<updated>2017-03-02T07:42:27Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2017-02-01T15:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e601757102cfd3eeae068f53b3bc1234f3a2b2e9'/>
<id>urn:sha1:e601757102cfd3eeae068f53b3bc1234f3a2b2e9</id>
<content type='text'>
We are going to split &lt;linux/sched/clock.h&gt; out of &lt;linux/sched.h&gt;, which
will have to be picked up from other headers and .c files.

Create a trivial placeholder &lt;linux/sched/clock.h&gt; file that just
maps to &lt;linux/sched.h&gt; to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86: include linux/ratelimit.h in nmi.c</title>
<updated>2016-06-06T15:10:15Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2016-06-06T14:09:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c361db5c2c64f1b7ffed5e9cc42e5062432238f2'/>
<id>urn:sha1:c361db5c2c64f1b7ffed5e9cc42e5062432238f2</id>
<content type='text'>
When building random configurations, we now occasionally get a new
build error:

   In file included from include/linux/kernel.h:13:0,
                    from include/linux/list.h:8,
                    from include/linux/preempt.h:10,
                    from include/linux/spinlock.h:50,
                    from arch/x86/kernel/nmi.c:13:
   arch/x86/kernel/nmi.c: In function 'nmi_max_handler':
   include/linux/printk.h:375:9: error: type defaults to 'int' in declaration of 'DEFINE_RATELIMIT_STATE' [-Werror=implicit-int]
     static DEFINE_RATELIMIT_STATE(_rs,    \
            ^
   arch/x86/kernel/nmi.c:110:2: note: in expansion of macro 'printk_ratelimited'
     printk_ratelimited(KERN_INFO
     ^~~~~~~~~~~~~~~~~~

This was working before the rtc rework series because linux/ratelimit.h
was included implictly through asm/mach_traps.h -&gt; asm/mc146818rtc.h
-&gt; linux/mc146818rtc.h -&gt; linux/rtc.h -&gt; linux/device.h.

We clearly shouldn't rely on this indirect inclusion, so this adds
an explicit #include in the file that needs it.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Fixes: 5ab788d73832 ("rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h")
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>x86/nmi: Mark 'ignore_nmis' as __read_mostly</title>
<updated>2016-03-08T11:48:19Z</updated>
<author>
<name>Kostenzer Felix</name>
</author>
<published>2016-03-06T22:20:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e2a7f5b9a8c49f1f4e1dc8972198510f43c0b2e'/>
<id>urn:sha1:8e2a7f5b9a8c49f1f4e1dc8972198510f43c0b2e</id>
<content type='text'>
ignore_nmis is used in two distinct places:

 1. modified through {stop,restart}_nmi by alternative_instructions
 2. read by do_nmi to determine if default_do_nmi should be called or not

thus the access pattern conforms to __read_mostly and do_nmi() is a fastpath.

Signed-off-by: Kostenzer Felix &lt;fkostenzer@live.at&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/nmi: Save regs in crash dump on external NMI</title>
<updated>2015-12-19T10:07:01Z</updated>
<author>
<name>Hidehiro Kawai</name>
</author>
<published>2015-12-14T10:19:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b279d67df88a49c6ca32b3eebd195660254be394'/>
<id>urn:sha1:b279d67df88a49c6ca32b3eebd195660254be394</id>
<content type='text'>
Now, multiple CPUs can receive an external NMI simultaneously by
specifying the "apic_extnmi=all" command line parameter. When we take
a crash dump by using external NMI with this option, we fail to save
registers into the crash dump. This happens as follows:

  CPU 0                              CPU 1
  ================================   =============================
  receive an external NMI
  default_do_nmi()                   receive an external NMI
    spin_lock(&amp;nmi_reason_lock)      default_do_nmi()
    io_check_error()                   spin_lock(&amp;nmi_reason_lock)
      panic()                            busy loop
      ...
        kdump_nmi_shootdown_cpus()
          issue NMI IPI -----------&gt; blocked until IRET
                                         busy loop...

Here, since CPU 1 is in NMI context, an additional NMI from CPU 0
remains unhandled until CPU 1 IRETs. However, CPU 1 will never execute
IRET so the NMI is not handled and the callback function to save
registers is never called.

To solve this issue, we check if the IPI for crash dumping was issued
while waiting for nmi_reason_lock to be released, and if so, call its
callback function directly. If the IPI is not issued (e.g. kdump is
disabled), the actual behavior doesn't change.

Signed-off-by: Hidehiro Kawai &lt;hidehiro.kawai.ez@hitachi.com&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Dave Young &lt;dyoung@redhat.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiang Liu &lt;jiang.liu@linux.intel.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: kexec@lists.infradead.org
Cc: linux-doc@vger.kernel.org
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stefan Lippers-Hollmann &lt;s.l-h@gmx.de&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: x86-ml &lt;x86@kernel.org&gt;
Link: http://lkml.kernel.org/r/20151210065245.4587.39316.stgit@softrs
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
</feed>
