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: <4A0B2B54.5090803@zytor.com>
Date:	Wed, 13 May 2009 13:19:32 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Hitoshi Mitake <h.mitake@...il.com>
CC:	Jeff Garzik <jeff@...zik.org>, Roland Dreier <rdreier@...co.com>,
	Ingo Molnar <mingo@...e.hu>,
	David Miller <davem@...emloft.net>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	tglx@...utronix.de, rpjday@...shcourse.ca,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: Remove readq()/writeq() on 32-bit

Hitoshi Mitake wrote:
> 
> I think it's good time to decide making all architectures
> which have readq/writeq provide HAVE_READQ/HAVE_WRITEQ or not.
> 
> Adding HAVE_READQ/HAVE_WRITEQ to Kconfig of architectures needs
> agreement of all maintainers of these.
> 
> But, David Miller, maintainer of SPARC architecture, acked Roland's patch
> because of the possibility of bugs non-atomicity of readq/writeq of
> x86-32 will cause.
> 
> And, Jeff Garzik said that he saw zero justification for API removal.
> 
> Which way should we choose?
> Remove readq/writeq from x86-32?
> Or add HAVE... to all architectures with readq/writeq?

There is another option, which is to have canned include variants, that
drivers can explicitly opt-in with:

#include <linux/io64_lh.h>

linux/io64_lh.h would then look like:

#ifndef _LINUX_IO64_LH_H
#define _LINUX_IO64_LH_H

#include <linux/io.h>

#ifndef HAVE_READQ

/* Low-High nonatomic readq() */

#endif

#ifndef HAVE_WRITEQ

/* Low-High nonatomic writeq() */

#endif

#endif


If we need more than io64_lh.h we can then add other variants, but I
suspect we won't need them -- except possibly an io64_hl.h.

	-hpa
--
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