lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 29 Jul 2009 09:19:12 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Zhu Yi <yi.zhu@...el.com>
Cc:	"Valdis.Kletnieks@...edu" <Valdis.Kletnieks@...edu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
Subject: Re: 31-rc3-mmotm0716 - wonky wireless statistics..

On Wed, 2009-07-29 at 09:31 +0800, Zhu Yi wrote:

> > # cat /proc/net/wireless
> > Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
> >  face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
> >  wlan0: 0000   63.  -47.  -256        0      0      0      0      0        0
> >  wlan1: 0000    0     0     0        0      0      0      0      0        0
> >  wlan2: 0000    0     0     0        0      0      0      0      0        0
> > 
> > Where did that -256 for "noise" come from?  It ends up confusing the
> > gkrellm-wifi plugin, it reports a S/N of 219dB ;)
> 
> This should be related to http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=commit;h=fdb897ea5c77836f890033d563336ab0c94c9222
> 
> But I don't think this is an ABI broken. User space should parse the
> trailing '.' to see if a field is updated or not because there are cards
> not capable to report hardware noise level anyway. Johannes?

So I had to look at the code to figure out wtf is going on.

Then the value shown is calculated as:
	((__s32) stats->qual.noise) - ((stats->qual.updated & IW_QUAL_DBM) ? 0x100 : 0)

and since we have dBm for the signal strength (and dBm is "all or
nothing") you get -256 since we don't fill noise right now.

However, it goes on like this:
	stats->qual.updated & IW_QUAL_NOISE_UPDATED ? '.' : ' '

so you're right -- the tool shouldn't be using the value unless followed
by a dot (".").

Thus, your analysis is correct as far as I can tell -- it's a userspace
bug and your userspace just happened to work correctly with this card,
but would have been broken with almost all other wireless cards.

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ