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: <20090703073801.GA10191@elte.hu>
Date:	Fri, 3 Jul 2009 09:38:01 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	David Kilroy <kilroyd@...glemail.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] check spinlock_t/rwlock_t argument type on non-SMP
	builds


* David Kilroy <kilroyd@...glemail.com> wrote:

> When writing code for UP without CONFIG_DEBUG_SPINLOCK it's easy 
> to get the first argument to the spinlock/rwlock functions wrong. 
> This is because the parameter is not actually used in this 
> configuration.
> 
> Typically you will only find out it's wrong
>  * by rebuilding with CONFIG_SMP or CONFIG_DEBUG_SPINLOCK
>  * after you've submitted your beautiful patch series.
> 
> The first means a long wait, and the latter is a bit late.
> 
> Add typechecking on the first argument of these macro functions. 
> Note that since the typecheck now references the variable, the 
> explicit read is redundant and can be removed.
> 
> This change causes compiler warnings in net/ipv4/route.c, as this 
> passes NULL as the first argument in the UP configuration. Simply 
> cast this.

Wondering - can the wrappers be moved from CPP land to C land by 
turning them into inlines? (i havent checked all usages so there 
might be some surprises, but by and large it ought to be possible.)

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ