Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1994373rwb; Fri, 2 Dec 2022 04:12:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf7v2mnd8ZqO9gQZN6x48Vd6xHKEPRtVo9Bi8qENDKX0XLBRh1+L1MJu56byneLw/9dMjVHK X-Received: by 2002:a17:902:d395:b0:189:58a9:14aa with SMTP id e21-20020a170902d39500b0018958a914aamr41117075pld.22.1669983125928; Fri, 02 Dec 2022 04:12:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669983125; cv=none; d=google.com; s=arc-20160816; b=oDtLAO3Z/gfA7f4YKO7yKFMfuxvZyCJxpPaZnXm9zbXabLk+scwy7j4co3jGCZefb5 axR2xNoX9Y0jaAFYwnYMHjceF8BJ1bj8Ntpv8gcqtQ9dX38mOoOHrMOoMhwgVQtJ3g2S u+KdQO/RtIxuwN3njWxqCzy6VO3zEYLVv1ufWkpzpVWsN+5psdgzQaO04t0gMbqlBZwu qStrxOw6/33I10koCo1DJtMdAf7hRDh59ZpKw0gGCnAbYvDW0PGfuHPJRE6NHKg6jnzp 4bVWhptTy8yn01GAc/WIzlD+ixyU6kkvSMncTnpZl8bDQ+MVUQ1WEII/qS5XV4nbFEuU d7+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=H4J1QlBm7jrozra/0CF+oQn5ERBHrQtWBr58qHx2qtU=; b=xy2dpUvQ3K1eeEbleUjH7R6qsMs6TembYForBJfdi5EIVVBsxDYupBUfdNEITRg0Tq yBjaxKZPBYY5AW54H8i/LwTJaLHXxYmnvYnz5MpT0V+UMm0iYHsd/Dy9IoDscl8yJzVg XP9DsVlhXm1scMaN52nyCIxXNS7C9Vme4X4whvQhUi0tKDfP0sZnSQ7Fdnh6JaHoUubw hBmZXYRU7OvuRxaQc2mlQm40e4zCj6y8yuK3r9AFRsIgNBdG66b1S9JfPxTvIR+KKFae TOwX9srDDVvFQRixGatfQuD0QQxYP64CBwDo3BtIGM2t2rV4R4s8Z3D1EeixGVyhZqwQ FYVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jw10-20020a170903278a00b001871e838ba9si6571276plb.344.2022.12.02.04.11.54; Fri, 02 Dec 2022 04:12:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233146AbiLBMCG (ORCPT + 83 others); Fri, 2 Dec 2022 07:02:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233419AbiLBMB6 (ORCPT ); Fri, 2 Dec 2022 07:01:58 -0500 Received: from out30-1.freemail.mail.aliyun.com (out30-1.freemail.mail.aliyun.com [115.124.30.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D827A5558; Fri, 2 Dec 2022 04:01:57 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R931e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VWE9a8o_1669982512; Received: from 30.32.112.227(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0VWE9a8o_1669982512) by smtp.aliyun-inc.com; Fri, 02 Dec 2022 20:01:53 +0800 Message-ID: <4ac71618-030a-e198-2885-f5f06d8483b3@linux.alibaba.com> Date: Fri, 2 Dec 2022 20:01:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH v4 0/2] Add SM4 XTS symmetric algorithm for blk-crypto and fscrypt Content-Language: en-US To: Eric Biggers Cc: "Theodore Y. Ts o" , Jaegeuk Kim , Jonathan Corbet , Jens Axboe , Ard Biesheuvel , Bagas Sanjaya , linux-fscrypt@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org References: <20221201125819.36932-1-tianjia.zhang@linux.alibaba.com> From: Tianjia Zhang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eric, On 12/2/22 3:29 AM, Eric Biggers wrote: > On Thu, Dec 01, 2022 at 08:58:17PM +0800, Tianjia Zhang wrote: >> SM4 is widely used in China's data encryption software and hardware. >> these algoritms are mandatory in many scenarios. This serial of >> patches enables the SM4-XTS algorithm in blk-crypto and enables the >> SM4-XTS/CTS algorithm in fscrypt to encrypt file content and filename. >> >> v4 changes: >> - only allow the SM4 XTS/CTS algorithm in policy v2 for fscrypt >> - update git commit message >> >> v3 change: >> - update git commit message >> >> v2 change: >> - As Eric said, the new FSCRYPT_MODE is defined for the unused numbers 7 and 8 >> >> Tianjia Zhang (2): >> blk-crypto: Add support for SM4-XTS blk crypto mode >> fscrypt: Add SM4 XTS/CTS symmetric algorithm support >> >> Documentation/filesystems/fscrypt.rst | 1 + >> block/blk-crypto.c | 6 ++++++ >> fs/crypto/keysetup.c | 15 +++++++++++++++ >> fs/crypto/policy.c | 5 +++++ >> include/linux/blk-crypto.h | 1 + >> include/uapi/linux/fscrypt.h | 2 ++ >> 6 files changed, 30 insertions(+) > > Applied. I don't think anyone should actually use this, but with the SM* > algorithms turning up everywhere these days, and people seemingly being totally > okay with that for some reason, I don't think it's fair for me to reject this. > > - Eric Thanks, this is really frustrating, still very grateful for your advice and review. Best regards, Tianjia