linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Arend van Spriel <arend@broadcom.com>
Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list@broadcom.com
Subject: Re: brcm80211: use endian annotation for pmk related structure
Date: Mon, 3 Nov 2014 15:22:46 +0300	[thread overview]
Message-ID: <20141103122246.GQ6890@mwanda> (raw)
In-Reply-To: <54539EB0.2050207@broadcom.com>

On Fri, Oct 31, 2014 at 03:37:36PM +0100, Arend van Spriel wrote:
> On 10/31/14 15:26, Dan Carpenter wrote:
> >On Fri, Oct 31, 2014 at 03:18:27PM +0100, Arend van Spriel wrote:
> >>Understood. Not sure what the motivation is to mistrust endian more.
> >
> >Endian data tends to come from suspicious places such as disk images,
> >usb devices, and networks.
> >
> >>Simply because there could be conversion errors? Anyway, the main
> >>question is whether pmkid_len is always between 0 and
> >>WLAN_PMKID_LEN. As far as I know it is. We could 1) add additional
> >>checks here, 2) make pmkid_len of u32 type, or 3) just mention the
> >>(sure) assumption in a comment. I would prefer option 2) or 3).
> >
> >I would prefer 2.  Static checker warnings are a pain.
> 
> Now who has been tinkering on static checkers ;-) Anyway, option 2)
> it is. Who will do the patch? :-p

Actually, in the end making it unsigned doesn't make sense because we
don't check for upper bound either.

Let's just forget about it.

regards,
dan carpenter


      reply	other threads:[~2014-11-03 12:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 12:51 brcm80211: use endian annotation for pmk related structure Dan Carpenter
2014-10-31 14:18 ` Arend van Spriel
2014-10-31 14:26   ` Dan Carpenter
2014-10-31 14:37     ` Arend van Spriel
2014-11-03 12:22       ` Dan Carpenter [this message]

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=20141103122246.GQ6890@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=arend@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).