From patchwork Thu Jul 13 05:36:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "De Lara Guarch, Pablo" X-Patchwork-Id: 26895 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 588C87CBB; Thu, 13 Jul 2017 15:37:07 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7C67A6841 for ; Thu, 13 Jul 2017 15:37:02 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2017 06:37:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,354,1496127600"; d="scan'208";a="124713894" Received: from silpixa00399464.ir.intel.com (HELO silpixa00399464.ger.corp.intel.com) ([10.237.222.157]) by orsmga005.jf.intel.com with ESMTP; 13 Jul 2017 06:37:00 -0700 From: Pablo de Lara To: declan.doherty@intel.com, fiona.trahe@intel.com, john.griffin@intel.com, deepak.k.jain@intel.com Cc: dev@dpdk.org, Pablo de Lara Date: Thu, 13 Jul 2017 06:36:50 +0100 Message-Id: <20170713053650.62998-6-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170713053650.62998-1-pablo.de.lara.guarch@intel.com> References: <20170713053650.62998-1-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH 5/5] doc: extend installation section on SNOW3G/KASUMI PMDs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" SNOW3G and KASUMI SW libraries encrypt buffers assuming that they are padded to a specific block size. This behaviour can be changed to avoid buffer overflow, by modifying the Makefile of these libraries. Therefore, the Installation section in the SNOW3G and KASUMI documentation has been extended, to document this case. Signed-off-by: Pablo de Lara --- doc/guides/cryptodevs/kasumi.rst | 12 ++++++++++++ doc/guides/cryptodevs/snow3g.rst | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/doc/guides/cryptodevs/kasumi.rst b/doc/guides/cryptodevs/kasumi.rst index bff9321..738ecee 100644 --- a/doc/guides/cryptodevs/kasumi.rst +++ b/doc/guides/cryptodevs/kasumi.rst @@ -70,6 +70,18 @@ on their system before building DPDK:: make +**Note**: When encrypting with KASUMI F8, by default the library +encrypts full blocks of 8 bytes, regardless the number of bytes to +be encrypted provided (which leads to a possible buffer overflow). +To avoid this situation, it is necessary not to pass +3GPP_SAFE_BUFFERS as a compilation flag. +Also, this is required when using chained operations +(cipher-then-auth/auth-then-cipher). +For this, in the Makefile of the library, make sure that this flag +is commented out:: + + #EXTRA_CFLAGS += -D_3GPP_SAFE_BUFFERS + **Note**: To build the PMD as a shared library, the libsso_kasumi library must be built as follows:: diff --git a/doc/guides/cryptodevs/snow3g.rst b/doc/guides/cryptodevs/snow3g.rst index 12b6c4a..41c48d6 100644 --- a/doc/guides/cryptodevs/snow3g.rst +++ b/doc/guides/cryptodevs/snow3g.rst @@ -69,6 +69,17 @@ on their system before building DPDK:: make snow3G +**Note**: When encrypting with SNOW3G UEA2, by default the library +encrypts blocks of 4 bytes, regardless the number of bytes to +be encrypted provided (which leads to a possible buffer overflow). +To avoid this situation, it is necessary not to pass +3GPP_SAFE_BUFFERS as a compilation flag. +For this, in the Makefile of the library, make sure that this flag +is commented out.:: + + #EXTRA_CFLAGS += -D_3GPP_SAFE_BUFFERS + + Initialization --------------