<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/pstore.h, branch v4.19.43</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.43</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.43'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-12-17T08:24:39Z</updated>
<entry>
<title>pstore/ram: Correctly calculate usable PRZ bytes</title>
<updated>2018-12-17T08:24:39Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2018-11-01T23:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ce469db0943bb633a8e8bdd288e45b228295d449'/>
<id>urn:sha1:ce469db0943bb633a8e8bdd288e45b228295d449</id>
<content type='text'>
[ Upstream commit 89d328f637b9904b6d4c9af73c8a608b8dd4d6f8 ]

The actual number of bytes stored in a PRZ is smaller than the
bytes requested by platform data, since there is a header on each
PRZ. Additionally, if ECC is enabled, there are trailing bytes used
as well. Normally this mismatch doesn't matter since PRZs are circular
buffers and the leading "overflow" bytes are just thrown away. However, in
the case of a compressed record, this rather badly corrupts the results.

This corruption was visible with "ramoops.mem_size=204800 ramoops.ecc=1".
Any stored crashes would not be uncompressable (producing a pstorefs
"dmesg-*.enc.z" file), and triggering errors at boot:

  [    2.790759] pstore: crypto_comp_decompress failed, ret = -22!

Backporting this depends on commit 70ad35db3321 ("pstore: Convert console
write to use -&gt;write_buf")

Reported-by: Joel Fernandes &lt;joel@joelfernandes.org&gt;
Fixes: b0aad7a99c1d ("pstore: Add compression support to pstore")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>pstore: Convert internal records to timespec64</title>
<updated>2018-06-05T23:57:31Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2018-05-14T22:50:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7aaa822ed060719bd4ea012609883b6bc6950508'/>
<id>urn:sha1:7aaa822ed060719bd4ea012609883b6bc6950508</id>
<content type='text'>
This prepares pstore for converting the VFS layer to timespec64.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Deepa Dinamani &lt;deepa.kernel@gmail.com&gt;
</content>
</entry>
<entry>
<title>pstore: Populate pstore record-&gt;time field</title>
<updated>2017-05-31T17:13:44Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-05-19T22:29:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c7f3c595f6ff7a1cfbf7ac782722bf5173e27775'/>
<id>urn:sha1:c7f3c595f6ff7a1cfbf7ac782722bf5173e27775</id>
<content type='text'>
The current time will be initially available in the record-&gt;time field
for all pstore_read() and pstore_write() calls. Backends can either
update the field during read(), or use the field during write() instead
of fetching time themselves.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore: Remove write_buf() callback</title>
<updated>2017-03-07T22:01:02Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-03-06T06:41:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4c9ec219766a217468fb94a281c416455a884dda'/>
<id>urn:sha1:4c9ec219766a217468fb94a281c416455a884dda</id>
<content type='text'>
Now that write() and write_buf() are functionally identical, this removes
write_buf(), and renames write_buf_user() to write_user(). Additionally
adds sanity-checks for pstore_info's declared functions and flags at
registration time.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore: Replace arguments for write_buf_user() API</title>
<updated>2017-03-07T22:01:01Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-03-05T08:56:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fdd0311863b32b42bb2c54e60c987bbbabc0c430'/>
<id>urn:sha1:fdd0311863b32b42bb2c54e60c987bbbabc0c430</id>
<content type='text'>
Removes argument list in favor of pstore record, though the user buffer
remains passed separately since it must carry the __user annotation.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore: Replace arguments for write_buf() API</title>
<updated>2017-03-07T22:01:01Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-03-05T08:27:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b10b471145f28c219d9ddcc309a67e053776865a'/>
<id>urn:sha1:b10b471145f28c219d9ddcc309a67e053776865a</id>
<content type='text'>
As with the other API updates, this removes the long argument list in favor
of passing a single pstore recaord.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore: Replace arguments for erase() API</title>
<updated>2017-03-07T22:01:00Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-03-05T07:31:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a61072aae693ba08390f92eed1dd0573fa5c3cd9'/>
<id>urn:sha1:a61072aae693ba08390f92eed1dd0573fa5c3cd9</id>
<content type='text'>
This removes the argument list for the erase() callback and replaces it
with a pointer to the backend record details to be removed.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore: Replace arguments for write() API</title>
<updated>2017-03-07T22:00:56Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-03-04T07:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=76cc9580e3fbd323651d06e8184a5a54e0e1066e'/>
<id>urn:sha1:76cc9580e3fbd323651d06e8184a5a54e0e1066e</id>
<content type='text'>
Similar to the pstore_info read() callback, there were too many arguments.
This switches to the new struct pstore_record pointer instead. This adds
"reason" and "part" to the record structure as well.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore: Replace arguments for read() API</title>
<updated>2017-03-07T22:00:55Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-03-04T06:09:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=125cc42baf8ab2149c207f8a360ea25668b8422d'/>
<id>urn:sha1:125cc42baf8ab2149c207f8a360ea25668b8422d</id>
<content type='text'>
The argument list for the pstore_read() interface is unwieldy. This changes
passes the new struct pstore_record instead. The erst backend was already
doing something similar internally.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore: Extract common arguments into structure</title>
<updated>2017-03-07T22:00:53Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-03-04T00:59:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9abdcccc3d5f3c72f25cd48160f60d911353bee9'/>
<id>urn:sha1:9abdcccc3d5f3c72f25cd48160f60d911353bee9</id>
<content type='text'>
The read/mkfile pair pass the same arguments and should be cleared
between calls. Move to a structure and wipe it after every loop.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
</feed>
