Commit Graph

704 Commits

Author SHA1 Message Date
Pablo de Lara
ae0a688051 Update License file
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2024-01-09 09:42:48 +00:00
Tomasz Kantecki
75af1c4d4e build: detect availability of -z now, relro and noexecstack linker options
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2024-01-05 14:45:12 +00:00
Pablo de Lara
71575ae434 raid: [example] fix memory leak in CRC64 example
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-22 09:35:37 +00:00
Pablo de Lara
9ee34ec0f5 crc: use macro to print 64-bit value
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-22 09:35:37 +00:00
Pablo de Lara
cf967e5a37 README: add section for DLL injection attack mitigations
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-21 16:05:52 +00:00
Pablo de Lara
29d99fce26 igzip: add zlib header init function
Add isal_zlib_hdr_init() function to initialize
the isal_zlib_header structure to all 0.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-20 14:05:52 +00:00
Tomasz Kantecki
6ef2abe80e igzip: fix issues reported by static code analysis
compute_dist_code() and compute_dist_icf_code() in huffman.h:
    Correct `assert(msb >= 1)` to `assert(msb >= 2)`.
    `msb` cannot be lower than 2 as it would result in corrupt computations.

get_dist_code() in huffman.h:
    Remove dead `if` statement at the beginning of the function.
    `dist` must be equal 1 or above in this function.

Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2023-12-19 20:36:39 +00:00
Tomasz Kantecki
402bd4f773 erasure_code: various fixes for static code analysis issues
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2023-12-19 20:36:39 +00:00
Tomasz Kantecki
ac2ee91cdb mem_zero_detect_test: fix for issue reported by static code analysis
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2023-12-19 20:36:39 +00:00
Tomasz Kantecki
5a00eaec33 igzip: several fixes for issues reported by static code analysis
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2023-12-19 20:36:39 +00:00
Pablo de Lara
c83771eeec mem: [test] fix memory leak
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-18 14:25:22 +00:00
Pablo de Lara
a3e260436a erasure_code: [test] fix memory leak
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-18 14:25:22 +00:00
Pablo de Lara
abd80d3c5a erasure_code: check for size in gf_Xvect_mad_avx512_gfni
Length of data was not checked in implementation with AVX512+GFNI,
at the start of the gf_Xvect_mad_avx512_gfni functions, resulting
in buffer overflow if length was less than 64 bytes.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-18 14:25:22 +00:00
Pablo de Lara
c06db0c60a igzip: [test] fix memory leak
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-18 14:25:22 +00:00
Pablo de Lara
d65d2b5572 crc: [test] fix memory leak
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-18 14:25:22 +00:00
Pablo de Lara
54d1153a61 raid: [test] fix memory leak
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-18 14:25:22 +00:00
Tomasz Kantecki
c183961175 build: enable full read-only relocations and control flow integrity for hardening check
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2023-12-18 10:47:23 +00:00
Tomasz Kantecki
809f536265 igzip_cli: add missing 'void' keyword to some function prototypes
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2023-12-18 10:47:23 +00:00
Marcel Cornu
561a419bc8 erasure_code: fix modules using incorrect unsigned jump
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-14 17:55:49 +00:00
Marcel Cornu
a53a20ea2a erasure_code: add AVX2 5vect mad with GFNI implementation
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-14 17:55:49 +00:00
Marcel Cornu
47ed2847af erasure_code: add AVX2 4vect mad with GFNI implementation
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-14 17:55:49 +00:00
Marcel Cornu
22b7f33d68 erasure_code: add AVX2 3vect mad with GFNI implementation
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-14 17:55:49 +00:00
Tomasz Kantecki
a139dd7302 igzip_cli: improve get_posix_filetime() to deal with potential fstat() errors
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2023-12-14 13:55:52 +00:00
Tomasz Kantecki
08f021c43f igzip_cli: fix for potential buffer overrun on 'outfile_name' buffer with strncat()
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2023-12-14 13:55:52 +00:00
Tomasz Kantecki
722144ee75 igzip_cli: simplify fopen_safe() by replacing access() calls with detailed error message after failed fopen()
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2023-12-14 13:55:52 +00:00
Tomasz Kantecki
0e6bc4a5a1 igzip: zero flags field in isal_gzip_header_init()
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
2023-12-14 13:55:52 +00:00
Marcel Cornu
d22bb198f3 erasure_code: optimize AVX2-GFNI single vector mad implementation
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-13 17:03:16 +00:00
Marcel Cornu
a0a149d674 erasure_code: add AVX2 2vect mad with GFNI implementation
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-13 17:03:16 +00:00
Marcel Cornu
0052080f53 erasure_code: optimize AVX2 GFNI 2 vector dot product
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-11 22:44:07 +00:00
Marcel Cornu
3f87141d03 erasure_code: optimize AVX2 GFNI single vector dot product
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-11 22:44:07 +00:00
Marcel Cornu
164d9ff1f0 erasure_code: add 2 vector AVX2 dot product with GFNI implementation
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-11 22:44:07 +00:00
Pablo de Lara
f82746491e tools: check code style first
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-11 15:23:56 +00:00
Pablo de Lara
8f2634aeac raid: remove unneeded load
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-11 09:31:11 +00:00
Pablo de Lara
5d6092c832 raid: optimize final parity check
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-11 09:31:11 +00:00
Pablo de Lara
bf8f2a25ba raid: fix function descriptions
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-11 09:31:11 +00:00
Marcel Cornu
307d737bf2 erasure_code: add 3 vector AVX2 dot product with GFNI implementation
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-07 14:01:18 +00:00
Pablo de Lara
4203d9628c igzip: fix null-terminated string setting
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-07 13:34:21 +00:00
Pablo de Lara
4a4635e8db igzip: remove unneeded check
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-07 13:34:21 +00:00
Pablo de Lara
02aa005c2d igzip: fix return value in wrapper header test
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-07 13:34:21 +00:00
Pablo de Lara
6dc544c661 Ignore obsolete warnings when using autoreconf
A few macros are declared obsolete from autoconf 2.70.
In order to avoid breaking compatibility with 2.69 removing them,
these warnings are ignored.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-07 13:29:03 +00:00
Pablo de Lara
7e2b097f15 igzip: fix build warnings on Windows
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-07 13:23:09 +00:00
Pablo de Lara
6188bf7b2f crc: fix build warnings on Windows
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-07 13:23:09 +00:00
Pablo de Lara
df073be348 tools: allow testing on multiple architectures with Intel SDE
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-01 14:33:29 +00:00
Pablo de Lara
2ca781df19 lib: reduce verbosity by default in tests
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-01 14:33:29 +00:00
Marcel Cornu
5f23c03415 erasure_code: add initial AVX2 mad with GFNI implementation
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-01 14:20:56 +00:00
Pablo de Lara
447d9af75b erasure_code: add initial AVX2 dot product with GFNI implementation
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-01 14:20:56 +00:00
Marcel Cornu
637f5a631d include: add memcpy asm module
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-01 14:20:56 +00:00
Marcel Cornu
bc34d87427 erasure_code: update GF_MUL_XOR macro to support VEX encoding
Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
2023-12-01 14:20:56 +00:00
Pablo de Lara
c8dd92f04a lib: add new interface supporting AVX2 with GFNI
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-12-01 14:20:56 +00:00
Pablo de Lara
f971f02309 erasure_code: expose base implementation of init_tables
Expose ec_init_tables_base(), which should be used
with ec_encode_data_base() and ec_encode_data_update_base().

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2023-11-23 10:56:28 +00:00