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: <20160822162553.GJ10153@twins.programming.kicks-ass.net>
Date:   Mon, 22 Aug 2016 18:25:53 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:     linux-kernel@...r.kernel.org, mingo@...nel.org,
        jiangshanlai@...il.com, dipankar@...ibm.com,
        akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
        josh@...htriplett.org, tglx@...utronix.de, rostedt@...dmis.org,
        dhowells@...hat.com, edumazet@...gle.com, dvhart@...ux.intel.com,
        fweisbec@...il.com, oleg@...hat.com, bobby.prani@...il.com
Subject: Re: [PATCH tip/core/rcu 2/2] documentation: Record reason for
 rcu_head two-byte alignment

On Mon, Aug 22, 2016 at 08:14:43AM -0700, Paul E. McKenney wrote:
> The __call_rcu() assertion that checks only the bottom bit of the
> rcu_head pointer is a bit counter-intuitive in these days of ubiquitous
> 64-bit systems.  This commit therefore records the reason for this
> odd alignment check, namely that m68k guarantees only two-byte alignment
> despite being a 32-bit architectures.

Would not something like:

#ifdef CONFIG_M68K
	/*
	 * m68k is weird and doesn't have naturally aligned types.
	 */
	WARN_ON_ONCE((unsigned long)head & 1);
#else
	WARN_ON_ONCE((unsigned long)head & (sizeof(unsigned long) - 1));
#endif

Be better?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ