Simple Life
by Alex Chan
136 Words

The problem isn’t the date, it’s that tw_cli is looking for X.Y.Z(-R-arch) in the release and it’s only getting X.Y(-R-arch) - 3.2.0-4-amd64 vs 3.10-2-amd64. When the release is set to 3.10.0-2-amd64 it runs fine. They may be doing a sscanf() with limited formats, and little or no error checking.

jam:~# uname -r
jam:~# tw_cli /c0 show firmware
Segmentation fault
jam:~# echo 3.10.0-2-amd64 > /sys/module/utsname/parameters/release
jam:~# uname -r
jam:~# tw_cli /c0 show firmware
/c0 Firmware Version = FE9X
If the binary was dynamic you could see about a uname() replacement with LD_PRELOAD but it’s static. There’s no source code so our options are limited:

LSI/3ware fixes tw_cli, hopefully removing all the uname() nonsense
Get Debian to use X.Y.Z-R-arch in release
Someone good with assembly comes up with a binary patch or something similar
Run a custom kernel
Run an older kernel
Ditch 3ware
I like my 9650 but this is crap.