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] [day] [month] [year] [list]
Message-ID: <CAJhHMCCjkTioUqh8fDTd2xgJ9q-Mb4bfu1ueu+uPjH2JU9bVyQ@mail.gmail.com>
Date:	Thu, 25 Sep 2014 14:39:00 -0400
From:	Pranith Kumar <bobby.prani@...il.com>
To:	Josh Triplett <josh@...htriplett.org>
Cc:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	"open list:READ-COPY UPDATE..." <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] rcu: Add sparse check for RCU_INIT_POINTER()

On Thu, Sep 25, 2014 at 2:10 PM,  <josh@...htriplett.org> wrote:
> On Thu, Sep 25, 2014 at 02:03:34PM -0400, Pranith Kumar wrote:
>> Add a sparse check when RCU_INIT_POINTER() is used to assign a non __rcu
>> annotated pointer.
>>
>> Signed-off-by: Pranith Kumar <bobby.prani@...il.com>
>
> Have you checked if this introduces a significant number of new warnings
> in the kernel?
>
> If not:
> Reviewed-by: Josh Triplett <josh@...htriplett.org>
>


I tested the above patch on a small test case where we are assigning
to a non __rcu annotated pointer and sparse does warn in that case.

I tried doing that and there were too many address space warnings
(maybe?) not related to __rcu annotation.

May be a diff of previous warnings and later warnings should show up
if any new warnings are being generated...

diff before.log after.log

> drivers/md/dm.c:2239:9: error: incompatible types in comparison expression (different address spaces)

Looking at this it shows that RCU_INIT_POINTER() is being used on a
non __rcu pointer. I will send in a patch fixing that.

Thanks!
-- 
Pranith
--
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