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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Jan 2008 12:58:45 -0800
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc:	akpm@...ux-foundation.org, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 07/26] Add INIT_ARRAY() to kernel.h

On Thu, 24 Jan 2008 15:27:13 -0500 Mathieu Desnoyers wrote:

> Add initialization of an array, which needs brackets that would pollute kernel
> code, to kernel.h. It is used to declare arguments passed as function parameters

Hi Mathieu,

Maybe you have explained this previously, but please give a short
explanation of "brackets that would pollute kernel code".

Thanks.

> such as:
> text_poke(addr, INIT_ARRAY(unsigned char, 0xf0, len), len);
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
> ---
>  include/linux/kernel.h |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: linux-2.6-lttng.mm/include/linux/kernel.h
> ===================================================================
> --- linux-2.6-lttng.mm.orig/include/linux/kernel.h	2008-01-24 14:10:54.000000000 -0500
> +++ linux-2.6-lttng.mm/include/linux/kernel.h	2008-01-24 14:23:06.000000000 -0500
> @@ -423,4 +423,6 @@ struct sysinfo {
>  #define NUMA_BUILD 0
>  #endif
>  
> +#define INIT_ARRAY(type, val, len) ((type [len]) { [0 ... (len)-1] = (val) })
> +
>  #endif

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