From: Jurij Smakov <jurij@wooyd.org>
To: sparclinux@vger.kernel.org
Subject: Unaligned accesses in compat_sys_msgrcv and sys_msgrcv
Date: Sat, 21 Oct 2006 04:11:08 +0000 [thread overview]
Message-ID: <20061021041107.GA4629@droopy.oc.cox.net> (raw)
Hi,
Every time I compile anything on my box running 2.6.18, I get these
messages in dmesg every 5 seconds:
Kernel unaligned access at TPC[4ec2f0] sys_msgrcv+0x2dc/0x32c
Kernel unaligned access at TPC[4e9f6c] compat_sys_msgrcv+0xbc/0x124
Kernel unaligned access at TPC[4ec2f0] sys_msgrcv+0x2dc/0x32c
Kernel unaligned access at TPC[4e9f6c] compat_sys_msgrcv+0xbc/0x124
Kernel unaligned access at TPC[4ec2f0] sys_msgrcv+0x2dc/0x32c
Decoding the addresses indicates that the unaligned accesses are
generated by get_user call in compat_sys_msgrcv at ipc/compat.c:357
and put_user in sys_msgrcv at ipc/msg.c:836. As far as I can tell, the
problem stems from the fact that allocating memory with
p = compat_alloc_user_space(second + sizeof(struct msgbuf));
at ipc/compat.c:352 does not guarantee alignment of p, so when we
later try to ldxa from the address &p->mtype (in get_user) or stxa
to &msgp->mtype (in put_user), we catch an exception.
As I'm not sure what would be the correct fix here, I'd appreciate any
advice on how to deal with that.
Best regards,
--
Jurij Smakov jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC
next reply other threads:[~2006-10-21 4:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-21 4:11 Jurij Smakov [this message]
2006-10-21 6:35 ` Unaligned accesses in compat_sys_msgrcv and sys_msgrcv David Miller
2006-10-23 4:54 ` David Miller
2006-10-23 16:52 ` Jurij Smakov
2006-10-23 21:01 ` David Miller
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=20061021041107.GA4629@droopy.oc.cox.net \
--to=jurij@wooyd.org \
--cc=sparclinux@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.