linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "GONG, Ruiqi" <gongruiqi@huaweicloud.com>
To: Vlastimil Babka <vbabka@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	David Rientjes <rientjes@google.com>,
	Pekka Enberg <penberg@kernel.org>,
	Christoph Lameter <cl@linux.com>, Tejun Heo <tj@kernel.org>,
	Dennis Zhou <dennis@kernel.org>,
	Alexander Potapenko <glider@google.com>,
	Marco Elver <elver@google.com>, Kees Cook <keescook@chromium.org>,
	Jann Horn <jannh@google.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	Pedro Falcato <pedro.falcato@gmail.com>,
	Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E . Hallyn" <serge@hallyn.com>,
	Wang Weiyang <wangweiyang2@huawei.com>,
	Xiu Jianfeng <xiujianfeng@huawei.com>,
	linux-mm@kvack.org, linux-hardening@vger.kernel.org,
	linux-kernel@vger.kernel.org, gongruiqi1@huawei.com
Subject: [PATCH v3 0/1] Randomized slab caches for kmalloc()
Date: Fri, 16 Jun 2023 19:18:42 +0800	[thread overview]
Message-ID: <20230616111843.3677378-1-gongruiqi@huaweicloud.com> (raw)

I adapted the v2 patch to the latest linux-next tree and made the v3
patch without "RFC", since this idea seems to be acceptable in general
based on previous dicussion with mm and hardening folks. Please check
the link specified below for more details of the discussion, and further
suggestions are welcome.

v3:
  - Replace SLAB_RANDOMSLAB with the new existing SLAB_NO_MERGE flag.
  - Shorten long code lines by wrapping and renaming.
  - Update commit message with latest perf benchmark and additional
    theorectical explanation.

v2:
  - Use hash_64() and a per-boot random seed to select kmalloc() caches.
  - Change acceptable # of caches from [4,16] to {2,4,8,16}, which is
    more compatible with hashing.
  - Supplement results of performance and memory overhead tests.
  - Link: https://lore.kernel.org/all/20230508075507.1720950-1-gongruiqi1@huawei.com/

v1:
  - Link: https://lore.kernel.org/all/20230315095459.186113-1-gongruiqi1@huawei.com/

GONG, Ruiqi (1):
  Randomized slab caches for kmalloc()

 include/linux/percpu.h  | 12 ++++++---
 include/linux/slab.h    | 20 ++++++++++++---
 mm/Kconfig              | 49 ++++++++++++++++++++++++++++++++++++
 mm/kfence/kfence_test.c |  6 +++--
 mm/slab.c               |  2 +-
 mm/slab.h               |  2 +-
 mm/slab_common.c        | 55 +++++++++++++++++++++++++++++++++++++----
 7 files changed, 130 insertions(+), 16 deletions(-)

-- 
2.25.1


             reply	other threads:[~2023-06-16 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 11:18 GONG, Ruiqi [this message]
2023-06-16 11:18 ` [PATCH v3 1/1] Randomized slab caches for kmalloc() GONG, Ruiqi
2023-06-21 18:21   ` Kees Cook
2023-06-25 11:25     ` GONG, Ruiqi
2023-06-22 13:56   ` Vlastimil Babka
2023-06-22 20:10     ` Kees Cook
2023-06-25 12:01       ` GONG, Ruiqi
     [not found] ` <570d788b-d7f3-64ab-97e1-4e847aef1321@web.de>
2023-06-26  0:56   ` [PATCH v3 0/1] " GONG, Ruiqi

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=20230616111843.3677378-1-gongruiqi@huaweicloud.com \
    --to=gongruiqi@huaweicloud.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=cl@linux.com \
    --cc=dennis@kernel.org \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=gongruiqi1@huawei.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jannh@google.com \
    --cc=jmorris@namei.org \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=paul@paul-moore.com \
    --cc=pedro.falcato@gmail.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=serge@hallyn.com \
    --cc=tj@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=wangweiyang2@huawei.com \
    --cc=xiujianfeng@huawei.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 NNTP newsgroup(s).