lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Nov 2006 17:28:49 -0800
From:	suzuki <suzuki@...ux.vnet.ibm.com>
To:	Arnd Bergmann <arnd@...db.de>
CC:	akpm@...l.org, davem@...emloft.net, linux-kernel@...r.kernel.org
Subject: Re: + fix-compat-space-msg-size-limit-for-msgsnd-msgrcv.patch added
 to -mm tree

Arnd Bergmann wrote:
> On Tuesday 14 November 2006 00:58, akpm@...l.org wrote:
> 
> 
>>Subject: Fix compat space msg size limit for msgsnd/msgrcv
>>From: suzuki <suzuki@...ux.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@...ibm.com>
>>Cc: Arnd Bergmann <arnd@...db.de>
>>Cc: "David S. Miller" <davem@...emloft.net>
>>Signed-off-by: Andrew Morton <akpm@...l.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 <><

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ