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:	Mon, 18 Apr 2011 18:21:05 +0100
From:	Stefano Stabellini <stefano.stabellini@...citrix.com>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Stefano Stabellini <Stefano.Stabellini@...citrix.com>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
	"jeremy@...p.org" <jeremy@...p.org>,
	"yinghai@...nel.org" <yinghai@...nel.org>,
	"mingo@...e.hu" <mingo@...e.hu>
Subject: Re: [PATCH 2/4] x86,xen: introduce
 x86_init.mapping.pagetable_reserve

On Mon, 18 Apr 2011, H. Peter Anvin wrote:
> On 04/18/2011 07:09 AM, Stefano Stabellini wrote:
> > 
> > Sorry, I don't mean to be pushy, it is just that I'll be AFK for 12 days
> > starting from next Friday and I think that this issue should really be
> > fixed in time for the 2.6.39 release, otherwise no 2.6.39 kernels will
> > be able to boot on any xen system.
> 
> YOU STILL HAVEN'T PROPOSED ANY SEMANTICS.
> 
> The semantics of a hook is a description of what the preconditions are,
> what the postconditions are, and what exactly they are allowed or not
> allowed to do.
> 
> This is a real pain to do, *exactly because hooks are a real pain*.
> Most hooks that have been put in has been "oh, just do something at
> point X in the code", which is a case of definition by implementation,
> which is exactly how we ended up with the current mess.
> 


x86_init.mapping.pagetable_setup_start(start, max_end)

    Notifies the subarch that the kernel early startup intends to
    use pages as page table pages.
    These pages will have physical addresses in the range
    start..max_end.

    Can be called multiple times to setup kernel page table pages,
    always in a pair with x86_init.mapping.pagetable_setup_done.
    It must be called before x86_init.paging.pagetable_setup_start().

    Preconditions: no kernel code after the 32-bit kernel entry point
    has hooked any new page table pages into the active page table
    except between a pair of
    x86_init.mapping.pagetable_setup_start and
    x86_init.mapping.pagetable_setup_done.

    Postcondition: pages in the range start..max_end may be used as
    page table pages and hooked into active page tables.
    Pages in this range may NOT be used for any other purpose.


x86_init.mapping.pagetable_setup_done(real_end)

    Notifies the subarch that the initial memory mapping is complete,
    and of the actual range of pages used.

    Preconditions:

    x86_init.mapping.pagetable_setup_start was previously called; the
    arguments to the calls must satisfy start <= real_end <= max_end

    The pages in the range start..real_end have been hooked into the
    active page table.
    The pages in the range real_end..max_end are not currently in use.

    Postconditions:

    Pages in the range real_end..max_end may be used as normal
    memory.

    Pages in the range start..real_end might be hooked into the active
    page table and cannot be used for other purposes.

    New page table pages must be allocated using
    pv_mmu_ops.alloc_pte/pmd/pud.
--
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