Hi,

i finally removed the mentioned 'false' requirement and the element was
compiled and integrated into the kernel module. When installing the
module with a click script using click-install, the module crashes with
a null pointer dereference, however. I didn't have the time to do
further tests with simpler click scripts. I will check this within the
next days.
Attached you will find the kernel call trace for this null pointer
dereference. The corresponding click part:

AddressInfo(localDevice DEVNAME:ip/24 DEVNAME:eth);
FromHost(fake0, localDevice:ipnet, ETHER localDevice:eth, TYPE IP) -> ...

DEVNAME will be replaced by an existing network device.
Maybe this is sufficient for someone to detect the problem.

Sascha

Am 09.11.2010 22:27, schrieb Sascha Alexander Jopen:
> Hello,
> 
> the FromHost element simply does not exist after compiling. ToHost,
> ToHostSniffers and ToDevice, as well as FromDevice, are compiled,
> FromHost not.
> When feeding a click script to click-install the following error is emitted:
> <stdin>:144: unknown element class 'FromHost'
> 
> fromhost.cc contains
> ELEMENT_REQUIRES(AnyDevice linuxmodule false)
> The 'false' requirement, may be this prevents compiling this element?
> 
> Sascha
> 
> 
> 
> Am 09.11.2010 22:06, schrieb Joonwoo Park:
>> Hi Sascha,
>>
>> I guess I'm not quite following FromHost issue here.
>>
>> Are you having build failure or any other problem?
>> When I submitted patchless patches, I also built and fixes FromHost
>> element and confirmed it's building.  I haven't tested element though.
>> Did you apply '07/12 FromHost: netdev_ops for linux 2.6.33+'?
>> http://www.mail-archive.com/[email protected]/msg04242.html
>>
>> Thanks,
>> Joonwoo
>>
>> On Tue, Nov 9, 2010 at 11:42 AM, Sascha Alexander Jopen
>> <[email protected]> wrote:
>>> Hey,
>>>
>>> i compiled for a recent kernel from ubuntu, namely 2.6.35-22-generic. I
>>> didn't apply your NETREG_REGISTERED patch, but it seems, everything
>>> compiled fine.
>>> I think this patch part is included in Joonwoos "[PATCH 04/12]
>>> Configury: prepend net_device namespace for NETREG_REGISTERED"
>>> As the enum in question is part of the net_device struct, everything
>>> should work as expected. Applying your patch leads to compiler errors on
>>> my system.
>>>
>>> So basically i am right, that FromHost is completely missing, currently?
>>> It would be nice, if someone could point me to the right direction. What
>>> is the problematic part in implementing this element?
>>>
>>> Regards,
>>> Sascha
>>>
>>> Am 09.11.2010 19:35, schrieb Roman Chertov:
>>>> Sascha,
>>>>
>>>> What kernel version did you use?  It appears that for 2.6.35 and above the
>>>> NETREG_REGISTERED fix is required as well.  If you start on updating 
>>>> FromHost, I
>>>> will be glad to give you a hand.
>>>>
>>>> Roman
>>>>
>>>>
>>>> On Fri, 05 Nov 2010 20:02:38 +0100 Sascha Alexander Jopen
>>>> <[email protected]> wrote
>>>>
>>>>> Hello,
>>>>>
>>>>> i tried click patchless today. I used those patches from Joonwoo, which
>>>>> didn't make it into the repository till now. Especially the patches to
>>>>> fixincludes and the configure scripts were necessary.
>>>>>
>>>>> It seems the FromHost element is not included during build. I know this
>>>>> was the last element which had to be done, but is it really still not
>>>>> finished? What are the missing parts for this element to work?
>>>>>
>>>>> We are using click userlevel and kernel level isn't really necessary but
>>>>> still nice to have. So maybe i could use some spare time to finish the
>>>>> FromHost element, if there isn't that much missing.
>>>>>
>>>>> Regards,
>>>>> Sascha Jopen
>>>>>
>>>>> On 11/03/10 17:42, Roman Chertov wrote:
>>>>>> This will also require Joonwoo's PATCH1/12.  It removes #include
>>>>>> <linux/autoconf.h>  from configure.in
>>>>>>
>>>>>> On Tue, 02 Nov 2010 18:44:32 -0700 "Roman Chertov"<[email protected]>
>>>>>> wrote
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> This works on Fedora 13 running 2.6.35.8 SMP kernel.  The second patch 
>>>>>>> is
>>>>>>> based
>>>>>>> on patches 2/12 and 3/12 that Joonwoo released.  I had to add the
>>>>>>> NETREG_REGISTERED patch due to scoping issues when an enum declared in
>>>>>>> net_device is used.  Otherwise, the code is same as in github master
>>>>>>> branch.
>>>>>>> I
>>>>>>> am not sure if there is a more elegant way to solve that issue.
>>>>>>>
>>>>>>> Roman
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> click mailing list
>>>>>> [email protected]
>>>>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>>>>
>>>>> _______________________________________________
>>>>> click mailing list
>>>>> [email protected]
>>>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>>>
>>>>
>>>
>>> _______________________________________________
>>> click mailing list
>>> [email protected]
>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>>
> 
> _______________________________________________
> click mailing list
> [email protected]
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click

[1238183.501964] click: starting router thread pid 8296 (f1a55f00)
[1238183.503654] BUG: unable to handle kernel NULL pointer dereference at 
00000008
[1238183.503658] IP: [<fd6592d8>] _ZN8FromHost10new_deviceEPKc+0x58/0xc0 [click]
[1238183.503760] *pde = df846067
[1238183.503763] Oops: 0002 [#2] SMP
[1238183.503766] last sysfs file: 
/sys/devices/pci0000:00/0000:00:1f.2/host2/target2:0:0/2:0:0:0/block/sda/uevent
[1238183.503769] Modules linked in: click iptable_filter ip_tables x_tables 
proclikefs btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus hfs minix ntfs 
vfat msdos fat jfs xfs exportfs reiserfs binfmt_misc parport_pc ppdev ath5k ath 
led_class nvidia(P) joydev snd_hda_codec_idt arc4 snd_hda_intel snd_hda_codec 
snd_hwdep snd_pcm snd_seq_midi iwl3945 snd_rawmidi snd_seq_midi_event pcmcia 
snd_seq iwlcore snd_timer mac80211 snd_seq_device dell_laptop dell_wmi 
yenta_socket dcdbas cfg80211 pcmcia_rsrc video psmouse snd pcmcia_core 
serio_raw intel_agp soundcore output snd_page_alloc agpgart lp parport usbhid 
hid firewire_ohci tg3 firewire_core crc_itu_t [last unloaded: click]
[1238183.503815]
[1238183.503819] Pid: 8293, comm: click-install Tainted: P      D     
2.6.35-22-generic #34-Ubuntu 0GU095/Precision M4300
[1238183.503822] EIP: 0060:[<fd6592d8>] EFLAGS: 00010286 CPU: 1
[1238183.503904] EIP is at _ZN8FromHost10new_deviceEPKc+0x58/0xc0 [click]
[1238183.503906] EAX: f100e800 EBX: f241f200 ECX: f100e800 EDX: 00000000
[1238183.503908] ESI: f072428c EDI: f241f23c EBP: f0679cc4 ESP: f0679cb8
[1238183.503910]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[1238183.503913] Process click-install (pid: 8293, ti=f0678000 task=f1074c20 
task.ti=f0678000)
[1238183.503914] Stack:
[1238183.503916]  00000001 f241f200 f0679dac f0679d80 fd65a260 00000000 
f241f200 f0679dac
[1238183.503922] <0> fd6cbb40 00000003 fd6c8530 f241f23c fd6cbb39 00000002 
fd6c86b6 f241f270
[1238183.503928] <0> f241f274 fd6cbb34 00000000 fd6c8537 f0679d64 fd6cbb2e 
00000000 fd6c871a
[1238183.503935] Call Trace:
[1238183.504026]  [<fd65a260>] ? 
_ZN8FromHost9configureER6VectorI6StringEP12ErrorHandler+0x3c0/0x4c0 [click]
[1238183.504107]  [<fd616781>] ? 
_ZN6Router10initializeEP12ErrorHandler+0x1f1/0x4b0 [click]
[1238183.504199]  [<fd6b0cff>] ? 
_ZL12write_configRK6StringP7ElementPvP12ErrorHandler+0x11f/0x1e0 [click]
[1238183.504281]  [<fd61422e>] ? 
_ZNK7Handler10call_writeERK6StringP7ElementP12ErrorHandler+0xae/0x100 [click]
[1238183.504372]  [<fd6b3447>] ? handler_do_write+0x227/0x710 [click]
[1238183.504379]  [<c0214747>] ? mem_cgroup_charge_common+0x57/0x70
[1238183.504457]  [<fd5f41e5>] ? click_lalloc+0x35/0x60 [click]
[1238183.504533]  [<fd5e882e>] ? _ZN6String11create_memoEPcii+0x3e/0x50 [click]
[1238183.504609]  [<fd5e99a2>] ? _ZN6String14append_garbageEi+0xc2/0x150 [click]
[1238183.504615]  [<c012ce18>] ? default_spin_lock_flags+0x8/0x10
[1238183.504620]  [<c05c8c0f>] ? _raw_spin_lock_irqsave+0x2f/0x50
[1238183.504625]  [<c0165f7f>] ? finish_wait+0x4f/0x70
[1238183.504715]  [<fd6b2eca>] ? _ZL11lock_configPKcii+0x9a/0xc0 [click]
[1238183.504805]  [<fd6b3995>] ? handler_flush+0x65/0xa0 [click]
[1238183.504809]  [<c0216901>] ? filp_close+0x31/0x80
[1238183.504813]  [<c02169c5>] ? sys_close+0x75/0xc0
[1238183.504817]  [<c05c9114>] ? syscall_call+0x7/0xb
[1238183.504820] Code: fd b9 d0 be 50 c0 85 c0 74 7c 89 f2 31 c0 c7 04 24 01 00 
00 00 e8 a9 07 ea c2 f0 ff 05 9c 90 7f c0 85 c0 74 4a 8b 90 c0 00 00 00 <c7> 42 
08 10 8f 65 fd 8b 90 c0 00 00 00 c7 42 0c 30 8f 65 fd 8b
[1238183.504875] EIP: [<fd6592d8>] _ZN8FromHost10new_deviceEPKc+0x58/0xc0 
[click] SS:ESP 0068:f0679cb8
[1238183.504967] CR2: 0000000000000008
[1238183.505040] ---[ end trace db552dcb0d7fb0e9 ]---
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to