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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 Jun 2012 07:26:04 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Larry Finger <Larry.Finger@...inger.net>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: Question about do_mmap changes

On Mon, Jun 04, 2012 at 12:29:45AM -0500, Larry Finger wrote:
> Al,
> 
> In commit e3fc629d7bb70848fbf479688a66d4e76dff46ac in 3.5-rc1, you
> change do_mmap() to static, and use do_mmap_pgoff() instaed. The
> VirtualBox kernel module calls do_mmap(), and no longer compiles. I
> fixed the compile problem with the patch
[snip]
> I am not quite sure why do_munmap() is undefined as the symbol is
> exported; however, should do_mmap_pgoff() be exported?

a) you'd better make very certain that you are holding ->mmap_sem on
current->mm; I couldn't verify that.

b) as for rtR0MemObjLinuxDoMmap(), I would suggest pulling down_write()/
up_write() on ->mmap_sem into the function, collapsing them down into
do_mmap() turning it into vm_mmap().  Oh, and probably breaking wrists
to whoever had come up with that function name, but that's a matter of
taste.  Some prefer kneecaps.

c) WTF is MY_DO_MUNMAP() and are you guaranteed that you are doing that to
current->mm and not to something else?  If not, you have a big problem;
if yes, convert to vm_munmap().

Again, doing mmap/munmap to some random process' mm is a bloody bad idea;
there's a shitload of races in that area.
--
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