From: Andries.Brouwer@cwi.nl
To: Andries.Brouwer@cwi.nl, swansma@yahoo.com
Cc: linux-kernel@vger.kernel.org, manfred@colorfullife.com
Subject: Re: Fwd: Re: System V msg queue bugs in latest kernels
Date: Sun, 18 Feb 2001 01:10:14 +0100 (MET) [thread overview]
Message-ID: <UTC200102180010.BAA163601.aeb@vlet.cwi.nl> (raw)
From swansma@yahoo.com Sat Feb 17 22:45:36 2001
I'm sending this to you with the hope that lines like this (in ipcs.c)
can be modified to report proper values:
printf ("%-10o%-12ld%-12ld\n",
ipcp->mode & 0777,
/*
* glibc-2.1.3 and earlier has unsigned short;
* glibc-2.1.91 has variation between
* unsigned short, unsigned long
* Austin has msgqnum_t
*/
(long) msgque.msg_cbytes,
(long) msgque.msg_qnum);
msg_cbytes and msg_qnum should be handled differently (as per Manfred's
email).
Hmm. In 2.2.18 these fields are short in the kernel, so there is
no more information, and ipcs cannot print it.
In 2.4.1 these fields are long in the kernel, and are copied back
to user space using copy_msqid_to_user() which will give the longs
in case IPC_64 was set, and the shorts otherwise.
(By the way, "IPC_64" is rather a misnomer - it is more like IPC_32.
I could well imagine that we'll need something for 64-bits sooner or
later (and call it IPC_128 then?).)
Manfred's email does
#define msg_lqbytes __rwait
that is, his program stores information in, and retrieves information
from some field that maybe is unused. In fact the kernel also uses it,
so I don't think that would be very successful.
No, we must just use IPC_64 when it is available, and that is glibc's job.
Looking at the libc source I see that glibc-2.1.95 does this, but
glibc-2.1.3 doesn't. So, maybe, if you upgrade your glibc all will be well.
Andries
reply other threads:[~2001-02-18 0:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=UTC200102180010.BAA163601.aeb@vlet.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=swansma@yahoo.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®