Re: Unaligned accesses in compat_sys_msgrcv and sys_msgrcv

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

 



From: Jurij Smakov <jurij@xxxxxxxxx>
Date: Fri, 20 Oct 2006 21:11:08 -0700

> 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.

compat_alloc_user_space() should round down the pointer it returns
to be 8-byte aligned.

Thanks for catching this, I'll cook up a patch over the weekend.

What application is calling sys_msgrev() during a compile btw?
-
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