All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, keescook@chromium.org,
	akpm@linux-foundation.org
Subject: [alternative-merged] mempool-use-kmalloc_size_roundup-to-match-ksize-usage.patch removed from -mm tree
Date: Fri, 28 Oct 2022 14:30:11 -0700	[thread overview]
Message-ID: <20221028213012.49C87C433D6@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: mempool: use kmalloc_size_roundup() to match ksize() usage
has been removed from the -mm tree.  Its filename was
     mempool-use-kmalloc_size_roundup-to-match-ksize-usage.patch

This patch was dropped because an alternative patch was or shall be merged

------------------------------------------------------
From: Kees Cook <keescook@chromium.org>
Subject: mempool: use kmalloc_size_roundup() to match ksize() usage
Date: Tue, 18 Oct 2022 02:03:29 -0700

Round up allocations with kmalloc_size_roundup() so that mempool's use of
ksize() is always accurate and no special handling of the memory is needed
by KASAN, UBSAN_BOUNDS, nor FORTIFY_SOURCE.

Link: https://lkml.kernel.org/r/20221018090323.never.897-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mempool.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/mempool.c~mempool-use-kmalloc_size_roundup-to-match-ksize-usage
+++ a/mm/mempool.c
@@ -526,7 +526,7 @@ EXPORT_SYMBOL(mempool_free_slab);
  */
 void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data)
 {
-	size_t size = (size_t)pool_data;
+	size_t size = kmalloc_size_roundup((size_t)pool_data);
 	return kmalloc(size, gfp_mask);
 }
 EXPORT_SYMBOL(mempool_kmalloc);
_

Patches currently in -mm which might be from keescook@chromium.org are

mempool-do-not-use-ksize-for-poisoning.patch


                 reply	other threads:[~2022-10-28 21:30 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=20221028213012.49C87C433D6@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.