From: Zach Brown <zach.brown@oracle.com>
To: "Sébastien Dugué" <sebastien.dugue@bull.net>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-aio <linux-aio@kvack.org>, Andrew Morton <akpm@osdl.org>,
Suparna Bhattacharya <suparna@in.ibm.com>,
Christoph Hellwig <hch@infradead.org>,
Badari Pulavarty <pbadari@us.ibm.com>,
Jean Pierre Dion <jean-pierre.dion@bull.net>,
Ulrich Drepper <drepper@redhat.com>
Subject: Re: [PATCH -mm 3/4][AIO] - AIO completion signal notification
Date: Mon, 20 Nov 2006 07:13:15 -0800 [thread overview]
Message-ID: <4561C60B.5000106@oracle.com> (raw)
In-Reply-To: <20061120152252.7e5a4229@frecb000686>
Sébastien Dugué wrote:
> AIO completion signal notification
This is looking a lot better, thanks for keeping at it.
> +static long aio_setup_sigevent(struct aio_notify *notify,
> + struct sigevent __user *user_event)
> +{
> + sigevent_t event;
> + struct task_struct *target;
> +
> + if (copy_from_user(&event, user_event, sizeof (event)))
> + return -EFAULT;
Last time we talked about this needing to call get_compat_sigevent(). I
think it still needs to.
I think we should avoid the examples set by the current
compat_sys_io_submit() and get_compat_sigevent() callers. They copy
translated data on to the userspace stack and pass it to the syscalls.
That will get crazy for compat_sys_io_submit() because it would have to
rewrite the iocb and the pointer to the iocb to get sys_io_submit() to
find a copied sigevent on the stack.
I think the model is compat_do_readv_writev(). Hoist some of the
syscall logic up into the compat layer so that one copying and
translating pass is made instead of trying to fool the syscall logic
into thinking that it's being called from a native word size caller.
So io_submit_one() should be given the kernel copies of the userspace
structures it needs. sys_io_submit() will pass it the copies it made
for native word size callers. compat_sys_io_submit() will pass in the
copies it made after translating from 32bit arguments. io_submit_one()
and lookup_kioctx() will have to be made available to kernel/compat.c
(via linux/aio.h, surely.). aio_setup_sigevent() will be called from
*_io_submit() and given the kernel sigevent, not a userspace pointer.
Reworking things this way should have the added benefit of making 32/64
sys_io_submit() more efficient than it is today.
- z
next prev parent reply other threads:[~2006-11-20 23:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-20 14:17 [PATCH -mm 0/4][AIO] - AIO completion signal notification v2 Sébastien Dugué
2006-11-20 14:22 ` [PATCH -mm 1/4][AIO] - fix aio.h includes Sébastien Dugué
2006-11-20 13:31 ` Zach Brown
2006-11-20 14:22 ` [PATCH -mm 2/4][AIO] - export good_sigevent() Sébastien Dugué
2006-11-20 13:42 ` Zach Brown
2006-11-20 21:45 ` Ulrich Drepper
2006-11-20 14:02 ` Zach Brown
2006-11-20 14:22 ` [PATCH -mm 3/4][AIO] - AIO completion signal notification Sébastien Dugué
2006-11-20 15:13 ` Zach Brown [this message]
2006-11-21 10:40 ` Sébastien Dugué
[not found] ` <20061122104055.3d1c029a@frecb000686>
2006-11-22 10:22 ` Zach Brown
2006-11-23 8:24 ` Sébastien Dugué
2006-11-22 1:02 ` Andrew Morton
2006-11-23 8:28 ` Sébastien Dugué
2006-11-23 8:40 ` Andrew Morton
2006-11-23 9:47 ` Sébastien Dugué
2006-11-23 10:14 ` Andrew Morton
2006-11-23 10:27 ` Sébastien Dugué
2006-11-23 10:57 ` [PATCH] fs : reorder some 'struct inode' fields to speedup i_size manipulations Eric Dumazet
2006-11-27 21:37 ` Andrew Morton
2006-11-27 21:52 ` Eric Dumazet
2006-11-27 22:01 ` Andrew Morton
2006-11-28 20:31 ` Eric Dumazet
2006-11-20 14:23 ` [PATCH -mm 4/4][AIO] - Listio support Sébastien Dugué
2006-11-21 10:35 ` Suparna Bhattacharya
2006-11-27 13:39 ` Bharata B Rao
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=4561C60B.5000106@oracle.com \
--to=zach.brown@oracle.com \
--cc=akpm@osdl.org \
--cc=drepper@redhat.com \
--cc=hch@infradead.org \
--cc=jean-pierre.dion@bull.net \
--cc=linux-aio@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbadari@us.ibm.com \
--cc=sebastien.dugue@bull.net \
--cc=suparna@in.ibm.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