Search Linux Wireless

Re: iw packaging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2008-09-16 at 23:38 +0200, Johannes Berg wrote:

> I think what may be happening is that alignment is somehow messing
> things up. Can you please try the patch below?

The patch doesn't help:

$ ./iw 
Usage:  ./iw [options] command
Options:
        --debug         enable netlink debugging
        --version       show version
Commands:
        list
        Segmentation fault (core dumped)

(gdb) p __start___cmd
$1 = 0x403d20
(gdb) p *__start___cmd
$2 = {section = 0x0, name = 0x403865 "list", args = 0x0, cmd = NL80211_CMD_GET_WIPHY, 
  nl_msg_flags = 768, idby = CIB_NONE, handler = 0x401da0 <handle_info>}
(gdb) p __start___cmd[0]
$3 = {section = 0x0, name = 0x403865 "list", args = 0x0, cmd = NL80211_CMD_GET_WIPHY, 
  nl_msg_flags = 768, idby = CIB_NONE, handler = 0x401da0 <handle_info>}
(gdb) p __start___cmd[1]
$4 = {section = 0x0, name = 0x0, args = 0x0, cmd = 4208746, nl_msg_flags = 0, idby = CIB_NONE, 
  handler = 0x1}
(gdb) p &__start___cmd[0]
$5 = (struct cmd *) 0x403d20
(gdb) p &__start___cmd[1]
$6 = (struct cmd *) 0x403d50

$ nm iw | grep __cmd |sort
0000000000403d20 A __start___cmd
0000000000403d20 r __cmd_handle_infoNL80211_CMD_GET_WIPHYCIB_NONE
0000000000403d60 r __cmd_handle_infoNL80211_CMD_GET_WIPHYCIB_PHY
0000000000403da0 r __cmd_handle_nameNL80211_CMD_SET_WIPHYCIB_PHY
...

The next command is at 0x403d60, but the code expects it at 0x403d50.
gdb confirms it:

(gdb) p *(struct cmd *) 0x403d60
$1 = {section = 0x0, name = 0x40386a "info", args = 0x0, cmd = NL80211_CMD_GET_WIPHY, 
  nl_msg_flags = 0, idby = CIB_PHY, handler = 0x401da0 <handle_info>}
(gdb) p *(struct cmd *) 0x403da0
$2 = {section = 0x403878 "set", name = 0x40387c "name", args = 0x403881 "<new name>", 
  cmd = NL80211_CMD_SET_WIPHY, nl_msg_flags = 0, idby = CIB_PHY, 
  handler = 0x402230 <handle_name>}
(gdb)

-- 
Regards,
Pavel Roskin
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux