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-next>] [day] [month] [year] [list]
Message-Id: <201611092036.DAJ05243.HOOMQSVOJFFLtF@I-love.SAKURA.ne.jp>
Date:   Wed, 9 Nov 2016 20:36:31 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:     paulmck@...ux.vnet.ibm.com, josh@...htriplett.org
Cc:     rostedt@...dmis.org, mathieu.desnoyers@...icios.com,
        jiangshanlai@...il.com, linux-kernel@...r.kernel.org
Subject: [srcu] Can we suppress sparse warning?

Hello.

When I build

---------- test/test.c ----------
#include <linux/module.h>

static int __init test_init(void)
{
        DEFINE_SRCU(srcu);
        int idx = srcu_read_lock(&srcu);
        void *ptr = srcu_dereference(ptr, &srcu);
        srcu_read_unlock(&srcu, idx);
        return -EINVAL;
}

module_init(test_init);
MODULE_LICENSE("GPL");
---------- test/test.c ----------

with C=1 option, I get

  test/test.c:7:21: error: incompatible types in comparison expression (different address spaces)

warning from

--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -605,7 +605,7 @@ static inline void rcu_preempt_sleep_check(void)
        /* Dependency order vs. p above. */ \
        typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
        RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
-       rcu_dereference_sparse(p, space); \
+       rcu_dereference_sparse(p, space); /** this line **/ \
        ((typeof(*p) __force __kernel *)(________p1)); \
 })
 #define __rcu_dereference_protected(p, c, space) \

. 

I want to use srcu_dereference() at
https://lists.01.org/pipermail/kbuild-all/2016-October/026587.html .
Can we have srcu version of 995f1405610bd844 ("rcu: Suppress sparse
warnings for rcu_dereference_raw()") ?

Regards.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ