stuartwells4 / klem

Wireless 802.11 Linux kernel link emulation driver (KLEM) by Stuart Wells
4 stars 1 forks source link

kernel panic/hang when testing driver port to Linux kernel 4.4 #1

Open capablegh opened 7 years ago

capablegh commented 7 years ago

Hello.

Building the driver sources for/on Ubuntu 16.04 fails, for some changes in Linux kernel between 4.1 and 4.2. The change to compile it is as below. At face value the change appears to be a trivial change, but the system hangs (or kernel panics) when attempting to "start" the driver. Of kernel/module panic trace has "klemNetConnect" at the bottom.

What may be the change needed to make this work? What information can I gather more info to identify/isolate the problem?

Driver change diff I made is below:

828a829,832
> #define LINUX44_TEST_CHANGE
> #define LINUX44_TEST_CHANGE
>     *pTotalFlags &= (/* FIF_PROMISC_IN_BSS | */ FIF_ALLMULTI);
> #else
829a834
> #endif
1422a1428,1432
> #ifdef LINUX44_TEST_CHANGE
>     ieee80211_hw_set(pMacData->pHW, MFP_CAPABLE);
>     ieee80211_hw_set(pMacData->pHW, SIGNAL_DBM);
>     ieee80211_hw_set(pMacData->pHW, AMPDU_AGGREGATION);
> #else
1430a1441
> #endif

The commands that seem to execute ok are:

modprobe mac80211
modprobe cfg80211
insmod klem.ko
echo “device = eth0” > /proc/klem

The start command that hangs the system is: echo “command = start” > /proc/klem

The dmesg output is:

[ 1121.794988] cfg80211: World regulatory domain updated: [ 1121.794992] cfg80211: DFS Master region: unset [ 1121.794993] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [ 1121.794995] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [ 1121.794996] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A) [ 1121.794997] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A) [ 1121.794999] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A) [ 1121.795000] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s) [ 1121.795002] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s) [ 1121.795003] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A) [ 1121.795004] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A) [ 1121.806393] klem: module verification failed: signature and/or required key missing - tainting kernel [ 1121.806971] klem::klemDataInit malloc internal data at ffff8800d9050000 [ 1121.807021] klem::privKLEMInit Module sucessfully installed

Contentes of /proc/klem after "device = eth0" are:

cat /proc/klem KLEM Proc Interface

Version: 1 raw-device: eth0 raw-socket: null netlink: null device-id: 0 device-id: lemu filter:

capablegh commented 7 years ago

Screenshot of one of the panics is below is below. There is not response to console keyboard input, and resetting the hardware is the only way to restart the system.

klem-panic