From: Amos Waterland <apw@us.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: pwaechtler@mac.com, golbi@mat.uni.torun.pl,
linux-kernel@vger.kernel.org, Jakub Jelinek <jakub@redhat.com>,
Ulrich Drepper <drepper@redhat.com>
Subject: Re: [PATCH] POSIX message queues
Date: Fri, 6 Sep 2002 17:48:32 -0500 [thread overview]
Message-ID: <20020906174832.A25611@kvasir.austin.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0209041311550.4000-100000@localhost.localdomain>; from mingo@elte.hu on Wed, Sep 04, 2002 at 01:13:28PM +0200
On Wed, Sep 04, 2002 at 01:13:28PM +0200, Ingo Molnar wrote:
>
> On Sun, 1 Sep 2002, Amos Waterland wrote:
>
> > That is the fundamental problem with a userspace shared memory
> > implementation: write permissions on a message queue should grant
> > mq_send(), but write permissions on shared memory grant a lot more than
> > just that.
>
> is it really a problem? As long as the read and write queues are separated
> per sender, all that can happen is that a sender is allowed to read his
> own messages - that is not an exciting capability.
Ingo:
I can see no way to keep the queues separated per sender if userspace
shared memory is used. The data structures used to keep track of the
messages must be writable by both the senders and receivers, because of
the kernel persistent nature of message queues: messages must stay in
the queue during the interval of arbitrary length between the sender
calling mq_send() and the receiver calling mq_receive().
That is, suppose process X posts message M, and then exits. Process Y
wants to receive message M, which means it must acquire a process-shared
lock and then remove M from the queue: so Y must be able to update the
data structures representing the queue. I see no way to allow Y to
update the data structures in shared memory without giving Y write
permission to the pages. If Y has write permission to the pages, it can
spoof messages/wreck the queue, etc. If you see a way around this,
please correct me. Thanks.
Ulrich/Jakub:
Is the above related to glibc's position that mq's will not go in until
there is kernel support? Thanks.
Amos Waterland
next prev parent reply other threads:[~2002-09-06 22:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-29 21:53 pwaechtler
2002-08-30 9:48 ` Amos Waterland
2002-08-31 11:43 ` pwaechtler
2002-08-31 13:14 ` Krzysztof Benedyczak
2002-09-01 0:22 ` Amos Waterland
2002-09-01 1:50 ` Amos Waterland
2002-09-04 11:13 ` Ingo Molnar
2002-09-06 10:04 ` Pavel Machek
2002-09-07 14:16 ` pwaechtler
2002-09-06 22:48 ` Amos Waterland [this message]
2002-09-07 14:11 ` pwaechtler
2002-09-07 15:17 ` Ingo Molnar
2002-09-08 22:00 ` Amos Waterland
2002-08-31 12:53 ` Krzysztof Benedyczak
2002-09-07 14:39 ` pwaechtler
-- strict thread matches above, loose matches on Subject: below --
2002-09-04 16:03 Manfred Spraul
2002-08-27 21:48 Krzysztof Benedyczak
2002-08-27 22:16 ` Christoph Hellwig
2002-08-31 13:28 ` Krzysztof Benedyczak
2002-09-01 7:24 ` Jakub Jelinek
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=20020906174832.A25611@kvasir.austin.ibm.com \
--to=apw@us.ibm.com \
--cc=drepper@redhat.com \
--cc=golbi@mat.uni.torun.pl \
--cc=jakub@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pwaechtler@mac.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®