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:	Sun, 16 Nov 2008 23:13:01 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	"KOSAKI Motohiro" <kosaki.motohiro@...fujitsu.com>
Cc:	"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>,
	balbir@...ux.vnet.ibm.com, "Lai Jiangshan" <laijs@...fujitsu.com>,
	"Arjan van de Ven" <arjan@...radead.org>,
	"Dave Airlie" <airlied@...il.com>,
	"David Miller" <davem@...emloft.net>, menage@...gle.com,
	jens.axboe@...cle.com, jack@...e.cz, jes@....com,
	linux-kernel@...r.kernel.org, dada1@...mosbay.com,
	"Alexey Dobriyan" <adobriyan@...il.com>
Subject: Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free()

On Mon, 17 Nov 2008 15:43:59 +0900 "KOSAKI Motohiro" <kosaki.motohiro@...fujitsu.com> wrote:

> >> > (I'll rename simple_malloc/simple_free to kvmalloc/kvfree)
> >> >
> >>
> >> I would prefer to find a way to say that one cannot select gfp_mask with this API.
> >>
> > I think gfp_mask must be passed explicitly.
> 
> Agreed.

It would only make sense if __vmalloc() can be called in atomic contexts.

__vmalloc() cannot be called from irq contexts due to it taking
non-irq-safe spinlocks.

__vmalloc() kinda looks like it could be called from non-irq atomic
contexts with GFP_ATOMIC, but I think it lies.  For example,
pud_alloc_one/pmd_alloc_one/etc use hard-wired GFP_KERNEL.

In which case this new allocation function can only be called from
contexts where GFP_KERNEL can be used, hence we don't need to pass that
in - it would be misleading to do so.

In fact it's not immediately clear why __vmalloc() takes a gfp_t
argument either?
--
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