Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1587687

Re: [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to refcount_t

From David Howells <dhowells@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to refcount_t
Date 2017-02-24 15:30 +0100
Message-ID <tep2F-1r4-3@gated-at.bofh.it> (permalink)
References (2 earlier) <tdkRr-4uK-13@gated-at.bofh.it> <tdHO2-4nL-5@gated-at.bofh.it> <tdITL-57Y-9@gated-at.bofh.it> <tdJ3r-5dB-5@gated-at.bofh.it> <tdJ3r-5dB-3@gated-at.bofh.it>
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903

Show all headers | View raw


Kees Cook <keescook@chromium.org> wrote:

> We can't allow the increment from 0 since it violates the intended
> use-after-free protections.

I would have thought that the protections would've been against the carry flag
getting set.

> If "0" means "still valid" then this
> sounds like it needs a global +1, as Elena suggested in her reply.

This makes it sound like refcount_t is then unsuitable for this.

Since I want to overhaul the code to use more RCU and eliminate some of the
locking, it might be worth waiting on the patches.

David

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-02-21 16:50 +0100
  Re: [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to refcount_t David Howells <dhowells@redhat.com> - 2017-02-22 17:20 +0100
    RE: [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to  refcount_t "Reshetova, Elena" <elena.reshetova@intel.com> - 2017-02-22 18:30 +0100
      Re: [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to refcount_t Kees Cook <keescook@chromium.org> - 2017-02-22 18:40 +0100
        RE: [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to  refcount_t "Reshetova, Elena" <elena.reshetova@intel.com> - 2017-02-23 14:40 +0100
        Re: [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to refcount_t David Howells <dhowells@redhat.com> - 2017-02-24 15:30 +0100
      Re: [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to refcount_t David Howells <dhowells@redhat.com> - 2017-02-22 18:40 +0100

csiph-web