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, 15 Sep 2014 18:21:31 +0200
From:	Oleg Nesterov <>
To:	Jerome Marchand <>
Cc:, Randy Dunlap <>,
	Martin Schwidefsky <>,
	Heiko Carstens <>,, Hugh Dickins <>,
	Peter Zijlstra <>,
	Paul Mackerras <>,
	Ingo Molnar <>,
	Arnaldo Carvalho de Melo <>,,,
Subject: Re: [RFC PATCH v2 5/5] mm, shmem: Show location of non-resident
	shmem pages in smaps

Hi Jerome,

Not sure I understand this patch correctly, will try to read it later.
But a couple of nits/questions anyway,

On 09/15, Jerome Marchand wrote:
> +The ShmXXX lines only appears for shmem mapping. They show the amount of memory
> +from the mapping that is currently:
> + - resident in RAM but not mapped into any process (ShmNotMapped)

But how can we know that it is not mapped by another process?

And in fact "not mapped" looks confusing (at least to me). IIUC it is actually
mapped even by this process, just it never tried to fault these (resident or
swapped) pages in. Right?

> +void update_shmem_stats(struct mem_size_stats *mss, struct vm_area_struct *vma,
> +			pgoff_t pgoff, unsigned long size)


> +{
> +	int count = 0;
> +
> +	switch (shmem_locate(vma, pgoff, &count)) {
> +		if (!count)
> +			mss->shmem_notmapped += size;
> +		break;
> +	case SHMEM_SWAP:
> +		mss->shmem_swap += size;
> +		break;
> +	}
> +}

It seems that shmem_locate() and shmem_vma() are only defined if CONFIG_SHMEM,
probably this series needs more ifdef's.

And I am not sure why we ignore SHMEM_SWAPCACHE...


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists