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: <20131016092601.GB23440@gmail.com>
Date:	Wed, 16 Oct 2013 11:26:01 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Christoph Lameter <cl@...ux.com>, Tejun Heo <tj@...nel.org>,
	akpm@...uxfoundation.org, rostedt@...dmis.org,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Eric Dumazet <edumazet@...gle.com>,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH 1/6] net: ip4_datagram_connect: Use correct form of
 statistics update


* Eric Dumazet <eric.dumazet@...il.com> wrote:

> On Wed, 2013-10-16 at 10:35 +0200, Peter Zijlstra wrote:
> > On Tue, Oct 15, 2013 at 12:47:23PM -0500, Christoph Lameter wrote:
> > > ip4_datagram_connect is called with BH processing enabled. Therefore
> > > we cannot use IP_INC_STATS_BH but must use IP_INC_STATS which disables
> > > BH handling before incrementing the counter.
> > > 
> > > The following trace is triggered without this patch:
> > > 
> > > [ 9293.806634] __this_cpu_add operation in preemptible [00000000] code: ntpd/2150
> > 
> > You lost the BUG there; that really needs to be there:
> > 
> >  - BUG makes people pay attention
> >  - This was an actual BUG wasn't it?
> > 
> > Sure there can be false positives, but in all cases people should 
> > amend the code. Sometimes with a comment explaining why the raw 
> > primitive should be used; sometimes to fix an actual bug, but a patch 
> > needs to be written. Therefore BUG!
> 
> Yep this is a real BUG for linux 2.6.36+ on 32bit arches,
> 
> The effect of this bug is that on 32bit arches, we might corrupt a 
> seqcount : Later, we can spin forever on it.

Ouch, that's a pretty serious bug ...

The patch title should reflect this fact.

> In linux 2.6.36 we converted IP mib from 32 to 64 bits, therefore this 
> fix should be backported up to 2.6.36
> 
> Prior to 2.6.36, the bug was that some increments of SNMP stat could be 
> lost, because two cpus could access the same location, hardly a 
> problem...

Acked-by: Ingo Molnar <mingo@...nel.org>

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