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>] [day] [month] [year] [list]
Date:	Mon, 4 May 2009 01:27:51 +0800
From:	Igor Podlesny <for.poige+linux@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Hi! How can I figure out amount of a process' "locked" memory?

	Sorry for asking here, but Googled no real answer. There's
/usr/bin/pmap with its man-page saying that "-x" option would tell
some "extended" info, but alas, it just outputing "-" instead of real
values.

	Tried to test that using simple C program named "ml.c":
	
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>

int main(int ac, char *av[])
{
    const size_t alloc_size = 45 * 1024 * 1024;
    char *buf = malloc(alloc_size);
    if (mlock(buf, alloc_size) ) {
        perror("mlock");
    }

    getchar();

    return (0);
}

	And pmap -x on that test process shows:

Address           Kbytes     RSS    Anon  Locked Mode   Mapping
0000000000400000       4       -       -       - r-x--  ml
0000000000600000       4       -       -       - rw---  ml
00007f9686000000   46080       -       -       - rw---    [ anon ]
00007f9688d00000    2048       -       -       - rw---    [ anon ]
[...]
----------------  ------  ------  ------  ------
total kB           66976       -       -       -

	It seems no information under corresponding /proc/PID can provide the
answer too, at least maps/smaps don't have something related to the
"locked" attribute.
	
	uname -rm: 2.6.29.2-64-1KHz-fst-ldbg x86_64
	/lib/libc.so.6: GNU C Library stable release version 2.9, by Roland
McGrath et al.

	Thanks in advance,

-- 
End of message. Next message?
--
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