Re: [PATCH v2 0/9] slab: Introduce dedicated bucket allocator

2024-03-05 Thread GONG, Ruiqi
On 2024/03/05 18:10, Kees Cook wrote: > Hi, > > Repeating the commit logs for patch 4 here: > > Dedicated caches are available For fixed size allocations via > kmem_cache_alloc(), but for dynamically sized allocations there is only > the global kmalloc API's set of buckets availabl

Re: [PATCH v2 0/9] slab: Introduce dedicated bucket allocator

2024-03-15 Thread GONG, Ruiqi
On 2024/03/08 4:31, Kees Cook wrote: > On Wed, Mar 06, 2024 at 09:47:36AM +0800, GONG, Ruiqi wrote: >> >> >> On 2024/03/05 18:10, Kees Cook wrote: >>> Hi, >>> >>> Repeating the commit logs for patch 4 here: >>> >>>

[PATCH v2 1/2] slab: Adjust placement of __kvmalloc_node_noprof

2025-02-07 Thread GONG Ruiqi
: GONG Ruiqi --- include/linux/slab.h | 22 + mm/slub.c| 90 ++ mm/util.c| 112 --- 3 files changed, 112 insertions(+), 112 deletions(-) diff --git a/include/linux/slab.h b/include/linux

[PATCH v2 2/2] slab: Achieve better kmalloc caches randomization in kvmalloc

2025-02-07 Thread GONG Ruiqi
Koczka Signed-off-by: GONG Ruiqi --- mm/slub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 0830894bb92c..46e884b77dca 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4903,9 +4903,9 @@ void *__kvmalloc_node_noprof(DECL_BUCKET_PARAMS(size, b),

[PATCH v2 0/2] Refine kmalloc caches randomization in kvmalloc

2025-02-07 Thread GONG Ruiqi
b.com/google/security-research/pull/83/files#diff-1604319b55a48c39a210ee52034ed7ff5b9cdc3d704d2d9e34eb230d19fae235R200 [1] Link: https://lore.kernel.org/all/62044279-0c56-4185-97f7-7afac65ff...@suse.cz/ [2] GONG Ruiqi (2): slab: Adjust placement of __kvmalloc_node_noprof slab: Achieve better km

[PATCH] mm/slab: Achieve better kmalloc caches randomization in kvmalloc

2025-01-21 Thread GONG Ruiqi
inline(.., _RET_IP_) ... <-- _RET_IP_ points to Thanks to Tamás Koczka for the report and discussion! Links: [1] https://github.com/google/security-research/pull/83/files#diff-1604319b55a48c39a210ee52034ed7ff5b9cdc3d704d2d9e34eb230d19fae235R200 Signed-off-by: GONG Ruiqi --- in

Re: [PATCH] mm/slab: Achieve better kmalloc caches randomization in kvmalloc

2025-01-25 Thread GONG Ruiqi
On 2025/01/24 23:19, Vlastimil Babka wrote: > On 1/22/25 17:02, Christoph Lameter (Ampere) wrote: >> On Wed, 22 Jan 2025, GONG Ruiqi wrote: >> >>> >>> +void *__kmalloc_node_inline(size_t size, kmem_buckets *b, gfp_t flags, >>> +

[PATCH v3 2/2] slab: Achieve better kmalloc caches randomization in kvmalloc

2025-02-12 Thread GONG Ruiqi
xploit.md?plain=1#L259 [1] Reported-by: Tamás Koczka Signed-off-by: GONG Ruiqi --- mm/slub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index abc982d68feb..1f7d1d260eeb 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4925,9 +4925,9 @@ void *

[PATCH v3 1/2] slab: Adjust placement of __kvmalloc_node_noprof

2025-02-12 Thread GONG Ruiqi
Move __kvmalloc_node_noprof (as well as kvfree*, kvrealloc_noprof and kmalloc_gfp_adjust for consistency) into mm/slub.c so that it can directly invoke __do_kmalloc_node, which is needed for the next patch. No functional changes intended. Signed-off-by: GONG Ruiqi --- mm/slub.c | 162

[PATCH v3 0/2] Refine kmalloc caches randomization in kvmalloc

2025-02-12 Thread GONG Ruiqi
earch/blob/908d59b573960dc0b90adda6f16f7017aca08609/pocs/linux/kernelctf/CVE-2024-27397_mitigation/docs/exploit.md?plain=1#L259 [1] Link: https://lore.kernel.org/all/62044279-0c56-4185-97f7-7afac65ff...@suse.cz/ [2] GONG Ruiqi (2): slab: Adjust placement of __kvmalloc_node_noprof slab: Achieve better kmalloc caches random