<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/pstore.h, branch v4.1.15</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.1.15</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.1.15'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-03-23T03:06:10Z</updated>
<entry>
<title>pstore: Add pstore type id for PPC64 opal nvram partition</title>
<updated>2015-03-23T03:06:10Z</updated>
<author>
<name>Hari Bathini</name>
<email>hbathini@linux.vnet.ibm.com</email>
</author>
<published>2015-02-05T19:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ae011d2e48d2e6c2ae29fd8aab439caf2fbfb5a8'/>
<id>urn:sha1:ae011d2e48d2e6c2ae29fd8aab439caf2fbfb5a8</id>
<content type='text'>
This patch adds a new PPC64 partition type to be used for opal
specific nvram partition. A new partition type is needed as none
of the existing type matches this partition type.

Signed-off-by: Hari Bathini &lt;hbathini@linux.vnet.ibm.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>pstore: Add pmsg - user-space accessible pstore object</title>
<updated>2015-01-17T00:01:10Z</updated>
<author>
<name>Mark Salyzyn</name>
<email>salyzyn@android.com</email>
</author>
<published>2015-01-17T00:01:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9d5438f462abd6398cdb7b3211bdcec271873a3b'/>
<id>urn:sha1:9d5438f462abd6398cdb7b3211bdcec271873a3b</id>
<content type='text'>
A secured user-space accessible pstore object. Writes
to /dev/pmsg0 are appended to the buffer, on reboot
the persistent contents are available in
/sys/fs/pstore/pmsg-ramoops-[ID].

One possible use is syslogd, or other daemon, can
write messages, then on reboot provides a means to
triage user-space activities leading up to a panic
as a companion to the pstore dmesg or console logs.

Signed-off-by: Mark Salyzyn &lt;salyzyn@android.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
<entry>
<title>pstore: Don't allow high traffic options on fragile devices</title>
<updated>2013-12-20T21:12:01Z</updated>
<author>
<name>Luck, Tony</name>
<email>tony.luck@intel.com</email>
</author>
<published>2013-12-18T23:17:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=df36ac1bc2a166eef90785d584e4cfed6f52bd32'/>
<id>urn:sha1:df36ac1bc2a166eef90785d584e4cfed6f52bd32</id>
<content type='text'>
Some pstore backing devices use on board flash as persistent
storage. These have limited numbers of write cycles so it
is a poor idea to use them from high frequency operations.

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>pstore: Introduce new argument 'compressed' in the read callback</title>
<updated>2013-08-19T17:18:11Z</updated>
<author>
<name>Aruna Balakrishnaiah</name>
<email>aruna@linux.vnet.ibm.com</email>
</author>
<published>2013-08-16T20:53:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9a4e1398208d147a9240731a1f8cfe7d8cc4c553'/>
<id>urn:sha1:9a4e1398208d147a9240731a1f8cfe7d8cc4c553</id>
<content type='text'>
Backends will set the flag 'compressed' after reading the log from
persistent store to indicate the data being returned to pstore is
compressed or not.

Signed-off-by: Aruna Balakrishnaiah &lt;aruna@linux.vnet.ibm.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
<entry>
<title>pstore: Add new argument 'compressed' in pstore write callback</title>
<updated>2013-08-19T17:18:10Z</updated>
<author>
<name>Aruna Balakrishnaiah</name>
<email>aruna@linux.vnet.ibm.com</email>
</author>
<published>2013-08-16T20:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b3b515bbd689ba3937cac2dd3fc55057f8c50329'/>
<id>urn:sha1:b3b515bbd689ba3937cac2dd3fc55057f8c50329</id>
<content type='text'>
Addition of new argument 'compressed' in the write call back will
help the backend to know if the data passed from pstore is compressed
or not (In case where compression fails.). If compressed, the backend
can add a tag indicating the data is compressed while writing to
persistent store.

Signed-off-by: Aruna Balakrishnaiah &lt;aruna@linux.vnet.ibm.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
<entry>
<title>pstore: Pass header size in the pstore write callback</title>
<updated>2013-07-01T08:10:48Z</updated>
<author>
<name>Aruna Balakrishnaiah</name>
<email>aruna@linux.vnet.ibm.com</email>
</author>
<published>2013-06-27T08:32:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6bbbca735936e15b9431882eceddcf6dff76e03c'/>
<id>urn:sha1:6bbbca735936e15b9431882eceddcf6dff76e03c</id>
<content type='text'>
Header size is needed to distinguish between header and the dump data.
Incorporate the addition of new argument (hsize) in the pstore write
callback.

Signed-off-by: Aruna Balakrishnaiah &lt;aruna@linux.vnet.ibm.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Read common partition via pstore</title>
<updated>2013-06-20T07:05:02Z</updated>
<author>
<name>Aruna Balakrishnaiah</name>
<email>aruna@linux.vnet.ibm.com</email>
</author>
<published>2013-06-05T18:52:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a5e4797b0f46819a74a7233825137ed5d2f51b51'/>
<id>urn:sha1:a5e4797b0f46819a74a7233825137ed5d2f51b51</id>
<content type='text'>
This patch exploits pstore subsystem to read details of common partition
in NVRAM to a separate file in /dev/pstore. For instance, common partition
details will be stored in a file named [common-nvram-6].

Signed-off-by: Aruna Balakrishnaiah &lt;aruna@linux.vnet.ibm.com&gt;
Reviewed-by: Jim Keniston &lt;jkenisto@us.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Read of-config partition via pstore</title>
<updated>2013-06-20T07:04:59Z</updated>
<author>
<name>Aruna Balakrishnaiah</name>
<email>aruna@linux.vnet.ibm.com</email>
</author>
<published>2013-06-05T18:52:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f33f748c964f6a6ee272b1c794b52f54f4da1d04'/>
<id>urn:sha1:f33f748c964f6a6ee272b1c794b52f54f4da1d04</id>
<content type='text'>
This patch set exploits the pstore subsystem to read details of
of-config partition in NVRAM to a separate file in /dev/pstore.
For instance, of-config partition details will be stored in a
file named [of-nvram-5].

Signed-off-by: Aruna Balakrishnaiah &lt;aruna@linux.vnet.ibm.com&gt;
Reviewed-by: Jim Keniston &lt;jkenisto@us.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/pseries: Read rtas partition via pstore</title>
<updated>2013-06-20T07:04:52Z</updated>
<author>
<name>Aruna Balakrishnaiah</name>
<email>aruna@linux.vnet.ibm.com</email>
</author>
<published>2013-06-05T18:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=69020eea973d95766e905ee0ce7773e0027377a3'/>
<id>urn:sha1:69020eea973d95766e905ee0ce7773e0027377a3</id>
<content type='text'>
This patch set exploits the pstore subsystem to read details of rtas partition
in NVRAM to a separate file in /dev/pstore. For instance, rtas details will be
stored in a file named [rtas-nvram-4].

Signed-off-by: Aruna Balakrishnaiah &lt;aruna@linux.vnet.ibm.com&gt;
Reviewed-by: Jim Keniston &lt;jkenisto@us.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>pstore: Avoid deadlock in panic and emergency-restart path</title>
<updated>2013-01-11T18:20:50Z</updated>
<author>
<name>Seiji Aguchi</name>
<email>seiji.aguchi@hds.com</email>
</author>
<published>2013-01-11T18:09:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9f244e9cfd70c7c0f82d3c92ce772ab2a92d9f64'/>
<id>urn:sha1:9f244e9cfd70c7c0f82d3c92ce772ab2a92d9f64</id>
<content type='text'>
[Issue]

When pstore is in panic and emergency-restart paths, it may be blocked
in those paths because it simply takes spin_lock.

This is an example scenario which pstore may hang up in a panic path:

 - cpuA grabs psinfo-&gt;buf_lock
 - cpuB panics and calls smp_send_stop
 - smp_send_stop sends IRQ to cpuA
 - after 1 second, cpuB gives up on cpuA and sends an NMI instead
 - cpuA is now in an NMI handler while still holding buf_lock
 - cpuB is deadlocked

This case may happen if a firmware has a bug and
cpuA is stuck talking with it more than one second.

Also, this is a similar scenario in an emergency-restart path:

 - cpuA grabs psinfo-&gt;buf_lock and stucks in a firmware
 - cpuB kicks emergency-restart via either sysrq-b or hangcheck timer.
   And then, cpuB is deadlocked by taking psinfo-&gt;buf_lock again.

[Solution]

This patch avoids the deadlocking issues in both panic and emergency_restart
paths by introducing a function, is_non_blocking_path(), to check if a cpu
can be blocked in current path.

With this patch, pstore is not blocked even if another cpu has
taken a spin_lock, in those paths by changing from spin_lock_irqsave
to spin_trylock_irqsave.

In addition, according to a comment of emergency_restart() in kernel/sys.c,
spin_lock shouldn't be taken in an emergency_restart path to avoid
deadlock. This patch fits the comment below.

&lt;snip&gt;
/**
 *      emergency_restart - reboot the system
 *
 *      Without shutting down any hardware or taking any locks
 *      reboot the system.  This is called when we know we are in
 *      trouble so this is our best effort to reboot.  This is
 *      safe to call in interrupt context.
 */
void emergency_restart(void)
&lt;snip&gt;

Signed-off-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Acked-by: Don Zickus &lt;dzickus@redhat.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
</feed>
