From 58a5320cc7acc41ce49ecc5d078769bda432b65e Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 19 Jul 2021 07:57:44 -0700 Subject: [PATCH 1/2] Added note for where to find the latest QAT v1.7 driver. --- wolfcrypt/src/port/intel/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/src/port/intel/README.md b/wolfcrypt/src/port/intel/README.md index 1b9ca9b..f8e1439 100644 --- a/wolfcrypt/src/port/intel/README.md +++ b/wolfcrypt/src/port/intel/README.md @@ -18,6 +18,9 @@ https://01.org/intel-quick-assist-technology/downloads ### QAT 1.7 +This page will always have the latest QAT 1.7 Linux release: +https://downloadcenter.intel.com/download/30178 + Note: If you have the older driver installed you may need to remove it or unload the module and reboot. 1. Setup `QAT1.7` and `wolfssl` next to each other in the same folder. From 56e8ad57cba74c23603f694a47219b044df51fb4 Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 22 Oct 2021 16:13:33 -0700 Subject: [PATCH 2/2] Fix for issue with QAT AES GCM input buffer already NUMA and not aligned. --- wolfcrypt/src/port/intel/README.md | 5 ++++- wolfcrypt/src/port/intel/quickassist_mem.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/port/intel/README.md b/wolfcrypt/src/port/intel/README.md index f8e1439..5542bd9 100644 --- a/wolfcrypt/src/port/intel/README.md +++ b/wolfcrypt/src/port/intel/README.md @@ -16,9 +16,12 @@ The asynchronous crypto files are located at `wolfcrypt/src/async.c` and `wolfss QuickAssist drivers can be downloaded from Intel here: https://01.org/intel-quick-assist-technology/downloads +The latest driver for QAT can be found here: +https://www.intel.com/content/www/us/en/download/19734 + ### QAT 1.7 -This page will always have the latest QAT 1.7 Linux release: +The latest QAT 1.7 Linux release: https://downloadcenter.intel.com/download/30178 Note: If you have the older driver installed you may need to remove it or unload the module and reboot. diff --git a/wolfcrypt/src/port/intel/quickassist_mem.c b/wolfcrypt/src/port/intel/quickassist_mem.c index 04c42fe..f322e48 100644 --- a/wolfcrypt/src/port/intel/quickassist_mem.c +++ b/wolfcrypt/src/port/intel/quickassist_mem.c @@ -563,6 +563,10 @@ void* IntelQaRealloc(void *ptr, size_t size, void* heap, int type if (newIsNuma == 0 && ptrIsNuma == 0) { allocNew = 1; } + /* confirm input is aligned, otherwise allocate new */ + else if (((size_t)ptr % WOLF_HEADER_ALIGN) != 0) { + allocNew = 1; + } /* if matching NUMA type and size fits, use existing */ else if (newIsNuma == ptrIsNuma && header->size >= size) {