<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/pstore/Kconfig, branch linux-7.1.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-07-17T23:08:58+00:00</updated>
<entry>
<title>pstore: Replace crypto API compression with zlib_deflate library calls</title>
<updated>2023-07-17T23:08:58+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2023-07-12T16:23:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=438b805003a07606f9a9f222a7ddb7dcdb87aeaa'/>
<id>urn:sha1:438b805003a07606f9a9f222a7ddb7dcdb87aeaa</id>
<content type='text'>
Pstore supports compression using a variety of algorithms exposed by the
crypto API. This uses the deprecated comp (as opposed to scomp/acomp)
API, and so we should stop using that, and either move to the new API,
or switch to a different approach entirely.

Given that we only compress ASCII text in pstore, and considering that
this happens when the system is likely to be in an unstable state, the
flexibility that the complex crypto API provides does not outweigh its
impact on the risk that we might encounter additional problems when
trying to commit the kernel log contents to the pstore backend.

So let's switch [back] to the zlib deflate library API, and remove all
the complexity that really has no place in a low-level diagnostic
facility. Note that, while more modern compression algorithms have been
added to the kernel in recent years, the code size of zlib deflate is
substantially smaller than, e.g., zstd, while its performance in terms
of compression ratio is comparable for ASCII text, and speed is deemed
irrelevant in this context.

Note that this means that compressed pstore records may no longer be
accessible after a kernel upgrade, but this has never been part of the
contract. (The choice of compression algorithm is not stored in the
pstore records either)

Tested-by: "Guilherme G. Piccoli" &lt;gpiccoli@igalia.com&gt; # Steam Deck
Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Reviewed-by: Eric Biggers &lt;ebiggers@google.com&gt;
Link: https://lore.kernel.org/r/20230712162332.2670437-3-ardb@kernel.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES</title>
<updated>2022-12-23T18:33:27+00:00</updated>
<author>
<name>John Stultz</name>
<email>jstultz@google.com</email>
</author>
<published>2022-12-21T05:18:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f4fec5943407318b9523f01ce1f5d668c028332'/>
<id>urn:sha1:2f4fec5943407318b9523f01ce1f5d668c028332</id>
<content type='text'>
In commit 76d62f24db07 ("pstore: Switch pmsg_lock to an rt_mutex
to avoid priority inversion") I changed a lock to an rt_mutex.

However, its possible that CONFIG_RT_MUTEXES is not enabled,
which then results in a build failure, as the 0day bot detected:
  https://lore.kernel.org/linux-mm/202212211244.TwzWZD3H-lkp@intel.com/

Thus this patch changes CONFIG_PSTORE_PMSG to select
CONFIG_RT_MUTEXES, which ensures the build will not fail.

Cc: Wei Wang &lt;wvw@google.com&gt;
Cc: Midas Chien&lt;midaschieh@google.com&gt;
Cc: Connor O'Brien &lt;connoro@google.com&gt;
Cc: Kees Cook &lt;keescook@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;
Cc: kernel test robot &lt;lkp@intel.com&gt;
Cc: kernel-team@android.com
Fixes: 76d62f24db07 ("pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: John Stultz &lt;jstultz@google.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20221221051855.15761-1-jstultz@google.com
</content>
</entry>
<entry>
<title>Revert "mark pstore-blk as broken"</title>
<updated>2021-11-17T00:23:42+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2021-11-16T18:15:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d1faacbf67b1944f0e0c618dc581d929263f6fe9'/>
<id>urn:sha1:d1faacbf67b1944f0e0c618dc581d929263f6fe9</id>
<content type='text'>
This reverts commit d07f3b081ee632268786601f55e1334d1f68b997.

pstore-blk was fixed to avoid the unwanted APIs in commit 7bb9557b48fc
("pstore/blk: Use the normal block device I/O path"), which landed in
the same release as the commit adding BROKEN.

Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20211116181559.3975566-1-keescook@chromium.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>mark pstore-blk as broken</title>
<updated>2021-06-14T14:26:03+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-06-08T16:13:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d07f3b081ee632268786601f55e1334d1f68b997'/>
<id>urn:sha1:d07f3b081ee632268786601f55e1334d1f68b997</id>
<content type='text'>
pstore-blk just pokes directly into the pagecache for the block
device without going through the file operations for that by faking
up it's own file operations that do not match the block device ones.

As this breaks the control of the block layer of it's page cache,
and even now just works by accident only the best thing is to just
disable this driver.

Fixes: 17639f67c1d6 ("pstore/blk: Introduce backend for block devices")
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20210608161327.1537919-1-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>pstore: Move kmsg_bytes default into Kconfig</title>
<updated>2020-12-01T20:09:17+00:00</updated>
<author>
<name>Vasile-Laurentiu Stanimir</name>
<email>vasile-laurentiu.stanimir@windriver.com</email>
</author>
<published>2020-11-04T13:05:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=26fecbf7602dd69b649914e61526bd67c557fece'/>
<id>urn:sha1:26fecbf7602dd69b649914e61526bd67c557fece</id>
<content type='text'>
While kmsg_bytes can be set for pstore via mount, if a crash occurs
before the mount only partial console log will be stored as kmsg_bytes
defaults to a potentially different hardcoded value in the kernel
(PSTORE_DEFAULT_KMSG_BYTES). This makes it impossible to analyze valuable
post-mortem data especially on the embedded development or in the process
of bringing up new boards. Change this value to be a Kconfig option
with the default of old PSTORE_DEFAULT_KMSG_BYTES

Signed-off-by: Vasile-Laurentiu Stanimir &lt;vasile-laurentiu.stanimir@windriver.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>Documentation: Add details for pstore/blk</title>
<updated>2020-05-30T17:34:03+00:00</updated>
<author>
<name>WeiXiong Liao</name>
<email>liaoweixiong@allwinnertech.com</email>
</author>
<published>2020-03-25T08:55:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=649304c936cd4d2a2128bb877044772416c7d4f5'/>
<id>urn:sha1:649304c936cd4d2a2128bb877044772416c7d4f5</id>
<content type='text'>
Add details on using pstore/blk, the new backend of pstore to record
dumps to block devices, in Documentation/admin-guide/pstore-blk.rst

Signed-off-by: WeiXiong Liao &lt;liaoweixiong@allwinnertech.com&gt;
Link: https://lore.kernel.org/lkml/20200511233229.27745-7-keescook@chromium.org/
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore/zone,blk: Add ftrace frontend support</title>
<updated>2020-05-30T17:34:03+00:00</updated>
<author>
<name>WeiXiong Liao</name>
<email>liaoweixiong@allwinnertech.com</email>
</author>
<published>2020-03-25T08:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=34327e9fd213414b35eb70aa512c4e39b2095907'/>
<id>urn:sha1:34327e9fd213414b35eb70aa512c4e39b2095907</id>
<content type='text'>
Support backend for ftrace. To enable ftrace backend, just make
ftrace_size be greater than 0 and a multiple of 4096.

Signed-off-by: WeiXiong Liao &lt;liaoweixiong@allwinnertech.com&gt;
Link: https://lore.kernel.org/lkml/20200511233229.27745-6-keescook@chromium.org/
Co-developed-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Link: https://lore.kernel.org/lkml/20200512170719.221514-1-colin.king@canonical.com
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore/zone,blk: Add console frontend support</title>
<updated>2020-05-30T17:34:03+00:00</updated>
<author>
<name>WeiXiong Liao</name>
<email>liaoweixiong@allwinnertech.com</email>
</author>
<published>2020-03-25T08:55:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cc9c4d1b5597167f8e8c92f6b61e1cda6d01884d'/>
<id>urn:sha1:cc9c4d1b5597167f8e8c92f6b61e1cda6d01884d</id>
<content type='text'>
Support backend for console. To enable console backend, just make
console_size be greater than 0 and a multiple of 4096.

Signed-off-by: WeiXiong Liao &lt;liaoweixiong@allwinnertech.com&gt;
Link: https://lore.kernel.org/lkml/20200511233229.27745-5-keescook@chromium.org/
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore/zone,blk: Add support for pmsg frontend</title>
<updated>2020-05-30T17:34:03+00:00</updated>
<author>
<name>WeiXiong Liao</name>
<email>liaoweixiong@allwinnertech.com</email>
</author>
<published>2020-03-25T08:54:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0dc068265a1c5923ffebf40388fbe93050a77ad1'/>
<id>urn:sha1:0dc068265a1c5923ffebf40388fbe93050a77ad1</id>
<content type='text'>
Add pmsg support to pstore/blk (through pstore/zone). To enable, pmsg_size
must be greater than 0 and a multiple of 4096.

Signed-off-by: WeiXiong Liao &lt;liaoweixiong@allwinnertech.com&gt;
Link: https://lore.kernel.org/lkml/20200511233229.27745-4-keescook@chromium.org/
Co-developed-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Link: https://lore.kernel.org/lkml/20200512171932.222102-1-colin.king@canonical.com
Co-developed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>pstore/blk: Introduce backend for block devices</title>
<updated>2020-05-30T17:34:03+00:00</updated>
<author>
<name>WeiXiong Liao</name>
<email>liaoweixiong@allwinnertech.com</email>
</author>
<published>2020-03-25T08:54:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=17639f67c1d61aba3c05e7703f75cd468f9d484f'/>
<id>urn:sha1:17639f67c1d61aba3c05e7703f75cd468f9d484f</id>
<content type='text'>
pstore/blk is similar to pstore/ram, but uses a block device as the
storage rather than persistent ram.

The pstore/blk backend solves two common use-cases that used to preclude
using pstore/ram:
- not all devices have a battery that could be used to persist
  regular RAM across power failures.
- most embedded intelligent equipment have no persistent ram, which
  increases costs, instead preferring cheaper solutions, like block
  devices.

pstore/blk provides separate configurations for the end user and for the
block drivers. User configuration determines how pstore/blk operates, such
as record sizes, max kmsg dump reasons, etc. These can be set by Kconfig
and/or module parameters, but module parameter have priority over Kconfig.
Driver configuration covers all the details about the target block device,
such as total size of the device and how to perform read/write operations.
These are provided by block drivers, calling pstore_register_blkdev(),
including an optional panic_write callback used to bypass regular IO
APIs in an effort to avoid potentially destabilized kernel code during
a panic.

Signed-off-by: WeiXiong Liao &lt;liaoweixiong@allwinnertech.com&gt;
Link: https://lore.kernel.org/lkml/20200511233229.27745-3-keescook@chromium.org/
Co-developed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
</feed>
