Unaligned accesses in compat_sys_msgrcv and sys_msgrcv

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx
Key: http://www.wooyd.org/pgpkey/                      KeyID: C99E03CC
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux