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: <20181108065942.6gnb675xb2wuerrl@linux-r8p5>
Date:   Wed, 7 Nov 2018 22:59:42 -0800
From:   Davidlohr Bueso <dave@...olabs.net>
To:     "chouryzhou(??????)" <chouryzhou@...cent.com>
Cc:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "arve@...roid.com" <arve@...roid.com>,
        "tkjos@...roid.com" <tkjos@...roid.com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2] binder: ipc namespace support for android binder

On Mon, 29 Oct 2018, chouryzhou(??????) wrote:
>@@ -63,6 +63,12 @@ struct ipc_namespace {
>        unsigned int    mq_msg_default;
>        unsigned int    mq_msgsize_default;
>
>+       /* next fields are for binder */
>+       struct mutex      binder_procs_lock;
>+       struct hlist_head binder_procs;
>+       struct mutex      binder_contexts_lock;
>+       struct hlist_head binder_contexts;

I don't think you want a mutex here protecting the binder_contexts list.
Afaict there is no concurrency going on: you only modify it in when doing
namespace init and exit (for which you have no serialization); do you even
need a lock here? Or at least I would think a more lightweight alternative
(rcu/spinlock/rwlock) would suffice.

Thanks,
Davidlohr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ