mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Philippe De Muyter" <phdm@macqel.be>
To: "David S. Miller" <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, uclinux-dev@uclinux.org
Subject: Re: PATCH : ppp + big-endian = kernel crash
Date: Sun, 29 May 2005 23:38:53 +0200 (CEST)	[thread overview]
Message-ID: <200505292138.j4TLcrJ28536@mail.macqel.be> (raw)
In-Reply-To: <20050529.135257.98862077.davem@davemloft.net> from "David S. Miller" at "May 29, 2005 01:52:57 pm"

I have also sent this message to uclinux-dev, where it can be of interest.

David S. Miller wrote :
> From: "Philippe De Muyter" <phdm@macqel.be>
> Date: Sun, 29 May 2005 21:48:42 +0200 (CEST)
> 
> > +		/* If the address of the packet is odd now, fix it. */
> > +		if ((unsigned long)skb->data & 1) {
> > +			unsigned char *p;
> 
> And now it will crash when a packet is only 2-byte aligned
> when the input packet processing does the first access
> to the IP address in the packet header.

Actually, my fix has been tested extensively, and m68k's won't crash when
accessing 4-bytes words on only 2-byte aligned addresses.  If you mean
that I moved the packet in the wrong direction to get the best alignment,
this can easily be fixed.

> 
> Please make your m68k port handle unaligned memory accesses
> in kernel mode properly instead.
> 

Do you mean that ip_rcv may not assume that packets are properly aligned ?

And some non-mmu m68k (Coldfires) do not provide enough information in
exception frames to restart instructions on an address error in the general
case.

Best regards

Philippe

  reply	other threads:[~2005-05-29 21:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-29 19:48 Philippe De Muyter
2005-05-29 20:52 ` David S. Miller
2005-05-29 21:38   ` Philippe De Muyter [this message]
2005-05-29 21:55     ` David S. Miller
2005-05-30  2:52       ` Andrew Morton
2005-05-30  3:11         ` David S. Miller
2005-06-01 15:26           ` Philippe De Muyter
2005-05-30 10:22         ` Andi Kleen
2005-05-30 13:01           ` cutaway
2005-05-30  7:16   ` Giuliano Pochini
2005-05-30 14:05 Greg Ungerer

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=200505292138.j4TLcrJ28536@mail.macqel.be \
    --to=phdm@macqel.be \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uclinux-dev@uclinux.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

all inboxes | Powered by JetHome®