From: suzuki <suzuki@linux.vnet.ibm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: akpm@osdl.org, davem@davemloft.net, linux-kernel@vger.kernel.org
Subject: Re: + fix-compat-space-msg-size-limit-for-msgsnd-msgrcv.patch added to -mm tree
Date: Mon, 13 Nov 2006 17:28:49 -0800 [thread overview]
Message-ID: <45591BD1.9070600@linux.vnet.ibm.com> (raw)
In-Reply-To: <200611140138.19111.arnd@arndb.de>
Arnd Bergmann wrote:
> 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.
>
I left it as such, inorder to avoid the future changes that may come in
the struct msgbuf -if at all-, which would make us to pass every single
field as a parameter to do_msgrcv/do_msgsnd.
thanks,
Suzuki
> Arnd <><
next prev parent reply other threads:[~2006-11-14 1:28 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 ` + fix-compat-space-msg-size-limit-for-msgsnd-msgrcv.patch added to -mm tree Arnd Bergmann
2006-11-14 1:28 ` suzuki [this message]
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=45591BD1.9070600@linux.vnet.ibm.com \
--to=suzuki@linux.vnet.ibm.com \
--cc=akpm@osdl.org \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@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.