From: Derrick McKee <derrick.mckee@gmail.com>
To: Linux Memory Management List <linux-mm@kvack.org>
Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com,
iamjoonsoo.kim@lge.com,
Andrew Morton <akpm@linux-foundation.org>
Subject: slab_alloc_node with CONFIG_SLAB_FREELIST_HARDENED
Date: Tue, 11 May 2021 11:52:35 -0400 [thread overview]
Message-ID: <CAJoBWHxLh6oz4UYTaowyY5WKLxho_SS43=xe171mcDe1thfD4A@mail.gmail.com> (raw)
Hi,
I am trying to understand how slab_alloc_node works in mm/slub.c when
CONFIG_SLAB_FREELIST_HARDENED=y. It seems like in ___slab_alloc,
c->freelist gets assigned the result of get_freepointer, which, when
CONFIG_SLAB_FREELIST_HARDENED=y, returns a value XOR'd with a
per-cache random number. However, that XOR'd value is never seemingly
undone, and slab_alloc_node passes the XOR'd (and thus invalid)
pointer directly to get_freepointer. Does anyone know where the XOR
reversal is performed? Thanks.
--
Derrick McKee
reply other threads:[~2021-05-11 15:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CAJoBWHxLh6oz4UYTaowyY5WKLxho_SS43=xe171mcDe1thfD4A@mail.gmail.com' \
--to=derrick.mckee@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.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