>> LZO is known to miscompile with gcc 10 and requires
>> -fno-strict-aliasing to compile. and also in my OpenVPN for Android
>> app I have to compile lzo with -O1 instead -O2 since it otherwise
>> segfaults on armv7a. Android uses LLVM/clang to compile so the broken
>> behaviour is present also on other compilers. I never investigated
>> which optimisation flag does break in clang/llvm/armv7a.
>  
> The alignment errors happen in OpenVPN code, not in LZO code. 
> We have to use the (ancient) gcc 4.0.0. After upgrading OpenVPN from
> 2.3 to 2.4 we did not even upgrade LZO from 2.0.6, but linked
> statically to the old compiled lib. I doubt that the compiler itself
> changes anything here.
> 
>> But bottom line is that you probably are running in a similar and I
>> would advise to compile lzo with less optimisation.
> 
> Thanks for the suggestion! 
> 
> Anyways I recompiled LZO without any optimazations and then OpenVPN
> 2.4.8. Unfortunatelly this changed nothing.
> 
> A few questions:
> ----------------
> 1) Do you run automated tests of the OpenVPN code on any build server? 
> 
> 2) If that is the case, is there any test with a version, where 
>    -DVERIFY_ALIGNMENT is enabled?
> 

I never heard of this option and Google does not want to spit something
out for me for that.

> 3) If that is also the case, can you see any ERRORS regarding the
>    alignment in the logs?
> 
> The problem is, that we do not have any power over the clients. It
> might well be, that there are even OpenVPN 2.2 clients out there.
> 

Compression adds a one byte header in the packet making it all
unaligned. The newer lz4 with swap, or v2 compression methods try to
avoid this misaligned, mainly for speed on platforms where unaligned
access comes with a penality.

I think there might still be unaligned access that are in the code but I
am not sure how to debug them. Is there an easy way to reproduce them?
Can a RPI configured to throw those warnings?

ARne

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to