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]
Message-ID: <4BDE8E24.5050200@redhat.com>
Date:	Mon, 03 May 2010 11:49:40 +0300
From:	Avi Kivity <avi@...hat.com>
To:	Changli Gao <xiaosuo@...il.com>
CC:	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>, jslaby@...e.cz,
	akpm@...ux-foundation.org, paulmck@...ux.vnet.ibm.com,
	adobriyan@...il.com, mingo@...e.hu, peterz@...radead.org,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: use kmalloc() to allocate fdmem if possible

On 05/03/2010 10:52 AM, Changli Gao wrote:
> On Mon, May 3, 2010 at 3:42 PM, Avi Kivity<avi@...hat.com>  wrote:
>    
>> On 05/03/2010 10:05 AM, Changli Gao wrote:
>>      
>>> On Mon, May 3, 2010 at 2:06 PM, Avi Kivity<avi@...hat.com>    wrote:
>>>
>>>        
>>>> My point is, vmalloc() and vfree should do this, not their callers:
>>>>
>>>> vmalloc(size):
>>>>     if (size<= PAGE_SIZE)
>>>>         return kmalloc(size, GFP_KERNEL);
>>>>     ...
>>>>
>>>> vfree(p):
>>>>     if (!is_vmalloc_addr(p) {
>>>>         kfree(p);
>>>>         return;
>>>>     }
>>>>     ...
>>>>
>>>>          
>>> I think we should not change vmalloc/vfree, and you can invent new
>>> memory APIs, such as malloc()/free().
>>>
>>>        
>> Why?
>>
>>      
> Because vmalloc is used to allocate virtually contiguous memory. v in
> vmalloc means virtually.
>
>    

A kmalloc()ed page is virtually contiguous, satisfying your requirement.

-- 
error compiling committee.c: too many arguments to function

--
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