Am Thu, 26 Mar 2020 09:38:49 +0100
schrieb Arne Schwabe <a...@rfc2549.org>:

> > RPI? You mean Raspberry PI?
> > Maybe on this machine the problem is not a problem. We also use
> > OpenVPN 2.4.7 on a ARMv7, and there is no obvious problem, just on
> > the old ARMv4.
> > 
> > Finding all problematic places in the code will still be difficult.
> 
> I just look at my RPI and it seems that it has the option you
> mentioned set by default:
> 
> cat /proc/cpu/alignment
> User:         0
> System:               0 (  (null))
> Skipped:      0
> Half:         0
> Word:         0
> DWord:                0
> Multi:                0
> User faults:  2 (fixup)

Yes, this seems to be the default setting for all newer ARM machines.
 
> But it seems that the CPU will not trap but instead allows unaligned
> memory access.
> 
> But since your machine requires that and setting it to 3 (warn+fixup)
> actually fixes the problem you should get warning messages in your
> dmesg output about the points in the code that trigger this problem.

Yes, we decided to solve the problem by setting it to 2. I will have
to make a performance test. I expect a lower performance. Additionally
this old machine is already slow as hell. Debugging and fixing all
eventual alignment problems will most probably take to quite time,
which we have no longer for the next release.

> And you could then either lookup with gdb what the IP addresse are
> pointing to in the the code or (probably easier) configure the kernel
> to send a SIGBUS, so you get a core image and can print a backtrace.
> If we know what code path actually trigger the unaligned access we
> can take a look and figure out what is wrong. Gert has done similar
> things with the sparc machines in the past.

Yes again. Finding all occurences will need a few different setups.

By the way: Stupid as I am it didn't occor to me to check the setting
of /proc/cpu/alignment on the ARMv7 machine, where the problems do not
occur. Now I did and surprise, surprise: It's already set to 2
there :-))

-- 
Servus
  Michael


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

Reply via email to