netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Ingo Oeser <netdev@axxeo.de>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Richard Henderson <rth@twiddle.net>
Cc: shemminger@osdl.org, p_gortmaker@yahoo.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	tomri@gmx.net, ioe-lkml@rameria.de
Subject: Re: Fw: [Bug 6421] New: kernel 2.6.10-2.6.16 on alpha: arch/alpha/kernel/io.c, iowrite16_rep() BUG_ON((unsigned long)src & 0x1) triggered
Date: Fri, 21 Apr 2006 16:12:27 -0700	[thread overview]
Message-ID: <20060421161227.00d688d6.akpm@osdl.org> (raw)
In-Reply-To: <200604211945.37129.netdev@axxeo.de>

Ingo Oeser <netdev@axxeo.de> wrote:
>
> Stephen Hemminger wrote:
> > Looks like PIO at unaligned addresses doesn't work on alpha...
> 
> Maybe this should be fixed similiar to ioread32_rep in  arch/alpha/kernel/io.c?
> 

I think so, but Ivan thinks networking is bust:


Ivan Kokshaysky <ink@jurassic.park.msu.ru> wrote:
>
> On Fri, Apr 21, 2006 at 04:28:30AM -0700, Andrew Morton wrote:
> > Why is it "silently corrupted"?  It's just misaligned, isn't it?  Networking
> > does that sometimes.
> 
> Because networking does read/write "short" fields in various packet
> header structures. Results are illustrated in a following example:
> 
> char foo[] __attribute__((aligned(8))) = "0123456701234567";
> 
> int main()
> {
> 	short *bar = (short *)&foo[7];
> 	printf("%04x\n", *bar); /* 3037 */
> 	*bar = 0x4241; /* "AB" */
> 	printf("%s\n", foo);
> 	return 0;
> }
> --------
> 0037
> ^^
> 0123456A01234567
>         ^
> Misalignment by two bytes for ints and longs is often unavoidable in
> networking and we can cope with it, but there is no excuse of 1-byte
> misalignment.

  reply	other threads:[~2006-04-21 23:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-21 17:27 Fw: [Bug 6421] New: kernel 2.6.10-2.6.16 on alpha: arch/alpha/kernel/io.c, iowrite16_rep() BUG_ON((unsigned long)src & 0x1) triggered Stephen Hemminger
2006-04-21 17:45 ` Ingo Oeser
2006-04-21 23:12   ` Andrew Morton [this message]
2006-04-22  7:56     ` alpha @ steudten Engineering
2006-04-23  5:43 ` Herbert Xu
2006-04-23  5:49   ` Herbert Xu

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=20060421161227.00d688d6.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=ioe-lkml@rameria.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@axxeo.de \
    --cc=netdev@vger.kernel.org \
    --cc=p_gortmaker@yahoo.com \
    --cc=rth@twiddle.net \
    --cc=shemminger@osdl.org \
    --cc=tomri@gmx.net \
    /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).