From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Dreier Subject: Re: [PATCH] regression: vmalloc easily fail. Date: Tue, 28 Oct 2008 14:22:16 -0700 Message-ID: References: <1225234513-3996-1-git-send-email-glommer@redhat.com> <49077E1A.5080105@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Glauber Costa , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, aliguori@codemonkey.ws, npiggin@suse.de, Jeremy Fitzhardinge , Krzysztof Helt To: Avi Kivity Return-path: Received: from sj-iport-2.cisco.com ([171.71.176.71]:1145 "EHLO sj-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752800AbYJ1VWS (ORCPT ); Tue, 28 Oct 2008 17:22:18 -0400 In-Reply-To: <49077E1A.5080105@redhat.com> (Avi Kivity's message of "Tue, 28 Oct 2008 23:03:22 +0200") Sender: kvm-owner@vger.kernel.org List-ID: > I'm guessing that the missing comment explains that this is > intentional, to trap buffer overflows? Actually, speaking of comments, it's interesting that __get_vm_area_node() -- which is called from vmalloc() -- does: /* * We always allocate a guard page. */ size += PAGE_SIZE; va = alloc_vmap_area(size, align, start, end, node, gfp_mask); and alloc_vmap_area() adds another PAGE_SIZE, as the original email pointed out: while (addr + size >= first->va_start && addr + size <= vend) { addr = ALIGN(first->va_end + PAGE_SIZE, align); I wonder if the double padding is causing a problem when things get too fragmented? - R.