This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: msgctl() on MIPS, n32 ABI.


On Thu, 4 Jan 2007 17:43:46 -0800, "Kaz Kylheku" <kaz@zeugmasystems.com> wrote:
> I have a user who's encountering an issue with the msgctl() system call,
> on MIPS, n32 ABI, kernel 2.6.17.7.
> 
> The glibc definition of msgid_ds seems to disagree with that of the
> kernel. When the IPC_STAT msgctl command is used, the kernel apparently
> overruns the space causing a corrupt stack, when the IPC_STAT command is
> used.
> 
> I don't see anything in the bits/msg.h definition of struct msqid_ds
> that would take care of 32 versus 64 issues. Shouldn't there be
> conditionally defined padding after the three __time_t members? For some
> other architectures like x86_64, the padding is there.
 
There is old (but recently reposted) patch for this issue:
http://sourceware.org/ml/libc-ports/2006-11/msg00003.html

> Also, the n32 system call just routes the system call directly to
> sys_msgctl, where there is no wrapper that would set the IPC_64 flag. If
> you don't have that, then the IPC_OLD version is assumed: i.e. that you
> have the old obsolete version of the structure which contains a next and
> previous pointer.

And I think this was fixed on linux-mips.org two months ago:

master: http://www.linux-mips.org/g/linux/8449047d
linux-2.6.18-stable: http://www.linux-mips.org/g/linux/26c12cea
linux-2.6.17-stable: http://www.linux-mips.org/g/linux/aee726a6
linux-2.6.16-stable: http://www.linux-mips.org/g/linux/2d465e56

Upcoming 2.6.20 will contain this fix.


Do they solve your problem?

---
Atsushi Nemoto


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]