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: <20200111083507.c32b85b1d47aa69928de530b@kernel.org>
Date:   Sat, 11 Jan 2020 08:35:07 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Joel Fernandes <joel@...lfernandes.org>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Anders Roxell <anders.roxell@...aro.org>, paulmck@...nel.org,
        "Naveen N . Rao" <naveen.n.rao@...ux.ibm.com>,
        Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
        David Miller <davem@...emloft.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -tip V2 0/2] kprobes: Fix RCU warning and cleanup

Hi Joel and Paul,

On Fri, 10 Jan 2020 16:14:38 -0500
Joel Fernandes <joel@...lfernandes.org> wrote:

> On Tue, Jan 07, 2020 at 09:15:35PM +0900, Masami Hiramatsu wrote:
> > Hello,
> > 
> > Anyone have any comment on this series?
> > Without this series, I still see the suspicious RCU warning for kprobe on -tip tree.
> 
> +Paul since RCU.
> 
> Hi Masami,
> 
> I believe I had commented before that I don't agree with this patch:
> https://lore.kernel.org/lkml/157535318870.16485.6366477974356032624.stgit@devnote2/
> 
> The rationale you used is to replace RCU-api with non-RCU api just to avoid
> warnings. I think a better approach is to use RCU api and pass the optional
> expression to silence the false-positive warnings by informing the RCU API
> about the fact that locks are held (similar to what we do for
> rcu_dereference_protected()). The RCU API will do additional checking
> (such as making sure preemption is disabled for safe RCU usage etc) as well.

Yes, that is what I did in [1/2] for get_kprobe().
Let me clarify the RCU list usage in [2/2].

With the careful check, other list traversals never be done in non-sleepable
context, those are always runs with kprobe_mutex held.
If I correctly understand the Documentation/RCU/listRCU.rst, we should/can use
non-RCU api for those cases, or do I miss something?

Thank you,

-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ