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: <CAEXv5_g=DS4wk0mgZuw-doVCqountb-CxZki1LOoQH-P7W1U4A@mail.gmail.com>
Date:   Mon, 13 Feb 2017 06:42:56 -0500
From:   David Windsor <dwindsor@...il.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Jeff Layton <jlayton@...chiereds.net>, linux-nfs@...r.kernel.org,
        netdev@...r.kernel.org, kernel-hardening@...ts.openwall.com,
        Bruce Fields <bfields@...ldses.org>,
        Kees Cook <keescook@...omium.org>,
        "Reshetova, Elena" <elena.reshetova@...el.com>
Subject: Re: [RFC][PATCH] nfsd: add +1 to reference counting scheme for struct nfsd4_session

On Mon, Feb 13, 2017 at 5:38 AM, Christoph Hellwig <hch@...radead.org> wrote:
> On Sat, Feb 11, 2017 at 09:01:15AM -0500, David Windsor wrote:
>> I'm not sure there's another way to accomplish what we need
>> (initializing struct nfsd4_session objects with refcount=1) without
>> also modifying the freeable reference state.  After migrating to the
>> refcount_t API, if we leave init_session() as is, the first call to
>> nfsd4_get_session_locked() will fail:
>
> Which is a pretty clear indicator that this code should simply not
> migrate to the recount_t API.  Why was it even considered if the
> conversion is obviously broken?

I'm not sure this is a sound argument for not converting to
refcount_t.  In other locations in which refcounting schemes are
"unnatural," i.e. freeing refcounted objects when their refcount is -1
(rather than 0), conversion to refcount_t is accomplished by
performing a logical +1 to the overall refcounting scheme.  We're
auditing all refcounting corner cases, such as these, to see if
similar solutions can be found.

Thanks,
David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ