From: "Gavin Lambert" <gavinl@compacsort.com>
To: <linux-mtd@lists.infradead.org>
Subject: MTD pointer alignment
Date: Wed, 29 Nov 2006 13:09:08 +1300 [thread overview]
Message-ID: <01e801c7134a$9c33da20$4800a8c0@gavinlpc> (raw)
Given that mtdchar assumes that it can mess with the low 2 bits of the
MTD pointer it keeps around with impunity, add_mtd_device in mtdcore.c
should probably refuse to add any MTD device pointer that doesn't fall
on a 4-byte boundary.
As of kernel 2.6.15, at least, it happily adds it, leading to much
weirdness if the pointer wasn't actually aligned that way (which can
happen if it's embedded in a structure -- since struct mtd_info starts
with a byte-sized field then by default the structure as a whole is
allowed to be byte aligned).
next reply other threads:[~2006-11-29 0:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 0:09 Gavin Lambert [this message]
2006-12-01 8:18 ` MTD pointer alignment Artem Bityutskiy
2006-12-03 21:43 ` Gavin Lambert
2006-12-04 13:37 ` David Woodhouse
2006-12-04 21:11 ` Gavin Lambert
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='01e801c7134a$9c33da20$4800a8c0@gavinlpc' \
--to=gavinl@compacsort.com \
--cc=linux-mtd@lists.infradead.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