mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: dhowells@redhat.com, "Reshetova,
	Elena" <elena.reshetova@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-afs@lists.infradead.org" <linux-afs@lists.infradead.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	Hans Liljestrand <ishkamiel@gmail.com>,
	David Windsor <dwindsor@gmail.com>
Subject: Re: [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to refcount_t
Date: Fri, 24 Feb 2017 14:21:45 +0000	[thread overview]
Message-ID: <32460.1487946105@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAGXu5jLVv+_RLth0A=4YGyOWcUv4JsMTpeOWrO3389dTRf-S8g@mail.gmail.com>

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

  parent reply	other threads:[~2017-02-24 14:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21 15:43 [PATCH 0/4] fs, afs subsystem refcounter conversions Elena Reshetova
2017-02-21 15:43 ` [PATCH 1/4] fs, afs: convert afs_cell.usage from atomic_t to refcount_t Elena Reshetova
2017-02-21 15:43 ` [PATCH 2/4] fs, afs: convert afs_vlocation.usage " Elena Reshetova
2017-02-21 15:43 ` [PATCH 3/4] fs, afs: convert afs_server.usage " Elena Reshetova
2017-02-21 15:43 ` [PATCH 4/4] fs, afs: convert afs_volume.usage " Elena Reshetova
2017-02-22 16:16 ` [PATCH 1/4] fs, afs: convert afs_cell.usage " David Howells
2017-02-22 17:19   ` Reshetova, Elena
2017-02-22 17:29   ` David Howells
2017-02-22 17:39     ` Kees Cook
2017-02-23 13:32       ` Reshetova, Elena
2017-02-24 14:21     ` David Howells [this message]
2017-02-22 16:22 ` [PATCH 2/4] fs, afs: convert afs_vlocation.usage " David Howells
2017-02-22 16:32 ` [PATCH 3/4] fs, afs: convert afs_server.usage " David Howells
2017-02-23 14:05   ` Reshetova, Elena
2017-02-22 16:34 ` [PATCH 4/4] fs, afs: convert afs_volume.usage " David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32460.1487946105@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=dwindsor@gmail.com \
    --cc=elena.reshetova@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ishkamiel@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®