<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/pstore/ram.c, branch v6.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-12-23T18:34:25+00:00</updated>
<entry>
<title>pstore: Properly assign mem_type property</title>
<updated>2022-12-23T18:34:25+00:00</updated>
<author>
<name>Luca Stefani</name>
<email>luca@osomprivacy.com</email>
</author>
<published>2022-12-22T13:10:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=beca3e311a49cd3c55a056096531737d7afa4361'/>
<id>urn:sha1:beca3e311a49cd3c55a056096531737d7afa4361</id>
<content type='text'>
If mem-type is specified in the device tree
it would end up overriding the record_size
field instead of populating mem_type.

As record_size is currently parsed after the
improper assignment with default size 0 it
continued to work as expected regardless of the
value found in the device tree.

Simply changing the target field of the struct
is enough to get mem-type working as expected.

Fixes: 9d843e8fafc7 ("pstore: Add mem_type property DT parsing support")
Cc: stable@vger.kernel.org
Signed-off-by: Luca Stefani &lt;luca@osomprivacy.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20221222131049.286288-1-luca@osomprivacy.com
</content>
</entry>
<entry>
<title>pstore/ram: Fix error return code in ramoops_probe()</title>
<updated>2022-12-02T23:16:59+00:00</updated>
<author>
<name>Wang Yufen</name>
<email>wangyufen@huawei.com</email>
</author>
<published>2022-12-02T08:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e1fce564900f8734edf15b87f028c57e14f6e28d'/>
<id>urn:sha1:e1fce564900f8734edf15b87f028c57e14f6e28d</id>
<content type='text'>
In the if (dev_of_node(dev) &amp;&amp; !pdata) path, the "err" may be assigned a
value of 0, so the error return code -EINVAL may be incorrectly set
to 0. To fix set valid return code before calling to goto.

Fixes: 35da60941e44 ("pstore/ram: add Device Tree bindings")
Signed-off-by: Wang Yufen &lt;wangyufen@huawei.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/1669969374-46582-1-git-send-email-wangyufen@huawei.com
</content>
</entry>
<entry>
<title>pstore/ram: Set freed addresses to NULL</title>
<updated>2022-10-19T16:25:39+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2022-10-11T20:01:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=06b4e09aab6c1ae6b3991a729d2fcb31e358e7f3'/>
<id>urn:sha1:06b4e09aab6c1ae6b3991a729d2fcb31e358e7f3</id>
<content type='text'>
For good measure, set all the freed addresses to NULL when managing
przs.

Cc: Anton Vorontsov &lt;anton@enomsg.org&gt;
Cc: Colin Cross &lt;ccross@android.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-and-tested-by: Guilherme G. Piccoli &lt;gpiccoli@igalia.com&gt;
Link: https://lore.kernel.org/r/20221011200112.731334-5-keescook@chromium.org
</content>
</entry>
<entry>
<title>pstore/ram: Move internal definitions out of kernel-wide include</title>
<updated>2022-10-17T20:14:32+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2022-10-11T20:01:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8bd4da0f0626ae9a82099d3d99cd6efd4355879b'/>
<id>urn:sha1:8bd4da0f0626ae9a82099d3d99cd6efd4355879b</id>
<content type='text'>
Most of the details of the ram backend are entirely internal to the
backend itself. Leave only what is needed to instantiate a ram backend
in the kernel-wide header.

Cc: Anton Vorontsov &lt;anton@enomsg.org&gt;
Cc: Colin Cross &lt;ccross@android.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-and-tested-by: Guilherme G. Piccoli &lt;gpiccoli@igalia.com&gt;
Link: https://lore.kernel.org/r/20221011200112.731334-4-keescook@chromium.org
</content>
</entry>
<entry>
<title>pstore/ram: Move pmsg init earlier</title>
<updated>2022-10-17T20:14:32+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2022-10-11T20:01:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6daf4e82bd54ef004ace4dd6deed60a32c282a95'/>
<id>urn:sha1:6daf4e82bd54ef004ace4dd6deed60a32c282a95</id>
<content type='text'>
Since the ftrace area can vary in size based on CPU count, move pmsg
initialization earlier so it will have a stable location.

Suggested-by: Paramjit Oberoi &lt;pso@chromium.org&gt;
Cc: Anton Vorontsov &lt;anton@enomsg.org&gt;
Cc: Colin Cross &lt;ccross@android.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed: Guilherme G. Piccoli &lt;gpiccoli@igalia.com&gt;
Link: https://lore.kernel.org/r/20221011200112.731334-3-keescook@chromium.org
</content>
</entry>
<entry>
<title>pstore/ram: Consolidate kfree() paths</title>
<updated>2022-10-17T20:14:32+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2022-10-11T20:01:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3219122b8cdd580f0793e803d4e80ecd7384cf17'/>
<id>urn:sha1:3219122b8cdd580f0793e803d4e80ecd7384cf17</id>
<content type='text'>
There's no reason to keep separate kfree() paths: either all allocations
succeeded, or not. Everything is torn down in the case of failure, so
adjust the callers to reflect this.

Cc: Anton Vorontsov &lt;anton@enomsg.org&gt;
Cc: Colin Cross &lt;ccross@android.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-and-tested-by: Guilherme G. Piccoli &lt;gpiccoli@igalia.com&gt;
Link: https://lore.kernel.org/r/20221011200112.731334-2-keescook@chromium.org
</content>
</entry>
<entry>
<title>pstore: Add mem_type property DT parsing support</title>
<updated>2021-03-31T17:06:23+00:00</updated>
<author>
<name>Mukesh Ojha</name>
<email>mojha@codeaurora.org</email>
</author>
<published>2021-03-22T18:42:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9d843e8fafc7c0b15d8f511d146c0c3d7c816634'/>
<id>urn:sha1:9d843e8fafc7c0b15d8f511d146c0c3d7c816634</id>
<content type='text'>
There could be a scenario where we define some region
in normal memory and use them store to logs which is later
retrieved by bootloader during warm reset.

In this scenario, we wanted to treat this memory as normal
cacheable memory instead of default behaviour which
is an overhead. Making it cacheable could improve
performance.

This commit gives control to change mem_type from Device
tree, and also documents the value for normal memory.

Signed-off-by: Mukesh Ojha &lt;mojha@codeaurora.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/1616438537-13719-1-git-send-email-mojha@codeaurora.org
</content>
</entry>
<entry>
<title>pstore/ram: Introduce max_reason and convert dump_oops</title>
<updated>2020-05-30T17:34:03+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2020-05-13T21:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=791205e3ec6081a8da6f00621e3453d622dc41e7'/>
<id>urn:sha1:791205e3ec6081a8da6f00621e3453d622dc41e7</id>
<content type='text'>
Now that pstore_register() can correctly pass max_reason to the kmesg
dump facility, introduce a new "max_reason" module parameter and
"max-reason" Device Tree field.

The "dump_oops" module parameter and "dump-oops" Device
Tree field are now considered deprecated, but are now automatically
converted to their corresponding max_reason values when present, though
the new max_reason setting has precedence.

For struct ramoops_platform_data, the "dump_oops" member is entirely
replaced by a new "max_reason" member, with the only existing user
updated in place.

Additionally remove the "reason" filter logic from ramoops_pstore_write(),
as that is not specifically needed anymore, though technically
this is a change in behavior for any ramoops users also setting the
printk.always_kmsg_dump boot param, which will cause ramoops to behave as
if max_reason was set to KMSG_DUMP_MAX.

Co-developed-by: Pavel Tatashin &lt;pasha.tatashin@soleen.com&gt;
Signed-off-by: Pavel Tatashin &lt;pasha.tatashin@soleen.com&gt;
Link: https://lore.kernel.org/lkml/20200515184434.8470-6-keescook@chromium.org/
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore/ftrace: Provide ftrace log merging routine</title>
<updated>2020-05-30T17:34:02+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2020-05-08T15:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=16a583079e937f6f5e6274ef7fda6dbf7dcb669f'/>
<id>urn:sha1:16a583079e937f6f5e6274ef7fda6dbf7dcb669f</id>
<content type='text'>
Move the ftrace log merging logic out of pstore/ram into pstore/ftrace
so other backends can use it, like pstore/zone.

Link: https://lore.kernel.org/lkml/20200510202436.63222-7-keescook@chromium.org/
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore/ram: Refactor ftrace buffer merging</title>
<updated>2020-05-30T17:34:02+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2020-05-08T15:34:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df9bf19d88965758c700f46ef75110336fea8654'/>
<id>urn:sha1:df9bf19d88965758c700f46ef75110336fea8654</id>
<content type='text'>
This changes the ftrace record merging code to be agnostic of
pstore/ram, as the first step to making it available as a generic
routine for other backends to use, such as pstore/zone.

Link: https://lore.kernel.org/lkml/20200510202436.63222-6-keescook@chromium.org/
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
</feed>
