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:	Wed, 16 Dec 2009 08:54:22 +0000
From:	David Howells <dhowells@...hat.com>
To:	Mike Frysinger <vapier@...too.org>
Cc:	dhowells@...hat.com, uclinux-dev@...inux.org,
	David McCullough <davidm@...pgear.com>,
	Greg Ungerer <gerg@...inux.org>,
	Paul Mundt <lethal@...ux-sh.org>,
	uclinux-dist-devel@...ckfin.uclinux.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NOMMU: add [stack] label to per-process maps output

Mike Frysinger <vapier@...too.org> wrote:

> it'd be cool if the global /proc/maps could display something like
> [stack/<pid>], but i can't quite divine how to get a mm_struct out
> of a vm_region without having to walk the entire process list.

Tricky.  vm_regions can be shared between multiple mm_structs, although in the
case of the stack, they're probably not.  Furthermore, there's no interface to
mmap() to say the region you're allocating belongs to a particular PID (and
with userspace created threads, you have to create the stack _before_ calling
clone()).

That said, you could add a 'creator pid' to the vm_region.  This could be set
firstly by mmap() to current->pid, and then overridden by clone() for the
stack VMA.  It would be approximate, but probably a good approximation.  You
probably don't actually need a back pointer, just an integer PID.

David
--
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