Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1043047rwb; Thu, 1 Dec 2022 11:32:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf4leiAQAMuZKdHn0LbZm6Jz6ykk7BL9p0YdTDn1TnlZshbFgwAXrIrmEQrY2WIN2TIpJg8Y X-Received: by 2002:a05:6402:4445:b0:468:eef6:a83c with SMTP id o5-20020a056402444500b00468eef6a83cmr6841698edb.191.1669923139532; Thu, 01 Dec 2022 11:32:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669923139; cv=none; d=google.com; s=arc-20160816; b=IdgIuYPHGxslR506wOYBP09L+tQKgW160kqmmLNDpSdPET7h/I0YHDbVcsoqbS8erV tcZZgTtflfIE18kNQEfg57rmhiVXzE9svAzLTX7DHDqDGOHPAHda+RENVw7EYWos0T9h NUgXyipa55m11nAayhCTPaB0BLq5rIA5b9vim8NgbruqEpN7RBcxw5o/iBp55cif4dPO iaoYSF2EQ1n4LX724JdAULdKMYTVrEyJp5IOyiLsFWLDg01YZyjkodxPwBe8/Y4p123S o85qcQc6uJPEanmGqDS+HP1z2folN435IXrTBJwxH/T+JXtIpX9YFr0lIbDUuExFCBue jd+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/hJ9fxb1Un5vBpqfZfVi4l38j1NAu0YQeZp+QRZtsm4=; b=ESgoGQYEvqPrBJyUBZMWWWjyMM62Zs5xF6aCje5/cYbKUUZ5oTd1bSYo7J00LUyzmQ gZQb0Oj1sqimYuVKB5yKNk42Zk82ksmYqN87D7eI1pSArEH80jvPxIDvN0rVM/0y43y9 l4hyKIjj0Pk6kNgrvQ7GCtB+R23V31yx7lJpw6nQu0omrwYoMKGZj4hrtb7Crj8yTtkm +1epjoSyDsSKUwaZu/wtjxaAaFI52Ce1rxqFZe7gHm0uQ1YwwdkLpEMyz0Yuhk0pvd0G M5lvMp+p4aEOPkwEL7hLcv4hb/6uX0hL+uizpXVf2GBHPx1OTambYPHelPPZxjn+9ikT dylQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rD8FMgQu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rn5-20020a170906d92500b007ac9a51342asi3284292ejb.188.2022.12.01.11.31.59; Thu, 01 Dec 2022 11:32:19 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rD8FMgQu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230083AbiLAT3U (ORCPT + 82 others); Thu, 1 Dec 2022 14:29:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbiLAT3S (ORCPT ); Thu, 1 Dec 2022 14:29:18 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57D41C7D27; Thu, 1 Dec 2022 11:29:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 09BCBB8201E; Thu, 1 Dec 2022 19:29:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B662C433C1; Thu, 1 Dec 2022 19:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669922954; bh=J43MOZ0js3CHpA7AwpgZh/EydKVlRQh87fdR90KbnRY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rD8FMgQukf48d4Y/QPh3LFy1sKkP4JdDiYxMhNO1HuDyXbeuu2h1PdaNULgR0hGQe wFaZCPUQEb8RU91EGwviDwhqZdxY3AfXn8b2kbTP04i0meZBQANgEIK1A0ERAoDAei 5TUlrcpjwRQTyIh2gzYQFKPbq4mvlYEmtW7+vbZRkVljcGHrWVckv6QevxieIcM5N4 OFfoeVkAHCG6dWQW7KVJeRWJesoh6r0LHfe9JUbGVABT96mHwUORX8oD3f3olmsJtk 7DwwqZXiVIe+eRWKqD39Lqf35JDJHlfySWNA7riEZS6sCn+3OyuRSYJQ8RB5vAs/am XhhuxhCEN9G2Q== Date: Thu, 1 Dec 2022 11:29:12 -0800 From: Eric Biggers To: Tianjia Zhang 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 Subject: Re: [PATCH v4 0/2] Add SM4 XTS symmetric algorithm for blk-crypto and fscrypt Message-ID: References: <20221201125819.36932-1-tianjia.zhang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221201125819.36932-1-tianjia.zhang@linux.alibaba.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 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