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] [day] [month] [year] [list]
Message-ID: <20060807124229.GS4995@hasse.suse.de>
Date:	Mon, 7 Aug 2006 14:42:29 +0200
From:	Jan Blunck <jblunck@...e.de>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-kernel@...r.kernel.org, paulus@...ba.org
Subject: Re: [PATCH] fix vmstat per cpu usage

On Wed, Aug 02, Andrew Morton wrote:

> > +#define per_cpu(var, cpu) (*({				\
> > +	int user_error_##var __attribute__ ((unused));	\
> > +	RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]); }))
> 
> What's it do?  Forces a syntax error if `var' isn't a simple identifier?
> 
> Seems sane, although I'd check that the compiler doesn't accidentally
> waste a stack slot for that local.  Perhaps it's be safer to make
> it a non-existing function:
> 
> 	extern int user_error#var(void);
> 

Yes, that is even better. See attached patch with the modifications for my
major archs (s390, x86-64, generic). I did a run of 'make allmodconfig' with
the attached patch and it produced some errors. I'll send the patches in a
seperate mail.

View attachment "percpu-simple-identifier-error.diff" of type "text/x-patch" (4444 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ