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:	Thu, 19 Apr 2007 12:12:29 -0700
From:	Dave Hansen <hansendc@...ibm.com>
To:	Matt Mackall <mpm@...enic.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 12/13] maps#2: Add /proc/pid/pagemap interface

On Fri, 2007-04-06 at 17:03 -0500, Matt Mackall wrote:
> 
> +static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned
> long end,
> +                            void *private)
> +{
> +       struct pagemapread *pm = private;
> +       pte_t *pte;
> +       int err;
> +
> +       pte = pte_offset_map(pmd, addr);
> +       for (; addr != end; pte++, addr += PAGE_SIZE) {
> +               if (addr < pm->next)
> +                       continue;
> +               if (!pte_present(*pte))
> +                       err = add_to_pagemap(addr, -1, pm);
> +               else
> +                       err = add_to_pagemap(addr, pte_pfn(*pte), pm);
> +               if (err)
> +                       return err;
> +       }
> +       pte_unmap(pte - 1);
> +       return 0;
> +} 

Sorry for the horribly late reply. ;)

Would you have any problems with this being extended for the !
pte_present() case to show pages that happen to be in swap?

I'm playing with some process checkpoint/restart code, and using the
existing swap mechanisms to get the current memory contents out of the
process.  I've also created a hackish syscall to make a pretty raw dump
of pte contents.

Perhaps we could steal the high bits of the pfn and have its presence in
swap, plus some handle to which swapfile it is in.  Or, would you rather
I just create a new /proc file that utilizes most of the code you
already put in place, and _just_ deals with swap?

-- Dave

-
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