All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: iw packaging
Date: Tue, 16 Sep 2008 17:48:59 -0400	[thread overview]
Message-ID: <1221601739.17084.22.camel@dv> (raw)
In-Reply-To: <1221601136.9262.23.camel@johannes.berg>

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

  reply	other threads:[~2008-09-16 21:49 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16 20:29 iw packaging Johannes Berg
2008-09-16 20:46 ` Stefanik Gábor
2008-09-16 20:50 ` Pavel Roskin
2008-09-16 21:11   ` Johannes Berg
2008-09-16 21:15     ` Johannes Berg
2008-09-16 21:23       ` Pavel Roskin
2008-09-16 21:38         ` Johannes Berg
2008-09-16 21:48           ` Pavel Roskin [this message]
2008-09-16 21:56             ` Johannes Berg
2008-09-16 22:14               ` Johannes Berg
2008-09-16 23:20                 ` Pavel Roskin
2008-09-17  7:30                   ` Johannes Berg
2008-09-17 10:41 ` Jochen Friedrich
2008-09-17 10:43   ` Johannes Berg
2008-09-17 11:05     ` "Adam Cécile (Le_Vert)"
2008-09-17 11:07       ` Johannes Berg
2008-09-17 11:11         ` "Adam Cécile (Le_Vert)"
2008-09-17 11:18           ` Johannes Berg
2008-09-17 11:25             ` Johannes Berg
2008-09-17 20:19             ` Stefanik Gábor
2008-09-17 20:31               ` Johannes Berg
2008-09-17 21:46                 ` Davide Pesavento
2008-09-17 21:51                   ` Stefanik Gábor
2008-09-17 21:52                   ` Johannes Berg
2008-09-17 21:58                     ` Stefanik Gábor
2008-09-17 22:03                       ` Luis R. Rodriguez
2008-09-17 22:06                         ` Stefanik Gábor
2008-09-17 22:07                           ` Johannes Berg
2008-09-17 22:04                       ` Johannes Berg
2008-09-17 16:23 ` Marcel Holtmann
2008-09-17 16:43   ` Johannes Berg
2008-09-17 18:06     ` Johannes Berg
2008-09-17 19:23       ` Luis R. Rodriguez
2008-09-17 23:36       ` Marcel Holtmann
2008-09-17 23:42         ` Johannes Berg
2008-10-10 21:25           ` Thomas d'Otreppe
2008-09-18  8:09 ` Helmut Schaa
2008-09-27 16:59 ` Davide Pesavento

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=1221601739.17084.22.camel@dv \
    --to=proski@gnu.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.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.