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: <20090513053622.GQ8633@ZenIV.linux.org.uk>
Date:	Wed, 13 May 2009 06:36:22 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Jeff Garzik <jeff@...zik.org>, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Mike Travis <travis@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>, roland@...hat.com
Subject: Re: [RFC PATCH 2/2] kernel/sched.c: VLA in middle of struct

On Wed, May 13, 2009 at 11:42:26AM +0930, Rusty Russell wrote:
> > > Anyway, since [] is C99, I thought it preferable to [0] which is a gcc
> > > extension.  However, if C99 is really so braindead as to disallow this
> > > fairly standard trick, so I'm happy to go with the gcc extension.[1]
> >
> > No.  There's a standard way to do that in C99; you can put a struct with
> > that thing into a union.
> 
> Ah, thanks for the clue.
> 
> How's this:
> 
> sched: avoid flexible array member inside struct (gcc extension)
> 
> struct sched_group and struct sched_domain end in 'unsigned long
> cpumask[]' which Jeff Garzik notes is not legal to place inside
> another struct.  It upsets sparse and clang (LLVM's C front end).
> 
> Al Viro pointed out that a union is the Right Way to do this.

Acked-by: Al Viro <viro@...iv.linux.org.uk>
--
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