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: <20110520114454.GD14745@elte.hu>
Date:	Fri, 20 May 2011 13:44:54 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Roland Dreier <roland@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Milton Miller <miltonm@....com>,
	James Bottomley <James.Bottomley@...senpartnership.com>,
	Hitoshi Mitake <h.mitake@...il.com>,
	Kashyap Desai <Kashyap.Desai@....com>,
	Len Brown <lenb@...nel.org>,
	Ravi Anand <ravi.anand@...gic.com>,
	Vikas Chaudhary <vikas.chaudhary@...gic.com>,
	Matthew Garrett <mjg@...hat.com>
Subject: Re: [PATCH] x86: Remove 32-bit versions of readq()/writeq()


* Roland Dreier <roland@...nel.org> wrote:

> From: Roland Dreier <roland@...estorage.com>
> 
> The presense of a writeq() implementation on 32-bit x86 that splits
> the 64-bit write into two 32-bit writes turns out to break the mpt2sas
> driver (and in general is risky for drivers as was discussed in
> <http://lkml.kernel.org/r/adaab6c1h7c.fsf@cisco.com>).  To fix this,
> revert 2c5643b1c5c7 ("x86: provide readq()/writeq() on 32-bit too")
> and follow-on cleanups.
> 
> This unfortunately leads to pushing non-atomic definitions of readq()
> and write() to various x86-only drivers that in the mean time started
> using the definitions in the x86 version of <asm/io.h>.  However as
> discussed exhaustively, this is actually the right thing to do,
> because the right way to split a 64-bit transaction is hardware
> dependent and therefore belongs in the hardware driver (eg mpt2sas
> needs a spinlock to make sure no other accesses occur in between the
> two halves of the access).
> 
> Build tested on 32- and 64-bit x86 allmodconfig.
> 
> Link: http://lkml.kernel.org/r/x86-32-writeq-is-broken@mdm.bga.com
> Cc: Hitoshi Mitake <h.mitake@...il.com>
> Cc: Kashyap Desai <Kashyap.Desai@....com>
> Cc: Len Brown <lenb@...nel.org>
> Cc: Ravi Anand <ravi.anand@...gic.com>
> Cc: Vikas Chaudhary <vikas.chaudhary@...gic.com>
> Cc: Matthew Garrett <mjg@...hat.com>
> Signed-off-by: Roland Dreier <roland@...estorage.com>
> ---
>  arch/x86/Kconfig                 |    2 --
>  arch/x86/include/asm/io.h        |   24 ++----------------------
>  drivers/acpi/apei/einj.c         |    8 ++++++++
>  drivers/acpi/atomicio.c          |    4 ++++
>  drivers/edac/i3200_edac.c        |   13 +++++++++++++
>  drivers/platform/x86/ibm_rtl.c   |   13 +++++++++++++
>  drivers/platform/x86/intel_ips.c |   13 +++++++++++++
>  drivers/scsi/qla4xxx/ql4_nx.c    |   21 +++++++++++++++++++++
>  8 files changed, 74 insertions(+), 24 deletions(-)

Hm, this patch is wider than i thought - might be better to do this via one of 
the driver trees or -mm?

The x86 bits are:

Acked-by: Ingo Molnar <mingo@...e.hu>

Thanks,

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