From: Shannon Nelson <shannon.nelson@oracle.com>
To: "Reshetova, Elena" <elena.reshetova@intel.com>,
"davem@davemloft.net" <davem@davemloft.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>,
"jag.raman@oracle.com" <jag.raman@oracle.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"keescook@chromium.org" <keescook@chromium.org>
Subject: Re: [PATCH] sparc64: convert mdesc_handle.refcnt from atomic_t to refcount_t
Date: Mon, 23 Oct 2017 08:19:20 -0700 [thread overview]
Message-ID: <2331cc3d-7a89-a835-bfc2-cab1dd2df9c3@oracle.com> (raw)
In-Reply-To: <2236FBA76BA1254E88B949DDB74E612B802B4255@IRSMSX102.ger.corp.intel.com>
On 10/23/2017 12:10 AM, Reshetova, Elena wrote:
>> On 10/20/2017 12:57 AM, Elena Reshetova wrote:
>>> atomic_t variables are currently used to implement reference
>>> counters with the following properties:
>>> - counter is initialized to 1 using atomic_set()
>>> - a resource is freed upon counter reaching zero
>>> - once counter reaches zero, its further
>>> increments aren't allowed
>>> - counter schema uses basic atomic operations
>>> (set, inc, inc_not_zero, dec_and_test, etc.)
>>>
>>> Such atomic variables should be converted to a newly provided
>>> refcount_t type and API that prevents accidental counter overflows
>>> and underflows. This is important since overflows and underflows
>>> can lead to use-after-free situation and be exploitable.
>>>
>>> The variable mdesc_handle.refcnt is used as pure reference counter.
>>> Convert it to refcount_t and fix up the operations.
>>>
>>> Suggested-by: Kees Cook <keescook@chromium.org>
>>> Reviewed-by: David Windsor <dwindsor@gmail.com>
>>> Reviewed-by: Hans Liljestrand <ishkamiel@gmail.com>
>>> Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
>>
>> Acked-by: Shannon Nelson <shannon.nelson@oracle.com>
>
> Thank you Shannon! Would you be able to take this patch into the respective tree
> to propagate normally from there?
>
> Best Regards,
> Elena.
Hi Elena,
Dave Miller takes good care of the sparclinux tree, I'm sure this is on
his ToDo list already.
sln
next prev parent reply other threads:[~2017-10-23 15:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 7:57 Elena Reshetova
2017-10-20 16:20 ` Shannon Nelson
2017-10-23 7:10 ` Reshetova, Elena
2017-10-23 15:19 ` Shannon Nelson [this message]
2017-11-15 5:42 ` David Miller
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=2331cc3d-7a89-a835-bfc2-cab1dd2df9c3@oracle.com \
--to=shannon.nelson@oracle.com \
--cc=davem@davemloft.net \
--cc=elena.reshetova@intel.com \
--cc=jag.raman@oracle.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=sparclinux@vger.kernel.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®