Messages in this thread | | | Date | Mon, 9 Aug 1999 20:31:07 -0500 | From | Michael Elizabeth Chastain <> | Subject | BUG: wait queue changes messed up struct msqid_ds |
| |
Hello *,
I'm looking at the wait queue changes in 2.3.1, and I noticed that one of the modified structures is "struct msqid_ds" in include/linux/msg.h.
"struct msqid_ds" is part of the userland-visible ABI; that is why it appears above the __KERNEL__ line. It is used in file ipc/msg.c, function sys_msgctl, cases MSG_STAT, IPC_SET, and IPC_STAT. Some of the values copied between kernel and user space are located after parts of the structure that have changed size, so they now have different offsets!
I think the canonical fix for this is to have two structures:
struct user_msqid_ds /* userland layout, outside __KERNEL__ */ struct kernel_msqid_ds /* kernel layout, inside __KERNEL__ */
In user_msqid_ds, "wwait" and "rwait" should be void pointers, for compatibility with 2.2
But I'm not attached to any particular solution. I just want to flag the problem.
Note: keep an eye on the sparc32 code, which already does one level of translation (and I believe it works correctly at the moment, good job). Make sure that it keeps translating to the same structure that sys_msgctl accepts!
Also, I checked out all the other structures affected in 2.3.1, and none of them triggered me to say "hmmm I remember entering that in my giant list of ABI Data Types". It's unusual for a wait-queue pointer to be in an ABI structure.
Michael Elizabeth Chastain <mailto:mec@shout.net> "love without fear"
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |