From patchwork Wed Nov 16 08:24:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tianjia Zhang X-Patchwork-Id: 1725 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp24894wru; Wed, 16 Nov 2022 00:34:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf6E2y/iJl4jxXk/1dFXZTu3oPA9YllYmLML/Cy2KvIInWTaC2H1x505HwR1+UxQFmKAcMm5 X-Received: by 2002:a17:90a:9e9:b0:20d:b124:33b1 with SMTP id 96-20020a17090a09e900b0020db12433b1mr2513503pjo.202.1668587650952; Wed, 16 Nov 2022 00:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668587650; cv=none; d=google.com; s=arc-20160816; b=kTAoVV6hA7vCWwl4xUE+gKE+Wm/q00IUj91dYB3OCCqcZzbEZ4tCcE0tTKXHgMkq4N YEPbvZlD6yQaZDNaTkAouKpo2THmiYZQ0pb8LFoKiWaPPCxuh2F3rhZTxcWQvfCCpQrK sDeQVmfD7isYblRNAnHuoLDci/7yYXjF2YGUTVrQkVhi8ARj0QTsxaMtnqWcoIA+kmnw 1WEBxVbgqiexheXaBveBjQqD3Mw/9h7fhY8+kWK9AO/E9rx/NQg9A3jYbVB5z4M2R5CI FBSNH6hi3qgeXa+Q6YF6fg1TWUPl0iTv8GfxowzKuixqikP1Ox/K3qmcQc+84C/jWase keQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=kMudU1jIiwjPzm/+jKN/OYP/himAzAhCkDI3SvcrNuk=; b=d4hA3D1bWwiHtGB6S6Sy1LmbR/axh/mTaJcHn/kLNSvCaWwsAh1x7No63FNehIrfdN qQZPuJ9ulf9eA+/H7fyJoFv35LC7zuGYsX05I3rujVqvaBVvGvvk9A7X6WFnSitFmnkT 936bXSUWzyfGSiyQn6emaE/njK5sOamLdjbXRLAeM1W5KGia8qMn4vILZ5B/2KMoy41p j+90lhGhSvbrw+KEGRIoJkIsJeRnbEdeft2qHo68uIR+4UG43OiKZvotvLEYCuLMokms i3LuXQua9ZUCG3I2DHH+oQi1+GChKOK12l4jH2N6sNpDHNAWc1VLCgbkw9tDFDZVzif5 4fnw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f25-20020a631019000000b0046fb2a57348si15260969pgl.84.2022.11.16.00.33.55; Wed, 16 Nov 2022 00:34:10 -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 S232892AbiKPI1i (ORCPT + 99 others); Wed, 16 Nov 2022 03:27:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232762AbiKPIZt (ORCPT ); Wed, 16 Nov 2022 03:25:49 -0500 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D904D140A5; Wed, 16 Nov 2022 00:24:21 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0VUx0rXp_1668587058; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0VUx0rXp_1668587058) by smtp.aliyun-inc.com; Wed, 16 Nov 2022 16:24:19 +0800 From: Tianjia Zhang To: "Theodore Y. Ts o" , Jaegeuk Kim , Eric Biggers , Jonathan Corbet , Jens Axboe , linux-fscrypt@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Cc: Tianjia Zhang Subject: [PATCH 0/2] Add SM4 XTS symmetric algorithm for blk-crypto and fscrypt Date: Wed, 16 Nov 2022 16:24:14 +0800 Message-Id: <20221116082416.98977-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749640964618610444?= X-GMAIL-MSGID: =?utf-8?q?1749640964618610444?= SM4 is widely used in China's data encryption software and hardware. 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. 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/fscrypt_private.h | 2 +- fs/crypto/keysetup.c | 15 +++++++++++++++ fs/crypto/policy.c | 4 ++++ include/linux/blk-crypto.h | 1 + include/uapi/linux/fscrypt.h | 4 +++- 7 files changed, 31 insertions(+), 2 deletions(-)