From: Emmanuel Guiton <emmanuel@netlab.hut.fi>
To: netfilter-devel@lists.netfilter.org
Subject: My first target module is a fiasco.
Date: Mon, 15 Dec 2003 17:21:24 +0200 [thread overview]
Message-ID: <3FDDD174.5050409@netlab.hut.fi> (raw)
Hei!
After having written a first version of a new target module, I tried to
test it. Well... I does not look promising: segmentation fault, the
detail follows. However, what disturbs me is that I commented out
totally my module, leaving only some printk to have some feedback and
the backbone of the module: register, unregister, the static struct
ipt_target, and the - empty - functions that go along with it.
To summarize: empty module; segmentation fault.
Can an enlighted and experienced mind points out my gaps?
Emmanuel
PS: in the following logs, ipt_SYNDIS is my target, and one can notice
at the 4th line the following: "SYNDIS: target registered." which is the
result of a printk I inserted at the end of my static int __init
init(void) function, just before to return.
Dec 15 16:53:34 pc104 insmod:
/lib/modules/2.4.23/kernel/net/ipv4/netfilter/ipt_SYNDIS.o: init_module:
Device or resource busy
Dec 15 16:53:34 pc104 insmod: Hint: insmod errors can be caused by
incorrect module parameters, including invalid IO or IRQ
parameters. You may find more information in syslog or the output
from dmesg
Dec 15 16:53:34 pc104 insmod:
/lib/modules/2.4.23/kernel/net/ipv4/netfilter/ipt_SYNDIS.o: insmod
ipt_SYNDIS failed
Dec 15 16:53:34 pc104 kernel: SYNDIS: target registered.<1>Unable to
handle kernel paging request at virtual address c884c348
Dec 15 16:53:34 pc104 kernel: printing eip:
Dec 15 16:53:34 pc104 kernel: c026f5a6
Dec 15 16:53:34 pc104 kernel: *pde = 07fbe067
Dec 15 16:53:34 pc104 kernel: *pte = 00000000
Dec 15 16:53:34 pc104 kernel: Oops: 0000
Dec 15 16:53:34 pc104 kernel: CPU: 0
Dec 15 16:53:34 pc104 kernel: EIP: 0010:[find_inlist_lock+198/368]
Not tainted
Dec 15 16:53:34 pc104 kernel: EFLAGS: 00010216
Dec 15 16:53:34 pc104 kernel: eax: c031ea53 ebx: c88480de ecx:
c031ea20 edx: c884c340
Dec 15 16:53:34 pc104 kernel: esi: c88480df edi: c884c348 ebp:
c0b35b84 esp: c0b35b2c
Dec 15 16:53:34 pc104 kernel: ds: 0018 es: 0018 ss: 0018
Dec 15 16:53:34 pc104 kernel: Process iptables (pid: 593,
stackpage=c0b35000)
Dec 15 16:53:34 pc104 kernel: Stack: 00000286 5f747069 444e5953 c0005349
c02ddcfc 00000001 c7fbe128 c0135843
Dec 15 16:53:34 pc104 kernel: 00000000 c0131857 c02ddb1c c02ddcf4
00000000 00000000 0000042c c0101c88
Dec 15 16:53:34 pc104 kernel: 0004a000 c0b35b60 00000000 c88480dc
00000001 c8848040 0000009c c026fc8c
Dec 15 16:53:34 pc104 kernel: Call Trace: [__alloc_pages+99/656]
[get_vm_area+23/240] [translate_table+1116/1616] [do_replace+379/1072]
[do_ipt_set_ctl+87/112]
Dec 15 16:53:34 pc104 kernel: [nf_sockopt+289/304]
[nf_setsockopt+32/48] [ip_setsockopt+1577/3696] [nf_sockopt+170/304]
[nf_getsockopt+32/48] [ip_getsockopt+2562/3316]
Dec 15 16:53:34 pc104 kernel: [enable_irq+97/176]
[ide_do_request+288/832] [schedule+627/1488] [__alloc_pages+99/656]
[lru_cache_add+110/128] [do_anonymous_page+269/288]
Dec 15 16:53:34 pc104 kernel: [do_no_page+458/480]
[handle_mm_fault+190/208] [vsnprintf+727/1136] [do_page_fault+786/1271]
[inet_setsockopt+37/48] [sys_setsockopt+69/128]
Dec 15 16:53:34 pc104 kernel: [sys_socketcall+408/496]
[do_page_fault+0/1271] [error_code+52/60] [system_call+51/56]
Dec 15 16:53:34 pc104 kernel:
Dec 15 16:53:34 pc104 kernel: Code: ae 75 08 84 c0 75 f8 31 c0 eb 04 19
c0 0c 01 85 c0 75 2e 89
Dec 15 16:54:14 pc104 syslog: Kernel log daemon terminating.
next reply other threads:[~2003-12-15 15:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-15 15:21 Emmanuel Guiton [this message]
2003-12-15 15:36 ` My first target module is a fiasco KOVACS Krisztian
2003-12-15 15:48 ` Emmanuel Guiton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FDDD174.5050409@netlab.hut.fi \
--to=emmanuel@netlab.hut.fi \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.