bitthief / openwrt

Linux distribution for embedded devices
https://openwrt.org
Other
45 stars 6 forks source link

ecm_conntrack_notifier_init kernel crash #9

Closed rmandrad closed 1 year ago

rmandrad commented 2 years ago

Hi @bitthief were you able to fix the kernel crash ? thank you

xsm1997 commented 1 year ago

I wrote some patches to fix this issue. Tested in QNAP 301w. Works fine for now.

patches.zip

Put 904-fix-ecm-brk.patch into ipq807x linux target, and put 902-fix-ecm-nf-ct-net.patch into qca-nss-ecm.

Explanation for 904-fix-ecm-brk.patch: It seems WARN_ON_ONCE will generate a BRK instruction in kernel of this version on arm64, which leads to kernel panic.

Explanation for 902-fix-ecm-nf-ct-net.patch: It fixes a null pointer access which is introduced in previous qca-nss-ecm patches.

By the way, you need to update ucode and rpcd packages to get latest luci working. And you need to include nss dtsi to qnap 301w dts to get nss working.

rmandrad commented 1 year ago

thank you let me try with the dynalink

rmandrad commented 1 year ago

@bitthief have you included these patches on your repo ? thank you

bitthief commented 1 year ago

@rmandrad Adding them now, I'll push the commit in a few minutes! Super excited to try this!

rmandrad commented 1 year ago

just tested it ... and it is not crashing anymore ... need to fix though the load of the board data for the dynalink ...

xsm1997 commented 1 year ago

I tested in 301w for a whole day with heavy CPU and WLAN load, and it is relatively stable.

But when I turn on Wifi 160Mhz, the radar is randomly detected by DFS, and the Wifi fallbacks into 80Mhz. I'm pretty sure there is actually no radar, because my another router (Redmi AX6000, X-Wrt) does not fallback at all. And my previous Redmi AX6 has this bug too. However, the Redmi AX6 with official firmware is working correctly. I don't know what causes it.

bitthief commented 1 year ago

@rmandrad yup, I tested it on AX3600 also just now, it works, just pushed a commit!

@xsm1997 you're a legend and a rockstar, thank you very very much for the help with this! We finally have fully working hardware acceleration. I'll be looking at the missing crypto bits (nss-cfi) etc. over the next few days.

I spent lots of time debugging it, my gut feeling was pointing to exactly the same places you found and fixed!

rmandrad commented 1 year ago

all good now with the dynalink

zxlhhyccc commented 1 year ago

all good now with the dynalink

Kernel compilation 905 patch error。。。。

xsm1997 commented 1 year ago

all good now with the dynalink

Kernel compilation 905 patch error。。。。

Please backup the config, delete the local repo, and clone it again. Direct pulling and merging can lead to corruption for this repo.