From: Arnd Bergmann <arnd@arndb.de>
To: akpm@osdl.org
Cc: suzuki@linux.vnet.ibm.com, davem@davemloft.net,
suzuki@in.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: + fix-compat-space-msg-size-limit-for-msgsnd-msgrcv.patch added to -mm tree
Date: Tue, 14 Nov 2006 01:38:18 +0100 [thread overview]
Message-ID: <200611140138.19111.arnd@arndb.de> (raw)
In-Reply-To: <200611132358.kADNwF0V012270@shell0.pdx.osdl.net>
On Tuesday 14 November 2006 00:58, akpm@osdl.org wrote:
> Subject: Fix compat space msg size limit for msgsnd/msgrcv
> From: suzuki <suzuki@linux.vnet.ibm.com>
>
> Currently we allocate 64k space on the user stack and use it the msgbuf for
> sys_{msgrcv,msgsnd} for compat and the results are later copied in user [by
> copy_in_user].
>
> This patch introduces helper routines for sys_{msgrcv,msgsnd} which would
> accept the pointer to msgbuf along with the msgp->mtext. This avoids the
> need to allocate the msgsize on the userspace (thus removing the size
> limit) and the overhead of an extra copy_in_user().
>
> Signed-off-by: Suzuki K P <suzuki@in.ibm.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: "David S. Miller" <davem@davemloft.net>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
This patch is definitely a big step in the right direction here, but why
not go all the way and pass msgp->mtype to do_msgsnd/do_msgrcv as kernel
data instead of a user space pointer? This way you can get rid of the
compat_alloc_userspace entirely and save avoid doing an extra
put_user/get_user pair in the compat_ function.
Arnd <><
next parent reply other threads:[~2006-11-14 0:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200611132358.kADNwF0V012270@shell0.pdx.osdl.net>
2006-11-14 0:38 ` Arnd Bergmann [this message]
2006-11-14 1:28 ` + fix-compat-space-msg-size-limit-for-msgsnd-msgrcv.patch added to -mm tree suzuki
2006-11-14 9:49 ` Arnd Bergmann
2006-11-14 21:22 ` suzuki
2006-11-14 23:24 ` Arnd Bergmann
2006-11-14 23:30 ` suzuki
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=200611140138.19111.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=suzuki@in.ibm.com \
--cc=suzuki@linux.vnet.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