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: <Pine.LNX.4.64.0711201245130.26745@schroedinger.engr.sgi.com>
Date:	Tue, 20 Nov 2007 12:46:43 -0800 (PST)
From:	Christoph Lameter <clameter@....com>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
cc:	ak@...e.de, akpm@...ux-foundation.org, travis@....com,
	linux-kernel@...r.kernel.org
Subject: Re: [rfc 23/45] cpu alloc: dmaengine conversion

On Tue, 20 Nov 2007, Mathieu Desnoyers wrote:

> > @@ -488,11 +487,8 @@ dma_async_memcpy_buf_to_buf(struct dma_c
> >  	tx->tx_set_dest(addr, tx, 0);
> >  	cookie = tx->tx_submit(tx);
> >  
> > -	cpu = get_cpu();
> > -	per_cpu_ptr(chan->local, cpu)->bytes_transferred += len;
> > -	per_cpu_ptr(chan->local, cpu)->memcpy_count++;
> > -	put_cpu();
> > -
> > +	__CPU_ADD(chan->local->bytes_transferred, len);
> > +	__CPU_INC(chan->local->memcpy_count);
> 
> I am wondering about the impact of the preempt disable removal here. It
> means that there is a statistically low probability that we will be
> moved to a different CPU between the bytes_transferred and the
> memcpy_count increments. I hope nobody relies on the fact that the
> per-cpu counts should match perfectly...

True. But as far as I can tell this is just statistics and technically the 
operation is not complete until this function has terminated. So one half 
was run on one and one half on the other. Where the statistics should be 
kept is ambiguous.

Having said that: We could leave the code unchanged if this is a concern.


-
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