Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp429632imu; Wed, 12 Dec 2018 20:40:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wdz6qrUhKq1+hWSq5x0xh21wZrhM74HbOS36IZzTnB988v7+gJlrBCD78/d+MPFQWTdpjG X-Received: by 2002:a62:520b:: with SMTP id g11mr23049723pfb.53.1544676017778; Wed, 12 Dec 2018 20:40:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544676017; cv=none; d=google.com; s=arc-20160816; b=G20P3wSwbfhhl4T2T7ilkbXXOf185lXjB2fVEpmFobdXyqGdAaPx0rbseA5f0E7zAR hvxDcmHAL5EwdLTc0Be4aPwNRdISEQne4XAsit1CnMggGy5MJt1SvCgpM+0Q2YPKXYY+ +PpPPpqTE2nxKq0Lzaf8LbpunCaeu4CQBL3HX1VjEcgLab2tx9FJr2EhLf4Qwmk1YEYA LeoVS+ic4Y6E4ylu0xF9JcIXZ2koYDhgEN0cc3/zUCbjKIG/Apbfgm1kLxncHGJ90Q/P kz8EML83h8OxZO25fhZ8quJcQKLK0Mf+/KvLoQCNahbpVyL9Fk+Cta619DA7AnnI/7sg OwMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=GUqO9TarSMpbULOV3D7x+UkuaCTNQkVA5qGC2iPS7TY=; b=095MOhfxxraP8GlmcZcCt0Seve1Rl2z3nfHjsufjloQRJUUKHL6u7aCzIlffypIteB l95MwLszJkL7W476PLolzjrxZOcRqDNPpLYZiA0Oq89hUc/ce/meKOhaxOo+ps+eHmWN C/+PNaF/2bo34l1lLmqdSzeqA1M71DLAUkeMGASM7GJGQVMGDQNlZFMYmNCHBfxZnzMH enzxeKV76/1z5iWXvWcmmK51OxyoxvOx6apfJR4LggvLdLs17ivU+9TdOiS/bh/Ojv0A r1QGCkA+kXkGEdrdVyouIThGKtHrRi5dNffqA98NQhTXPw28YlqRSEkccOgxd2Mm75gZ 0AkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 87si682717pfs.7.2018.12.12.20.40.03; Wed, 12 Dec 2018 20:40:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729297AbeLMEjO (ORCPT + 99 others); Wed, 12 Dec 2018 23:39:14 -0500 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]:54179 "EHLO smtp2207-205.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728651AbeLMEjM (ORCPT ); Wed, 12 Dec 2018 23:39:12 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07451554|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e01e01534;MF=liaoweixiong@allwinnertech.com;NM=1;PH=DS;RN=5;RT=5;SR=0;TI=SMTPD_---.DWhK5Rk_1544675945; Received: from 172.16.10.102(mailfrom:liaoweixiong@allwinnertech.com fp:SMTPD_---.DWhK5Rk_1544675945) by smtp.aliyun-inc.com(10.147.43.230); Thu, 13 Dec 2018 12:39:06 +0800 Subject: Re: [PATCH] pstore: fix crypto dependencies of 842/zstd compression To: Kees Cook Cc: Anton Vorontsov , Colin Cross , Tony Luck , LKML References: <1544603038-9373-1-git-send-email-liaoweixiong@allwinnertech.com> From: =?UTF-8?B?5buW5aiB6ZuE?= Message-ID: <44ffbb80-37ab-b597-459b-1037f42d726d@allwinnertech.com> Date: Thu, 13 Dec 2018 12:39:05 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 > > 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 >> > >