cisco / libsrtp

Library for SRTP (Secure Realtime Transport Protocol)
Other
1.23k stars 476 forks source link

Setting CPU_RISC=1 appears to cause problems #375

Closed nils-ohlmeier closed 4 years ago

nils-ohlmeier commented 6 years ago

Mozilla has accumulated a few bug reports now that setting CPU_RISC=1 on RISC based platforms like MIPS actually causes problems. Things seem to work fine if CPU_CISC=1 gets set instead.

https://bugzilla.mozilla.org/show_bug.cgi?id=821855 https://bugzilla.mozilla.org/show_bug.cgi?id=1415753

We don't really have an idea what is going wrong in the RISC case scenario.

pabuhler commented 6 years ago

Hi,

I am not sure what is going wrong here. There has been a general bug with big endian systems for a awhile but it was fixed recently (1.6/2.1) not sure if that is related. If you are definitely not building for big endian than I guess not.

After looking on the net I saw that Linphone has changed this to only set RISC with big endian systems so obviously they have seen issues here before but I don't find the history with the change.

I will try to dig a bit deeper maybe can get a risc build running with qemu.

huangwenjun06 commented 6 years ago

https://bugzilla.mozilla.org/show_bug.cgi?id=1415753 our system is small endian system; platform MIPS64 (loongson3a);

nils-ohlmeier commented 6 years ago

Thanks @pabuhler. Firefox up to now uses srtp 1.4.4, so I assume we are affected by what got fixed in 1.6/2.1.

Let's see if updating our libsrtp code here https://bugzilla.mozilla.org/show_bug.cgi?id=1230759 will fix this issue then.

pabuhler commented 6 years ago

I have tried cross compiling with mips64el-linux-gnuabi64-gcc which results with CPU_RISC=1 and running the test locally with qemu-user but have not being able to reproduce. So either the issues is fixed or this is not a reliable way of testing. Looking forward to hear if it is still an issue for you after upgrading.

pabuhler commented 6 years ago

@nils-ohlmeier has updating fixed this issue?

pabuhler commented 6 years ago

@nils-ohlmeier , I have tried to follow the bugs on mozilla and see that the updating is complete, but am unsure if it fixed this issue for you. Can you provide an update if this is still an issue as currently I am unable to reproduce.

nils-ohlmeier commented 6 years ago

@huangwenjun06 as we don't have any small endian systems and you reported https://bugzilla.mozilla.org/show_bug.cgi?id=1415753 could you update your sources to Nightly Fx 59 and check if the CPU_CISC vs CPU_RISC settings make more sense now with the new version of libsrtp in Firefox?

pabuhler commented 5 years ago

@nils-ohlmeier & @huangwenjun06 it has now been over a year, should I just close this issue?

pabuhler commented 4 years ago

I am closing this bug now as there is currently no indication that anything more needs to be done in libsrtp. Feel free to reopen if these issue persist with latest releases.