Re: [PATCH v2] x86: fix small LDT allocation for Xen

2015-09-02 Thread Ingo Molnar
* Jan Beulich wrote: > >> @@ -95,7 +95,7 @@ static void free_ldt_struct(struct ldt_s > >> if (ldt->size * LDT_ENTRY_SIZE > PAGE_SIZE) > >> vfree(ldt->entries); > >> else > >> - kfree(ldt->entries); > >> + put_page(virt_to_page(ldt->entr

Re: [PATCH v2] x86: fix small LDT allocation for Xen

2015-09-02 Thread Jan Beulich
>>> On 02.09.15 at 16:08, wrote: > On Sep 2, 2015 5:46 AM, "Jan Beulich" wrote: >> >> While commit 37868fe113 ("x86/ldt: Make modify_ldt synchronous") added >> a nice comment explaining that Xen needs page-aligned whole page chunks >> for guest descriptor tables, it then nevertheless used kzalloc

Re: [PATCH v2] x86: fix small LDT allocation for Xen

2015-09-02 Thread Andy Lutomirski
On Sep 2, 2015 5:46 AM, "Jan Beulich" wrote: > > While commit 37868fe113 ("x86/ldt: Make modify_ldt synchronous") added > a nice comment explaining that Xen needs page-aligned whole page chunks > for guest descriptor tables, it then nevertheless used kzalloc() on the > small size path. As I'm unaw

[PATCH v2] x86: fix small LDT allocation for Xen

2015-09-02 Thread Jan Beulich
While commit 37868fe113 ("x86/ldt: Make modify_ldt synchronous") added a nice comment explaining that Xen needs page-aligned whole page chunks for guest descriptor tables, it then nevertheless used kzalloc() on the small size path. As I'm unaware of guarantees for kmalloc(PAGE_SIZE, ) to return pag