diff options
author | Mariusz Drost <mariuszx.drost@intel.com> | 2019-10-09 10:16:20 +0100 |
---|---|---|
committer | Mariusz Drost <mariuszx.drost@intel.com> | 2019-10-09 10:32:09 +0100 |
commit | 0e37b2e9d04bbc8e91833e45ce3e4535255a796e (patch) | |
tree | 965cf35af344129cf46f613335c3784d5a5ca7ad /lib/libtle_l4p/halfsiphash.h | |
parent | e4380f4866091fd92a7a57667dd938a99144f9cd (diff) |
l4p/tcp: fix SIGSEGV when reading IPv6 address
IPv6 address is obtained through pointer to mbuf (part storing IPv6
addr). Structure which then holds that pointer defines it as a pointer
to _m128i data type. Because of that, when code is optimized,
instruction vmovdqa is used, which requires data to be aligned to
16-bytes. Pointer from mbuf does not have to be aligned in that way,
which may cause SIGSEGV.
Solution is to add attribute packed and aligned(1) to structure holding
IPv6 address. With that, vmovdqu assembly instruction is used, which is
the equivalent of vmovdqa, but for unaligned data.
Signed-off-by: Mariusz Drost <mariuszx.drost@intel.com>
Change-Id: I66e7ce2a317de2cdbc763ec8e31141605b5e5469
Diffstat (limited to 'lib/libtle_l4p/halfsiphash.h')
0 files changed, 0 insertions, 0 deletions