From: Carlos O'Donell via Libc-alpha <libc-alpha@sourceware.org>
To: Eyal Itkin <eyal.itkin@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>,
GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Update tcache double-free check
Date: Mon, 10 Aug 2020 09:44:31 -0400 [thread overview]
Message-ID: <897cace4-79a9-9562-7c56-27a4895f837a@redhat.com> (raw)
In-Reply-To: <CAA=iMULG5VYLWYDSRNdHwUmekUS0V3DPPky84hmQkuCD50cGKQ@mail.gmail.com>
On 8/10/20 9:35 AM, Eyal Itkin wrote:
> The overall scheme for accumulating random between threads might be
> useful in the future, for a cookie-style security check, however I
> convinced myself that it won't be needed in this case.
Your analysis seems sensible to me. In the case of a cookie-style check
I think we can and *should* do this with some of the chunk metadata.
This is something Florian proposed a couple of years ago, but the
difficulty is that it's straight on the hot path, so you have to try
reorder the operations to get as-good performance as before. Given that
you're already touching the cacheline with the metadata there is a lot
that you can hide e.g. xor of the size with a cookie.
You're right though the code you've written I think will be useful to
others.
I still need to review the various versions we have and get consensus.
--
Cheers,
Carlos.
next prev parent reply other threads:[~2020-08-10 13:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 13:37 [PATCH] Update tcache double-free check Eyal Itkin via Libc-alpha
2020-07-24 21:05 ` Carlos O'Donell via Libc-alpha
2020-07-25 10:39 ` Eyal Itkin via Libc-alpha
2020-07-25 21:07 ` Carlos O'Donell via Libc-alpha
2020-08-10 13:07 ` Eyal Itkin via Libc-alpha
2020-08-10 13:12 ` Carlos O'Donell via Libc-alpha
2020-08-10 13:35 ` Eyal Itkin via Libc-alpha
2020-08-10 13:44 ` Carlos O'Donell via Libc-alpha [this message]
2021-07-02 7:24 ` Siddhesh Poyarekar
2021-07-02 7:57 ` Eyal Itkin via Libc-alpha
2021-07-02 8:45 ` Siddhesh Poyarekar
2020-08-26 20:40 ` Carlos O'Donell via Libc-alpha
2020-10-03 9:04 ` Eyal Itkin via Libc-alpha
2020-10-04 19:41 ` Carlos O'Donell via Libc-alpha
2020-10-14 13:44 ` Eyal Itkin via Libc-alpha
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=897cace4-79a9-9562-7c56-27a4895f837a@redhat.com \
--to=libc-alpha@sourceware.org \
--cc=carlos@redhat.com \
--cc=eyal.itkin@gmail.com \
--cc=fweimer@redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).