Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3123893rdh; Thu, 28 Sep 2023 03:28:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkwRYFpn54gqlUbb614HnYplX45wwUUeqkHCc5KVCH8qjX3ipHLbhjG8l43SEZ93tnHJHG X-Received: by 2002:a05:6a20:938d:b0:15d:624c:6e43 with SMTP id x13-20020a056a20938d00b0015d624c6e43mr926737pzh.3.1695896910049; Thu, 28 Sep 2023 03:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695896910; cv=none; d=google.com; s=arc-20160816; b=zraMndZwEI6wVww2v0rgYzS/nvOk3Iwy0w+buh1Bi/N3iLIED171KvmAPiF2kJsgSO Lx4+kLpWe4BUpoBvCzj5nrAIf4nEHbHJPVmrDhRkmdvPhn7X0Pw47lisKeY7PoDQpfxB UWcvNAg3ThxsamlNnaokVUMwPjX0OP7nC/WIUeE99rgaRfXRom7rOZ0740VxAxWtvOtK HN1MxEJNqX3dN5rcGZ9kKeqLYe/z7Y9USOkdfxpGQWdGLtNpGATxwOHjgrrfFAC0uzx6 kgkjKQ/vK2kgXYHq5RQRIn6HnAxagaB/7QxwmqQDRpjytBi/Z+1zHPOX5/XlF/kZKkp7 h3RQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qw31w5FtGftCkP1Yjg5Z8T0dYbboTi7QLUlCgNSanH0=; fh=tviR08lFG+54esGJyrLHT4lrARHdK8RLPqfNKMCXuuE=; b=S7piojz9NJ07E+8sDD84hmSzDXNXKyQSjbGkuBJT0drHFJv5odSw2/rEtp9pY1eAzd wAk6WaqJKNR9yLPKC1Hp6XRD26f4imY3Va+6/mo0POwhCOenOdHdP4+6fPzeDPLDzKRc ZXZCDkqHYMEtbt8ykEqcjhV3VLIerMD9WeLTP0LDH1Jl5ZcYI4ivIxQRRY4TUCZfHed4 07fqn96HKaOQN4TiLoeVw4ESeEaE69K62Rj5BoIdisHjzxtph5WOHagRF2BOg+MYBzVx bMx96hwmuvgOxyATwZFfK5KlUTiPB96VQl3JIn2duFtydTSrjOetfX9ozCFg7c1yp7B9 +BAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=J1a9Flam; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s10-20020a170902ea0a00b001c624cbc92dsi10293851plg.296.2023.09.28.03.28.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 03:28:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=J1a9Flam; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 61CCF81C2035; Thu, 28 Sep 2023 00:39:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbjI1HjC (ORCPT + 99 others); Thu, 28 Sep 2023 03:39:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbjI1HjA (ORCPT ); Thu, 28 Sep 2023 03:39:00 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B413AC; Thu, 28 Sep 2023 00:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695886739; x=1727422739; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=40nXyAPgocdeKIF3kA25jghB0Z6YVlYWl0z9fcbH7IA=; b=J1a9FlampS2PPq+hvytNIZ96u+ToAmAyTNZTQG6c9F6Qw1ejwR/eCrbQ Rx0GSZdG8zPHUixnh8D99G1Up4OlDHOYP+8/1WBg9//ix18J0jQfxvhcI qc2O1hPVVbTJCbCi5JQKGpaH7WjZRqI7athbWNgwrAxPkuIW1B0Z3/v1s FKhnZ5z2Z5w5Dn+MvuwZ2IpXegWi2l4DRQ5CiSmVUzLWZ/oe++VgO3Bn3 Aucj3LeKkmvJJIuhMCPVNG3PdCvdwsL6CLXuRiTRyPqbqIJ4iH3/hNfx1 boaom9OTITLCJm3KageGpMnDtkMQoS4X3iLkT1TZ0OGG3hLB5aJTxFnHQ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10846"; a="367064857" X-IronPort-AV: E=Sophos;i="6.03,183,1694761200"; d="scan'208";a="367064857" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2023 00:38:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10846"; a="742990418" X-IronPort-AV: E=Sophos;i="6.03,183,1694761200"; d="scan'208";a="742990418" Received: from chang-linux-3.sc.intel.com ([172.25.66.173]) by orsmga007.jf.intel.com with ESMTP; 28 Sep 2023 00:38:57 -0700 From: "Chang S. Bae" To: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, davem@davemloft.net, ebiggers@kernel.org, x86@kernel.org, chang.seok.bae@intel.com Subject: [PATCH v2 0/3] crypto: x86/aesni - Improve XTS data type Date: Thu, 28 Sep 2023 00:25:05 -0700 Message-Id: <20230928072508.218368-1-chang.seok.bae@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230925151752.162449-1-chang.seok.bae@intel.com> References: <20230925151752.162449-1-chang.seok.bae@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 28 Sep 2023 00:39:17 -0700 (PDT) V1->V2: * Drop the unnecessary casts (Eric). * Put the 'Link:' tag right after 'Suggested-by' (Eric). --- The field within the struct aesni_xts_ctx is currently defined as a byte array, sized to match the struct crypto_aes_ctx. However, it actually represents the struct data type. To accurately redefine the data type, some adjustments have to be made to the address alignment code. It involved refactoring the common alignment code initially, followed by updating the structure's definition. Finally, the XTS alignment is now performed early in the process, rather than at every access point. This change was suggested during Eric's review of another series intended to enable an alternative AES implementation [1][2]. I viewed it as an enhancement to the mainline, independent of the series. I have divided these changes into incremental pieces, making them considerably more reviewable and maintainable. The series is based on the cryptodev's master branch: git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master Thanks, Chang [1] https://lore.kernel.org/all/ZFWQ4sZEVu%2FLHq+Q@gmail.com/ [2] https://lore.kernel.org/all/20230526065414.GB875@sol.localdomain/ Chang S. Bae (3): crypto: x86/aesni - Refactor the common address alignment code crypto: x86/aesni - Correct the data type in struct aesni_xts_ctx crypto: x86/aesni - Perform address alignment early for XTS mode arch/x86/crypto/aesni-intel_glue.c | 52 ++++++++++++++---------------- 1 file changed, 25 insertions(+), 27 deletions(-) base-commit: 1c43c0f1f84aa59dfc98ce66f0a67b2922aa7f9d -- 2.34.1