From: Harvey Harrison <harvey.harrison@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Jiri Benc <jbenc@suse.cz>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/2] tkip: remove inlines duplicating byteorder macros
Date: Sun, 09 Mar 2008 17:07:17 -0700 [thread overview]
Message-ID: <1205107642.6474.5.camel@brick> (raw)
In-Reply-To: <1204959424.6387.39.camel@johannes.berg>
On Sat, 2008-03-08 at 07:57 +0100, Johannes Berg wrote:
> On Fri, 2008-03-07 at 19:17 -0800, Harvey Harrison wrote:
> > Also remove Hi16/Lo16 and open code them in the one place they
> > are used.
>
> > int i, j;
> > + __le16 *ptr = (__le16 *)ta; /* address is held in LE byteorder */
> > +
> > + p1k[0] = tsc_IV32 & 0xffff;
> > + p1k[1] = tsc_IV32 >> 16;
> > + p1k[2] = __le16_to_cpup(ptr++);
> > + p1k[3] = __le16_to_cpup(ptr++);
> > + p1k[4] = __le16_to_cpup(ptr);
> >
> > - p1k[0] = Lo16(tsc_IV32);
> > - p1k[1] = Hi16(tsc_IV32);
> > - p1k[2] = Mk16(ta[1], ta[0]);
> > - p1k[3] = Mk16(ta[3], ta[2]);
> > - p1k[4] = Mk16(ta[5], ta[4]);
>
> NACK! Now the code assumes natural alignment of the u16s which is, as
> far as I can tell, completely bogus. Please review
> Documentation/unaligned-memory-access.txt.
I didn't think about the alignment constraints, true. Maybe common
_unaligned versions should be added to the kernel infrastructure instead
of hiding these hand-rolled versions in tkip.c?
Harvey
prev parent reply other threads:[~2008-03-10 0:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-08 3:17 [PATCH 2/2] tkip: remove inlines duplicating byteorder macros Harvey Harrison
2008-03-08 6:57 ` Johannes Berg
2008-03-10 0:07 ` Harvey Harrison [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=1205107642.6474.5.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=jbenc@suse.cz \
--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.