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: <20160107190535.GF238@brightrain.aerifal.cx>
Date:	Thu, 7 Jan 2016 14:05:35 -0500
From:	Rich Felker <dalias@...c.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	"Michael S. Tsirkin" <mst@...hat.com>,
	linux-kernel@...r.kernel.org, linux-sh@...r.kernel.org,
	Rob Landley <rob@...dley.net>, Jeff Dionne <jeff@...inux.org>,
	Yoshinori Sato <ysato@...rs.sourceforge.jp>
Subject: Re: [PATCH v2 31/32] sh: support a 2-byte smp_store_mb

On Thu, Jan 07, 2016 at 02:37:49PM +0100, Peter Zijlstra wrote:
> On Wed, Jan 06, 2016 at 06:53:01PM -0500, Rich Felker wrote:
> > It would be nice to have these in asm-generic for archs which don't
> > define their own versions rather than having cruft like this repeated
> > per-arch. 
> 
> Maybe, but I'm not sure how many archs would indeed suffer this problem,
> so far I'm only aware of Alpha and SH that do not have short atomic ops.

Apparently original armv6 (non-k) lacked u8 and u16 variants of
ldrex/strex. I'm pretty sure or1k also lacks them, and mips,
microblaze, and some powerpc versions might too. Not sure about
risc-v.

> > Strictly speaking, the volatile u32 used to access the
> > 32-bit word containing the u8 or u16 should be
> > __attribute__((__may_alias__)) too. Is there an existing kernel type
> > for a "may_alias u32" or should it perhaps be added?
> 
> The kernel does -fno-strict-aliasing because the C aliasing rules are
> crap (TM) :-), so I suspect we do not need the alias attribute here.

I suspect working on the kernel I'm going to have to get used to
getting "corrected" for writing proper C... ;-)

Rich

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ