Re: [PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs

2022-05-19 Thread David Marchand
On Thu, Apr 7, 2022 at 5:24 PM David Marchand wrote: > On Thu, Mar 10, 2022 at 3:55 PM Ananyev, Konstantin > wrote: > > > Calls to rte_memcpy for 1 < n < 16 could result in unaligned > > > loads/stores, which is undefined behaviour according to the C > > > standard, and strict aliasing violations

Re: [PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs

2022-05-19 Thread David Marchand
Hello Luc, On Fri, May 13, 2022 at 9:16 PM Luc Pelletier wrote: > > > Actually, looking again at the history, it fixes: > > > Fixes: f5472703c0bd ("eal: optimize aligned memcpy on x86") > > > > Nop, that's probably even older, could you double check? > > I'll hold on pushing this fix. > > It seem

Re: [PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs

2022-05-13 Thread Luc Pelletier
Hi David, > > Actually, looking again at the history, it fixes: > > Fixes: f5472703c0bd ("eal: optimize aligned memcpy on x86") > > Nop, that's probably even older, could you double check? > I'll hold on pushing this fix. It seems you still haven't received a response. I'll take a stab at this.

Re: [PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs

2022-04-08 Thread Luc Pelletier
Hi David, Le jeu. 7 avr. 2022 à 11:24, David Marchand a écrit : > > As a side note, we probably need to check other similar places in DPDK code. > > What would be the best way to detect those problematic places? As far as I'm aware, there is no silver bullet to detect all strict aliasing violat

Re: [PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs

2022-04-07 Thread David Marchand
On Thu, Apr 7, 2022 at 5:32 PM David Marchand wrote: > > On Thu, Apr 7, 2022 at 5:24 PM David Marchand > wrote: > > > > On Thu, Mar 10, 2022 at 3:55 PM Ananyev, Konstantin > > wrote: > > > > Calls to rte_memcpy for 1 < n < 16 could result in unaligned > > > > loads/stores, which is undefined be

Re: [PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs

2022-04-07 Thread David Marchand
On Thu, Apr 7, 2022 at 5:24 PM David Marchand wrote: > > On Thu, Mar 10, 2022 at 3:55 PM Ananyev, Konstantin > wrote: > > > Calls to rte_memcpy for 1 < n < 16 could result in unaligned > > > loads/stores, which is undefined behaviour according to the C > > > standard, and strict aliasing violatio

Re: [PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs

2022-04-07 Thread David Marchand
On Thu, Mar 10, 2022 at 3:55 PM Ananyev, Konstantin wrote: > > Calls to rte_memcpy for 1 < n < 16 could result in unaligned > > loads/stores, which is undefined behaviour according to the C > > standard, and strict aliasing violations. > > > > The code was changed to use a packed structure that al

RE: [PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs

2022-03-10 Thread Ananyev, Konstantin
> Calls to rte_memcpy for 1 < n < 16 could result in unaligned > loads/stores, which is undefined behaviour according to the C > standard, and strict aliasing violations. > > The code was changed to use a packed structure that allows aliasing > (using the __may_alias__ attribute) to perform the

[PATCH v7] eal: fix rte_memcpy strict aliasing/alignment bugs

2022-02-25 Thread Luc Pelletier
Calls to rte_memcpy for 1 < n < 16 could result in unaligned loads/stores, which is undefined behaviour according to the C standard, and strict aliasing violations. The code was changed to use a packed structure that allows aliasing (using the __may_alias__ attribute) to perform the load/store ope