Patch applied. Command:
/usr/local/pf/sbin/tcpdump -nn -i net1 -c 10
dmesg attached (everything after PF_RING load).
Jim
On 07/15/2015 09:15 AM, Alfredo Cardigliano wrote:
> Hi Jim
> this requires a bit of debugging because bpf_filter_skb() is
> not supposed to be called with the command you provided,
> but this does not seem to be the case from the trace.
> Could you apply this patch and provide the dmesg output
> after running the application?
>
> Thank you
> Alfredo
>
> diff --git a/kernel/pf_ring.c b/kernel/pf_ring.c
> index 5433e89..0d52c26 100644
> --- a/kernel/pf_ring.c
> +++ b/kernel/pf_ring.c
> @@ -4030,7 +4030,8 @@ static int add_skb_to_ring(struct sk_buff *skb,
> atomic_inc(&pfr->num_ring_users);
>
> /* [1] BPF Filtering */
> - if(pfr->bpfFilter) {
> + if (0) {
> + //if(pfr->bpfFilter) {
> if(bpf_filter_skb(skb, pfr, displ) == 0) {
> atomic_dec(&pfr->num_ring_users);
> return(-1);
> @@ -7491,7 +7492,7 @@ static int ring_setsockopt(struct socket *sock,
> case SO_ATTACH_FILTER:
> ret = -EINVAL;
>
> - if(unlikely(enable_debug))
> + //if(unlikely(enable_debug))
> printk("[PF_RING] BPF filter (%d)\n", 0);
>
> if(optlen == sizeof(struct sock_fprog)) {
>
[194838.542232] pf_ring: module verification failed: signature and/or required key missing - tainting kernel [194838.542767] [PF_RING] Welcome to PF_RING 6.1.1 ($Revision: $) (C) 2004-14 ntop.org [194838.542784] [PF_RING] registered /proc/net/pf_ring/ [194838.542788] NET: Registered protocol family 27 [194838.542794] [PF_RING] Min # ring slots 4096 [194838.542795] [PF_RING] Slot version 16 [194838.542796] [PF_RING] Capture TX Yes [RX+TX] [194838.542796] [PF_RING] IP Defragment No [194838.542797] [PF_RING] Initialized correctly [194902.697726] device net1 entered promiscuous mode [194902.706086] [PF_RING] BPF filter (0) [194902.706091] [PF_RING] BPF filter (0) [194902.707470] device net1 left promiscuous mode [194902.711913] ------------[ cut here ]------------ [194902.711926] WARNING: at mm/vmalloc.c:1480 __vunmap+0xf2/0x100() [194902.711931] Trying to vfree() bad address (ffff880230d347a0) [194902.711933] Modules linked in: pf_ring(OF) nfnetlink_queue nfnetlink_log nfnetlink blueto oth rfkill vmw_vsock_vmci_transport vsock ip6t_rpfilter ip6t_REJECT ipt_REJECT xt_conntrack e btable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ip v6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptab le_mangle iptable_security iptable_raw iptable_filter ip_tables coretemp crct10dif_pclmul crc 32_pclmul crc32c_intel ghash_clmulni_intel ppdev aesni_intel lrw gf128mul glue_helper ablk_he lper cryptd vmw_balloon serio_raw pcspkr i2c_piix4 parport_pc parport vmw_vmci shpchp xfs lib crc32c sr_mod cdrom ata_generic pata_acpi sd_mod crc_t10dif crct10dif_common [194902.712020] vmwgfx drm_kms_helper ttm vmxnet3 drm vmw_pvscsi ahci libahci ata_piix libat a i2c_core floppy dm_mirror dm_region_hash dm_log dm_mod [194902.712045] CPU: 0 PID: 15947 Comm: kworker/0:1 Tainted: GF O-------------- 3. 10.0-229.7.2.el7.x86_64 #1 [194902.712048] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference P latform, BIOS 6.00 09/30/2014 [194902.712054] Workqueue: events jit_free_defer [194902.712057] ffff880231cb3d60 00000000cc4c69a9 ffff880231cb3d18 ffffffff81604386 [194902.712062] ffff880231cb3d50 ffffffff8106e28b ffff880230d347a0 ffff8800babf2200 [194902.712067] ffff88023fc12ec0 ffff88023fc17000 0000000000000000 ffff880231cb3db8 [194902.712073] Call Trace: [194902.712086] [<ffffffff81604386>] dump_stack+0x19/0x1b [194902.712093] [<ffffffff8106e28b>] warn_slowpath_common+0x6b/0xb0 [194902.712099] [<ffffffff8106e32c>] warn_slowpath_fmt+0x5c/0x80 [194902.712106] [<ffffffff810ad756>] ? __dequeue_entity+0x26/0x40 [194902.712112] [<ffffffff811913a2>] __vunmap+0xf2/0x100 [194902.712118] [<ffffffff81191426>] vfree+0x36/0x70 [194902.712126] [<ffffffff810da901>] module_free+0x11/0x30 [194902.712135] [<ffffffff81069463>] jit_free_defer+0x13/0x20 [194902.712149] [<ffffffff8108f0bb>] process_one_work+0x17b/0x470 [194902.712153] [<ffffffff8108fe8b>] worker_thread+0x11b/0x400 [194902.712157] [<ffffffff8108fd70>] ? rescuer_thread+0x400/0x400 [194902.712161] [<ffffffff8109726f>] kthread+0xcf/0xe0 [194902.712165] [<ffffffff810971a0>] ? kthread_create_on_node+0x140/0x140 [194902.712171] [<ffffffff81614158>] ret_from_fork+0x58/0x90 [194902.712175] [<ffffffff810971a0>] ? kthread_create_on_node+0x140/0x140 [194902.712178] ---[ end trace f472c98c81efbc93 ]--- [194902.720916] BUG: unable to handle kernel paging request at ffffffffffffffff [194902.721653] IP: [<ffffffff8106a762>] bpf_jit_free+0x22/0x50 [194902.721677] PGD 190d067 PUD 190f067 PMD 0 [194902.721696] Oops: 0002 [#1] SMP [194902.721710] Modules linked in: pf_ring(OF) nfnetlink_queue nfnetlink_log nfnetlink bluetooth rfkill vmw_vsock_vmci_transport vsock ip6t_rpfilter ip6t_REJECT ipt_REJECT xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw iptable_filter ip_tables coretemp crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel ppdev aesni_intel lrw gf128mul glue_helper ablk_helper cryptd vmw_balloon serio_raw pcspkr i2c_piix4 parport_pc parport vmw_vmci shpchp xfs libcrc32c sr_mod cdrom ata_generic pata_acpi sd_mod crc_t10dif crct10dif_common [194902.722030] vmwgfx drm_kms_helper ttm vmxnet3 drm vmw_pvscsi ahci libahci ata_piix libata i2c_core floppy dm_mirror dm_region_hash dm_log dm_mod [194902.722104] CPU: 0 PID: 13 Comm: rcuos/1 Tainted: GF W O-------------- 3.10.0-229.7.2.el7.x86_64 #1 [194902.722138] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 09/30/2014 [194902.722174] task: ffff8802341a8b60 ti: ffff8802341b0000 task.ti: ffff8802341b0000 [194902.722200] RIP: 0010:[<ffffffff8106a762>] [<ffffffff8106a762>] bpf_jit_free+0x22/0x50 [194902.722230] RSP: 0000:ffff8802341b3df0 EFLAGS: 00010202 [194902.722249] RAX: 0000000fffffffe0 RBX: ffff8800af685bc0 RCX: 000000018040003e [194902.722273] RDX: ffffffffffffffff RSI: ffffea0002bd4a00 RDI: 0000000000001400 [194902.722297] RBP: ffff8802341b3e08 R08: ffff8800af528500 R09: 000000018040003e [194902.722328] R10: ffffea0002bd4a00 R11: ffffffff81113030 R12: 0000000000000001 [194902.722353] R13: 0000000000000000 R14: 0000000000000003 R15: ffff8800af685bd0 [194902.722377] FS: 0000000000000000(0000) GS:ffff88023fc00000(0000) knlGS:0000000000000000 [194902.722405] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [194902.722424] CR2: ffffffffffffffff CR3: 00000000363ab000 CR4: 00000000001407f0 [194902.722503] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [194902.722554] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [194902.723188] Stack: [194902.723197] ffff8802341b3e08 ffffffff8150fd76 ffff8800af685bd0 ffff8802341b3ec0 [194902.723226] ffffffff81113009 ffff8802341a8b60 ffff8802341a8b60 ffff88023fd0df50 [194902.723255] ffff8802341b3e80 ffff8802341a8b60 ffff88023fd0df28 ffff88023fd0df38 [194902.723284] Call Trace: [194902.723298] [<ffffffff8150fd76>] ? sk_filter_release_rcu+0x16/0x30 [194902.723327] [<ffffffff81113009>] rcu_nocb_kthread+0x229/0x370 [194902.723350] [<ffffffff81098230>] ? wake_up_bit+0x30/0x30 [194902.723370] [<ffffffff81112de0>] ? rcu_start_gp+0x40/0x40 [194902.723390] [<ffffffff8109726f>] kthread+0xcf/0xe0 [194902.723409] [<ffffffff810971a0>] ? kthread_create_on_node+0x140/0x140 [194902.723433] [<ffffffff81614158>] ret_from_fork+0x58/0x90 [194902.723453] [<ffffffff810971a0>] ? kthread_create_on_node+0x140/0x140 [194902.723476] Code: 84 e9 94 fa ff ff 0f 1f 00 0f 1f 44 00 00 48 8b 57 08 48 81 fa 20 01 51 81 74 37 48 b8 e0 ff ff ff 0f 00 00 00 55 bf 00 14 00 00 <48> 89 02 48 8d 42 08 48 8b 35 38 75 9b 00 48 89 e5 48 c7 42 18 [194902.726178] RIP [<ffffffff8106a762>] bpf_jit_free+0x22/0x50 [194902.727197] RSP <ffff8802341b3df0> [194902.728206] CR2: ffffffffffffffff
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc
