From: Manfred Spraul <manfred@colorfullife.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: posix message queues
Date: Thu, 08 Apr 2004 16:08:10 +0200 [thread overview]
Message-ID: <40755CCA.8030507@colorfullife.com> (raw)
In-Reply-To: <200404081017.46132.arnd@arndb.de>
Arnd Bergmann wrote:
>What worries me more than mq_attr compatibility is the conversion
>of struct sigevent, which might turn out really hard when more
>fields in there are used.
>
What is the problem for the wrappers with sigevent?
>+
>+static int get_compat_sigevent(struct sigevent *event,
>+ const struct compat_sigevent __user *u_event)
>+{
>+ if (verify_area(VERIFY_READ, u_event, sizeof(*u_event)))
>+ return -EFAULT;
>+
>+ return __get_user(event->sigev_value.sival_int,
>+ &u_event->sigev_value.sival_int)
>+ | __get_user(event->sigev_signo, &u_event->sigev_signo)
>+ | __get_user(event->sigev_notify, &u_event->sigev_notify)
>+ | __get_user(event->sigev_notify_thread_id,
>+ &u_event->sigev_notify_thread_id);
>+}
>+
>
The dangerous case for the wrappers is mq_notify for SIGEV_THREAD: The
kernel will read (with copy_from_user()) from the pointer
u_event->sigev_value.sival_ptr. Fixed 32-byte buffer. The data is opaque
- the kernel copies it back to the same process without any
interpretation. Would that work on all archs?
--
Manfred
next prev parent reply other threads:[~2004-04-08 14:08 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-07 19:07 posix message queues Andrew Morton
2004-04-07 19:15 ` Manfred Spraul
2004-04-08 8:17 ` Arnd Bergmann
2004-04-08 8:49 ` Andrew Morton
2004-04-08 14:08 ` Manfred Spraul [this message]
2004-04-08 20:24 ` Andrew Morton
2004-04-09 23:45 ` David S. Miller
2004-04-10 11:19 ` Manfred Spraul
2004-04-10 11:53 ` Manfred Spraul
2004-04-10 20:43 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2010-09-02 9:51 POSIX Message Queues Ardhan Madras
2010-06-15 3:34 Ardhan Madras
2010-06-15 15:33 ` Glynn Clements
2010-06-12 9:10 Ardhan Madras
2010-06-12 13:40 ` Glynn Clements
2004-04-08 22:22 posix message queues Arnd Bergmann
2003-10-07 7:50 POSIX " Peter Waechtler
2003-10-07 8:11 ` Jakub Jelinek
2003-10-05 9:13 Krzysztof Benedyczak
2003-10-05 10:11 ` Manfred Spraul
2003-10-06 19:04 ` Krzysztof Benedyczak
2003-10-05 16:35 ` Ulrich Drepper
2003-10-05 18:16 ` Jamie Lokier
2003-10-05 18:32 ` Jakub Jelinek
2003-10-05 19:18 ` Jamie Lokier
2003-10-05 21:52 ` Ulrich Drepper
2002-10-02 10:35 Krzysztof Benedyczak
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=40755CCA.8030507@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=akpm@osdl.org \
--cc=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.