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] [day] [month] [year] [list]
Date:	Fri, 27 Apr 2012 17:37:06 +0400
From:	Pavel Emelyanov <xemul@...allels.com>
To:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
CC:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Hugh Dickins <hughd@...gle.com>, Rik van Riel <riel@...hat.com>
Subject: Re: [PATCH 2/2] proc: report page->index instead of pfn for non-linear
 mappings in /proc/pid/pagemap

On 04/27/2012 04:39 PM, Konstantin Khlebnikov wrote:
> Currently there is no way to find out current layout of non-linear mapping.
> Also there is no way to distinguish ordinary file mapping from non-linear mapping.
> 
> Now in pagemap non-linear pte can be recognized as present swapped file-backed,
> or as non-present non-swapped file-backed for non-present non-linear file-pte:
> 
>     present swapped file    data        description
>     0       0       0       null        non-present
>     0       0       1       page-index  non-linear file-pte
>     0       1       0       swap-entry  anon-page in swap, migration or hwpoison
>     0       1       1       swap-entry  file-page in migration or hwpoison
>     1       0       0       page-pfn    present private-anon or special page
>     1       0       1       page-pfn    present file or shared-anon page
>     1       1       0       none        impossible combination
>     1       1       1       page-index  non-linear file-page
> 
> [ the last unused combination 1-1-0 can be used for special pages, if anyone want this ]

This means that

a) Any application doing if (pme & PAGE_IS_XXX) checks will get ... broken
b) In order to determine that a mapping is non-linear we'll have to scan it
   ALL and check. Currently in CRIU we just don't read the pagemap for shared
   file maps but will have to. This is not very optimal. I'd prefer having
   this linear/nonlinear info in /proc/pid/smaps or smth like this.

> Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>
> Cc: Pavel Emelyanov <xemul@...allels.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Hugh Dickins <hughd@...gle.com>
> Cc: Rik van Riel <riel@...hat.com>
--
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