2018-12-12 08:26:03

by WeiXiong Liao

[permalink] [raw]
Subject: [PATCH] pstore: fix crypto dependencies of 842/zstd compression

Reference to commit 58eb5b670747 ("pstore: fix crypto dependencies"),
which fixed crypto dependencies of deflate, lzo, lz4 and lz4hc
compression, but omitted 842 and newer compression zstd from
commit 1021bcf44d0e ("pstore: add zstd compression support")

Signed-off-by: liaoweixiong <[email protected]>
---
fs/pstore/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig
index 0d19d19..7068f45 100644
--- a/fs/pstore/Kconfig
+++ b/fs/pstore/Kconfig
@@ -44,14 +44,14 @@ config PSTORE_LZ4HC_COMPRESS
This option enables LZ4HC (high compression) mode algorithm.

config PSTORE_842_COMPRESS
- bool "842 compression"
+ tristate "842 compression"
depends on PSTORE
select CRYPTO_842
help
This option enables 842 compression algorithm support.

config PSTORE_ZSTD_COMPRESS
- bool "zstd compression"
+ tristate "zstd compression"
depends on PSTORE
select CRYPTO_ZSTD
help
--
1.9.1



2018-12-12 18:44:51

by Kees Cook

[permalink] [raw]
Subject: Re: [PATCH] pstore: fix crypto dependencies of 842/zstd compression

On Wed, Dec 12, 2018 at 12:24 AM liaoweixiong
<[email protected]> wrote:
>
> Reference to commit 58eb5b670747 ("pstore: fix crypto dependencies"),
> which fixed crypto dependencies of deflate, lzo, lz4 and lz4hc
> compression, but omitted 842 and newer compression zstd from
> commit 1021bcf44d0e ("pstore: add zstd compression support")
>
> Signed-off-by: liaoweixiong <[email protected]>

Were you seeing build or config failures without this patch?

-Kees

> ---
> fs/pstore/Kconfig | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig
> index 0d19d19..7068f45 100644
> --- a/fs/pstore/Kconfig
> +++ b/fs/pstore/Kconfig
> @@ -44,14 +44,14 @@ config PSTORE_LZ4HC_COMPRESS
> This option enables LZ4HC (high compression) mode algorithm.
>
> config PSTORE_842_COMPRESS
> - bool "842 compression"
> + tristate "842 compression"
> depends on PSTORE
> select CRYPTO_842
> help
> This option enables 842 compression algorithm support.
>
> config PSTORE_ZSTD_COMPRESS
> - bool "zstd compression"
> + tristate "zstd compression"
> depends on PSTORE
> select CRYPTO_ZSTD
> help
> --
> 1.9.1
>


--
Kees Cook

2018-12-13 04:40:17

by WeiXiong Liao

[permalink] [raw]
Subject: Re: [PATCH] pstore: fix crypto dependencies of 842/zstd compression

In fast, there is no any failure while building or configuring on the
newest codes.

The patch of commit 58eb5b670747 ("pstore: fix crypto dependencies")
makes the pstore itself select the crypto core if PSTORE_COMPRESS is
set. This fixes the dependence bug at all in my tests.
But this patch also turns the sub-options from 'bool' into 'tristate'.
It's ok, but makes sub-options different between deflate, lzo, lz4,
lz4hc and 842, zstd. So, my patch just keeps them in line.
How about to make all these sub-options as 'bool'? These compressions
are just function options but not module. Otherwise, it's not about
fixing crypto dependencies.

在 2018年12月13日 02:43, Kees Cook 写道:
> On Wed, Dec 12, 2018 at 12:24 AM liaoweixiong
> <[email protected]> wrote:
>>
>> Reference to commit 58eb5b670747 ("pstore: fix crypto dependencies"),
>> which fixed crypto dependencies of deflate, lzo, lz4 and lz4hc
>> compression, but omitted 842 and newer compression zstd from
>> commit 1021bcf44d0e ("pstore: add zstd compression support")
>>
>> Signed-off-by: liaoweixiong <[email protected]>
>
> Were you seeing build or config failures without this patch?
>
> -Kees
>
>> ---
>> fs/pstore/Kconfig | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig
>> index 0d19d19..7068f45 100644
>> --- a/fs/pstore/Kconfig
>> +++ b/fs/pstore/Kconfig
>> @@ -44,14 +44,14 @@ config PSTORE_LZ4HC_COMPRESS
>> This option enables LZ4HC (high compression) mode algorithm.
>>
>> config PSTORE_842_COMPRESS
>> - bool "842 compression"
>> + tristate "842 compression"
>> depends on PSTORE
>> select CRYPTO_842
>> help
>> This option enables 842 compression algorithm support.
>>
>> config PSTORE_ZSTD_COMPRESS
>> - bool "zstd compression"
>> + tristate "zstd compression"
>> depends on PSTORE
>> select CRYPTO_ZSTD
>> help
>> --
>> 1.9.1
>>
>
>

2018-12-14 01:49:13

by WeiXiong Liao

[permalink] [raw]
Subject: Re: [PATCH] pstore: fix crypto dependencies of 842/zstd compression



在 2018年12月13日 02:43, Kees Cook 写道:
> On Wed, Dec 12, 2018 at 12:24 AM liaoweixiong
> <[email protected]> wrote:
>>
>> Reference to commit 58eb5b670747 ("pstore: fix crypto dependencies"),
>> which fixed crypto dependencies of deflate, lzo, lz4 and lz4hc
>> compression, but omitted 842 and newer compression zstd from
>> commit 1021bcf44d0e ("pstore: add zstd compression support")
>>
>> Signed-off-by: liaoweixiong <[email protected]>
>
> Were you seeing build or config failures without this patch?
>
testsdfsdf
> -Kees
>
>> ---
>> fs/pstore/Kconfig | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig
>> index 0d19d19..7068f45 100644
>> --- a/fs/pstore/Kconfig
>> +++ b/fs/pstore/Kconfig
>> @@ -44,14 +44,14 @@ config PSTORE_LZ4HC_COMPRESS
>> This option enables LZ4HC (high compression) mode algorithm.
>>
>> config PSTORE_842_COMPRESS
>> - bool "842 compression"
>> + tristate "842 compression"
>> depends on PSTORE
>> select CRYPTO_842
>> help
>> This option enables 842 compression algorithm support.
>>
>> config PSTORE_ZSTD_COMPRESS
>> - bool "zstd compression"
>> + tristate "zstd compression"
>> depends on PSTORE
>> select CRYPTO_ZSTD
>> help
>> --
>> 1.9.1
>>
>
>

2018-12-17 09:06:55

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH] pstore: fix crypto dependencies of 842/zstd compression

Hi liaoweixiong,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on kees/for-next/pstore]
[also build test ERROR on v4.20-rc7 next-20181214]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/liaoweixiong/pstore-fix-crypto-dependencies-of-842-zstd-compression/20181214-222645
base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All errors (new ones prefixed by >>):

fs/pstore/platform.o: In function `zbufsize_zstd':
>> platform.c:(.text+0x30a): undefined reference to `ZSTD_compressBound'

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (1.00 kB)
.config.gz (64.48 kB)
Download all attachments

2018-12-18 08:05:25

by WeiXiong Liao

[permalink] [raw]
Subject: Re: [PATCH] pstore: fix crypto dependencies of 842/zstd compression

hi ,
On 2018/12/17 16:16, kbuild test robot wrote:
> Hi liaoweixiong,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on kees/for-next/pstore]
> [also build test ERROR on v4.20-rc7 next-20181214]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/liaoweixiong/pstore-fix-crypto-dependencies-of-842-zstd-compression/20181214-222645
> base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
> config: i386-allmodconfig (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386
>
> All errors (new ones prefixed by >>):
>
> fs/pstore/platform.o: In function `zbufsize_zstd':
>>> platform.c:(.text+0x30a): undefined reference to `ZSTD_compressBound'
Yes, i reproduced it. I had made a new patch in version 2.
On new patch, i try to trun sub-options of compression back to 'bool'
for more rigorous.

Commit info like this:
On commit 58eb5b670747 ("pstore: fix crypto dependencies"),
dependency bug was fixed by selecting the crypto core rather than
turned compression sub-options to 'tristate'.
In addition, these options are used to enable/disable compression. They
are not modules, and mean nothing when set to 'M'.
So, this patch is going to turn them back to 'bool'.

>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>