0

我正在将一个名为 GTP 的驱动程序从 4.9 Linux 内核反向移植到 3.18 版本。我修复了驱动程序源代码中的错误并成功编译了内核。我还使用 Ubuntu Server 14.04 来测试带有该驱动程序的内核。(还有一个netlink库(libgtpnl)来控制驱动。我做modprobe gtp没有问题。我用这个库来控制驱动的一些功能,没有问题。但是,奇怪的是,当我启用转发:(echo 1 > /proc/sys/net/ipv4/ip_forward)内核不知何故拖拉。我也无法执行许多网络命令(ifconfig、iproute等)

dmesg 显示:

[   33.032315] gtp: GTP module loaded (pdp ctx size 88 bytes)
[   62.269996] general protection fault: 0000 [#1] SMP 
[   62.270028] Modules linked in: gtp(E) udp_tunnel(E) pci_stub(E) vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) nfnetlink_queue(E) nfnetlink_log(E) nfnetlink(E) coretemp(E) crct10dif_pclmul(E) ppdev(E) crc32_pclmul(E) ghash_clmulni_intel(E) vmw_balloon(E) btusb(E) bluetooth(E) aesni_intel(E) aes_x86_64(E) lrw(E) gf128mul(E) glue_helper(E) ablk_helper(E) cryptd(E) microcode(E) serio_raw(E) snd_ens1371(E) snd_ac97_codec(E) ac97_bus(E) gameport(E) snd_rawmidi(E) snd_seq_device(E) snd_pcm(E) snd_timer(E) snd(E) soundcore(E) vmwgfx(E) ttm(E) drm_kms_helper(E) drm(E) shpchp(E) vmw_vmci(E) i2c_piix4(E) parport_pc(E) mac_hid(E) lp(E) parport(E) hid_generic(E) usbhid(E) hid(E) psmouse(E) ahci(E) libahci(E) e1000(E) mptspi(E) mptscsih(E) mptbase(E) floppy(E) vmw_pvscsi(E) vmxnet3(E) pata_acpi(E)
[   62.271080] CPU: 1 PID: 1323 Comm: bash Tainted: G           OE  3.18.20-bondingv4 #7
[   62.271121] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/31/2013
[   62.271293] task: ffff8800772c9920 ti: ffff880079390000 task.ti: ffff880079390000
[   62.271329] RIP: 0010:[<ffffffff81669a5d>]  [<ffffffff81669a5d>] dev_disable_lro+0x2d/0x130
[   62.271465] RSP: 0018:ffff880079393df8  EFLAGS: 00010206
[   62.271492] RAX: 0000000000200000 RBX: 0002000000000000 RCX: 0000000000000000
[   62.271595] RDX: ffffffff81ce6d98 RSI: 0000000000000000 RDI: ffff8800795ed000
[   62.271630] RBP: ffff880079393e18 R08: 0000000000000000 R09: ffff88007e4361a0
[   62.271664] R10: ffffffff8165266f R11: ffffea0001dd5480 R12: ffffffff81ce2e00
[   62.271703] R13: ffffffff81ce2ec8 R14: ffff880079393f50 R15: ffff8800795ed000
[   62.271798] FS:  00007fcfa02e8740(0000) GS:ffff88007e420000(0000) knlGS:0000000000000000
[   62.271838] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   62.271866] CR2: 00007ffe943a5ac8 CR3: 00000000782e6000 CR4: 00000000001407e0
[   62.271964] Stack:
[   62.271978]  ffffffff81ce2e00 0000000000000001 ffffffff81ce2e00 ffffffff81ce2ec8
[   62.272078]  ffff880079393e68 ffffffff816da5a2 0000000000000000 0000000000000002
[   62.272774]  ffffffff81ce8b40 0000000000000001 ffffffffffffffea ffffffff81ce8b40
[   62.273379] Call Trace:
[   62.274042]  [<ffffffff816da5a2>] devinet_sysctl_forward+0x1c2/0x1f0
[   62.274940]  [<ffffffff8124bf23>] proc_sys_call_handler+0xb3/0xc0
[   62.275504]  [<ffffffff8124bf44>] proc_sys_write+0x14/0x20
[   62.276157]  [<ffffffff811db457>] vfs_write+0xb7/0x1f0
[   62.276795]  [<ffffffff811dbed6>] SyS_write+0x46/0xb0
[   62.277394]  [<ffffffff81786914>] ? int_check_syscall_exit_work+0x34/0x3d
[   62.278080]  [<ffffffff8178668d>] system_call_fastpath+0x16/0x1b
[   62.278753] Code: 44 00 00 55 48 89 e5 41 55 41 54 53 48 89 fb 48 83 ec 08 8b 87 0c 02 00 00 a8 01 75 39 a9 00 00 20 00 74 07 48 8b 9b f0 08 00 00 <48> 81 a3 e0 00 00 00 ff 7f ff ff 48 89 df e8 80 ff ff ff f6 83 
[   62.282203] RIP  [<ffffffff81669a5d>] dev_disable_lro+0x2d/0x130
[   62.282925]  RSP <ffff880079393df8>
[   62.283664] ---[ end trace f2a66d8a2b1df752 ]---
[   62.289214] init: tty2 main process ended, respawning

由于驱动程序似乎没有许可证,因此有一些与内核污染相关的答案。但是它有,我不知道为什么内核没有意识到它。我找不到驱动程序如何使用 dev_disable_lro。我无法通过。任何帮助确定我的问题将不胜感激。谢谢

4

0 回答 0