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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150518.160931.2235555994068443513.davem@davemloft.net>
Date:	Mon, 18 May 2015 16:09:31 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	aleksey.makarov@...iga.com
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	david.daney@...ium.com, sgoutham@...ium.com, mjc@...ihalf.com,
	ganapatrao.kulkarni@...iumnetworks.com, tomasz.nowicki@...aro.org,
	rrichter@...ium.com, kamil@...ihalf.com,
	tsrinivasulu@...iumnetworks.com, svangala@...ium.com,
	rric@...nel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH net-next v3 2/2] net: Adding support for Cavium
 ThunderX network controller

From: Aleksey Makarov <aleksey.makarov@...iga.com>
Date: Fri, 15 May 2015 20:36:39 -0700

> +/* Register read/write APIs */
> +static void nic_reg_write(struct nicpf *nic, u64 offset, u64 val)
> +{
> +	writeq_relaxed(val, nic->reg_base + offset);
> +}
> +
> +static u64 nic_reg_read(struct nicpf *nic, u64 offset)
> +{
> +	return readq_relaxed(nic->reg_base + offset);
> +}

Are you really sure it's OK to used relaxed ordering for all register
accesses like this?

Personally, I think it's asking for trouble.

Maybe in _extremely_ specific situations in the packet processing
fast path where you can clearly define the ordering needs when
programming the mailbox registers, I'd say it's OK.

But universally across the entire driver?  No way, no way at all.
--
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