<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/pstore.h, branch v3.14.29</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.14.29</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.14.29'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-12-20T21:12:01Z</updated>
<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>
<entry>
<title>efi_pstore: Add a sequence counter to a variable name</title>
<updated>2012-11-27T00:07:44Z</updated>
<author>
<name>Seiji Aguchi</name>
<email>seiji.aguchi@hds.com</email>
</author>
<published>2012-11-27T00:07:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=755d4fe46529018ae45bc7c86df682de45ace764'/>
<id>urn:sha1:755d4fe46529018ae45bc7c86df682de45ace764</id>
<content type='text'>
[Issue]

Currently, a variable name, which identifies each entry, consists of type, id and ctime.
But if multiple events happens in a short time, a second/third event may fail to log because
efi_pstore can't distinguish each event with current variable name.

[Solution]

A reasonable way to identify all events precisely is introducing a sequence counter to
the variable name.

The sequence counter has already supported in a pstore layer with "oopscount".
So, this patch adds it to a variable name.
Also, it is passed to read/erase callbacks of platform drivers in accordance with
the modification of the variable name.

  &lt;before applying this patch&gt;
 a variable name of first event: dump-type0-1-12345678
 a variable name of second event: dump-type0-1-12345678

  type:0
  id:1
  ctime:12345678

 If multiple events happen in a short time, efi_pstore can't distinguish them because
 variable names are same among them.

  &lt;after applying this patch&gt;

 it can be distinguishable by adding a sequence counter as follows.

 a variable name of first event: dump-type0-1-1-12345678
 a variable name of Second event: dump-type0-1-2-12345678

  type:0
  id:1
  sequence counter: 1(first event), 2(second event)
  ctime:12345678

In case of a write callback executed in pstore_console_write(), "0" is added to
an argument of the write callback because it just logs all kernel messages and
doesn't need to care about multiple events.

Signed-off-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Mike Waychison &lt;mikew@google.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
<entry>
<title>efi_pstore: Add ctime to argument of erase callback</title>
<updated>2012-11-27T00:02:12Z</updated>
<author>
<name>Seiji Aguchi</name>
<email>seiji.aguchi@hds.com</email>
</author>
<published>2012-11-14T20:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a9efd39cd547223597cfe7c53acec44c099b9264'/>
<id>urn:sha1:a9efd39cd547223597cfe7c53acec44c099b9264</id>
<content type='text'>
[Issue]

Currently, a variable name, which is used to identify each log entry, consists of type,
id and ctime. But an erase callback does not use ctime.

If efi_pstore supported just one log, type and id were enough.
However, in case of supporting multiple logs, it doesn't work because
it can't distinguish each entry without ctime at erasing time.

 &lt;Example&gt;

 As you can see below, efi_pstore can't differentiate first event from second one without ctime.

 a variable name of first event: dump-type0-1-12345678
 a variable name of second event: dump-type0-1-23456789

  type:0
  id:1
  ctime:12345678, 23456789

[Solution]

This patch adds ctime to an argument of an erase callback.

It works across reboots because ctime of pstore means the date that the record was originally stored.
To do this, efi_pstore saves the ctime to variable name at writing time and passes it to pstore
at reading time.

Signed-off-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Acked-by: Mike Waychison &lt;mikew@google.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
</feed>
