All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred <manfred@colorfullife.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Andrea Arcangeli <andrea@suse.de>, Hubert Mantel <mantel@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: Compatibility issue with 2.2.19pre7
Date: Thu, 11 Jan 2001 07:10:27 -0500 (EST)	[thread overview]
Message-ID: <979215027.3a5da2b3781d7@localhost> (raw)
In-Reply-To: <200101110734.f0B7Y1x01512@flint.arm.linux.org.uk>
In-Reply-To: <200101110734.f0B7Y1x01512@flint.arm.linux.org.uk>

Zitiere Russell King <rmk@arm.linux.org.uk>:
> The API changed:
>  struct nfs_mount_data {
>         int             version;                /* 1 */
>         int             fd;                     /* 1 */
> -       struct nfs_fh   root;                   /* 1 */
> +       struct nfs2_fh  old_root;               /* 1 */

I don't see an API change:
the 2.2.17 "struct nfs_fs" and the 2.2.18 "struct nfs2_fh" are identical.

Ok, I see the problem:

struct nfs_fh {
    unsigned short          size;
    unsigned char           data[NFS_MAXFHSIZE];
}

The compiler thinks that data is a character array, thus no padding is inserted.
nlm_lookup_file casts f->data to "struct knfs_fs", a structure with pointers and
u32. --> unaligned u32 read --> boom.

Is that correct?
Is &(((struct nfs_fh*)0)->data) 2 or 4?

ARM isn't the only cpu that can't handle unaligned memory reads, why doesn't the
code fail on Alpha/Sparc? Does gcc insert padding on these cpus?


--
	Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2001-01-11 12:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-10  0:37 Compatibility issue with 2.2.19pre7 Hubert Mantel
2001-01-10  0:43 ` Alan Cox
2001-01-10  6:54 ` Russell King
2001-01-10 15:31   ` Andrea Arcangeli
2001-01-10 22:09     ` Russell King
2001-01-10 23:59       ` Andrea Arcangeli
2001-01-11  7:34         ` Russell King
2001-01-11 10:33           ` Andi Kleen
2001-01-11 10:36             ` Russell King
2001-01-11 12:10           ` Manfred [this message]
2001-01-11 12:10             ` Andi Kleen
2001-01-11 12:29               ` Manfred
2001-01-11 13:27                 ` Russell King
2001-01-24  7:51         ` Richard Henderson
2001-01-24  9:02           ` Andrea Arcangeli
2001-01-24  9:51             ` Richard Henderson
2001-01-24 12:21               ` Andrea Arcangeli
2001-01-24 17:49                 ` Richard Henderson
2001-01-24 10:09             ` Thomas Pornin
2001-01-11 15:28     ` Trond Myklebust
2001-01-11 16:19       ` Manfred Spraul
2001-01-11 17:44         ` Trond Myklebust
2001-01-11 18:22           ` Trond Myklebust
2001-01-11 18:27             ` Andrea Arcangeli
2001-01-11 18:30               ` Trond Myklebust
2001-01-11 18:43                 ` Andrea Arcangeli
2001-01-11 20:09                   ` Russell King
2001-01-11 20:39                   ` Trond Myklebust
2001-01-11 11:37   ` Trond Myklebust
  -- strict thread matches above, loose matches on Subject: below --
2001-01-24 13:46 Jesse Pollard

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=979215027.3a5da2b3781d7@localhost \
    --to=manfred@colorfullife.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mantel@suse.de \
    --cc=rmk@arm.linux.org.uk \
    /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.