<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/pstore/platform.c, branch linux-3.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-11-15T02:30:21Z</updated>
<entry>
<title>pstore: Fix NULL pointer dereference in console writes</title>
<updated>2012-11-15T02:30:21Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2012-11-14T11:49:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70a6f46d7b0ec03653b9ab3f8063a9717a4a53ef'/>
<id>urn:sha1:70a6f46d7b0ec03653b9ab3f8063a9717a4a53ef</id>
<content type='text'>
Passing a NULL id causes a NULL pointer deference in writers such as
erst_writer and efi_pstore_write because they expect to update this id.
Pass a dummy id instead.

This avoids a cascade of oopses caused when the initial
pstore_console_write passes a null which in turn causes writes to the
console causing further oopses in subsequent pstore_console_write calls.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
</content>
</entry>
<entry>
<title>pstore: Avoid recursive spinlocks in the oops_in_progress case</title>
<updated>2012-09-21T00:04:50Z</updated>
<author>
<name>Chuansheng Liu</name>
</author>
<published>2012-09-17T17:43:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=80c9d03c22f13a17df67b4b99a83ed5e9acf6093'/>
<id>urn:sha1:80c9d03c22f13a17df67b4b99a83ed5e9acf6093</id>
<content type='text'>
Like 8250 driver, when pstore is registered as a console,
to avoid recursive spinlocks when panic happening, change the
spin_lock_irqsave to spin_trylock_irqsave when oops_in_progress
is true.

Signed-off-by: liu chuansheng &lt;chuansheng.liu@intel.com&gt;
Signed-off-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
</content>
</entry>
<entry>
<title>pstore/ftrace: Convert to its own enable/disable debugfs knob</title>
<updated>2012-09-07T05:16:58Z</updated>
<author>
<name>Anton Vorontsov</name>
</author>
<published>2012-07-17T21:26:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65f8c95e46a1827ae8bbc52a817ea308dd7d65ae'/>
<id>urn:sha1:65f8c95e46a1827ae8bbc52a817ea308dd7d65ae</id>
<content type='text'>
With this patch we no longer reuse function tracer infrastructure, now
we register our own tracer back-end via a debugfs knob.

It's a bit more code, but that is the only downside. On the bright side we
have:

- Ability to make persistent_ram module removable (when needed, we can
  move ftrace_ops struct into a module). Note that persistent_ram is still
  not removable for other reasons, but with this patch it's just one
  thing less to worry about;

- Pstore part is more isolated from the generic function tracer. We tried
  it already by registering our own tracer in available_tracers, but that
  way we're loosing ability to see the traces while we record them to
  pstore. This solution is somewhere in the middle: we only register
  "internal ftracer" back-end, but not the "front-end";

- When there is only pstore tracing enabled, the kernel will only write
  to the pstore buffer, omitting function tracer buffer (which, of course,
  still can be enabled via 'echo function &gt; current_tracer').

Suggested-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
</content>
</entry>
<entry>
<title>pstore: Add persistent function tracing</title>
<updated>2012-07-17T17:05:52Z</updated>
<author>
<name>Anton Vorontsov</name>
</author>
<published>2012-07-10T00:10:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=060287b8c467bf49a594d8d669e1986c6d8d76b0'/>
<id>urn:sha1:060287b8c467bf49a594d8d669e1986c6d8d76b0</id>
<content type='text'>
With this support kernel can save function call chain log into a
persistent ram buffer that can be decoded and dumped after reboot
through pstore filesystem. It can be used to determine what function
was last called before a reset or panic.

We store the log in a binary format and then decode it at read time.

p.s.
Mostly the code comes from trace_persistent.c driver found in the
Android git tree, written by Colin Cross &lt;ccross@android.com&gt;
(according to sign-off history). I reworked the driver a little bit,
and ported it to pstore.

Signed-off-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pstore: Introduce write_buf backend callback</title>
<updated>2012-07-17T16:51:38Z</updated>
<author>
<name>Anton Vorontsov</name>
</author>
<published>2012-07-10T00:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=897dba027445be93f40e5caf550556ca38c48c51'/>
<id>urn:sha1:897dba027445be93f40e5caf550556ca38c48c51</id>
<content type='text'>
For function tracing we need to stop using pstore.buf directly, since
in a tracing callback we can't use spinlocks, and thus we can't safely
use the global buffer.

With write_buf callback, backends no longer need to access pstore.buf
directly, and thus we can pass any buffers (e.g. allocated on stack).

Signed-off-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 3.5-rc4 into staging-next</title>
<updated>2012-06-25T16:31:00Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2012-06-25T16:31:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bcc66c0b8881f88459f9ac21038455bcafacdc6e'/>
<id>urn:sha1:bcc66c0b8881f88459f9ac21038455bcafacdc6e</id>
<content type='text'>
This picks up the staging changes made in 3.5-rc4 so that everyone can sync up
properly.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kmsg - kmsg_dump() use iterator to receive log buffer content</title>
<updated>2012-06-15T21:53:59Z</updated>
<author>
<name>Kay Sievers</name>
</author>
<published>2012-06-15T12:07:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2ae715d66bf4becfb85eb84b7150e23cf27df30'/>
<id>urn:sha1:e2ae715d66bf4becfb85eb84b7150e23cf27df30</id>
<content type='text'>
Provide an iterator to receive the log buffer content, and convert all
kmsg_dump() users to it.

The structured data in the kmsg buffer now contains binary data, which
should no longer be copied verbatim to the kmsg_dump() users.

The iterator should provide reliable access to the buffer data, and also
supports proper log line-aware chunking of data while iterating.

Signed-off-by: Kay Sievers &lt;kay@vrfy.org&gt;
Tested-by: Tony Luck &lt;tony.luck@intel.com&gt;
Reported-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Tested-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pstore/platform: Disable automatic updates by default</title>
<updated>2012-06-13T23:59:37Z</updated>
<author>
<name>Anton Vorontsov</name>
</author>
<published>2012-05-26T13:20:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=521f7288a8126a8ec28e3ab623aacf0590684b80'/>
<id>urn:sha1:521f7288a8126a8ec28e3ab623aacf0590684b80</id>
<content type='text'>
Having automatic updates seems pointless for production system, and
even dangerous and thus counter-productive:

1. If we can mount pstore, or read files, we can as well read
   /proc/kmsg. So, there's little point in duplicating the
   functionality and present the same information but via another
   userland ABI;

2. Expecting the kernel to behave sanely after oops/panic is naive.
   It might work, but you'd rather not try it. Screwed up kernel
   can do rather bad things, like recursive faults[1]; and pstore
   rather provoking bad things to happen. It uses:

   1. Timers (assumes sane interrupts state);
   2. Workqueues and mutexes (assumes scheduler in a sane state);
   3. kzalloc (a working slab allocator);

   That's too much for a dead kernel, so the debugging facility
   itself might just make debugging harder, which is not what
   we want.

Maybe for non-oops message types it would make sense to re-enable
automatic updates, but so far I don't see any use case for this.
Even for tracing, it has its own run-time/normal ABI, so we're
only interested in pstore upon next boot, to retrieve what has
gone wrong with HW or SW.

So, let's disable the updates by default.

[1]
BUG: unable to handle kernel paging request at fffffffffffffff8
IP: [&lt;ffffffff8104801b&gt;] kthread_data+0xb/0x20
[...]
Process kworker/0:1 (pid: 14, threadinfo ffff8800072c0000, task ffff88000725b100)
[...
Call Trace:
 [&lt;ffffffff81043710&gt;] wq_worker_sleeping+0x10/0xa0
 [&lt;ffffffff813687a8&gt;] __schedule+0x568/0x7d0
 [&lt;ffffffff8106c24d&gt;] ? trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff81087e22&gt;] ? call_rcu_sched+0x12/0x20
 [&lt;ffffffff8102b596&gt;] ? release_task+0x156/0x2d0
 [&lt;ffffffff8102b45e&gt;] ? release_task+0x1e/0x2d0
 [&lt;ffffffff8106c24d&gt;] ? trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff81368ac4&gt;] schedule+0x24/0x70
 [&lt;ffffffff8102cba8&gt;] do_exit+0x1f8/0x370
 [&lt;ffffffff810051e7&gt;] oops_end+0x77/0xb0
 [&lt;ffffffff8135c301&gt;] no_context+0x1a6/0x1b5
 [&lt;ffffffff8135c4de&gt;] __bad_area_nosemaphore+0x1ce/0x1ed
 [&lt;ffffffff81053156&gt;] ? ttwu_queue+0xc6/0xe0
 [&lt;ffffffff8135c50b&gt;] bad_area_nosemaphore+0xe/0x10
 [&lt;ffffffff8101fa47&gt;] do_page_fault+0x2c7/0x450
 [&lt;ffffffff8106e34b&gt;] ? __lock_release+0x6b/0xe0
 [&lt;ffffffff8106bf21&gt;] ? mark_held_locks+0x61/0x140
 [&lt;ffffffff810502fe&gt;] ? __wake_up+0x4e/0x70
 [&lt;ffffffff81185f7d&gt;] ? trace_hardirqs_off_thunk+0x3a/0x3c
 [&lt;ffffffff81158970&gt;] ? pstore_register+0x120/0x120
 [&lt;ffffffff8136a37f&gt;] page_fault+0x1f/0x30
 [&lt;ffffffff81158970&gt;] ? pstore_register+0x120/0x120
 [&lt;ffffffff81185ab8&gt;] ? memcpy+0x68/0x110
 [&lt;ffffffff8115875a&gt;] ? pstore_get_records+0x3a/0x130
 [&lt;ffffffff811590f4&gt;] ? persistent_ram_copy_old+0x64/0x90
 [&lt;ffffffff81158bf4&gt;] ramoops_pstore_read+0x84/0x130
 [&lt;ffffffff81158799&gt;] pstore_get_records+0x79/0x130
 [&lt;ffffffff81042536&gt;] ? process_one_work+0x116/0x450
 [&lt;ffffffff81158970&gt;] ? pstore_register+0x120/0x120
 [&lt;ffffffff8115897e&gt;] pstore_dowork+0xe/0x10
 [&lt;ffffffff81042594&gt;] process_one_work+0x174/0x450
 [&lt;ffffffff81042536&gt;] ? process_one_work+0x116/0x450
 [&lt;ffffffff81042e13&gt;] worker_thread+0x123/0x2d0
 [&lt;ffffffff81042cf0&gt;] ? manage_workers.isra.28+0x120/0x120
 [&lt;ffffffff81047d8e&gt;] kthread+0x8e/0xa0
 [&lt;ffffffff8136ba74&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff8136a199&gt;] ? retint_restore_args+0xe/0xe
 [&lt;ffffffff81047d00&gt;] ? __init_kthread_worker+0x70/0x70
 [&lt;ffffffff8136ba70&gt;] ? gs_change+0xb/0xb
Code: be e2 00 00 00 48 c7 c7 d1 2a 4e 81 e8 bf fb fd ff 48 8b 5d f0 4c 8b 65 f8 c9 c3 0f 1f 44 00 00 48 8b 87 08 02 00 00 55 48 89 e5 &lt;48&gt; 8b 40 f8 5d c3 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
RIP  [&lt;ffffffff8104801b&gt;] kthread_data+0xb/0x20
 RSP &lt;ffff8800072c1888&gt;
CR2: fffffffffffffff8
---[ end trace 996a332dc399111d ]---
Fixing recursive fault but reboot is needed!

Signed-off-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pstore/platform: Make automatic updates interval configurable</title>
<updated>2012-06-13T23:59:37Z</updated>
<author>
<name>Anton Vorontsov</name>
</author>
<published>2012-05-26T13:20:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3f5f075c2e2c52c9c656c54ea77ceff5b2e1e25'/>
<id>urn:sha1:a3f5f075c2e2c52c9c656c54ea77ceff5b2e1e25</id>
<content type='text'>
There is no behavioural change, the default value is still 60 seconds.

Signed-off-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pstore: Add console log messages support</title>
<updated>2012-06-13T23:59:27Z</updated>
<author>
<name>Anton Vorontsov</name>
</author>
<published>2012-05-26T13:20:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f29e5956aebafe63f81e80f972c44c4a666e5c7f'/>
<id>urn:sha1:f29e5956aebafe63f81e80f972c44c4a666e5c7f</id>
<content type='text'>
Pstore doesn't support logging kernel messages in run-time, it only
dumps dmesg when kernel oopses/panics. This makes pstore useless for
debugging hangs caused by HW issues or improper use of HW (e.g.
weird device inserted -&gt; driver tried to write a reserved bits -&gt;
SoC hanged. In that case we don't get any messages in the pstore.

Therefore, let's add a runtime logging support: PSTORE_TYPE_CONSOLE.

Signed-off-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Colin Cross &lt;ccross@android.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
