<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/crash.c, branch linux-4.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-07-14T10:26:22Z</updated>
<entry>
<title>powerpc/crash: Rearrange loop condition to avoid out of bounds array access</title>
<updated>2016-07-14T10:26:22Z</updated>
<author>
<name>Suraj Jitindar Singh</name>
</author>
<published>2016-07-11T04:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7d6392866e9777cb287ad194ce8eca00737066f'/>
<id>urn:sha1:a7d6392866e9777cb287ad194ce8eca00737066f</id>
<content type='text'>
The array crash_shutdown_handles[] has size CRASH_HANDLER_MAX, thus when
we loop over the elements of the list we check crash_shutdown_handles[i]
&amp;&amp; i &lt; CRASH_HANDLER_MAX. However this means that when we increment i to
CRASH_HANDLER_MAX we will perform an out of bound array access checking
the first condition before exiting on the second condition.

To avoid the out of bounds access, simply reorder the loop conditions.

Fixes: 1d1451655bad ("powerpc: Add array bounds checking to crash_shutdown_handlers")
Signed-off-by: Suraj Jitindar Singh &lt;sjitindarsingh@gmail.com&gt;
Reviewed-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/sparse: make some things static</title>
<updated>2016-06-16T12:23:11Z</updated>
<author>
<name>Daniel Axtens</name>
</author>
<published>2016-05-18T01:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34852ed5511ec5d07897f22d5607061a248fc82f'/>
<id>urn:sha1:34852ed5511ec5d07897f22d5607061a248fc82f</id>
<content type='text'>
This is just a smattering of things picked up by sparse that should
be made static.

Signed-off-by: Daniel Axtens &lt;dja@axtens.net&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc: Add array bounds checking to crash_shutdown_handlers</title>
<updated>2016-06-16T06:05:47Z</updated>
<author>
<name>Suraj Jitindar Singh</name>
</author>
<published>2016-05-11T00:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1d1451655bad9a6a5fd7a42de68420069ce3bee3'/>
<id>urn:sha1:1d1451655bad9a6a5fd7a42de68420069ce3bee3</id>
<content type='text'>
The array crash_shutdown_handles is an array of size CRASH_HANDLER_MAX+1
containing up to CRASH_HANDLER_MAX shutdown_handlers. It is assumed to
be NULL terminated, which it is under normal circumstances. Array
accesses in the functions crash_shutdown_unregister() and
default_machine_crash_shutdown() rely on this NULL termination property
when traversing this list and don't protect again out of bounds accesses.
If the NULL terminator were somehow overwritten these functions could
potentially access out of the bounds of the array.

Shrink the array to size CRASH_HANDLER_MAX and implement explicit array
bounds checking when accessing the elements of the
crash_shutdown_handles[] array in crash_shutdown_unregister() and
default_machine_crash_shutdown().

Signed-off-by: Suraj Jitindar Singh &lt;sjitindarsingh@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/book3e/kdump: Enable crash_kexec_wait_realmode</title>
<updated>2015-10-27T23:13:27Z</updated>
<author>
<name>Scott Wood</name>
</author>
<published>2015-10-07T03:48:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eeaab663a06c3ddc7213d30d304de73e30bc772e'/>
<id>urn:sha1:eeaab663a06c3ddc7213d30d304de73e30bc772e</id>
<content type='text'>
While book3e doesn't have "real mode", we still want to wait for
all the non-crash cpus to complete their shutdown.

Signed-off-by: Scott Wood &lt;scottwood@freescale.com&gt;
</content>
</entry>
<entry>
<title>arch,powerpc: Convert smp_mb__*()</title>
<updated>2014-04-18T12:20:41Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2014-03-13T18:00:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c645073f7e4f073e1ebcd0f0d91652c4468b8364'/>
<id>urn:sha1:c645073f7e4f073e1ebcd0f0d91652c4468b8364</id>
<content type='text'>
Powerpc allows reordering over its ll/sc implementation. Implement the
two new barriers as appropriate.

Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/n/tip-gg2ffgq32sjgy9b8lj6m3hsc@git.kernel.org
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mahesh Salgaonkar &lt;mahesh@linux.vnet.ibm.com&gt;
Cc: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Delete non-required instances of include &lt;linux/init.h&gt;</title>
<updated>2014-01-15T02:46:44Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2014-01-09T05:44:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c141611fb1ee2cfc374cf9be5327e97f361c4bed'/>
<id>urn:sha1:c141611fb1ee2cfc374cf9be5327e97f361c4bed</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.

The one instance where we add an include for init.h covers off
a case where that file was implicitly getting it from another
header which itself didn't need it.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>Disintegrate asm/system.h for PowerPC</title>
<updated>2012-03-28T17:30:02Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2012-03-28T17:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae3a197e3d0bfe3f4bf1693723e82dc018c096f3'/>
<id>urn:sha1:ae3a197e3d0bfe3f4bf1693723e82dc018c096f3</id>
<content type='text'>
Disintegrate asm/system.h for PowerPC.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
cc: linuxppc-dev@lists.ozlabs.org
</content>
</entry>
<entry>
<title>powerpc/crash: Fix build error without SMP</title>
<updated>2012-01-24T22:47:45Z</updated>
<author>
<name>Christian Kujau</name>
</author>
<published>2012-01-17T19:13:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=897e01a08c08d86bc76bebb0ca14588b406500e5'/>
<id>urn:sha1:897e01a08c08d86bc76bebb0ca14588b406500e5</id>
<content type='text'>
I could not find cpus_in_crash anywhere in the sourcetree, except for
arch/powerpc/kernel/crash.c. Moving the definition into the CONFIG_SMP
fixes it.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/kdump: Only save CPU state first time through the secondary CPU capture code</title>
<updated>2011-12-08T03:02:24Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2011-11-30T00:23:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2440c01e10f07adcbc2094ba12ae4ad6094bd2b6'/>
<id>urn:sha1:2440c01e10f07adcbc2094ba12ae4ad6094bd2b6</id>
<content type='text'>
We might enter the secondary CPU capture code twice, eg if we have to
unstick some CPUs with a system reset. In this case we don't want to
overwrite the state on CPUs that had made it into the capture code OK,
so use the cpus_state_saved cpumask for that and make it local to
crash_ipi_callback.

For controlling progress now use atomic_t cpus_in_crash to count how
many CPUs have made it into the kdump code, and time_to_dump to tell
everyone it's time to dump.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/kdump: Delay before sending IPI on a system reset</title>
<updated>2011-12-08T03:02:24Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2011-11-30T00:23:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=549e88a134b3b393a4312e8d76628b9260eee57f'/>
<id>urn:sha1:549e88a134b3b393a4312e8d76628b9260eee57f</id>
<content type='text'>
If we enter the kdump code via system reset, wait a bit before
sending the IPI to capture all secondary CPUs. Without it we race
with the hypervisor that is issuing the system reset to each CPU.
If the IPI gets there first the system reset oops output then shows
the register state of the IPI handler which is not what we want.

I took the opportunity to add defines for all the various delays
we have. There's no need for cpu_relax when we are doing an mdelay,
so remove them too.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
</feed>
