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: <1290576280.1690.13.camel@leonhard>
Date:	Wed, 24 Nov 2010 14:24:40 +0900
From:	Namhyung Kim <namhyung@...il.com>
To:	Dan Carpenter <error27@...il.com>
Cc:	Jens Axboe <jaxboe@...ionio.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] generic-ipi: add lock context annotations

2010-11-23 (화), 12:40 +0300, Dan Carpenter: 
> On Tue, Nov 23, 2010 at 09:49:56AM +0100, Jens Axboe wrote:
> > I guess what Peter means is that the fact that the function grabs the
> > lock is apparent in the code, if sparse was a bit "smarter", it would
> > see and note this itself.
> 
> The sparse warning messages should have been included in the commit
> message.  Here they are:
> 
> kernel/smp.c:513:6: warning: context imbalance in 'ipi_call_lock' - wrong count at exit
> kernel/smp.c:518:6: warning: context imbalance in 'ipi_call_unlock' - unexpected unlock
> kernel/smp.c:523:6: warning: context imbalance in 'ipi_call_lock_irq' - wrong count at exit
> kernel/smp.c:528:6: warning: context imbalance in 'ipi_call_unlock_irq' - unexpected unlock
> 
> What happens is that sparse *does* see that the locks are unlocked and
> that's what it complains about.
> 
> Sparse works before the code is linked so this change doesn't affect
> anything outside kernel/smp.c.  If we added these annotations to
> include/linux/smp.h then they would be used for checking
> kernel/smpboot.c
> 
> regards,
> dan carpenter
> 

I tried to annotate declations in include/linux/smp.h but it didn't work
well. Maybe that's what we need to fix the sparse?

Anyway, Jens, do you want new patch which includes above warnings?

Thanks.

-- 
Regards,
Namhyung Kim



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