<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/pstore/ram.c, branch linux-4.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-10-28T07:45:20Z</updated>
<entry>
<title>pstore/ramoops: fixup driver removal</title>
<updated>2016-10-28T07:45:20Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2016-09-08T11:48:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f33909bb21252e3c93876feb5bc28f0d33bf0ac9'/>
<id>urn:sha1:f33909bb21252e3c93876feb5bc28f0d33bf0ac9</id>
<content type='text'>
commit 4407de74df18ed405cc5998990004c813ccfdbde upstream.

A basic rmmod ramoops segfaults. Let's see why.

Since commit 34f0ec82e0a9 ("pstore: Correct the max_dump_cnt clearing of
ramoops") sets -&gt;max_dump_cnt to zero before looping over -&gt;przs but we
didn't use it before that either.

And since commit ee1d267423a1 ("pstore: add pstore unregister") we free
that memory on rmmod.

But even then, we looped until a NULL pointer or ERR. I don't see where
it is ensured that the last member is NULL. Let's try this instead:
simply error recovery and free. Clean up in error case where resources
were allocated. And then, in the free path, rely on -&gt;max_dump_cnt in
the free path.

Cc: Anton Vorontsov &lt;anton@enomsg.org&gt;
Cc: Colin Cross &lt;ccross@android.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ramoops: use persistent_ram_free() instead of kfree() for freeing prz</title>
<updated>2016-08-05T18:21:46Z</updated>
<author>
<name>Hiraku Toyooka</name>
</author>
<published>2016-07-25T03:56:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e976e56423dc1cc01686861fc3e0c6c0ec8cd8b7'/>
<id>urn:sha1:e976e56423dc1cc01686861fc3e0c6c0ec8cd8b7</id>
<content type='text'>
persistent_ram_zone(=prz) structures are allocated by persistent_ram_new(),
which includes vmap() or ioremap(). But they are currently freed by
kfree(). This uses persistent_ram_free() for correct this asymmetry usage.

Signed-off-by: Hiraku Toyooka &lt;hiraku.toyooka.gu@hitachi.com&gt;
Signed-off-by: Nobuhiro Iwamatsu &lt;nobuhiro.iwamatsu.kw@hitachi.com&gt;
Cc: Mark Salyzyn &lt;salyzyn@android.com&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi.tr@hitachi.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>ramoops: use DT reserved-memory bindings</title>
<updated>2016-08-05T18:21:36Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2016-07-30T01:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=529182e204db083cb7bda832d1c5c6d9278ba1cb'/>
<id>urn:sha1:529182e204db083cb7bda832d1c5c6d9278ba1cb</id>
<content type='text'>
Instead of a ramoops-specific node, use a child node of /reserved-memory.
This requires that of_platform_device_create() be explicitly called
for the node, though, since "/reserved-memory" does not have its own
"compatible" property.

Suggested-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>pstore/ram: add Device Tree bindings</title>
<updated>2016-06-14T18:34:39Z</updated>
<author>
<name>Greg Hackmann</name>
</author>
<published>2016-01-07T23:40:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=35da60941e44dbf57868e67686dd24cc1a33125a'/>
<id>urn:sha1:35da60941e44dbf57868e67686dd24cc1a33125a</id>
<content type='text'>
ramoops is one of the remaining places where ARM vendors still rely on
board-specific shims.  Device Tree lets us replace those shims with
generic code.

These bindings mirror the ramoops module parameters, with two small
differences:

(1) dump_oops becomes an optional "no-dump-oops" property, since ramoops
    sets dump_oops=1 by default.

(2) mem_type=1 becomes the more self-explanatory "unbuffered" property.

Signed-off-by: Greg Hackmann &lt;ghackmann@google.com&gt;
[fixed platform_get_drvdata() crash, thanks to Brian Norris]
[switched from u64 to u32 to simplify code, various whitespace fixes]
[use dev_of_node() to gain code-elimination for CONFIG_OF=n]
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore: add lzo/lz4 compression support</title>
<updated>2016-06-02T17:59:31Z</updated>
<author>
<name>Geliang Tang</name>
</author>
<published>2016-02-18T14:04:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8cfc8ddc99df9509a46043b14af81f5c6a223eab'/>
<id>urn:sha1:8cfc8ddc99df9509a46043b14af81f5c6a223eab</id>
<content type='text'>
Like zlib compression in pstore, this patch added lzo and lz4
compression support so that users can have more options and better
compression ratio.

The original code treats the compressed data together with the
uncompressed ECC correction notice by using zlib decompress. The
ECC correction notice is missing in the decompression process. The
treatment also makes lzo and lz4 not working. So I treat them
separately by using pstore_decompress() to treat the compressed
data, and memcpy() to treat the uncompressed ECC correction notice.

Signed-off-by: Geliang Tang &lt;geliangtang@163.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore: Add support for 64 Bit address space</title>
<updated>2016-03-10T17:43:36Z</updated>
<author>
<name>Wiebe, Wladislav (Nokia - DE/Ulm)</name>
</author>
<published>2015-11-13T12:10:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=764fd639d794a1c0b0d203b19d1bef0451c23fb1'/>
<id>urn:sha1:764fd639d794a1c0b0d203b19d1bef0451c23fb1</id>
<content type='text'>
Some architectures have their reserved RAM in 64 Bit address space.
Therefore convert mem_address module parameter to ullong.

Signed-off-by: Wladislav Wiebe &lt;wladislav.wiebe@nokia.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: add pstore unregister</title>
<updated>2015-10-22T15:59:18Z</updated>
<author>
<name>Geliang Tang</name>
</author>
<published>2015-10-20T07:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee1d267423a1f8041e2b1a33fc23e4393c67677e'/>
<id>urn:sha1:ee1d267423a1f8041e2b1a33fc23e4393c67677e</id>
<content type='text'>
pstore doesn't support unregistering yet. It was marked as TODO.
This patch adds some code to fix it:
 1) Add functions to unregister kmsg/console/ftrace/pmsg.
 2) Add a function to free compression buffer.
 3) Unmap the memory and free it.
 4) Add a function to unregister pstore filesystem.

Signed-off-by: Geliang Tang &lt;geliangtang@163.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
[Removed __exit annotation from ramoops_remove(). Reported by Arnd Bergmann]
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
<entry>
<title>ramoops: make it possible to change mem_type param.</title>
<updated>2015-05-21T16:52:29Z</updated>
<author>
<name>Wang Long</name>
</author>
<published>2015-05-21T16:52:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=078550569eafc6631d333488045159badbeb911a'/>
<id>urn:sha1:078550569eafc6631d333488045159badbeb911a</id>
<content type='text'>
If we set ramoops.mem_type=1 in command line, the current
code can not change mem_type to 1, because it is assigned
to 0 in function ramoops_register_dummy.

This patch make it possible to change mem_type parameter
in command line.

Signed-off-by: Wang Long &lt;long.wanglong@huawei.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
<entry>
<title>pstore/ram: verify ramoops header before saving record</title>
<updated>2015-05-21T16:50:34Z</updated>
<author>
<name>Ben Zhang</name>
</author>
<published>2015-05-21T16:50:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e036bd330d21e929e94ed4d5432f9d279b19ce47'/>
<id>urn:sha1:e036bd330d21e929e94ed4d5432f9d279b19ce47</id>
<content type='text'>
On some devices the persistent memory contains junk after a cold boot,
and /dev/pstore/dmesg-ramoops-* are created with random data which is
not the result of a kernel crash.

This patch adds a ramoops header check and skips any
persistent_ram_zone that does not have a valid header.

Signed-off-by: Ben Zhang &lt;benzh@chromium.org&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
<entry>
<title>fs/pstore: Optimization function ramoops_init_przs</title>
<updated>2015-05-21T16:47:22Z</updated>
<author>
<name>long.wanglong</name>
</author>
<published>2015-05-21T16:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07239fc854ec61b3cdc400d2a50d322d39c673f6'/>
<id>urn:sha1:07239fc854ec61b3cdc400d2a50d322d39c673f6</id>
<content type='text'>
The value of cxt-&gt;record_size does not change in the loop,
so this patch optimize the assign statement by dropping
sz entirely and using cxt-&gt;record_size in its place.

Signed-off-by: Wang Long &lt;long.wanglong@huawei.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
</content>
</entry>
</feed>
