<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/crash.c, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-08-29T23:28:16Z</updated>
<entry>
<title>kexec: create a new config option CONFIG_KEXEC_FILE for new syscall</title>
<updated>2014-08-29T23:28:16Z</updated>
<author>
<name>Vivek Goyal</name>
</author>
<published>2014-08-29T22:18:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74ca317c26a3f8543203b61d262c0ab2e30c384e'/>
<id>urn:sha1:74ca317c26a3f8543203b61d262c0ab2e30c384e</id>
<content type='text'>
Currently new system call kexec_file_load() and all the associated code
compiles if CONFIG_KEXEC=y.  But new syscall also compiles purgatory
code which currently uses gcc option -mcmodel=large.  This option seems
to be available only gcc 4.4 onwards.

Hiding new functionality behind a new config option will not break
existing users of old gcc.  Those who wish to enable new functionality
will require new gcc.  Having said that, I am trying to figure out how
can I move away from using -mcmodel=large but that can take a while.

I think there are other advantages of introducing this new config
option.  As this option will be enabled only on x86_64, other arches
don't have to compile generic kexec code which will never be used.  This
new code selects CRYPTO=y and CRYPTO_SHA256=y.  And all other arches had
to do this for CONFIG_KEXEC.  Now with introduction of new config
option, we can remove crypto dependency from other arches.

Now CONFIG_KEXEC_FILE is available only on x86_64.  So whereever I had
CONFIG_X86_64 defined, I got rid of that.

For CONFIG_KEXEC_FILE, instead of doing select CRYPTO=y, I changed it to
"depends on CRYPTO=y".  This should be safer as "select" is not
recursive.

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Tested-by: Shaun Ruffell &lt;sruffell@digium.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kexec: support for kexec on panic using new system call</title>
<updated>2014-08-08T22:57:33Z</updated>
<author>
<name>Vivek Goyal</name>
</author>
<published>2014-08-08T21:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd5f726076cc7639d9713b334c8c133f77c6757a'/>
<id>urn:sha1:dd5f726076cc7639d9713b334c8c133f77c6757a</id>
<content type='text'>
This patch adds support for loading a kexec on panic (kdump) kernel usning
new system call.

It prepares ELF headers for memory areas to be dumped and for saved cpu
registers.  Also prepares the memory map for second kernel and limits its
boot to reserved areas only.

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
Cc: Eric Biederman &lt;ebiederm@xmission.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: Greg Kroah-Hartman &lt;greg@kroah.com&gt;
Cc: Dave Young &lt;dyoung@redhat.com&gt;
Cc: WANG Chao &lt;chaowang@redhat.com&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>x86, crash: Unify ifdef</title>
<updated>2014-03-13T22:32:44Z</updated>
<author>
<name>Borislav Petkov</name>
</author>
<published>2014-03-12T14:13:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5314feebabd92535a16295a8067b3fd79815cd16'/>
<id>urn:sha1:5314feebabd92535a16295a8067b3fd79815cd16</id>
<content type='text'>
Merge two back-to-back CONFIG_X86_32 ifdefs into one.

Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Link: http://lkml.kernel.org/r/1394633584-5509-3-git-send-email-bp@alien8.de
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>x86: Delete non-required instances of include &lt;linux/init.h&gt;</title>
<updated>2014-01-07T05:25:18Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2014-01-07T00:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=663b55b9b39fa9c848cca273ca4e12bf29b32c71'/>
<id>urn:sha1:663b55b9b39fa9c848cca273ca4e12bf29b32c71</id>
<content type='text'>
None of these files are actually using any __init type directives
and hence don't need to include &lt;linux/init.h&gt;.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

[ hpa: undid incorrect removal from arch/x86/kernel/head_32.S ]

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Link: http://lkml.kernel.org/r/1389054026-12947-1-git-send-email-paul.gortmaker@windriver.com
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
<entry>
<title>x86/apic: Disable I/O APIC before shutdown of the local APIC</title>
<updated>2013-11-07T09:12:37Z</updated>
<author>
<name>Fenghua Yu</name>
</author>
<published>2013-10-24T01:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=522e66464467543c0d88d023336eec4df03ad40b'/>
<id>urn:sha1:522e66464467543c0d88d023336eec4df03ad40b</id>
<content type='text'>
In reboot and crash path, when we shut down the local APIC, the I/O APIC is
still active. This may cause issues because external interrupts
can still come in and disturb the local APIC during shutdown process.

To quiet external interrupts, disable I/O APIC before shutdown local APIC.

Signed-off-by: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Link: http://lkml.kernel.org/r/1382578212-4677-1-git-send-email-fenghua.yu@intel.com
Cc: &lt;stable@kernel.org&gt;
[ I suppose the 'issue' is a hang during shutdown. It's a fine change nevertheless. ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/ioapic/kcrash: Prevent crash_kexec() from deadlocking on ioapic_lock</title>
<updated>2013-08-20T07:26:33Z</updated>
<author>
<name>Yoshihiro YUNOMAE</name>
</author>
<published>2013-08-20T07:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17405453f4ad0220721a29978692081be6392b8f'/>
<id>urn:sha1:17405453f4ad0220721a29978692081be6392b8f</id>
<content type='text'>
Prevent crash_kexec() from deadlocking on ioapic_lock. When
crash_kexec() is executed on a CPU, the CPU will take ioapic_lock
in disable_IO_APIC(). So if the cpu gets an NMI while locking
ioapic_lock, a deadlock will happen.

In this patch, ioapic_lock is zapped/initialized before disable_IO_APIC().

You can reproduce this deadlock the following way:

1. Add mdelay(1000) after raw_spin_lock_irqsave() in
   native_ioapic_set_affinity()@arch/x86/kernel/apic/io_apic.c

   Although the deadlock can occur without this modification, it will increase
   the potential of the deadlock problem.

2. Build and install the kernel

3. Set up the OS which will run panic() and kexec when NMI is injected
    # echo "kernel.unknown_nmi_panic=1" &gt;&gt; /etc/sysctl.conf
    # vim /etc/default/grub
      add "nmi_watchdog=0 crashkernel=256M" in GRUB_CMDLINE_LINUX line
    # grub2-mkconfig

4. Reboot the OS

5. Run following command for each vcpu on the guest
    # while true; do echo &lt;CPU num&gt; &gt; /proc/irq/&lt;IO-APIC-edge or IO-APIC-fasteoi&gt;/smp_affinitity; done;
   By running this command, cpus will get ioapic_lock for setting affinity.

6. Inject NMI (push a dump button or execute 'virsh inject-nmi &lt;domain&gt;' if you
   use VM). After injecting NMI, panic() is called in an nmi-handler context.
   Then, kexec will normally run in panic(), but the operation will be stopped
   by deadlock on ioapic_lock in crash_kexec()-&gt;machine_crash_shutdown()-&gt;
   native_machine_crash_shutdown()-&gt;disable_IO_APIC()-&gt;clear_IO_APIC()-&gt;
   clear_IO_APIC_pin()-&gt;ioapic_read_entry().

Signed-off-by: Yoshihiro YUNOMAE &lt;yoshihiro.yunomae.ez@hitachi.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Gleb Natapov &lt;gleb@redhat.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: Joerg Roedel &lt;joro@8bytes.org&gt;
Cc: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Cc: Hidehiro Kawai &lt;hidehiro.kawai.ez@hitachi.com&gt;
Cc: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Cc: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: yrl.pp-manager.tt@hitachi.com
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Link: http://lkml.kernel.org/r/20130820070107.28245.83806.stgit@yunodevel
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/kexec: crash_vmclear_local_vmcss needs __rcu</title>
<updated>2012-12-11T21:55:23Z</updated>
<author>
<name>Zhang Yanfei</name>
</author>
<published>2012-12-11T09:11:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ca0d818cbcbcac75a02833861b6fc42a98b904e'/>
<id>urn:sha1:0ca0d818cbcbcac75a02833861b6fc42a98b904e</id>
<content type='text'>
This removes the sparse warning:
arch/x86/kernel/crash.c:49:32: sparse: incompatible types in comparison expression (different address spaces)

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Signed-off-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
</content>
</entry>
<entry>
<title>x86/kexec: VMCLEAR VMCSs loaded on all cpus if necessary</title>
<updated>2012-12-06T16:25:36Z</updated>
<author>
<name>Zhang Yanfei</name>
</author>
<published>2012-12-06T15:40:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f23d1f4a116038c68df224deae6718fde87d8f0d'/>
<id>urn:sha1:f23d1f4a116038c68df224deae6718fde87d8f0d</id>
<content type='text'>
This patch provides a way to VMCLEAR VMCSs related to guests
on all cpus before executing the VMXOFF when doing kdump. This
is used to ensure the VMCSs in the vmcore updated and
non-corrupted.

Signed-off-by: Zhang Yanfei &lt;zhangyanfei@cn.fujitsu.com&gt;
Acked-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Gleb Natapov &lt;gleb@redhat.com&gt;
</content>
</entry>
<entry>
<title>x86, nmi: Wire up NMI handlers to new routines</title>
<updated>2011-10-10T04:56:57Z</updated>
<author>
<name>Don Zickus</name>
</author>
<published>2011-09-30T19:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c48f1c629ecfa114850c03f875c6691003214de'/>
<id>urn:sha1:9c48f1c629ecfa114850c03f875c6691003214de</id>
<content type='text'>
Just convert all the files that have an nmi handler to the new routines.
Most of it is straight forward conversion.  A couple of places needed some
tweaking like kgdb which separates the debug notifier from the nmi handler
and mce removes a call to notify_die.

[Thanks to Ying for finding out the history behind that mce call

https://lkml.org/lkml/2010/5/27/114

And Boris responding that he would like to remove that call because of it

https://lkml.org/lkml/2011/9/21/163]

The things that get converted are the registeration/unregistration routines
and the nmi handler itself has its args changed along with code removal
to check which list it is on (most are on one NMI list except for kgdb
which has both an NMI routine and an NMI Unknown routine).

Signed-off-by: Don Zickus &lt;dzickus@redhat.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Corey Minyard &lt;minyard@acm.org&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Robert Richter &lt;robert.richter@amd.com&gt;
Cc: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: Corey Minyard &lt;minyard@acm.org&gt;
Cc: Jack Steiner &lt;steiner@sgi.com&gt;
Link: http://lkml.kernel.org/r/1317409584-23662-4-git-send-email-dzickus@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86, UV: Make kdump avoid stack dumps</title>
<updated>2010-07-21T18:33:27Z</updated>
<author>
<name>Cliff Wickman</name>
</author>
<published>2010-07-20T23:09:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5edd19af18a36a4e22c570b1b969179e0ca1fe4c'/>
<id>urn:sha1:5edd19af18a36a4e22c570b1b969179e0ca1fe4c</id>
<content type='text'>
UV NMI callback's should not write stack dumps when a kdump is to be written.

When invoking the crash kernel to write a dump, kdump_nmi_shootdown_cpus()
uses NMI's to get all the cpu's to save their register context and halt.

But the NMI interrupt handler runs a callback list.  This patch sets a flag
to prevent any of those callbacks from interfering with the halt of the cpu.

For UV, which currently has the only callback to which this is relevant, the
uv_handle_nmi() callback should not do dumping of stacks.

The 'in_crash_kexec' flag is defined as an extern in kdebug.h firstly
because x2apic_uv_x.c includes it.  Secondly because some future callback
might need the flag to know that it should not enter the debugger.
(Such a scenario was in fact present in the 2.6.32 kernel, SuSE distribution,
 where a call to kdb needed to be avoided.)

Signed-off-by: Cliff Wickman &lt;cpw@sgi.com&gt;
LKML-Reference: &lt;E1ObLvt-0005UZ-Va@eag09.americas.sgi.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
</entry>
</feed>
