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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100824162427.58e2eb88.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Tue, 24 Aug 2010 16:24:27 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Russell King <rmk@....linux.org.uk>,
	David Howells <dhowells@...hat.com>,
	Ralf Baechle <ralf@...ux-mips.org>,
	David Miller <davem@...emloft.net>,
	Paul Mackerras <paulus@...ba.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Hugh Dickins <hughd@...gle.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, linux-arch@...r.kernel.org
Subject: Re: [RFC][PATCH 2/6] mm: stack based kmap_atomic

On Thu, 19 Aug 2010 22:13:19 +0200
Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:

> Keep the current interface but ignore the KM_type and use a stack
> based approach.
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> ---
 
> +DECLARE_PER_CPU(int, __kmap_atomic_idx);
> +
> +static inline int kmap_atomic_idx_push(void)
> +{
> +	int idx = __get_cpu_var(__kmap_atomic_idx)++;
> +#ifdef CONFIG_DEBUG_HIGHMEM
> +	BUG_ON(idx > KM_TYPE_NR);
> +#endif
> +	return idx;
> +}
> +
> +static inline int kmap_atomic_idx_pop(void)
> +{
> +	int idx = --__get_cpu_var(__kmap_atomic_idx);
> +#ifdef CONFIG_DEBUG_HIGHMEM
> +	BUG_ON(idx < 0);
> +#endif
> +	return idx;
> +}
> +
>  #else /* CONFIG_HIGHMEM */
> 

I may don't understand anything... Is irq already disabled ?
And Is it documented that kmap_atomic shouln't be used under NMI or something
special interrupts ?

Thanks,
-Kame


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