From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91AA0C4332F for ; Fri, 9 Dec 2022 15:32:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C3CD08E0003; Fri, 9 Dec 2022 10:32:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BECDF8E0001; Fri, 9 Dec 2022 10:32:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB5328E0003; Fri, 9 Dec 2022 10:32:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 9E4C28E0001 for ; Fri, 9 Dec 2022 10:32:57 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 5ADC840931 for ; Fri, 9 Dec 2022 15:32:57 +0000 (UTC) X-FDA: 80223160794.06.12F77E7 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf24.hostedemail.com (Postfix) with ESMTP id 79FF018001D for ; Fri, 9 Dec 2022 15:32:55 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=ayn0wV8G; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=kRLMNPLy; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1670599975; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=y1oe6AS8U5UukEMAdOkLhhvwGRmDfr7zc41wEr0hZu4=; b=QSuHfUuSJWMjW9TeK+tEzWi2qUa107oOqJzBu/BWVn01x9Xct9QwvdAKa8gFBCmaFEs5XD xCL/ikaWuXhSNFbzJ2l+xAjXsz2u5mYoJ7hQwPF8O099iwUt+UoK/r29z2Bo2ytlddX6SF 0rEbEKomrsP87jde7UVq9sT7GnERbkk= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=ayn0wV8G; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=kRLMNPLy; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1670599975; a=rsa-sha256; cv=none; b=H51i7LmEVRiRDb4eA5qOMhN9iWrMOpal9VkjREgOuoewJdSy0U6zn7gNitj3ixtWZDmCL9 JY8Jwg2iXx/K66STmOdz0qWEoJOQ+1EKXKuqyMno/lGxoqB3Ot3IxH1G6vpuhG8r8f/7ZT DEOU4Rgwh5wrCIGgBIPwJHICofdaJlA= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B9E781FF90; Fri, 9 Dec 2022 15:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1670599973; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y1oe6AS8U5UukEMAdOkLhhvwGRmDfr7zc41wEr0hZu4=; b=ayn0wV8GS6fm+bmItqAdnHivEWnOPqYsn6x3fG3WSBMb6eGCo6df6N5pU72oObs20/tI5O wS+t9aQc60GZzPVEvoAbwNOrPl520SgEzEZRxuTMGUpvd1d4InltoP3udQZK43to+wLBKK dKARUHGnbuX9cS0J+KdE/glbz+z0NfQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1670599973; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y1oe6AS8U5UukEMAdOkLhhvwGRmDfr7zc41wEr0hZu4=; b=kRLMNPLyBLrYAKA9pmp5HUvp99+kzkyCozx3WYfaHxhx/vjDjdrUzq1nZNI/aPYmqXNPqN e6fA7t30FUBf8JBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 84F2913597; Fri, 9 Dec 2022 15:32:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hFDVHyVVk2N+LgAAMHmgww (envelope-from ); Fri, 09 Dec 2022 15:32:53 +0000 Message-ID: <8f81dbc0-da85-dff7-4a88-c0c4639649c1@suse.cz> Date: Fri, 9 Dec 2022 16:32:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 From: Vlastimil Babka Subject: [GIT PULL] slab updates for 6.2-rc1 To: Linus Torvalds Cc: David Rientjes , Joonsoo Kim , Christoph Lameter , Pekka Enberg , Andrew Morton , "linux-mm@kvack.org" , LKML , patches@lists.linux.dev, Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Kees Cook , Feng Tang , Dennis Zhou Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 79FF018001D X-Stat-Signature: tj86satepjgy9yus6wf16jy155k8qwe8 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1670599975-832476 X-HE-Meta: U2FsdGVkX18e9KzXqPt1zHpwBAtKSSGcq2zcKbuP6IQBdF+8sSGwCIZ3hsn1dGOPTu71qpqrFwy/59iZ5PeDr/AVl8Tdv1k6UlhmJimXXhoxpFqGN3ft90WWjK/G22JiWSdlh6CiwiIzLZSJGosj3iqbYvubZXgHKEvgKHs9r+1ifcf8ZBDCY6rjV1o4Z2FN2QXB+eEoa9Aq6CfS/UxG5QgMxEOE0VPOhoRRoFMIVYV1BIZAdkwGVcpYfCnCNYMaerAY6t8XOJ/NMRpMgVoOF+yG4njRAGccj60oVtukJB0MoBhE7L5qkJEv3RMRFT0oHB4xDAwXiN10bAcBeGc6Pm5nsvawzMSt9vvIRgycVraDqjKp2HfWuvTc9JYvZniSaTRLvbgvfv4kfcn/mz3+5QAYdMH7NPlX/hkly4PhxuCa9hvAMCe1SnQSGxJp8ruGv4bWPIG9NEKnXeLoyvdgYwRsijzx14t062e6pdobJp50ii2EJ+W4+ygaWYeP8Se7sluesOXEsA4ILO9X8fXsUfKk4/xTu6gEhnmeoS5MZYK2R/EJOHR3/1IbyaLfZ3ZcodrJ5HOS6jSyJAxunbluiKQlUns9+KSmM/H4zhRLaKGk23SJSJBQ1ULVUUGXiYAsweG0F1tCDxj8XxePmiFDiiQ3cKQEE/WYZlafprlfPc37GQCC7rwL5zA0oa+43YxA9QQ5QAzL1uoBTbo9x8OoqSnwnDk10+NBOBIC0IeNkwa/kbpeSE0255yJcWO22UqmIxVD8N32ozsGrROgN8eYB4gcCjK08wDLXoyWTUEn4NmWryI2soAAk2f2qMvr+DnvjpeyrkuhLGr1mzXf0s+5DC+thp4byW0+CqStiZiEP7nVN/XU1nMhUcTvgRhs50C9BO7/b14RkQ4KG0NH+vE85TzMwajJGrYMk2WviE3na+2/TTThcc7nUjBSYkmNgT+K6WXheBHpHoAPSvWzR8B vV4Z5QB1 xV1uZborRt0El5ai+V6tnRdc+yMsUE1I2UbiLJoZzuuejwqUaJXK0PSFtXg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Linus, please pull the latest slab updates from: git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-6.2-rc1 The changes, including the first step to remove SLOB, are summarized below. There's one trivial conflict with percpu tree: https://lore.kernel.org/all/20221122163634.3b21cf71@canb.auug.org.au/ ====================================== * SLOB deprecation and SLUB_TINY The SLOB allocator adds maintenance burden and stands in the way of API improvements [1]. Deprecate it by renaming the config option (to make users notice) to CONFIG_SLOB_DEPRECATED with updated help text. SLUB should be used instead as SLAB will be the next on the removal list. Based on reports from a riscv k210 board with 8MB RAM, add a CONFIG_SLUB_TINY option to minimize SLUB's memory usage at the expense of scalability. This has resolved the k210 regression [2] so in case there are no others (that wouldn't be resolvable by further tweaks to SLUB_TINY) plan is to remove SLOB in a few cycles. Existing defconfigs with CONFIG_SLOB are converted to CONFIG_SLUB_TINY. * kmalloc() slub_debug redzone improvements A series from Feng Tang that builds on the tracking or requested size for kmalloc() allocations (for caches with debugging enabled) added in 6.1, to make redzone checks consider the requested size and not the rounded up one, in order to catch more subtle buffer overruns. Includes new slub_kunit test. * struct slab fields reordering to accomodate larger rcu_head RCU folks would like to grow rcu_head with debugging options, which breaks current struct slab layout's assumptions, so reorganize it to make this possible. * Miscellaneous improvements/fixes - __alloc_size checking compiler workaround by Kees Cook. - Optimize and cleanup SLUB's sysfs init, by Rasmus Villemoes. - Make SLAB compatible with PROVE_RAW_LOCK_NESTING, by Jiri Kosina. - Correct SLUB's percpu allocation estimates, by Baoquan He. - Re-enableS LUB's run-time failslab sysfs control, by Alexander Atanasov. - Make tools/vm/slabinfo more user friendly when not run as root, by Rong Tao. - Dead code removal in SLUB, by Hyeonggon Yoo. [1] https://lore.kernel.org/all/b35c3f82-f67b-2103-7d82-7a7ba7521439@suse.cz/ [2] https://lore.kernel.org/all/6a1883c4-4c3f-545a-90e8-2cd805bcf4ae@opensource.wdc.com/ ---------------------------------------------------------------- Alexander Atanasov (1): mm: Make failslab writable again Baoquan He (2): percpu: adjust the value of PERCPU_DYNAMIC_EARLY_SIZE mm/slub, percpu: correct the calculation of early percpu allocation size Feng Tang (5): mm/slub: only zero requested size of buffer for kzalloc when debug enabled mm: kasan: Extend kasan_metadata_size() to also cover in-object size mm/slub: extend redzone check to extra allocated kmalloc space than requested mm/slub, kunit: add SLAB_SKIP_KFENCE flag for cache creation mm/slub, kunit: Add a test case for kmalloc redzone check Hyeonggon Yoo (1): mm/slub: remove dead code for debug caches on deactivate_slab() Jiri Kosina (1): mm/slab: Annotate kmem_cache_node->list_lock as raw Kees Cook (2): slab: Clean up SLOB vs kmalloc() definition slab: Remove special-casing of const 0 size allocations Rasmus Villemoes (2): mm: slub: remove dead and buggy code from sysfs_slab_add() mm: slub: make slab_sysfs_init() a late_initcall Rong Tao (1): tools/vm/slabinfo: indicates the cause of the EACCES error Vlastimil Babka (25): mm/slub: perform free consistency checks before call_rcu mm/slab: move and adjust kernel-doc for kmem_cache_alloc mm/migrate: make isolate_movable_page() skip slab pages mm/sl[au]b: rearrange struct slab fields to allow larger rcu_head Merge branch 'slab/for-6.2/cleanups' into slab/for-next Merge branch 'slab/for-6.2/locking' into slab/for-next Merge branch 'slab/for-6.2/slub-sysfs' into slab/for-next Merge branch 'slab/for-6.2/tools' into slab/for-next Merge branch 'slab/for-6.2/fit_rcu_head' into slab/for-next Merge branch 'slab/for-6.2/kmalloc_redzone' into slab/for-next Merge branch 'slab/for-6.2/alloc_size' into slab/for-next mm, slab: ignore hardened usercopy parameters when disabled mm, slub: add CONFIG_SLUB_TINY mm, slub: disable SYSFS support with CONFIG_SLUB_TINY mm, slub: retain no free slabs on partial list with CONFIG_SLUB_TINY mm, slub: lower the default slub_max_order with CONFIG_SLUB_TINY mm, slub: don't create kmalloc-rcl caches with CONFIG_SLUB_TINY mm, slab: ignore SLAB_RECLAIM_ACCOUNT with CONFIG_SLUB_TINY mm, slub: refactor free debug processing mm, slub: split out allocations from pre/post hooks mm, slub: remove percpu slabs with CONFIG_SLUB_TINY mm, slub: don't aggressively inline with CONFIG_SLUB_TINY mm, slob: rename CONFIG_SLOB to CONFIG_SLOB_DEPRECATED Merge branch 'slab/for-6.2/kmalloc_redzone' into slab/for-next Merge branch 'slub-tiny-v1r6' into slab/for-next Documentation/mm/slub.rst | 2 + arch/arm/configs/clps711x_defconfig | 3 +- arch/arm/configs/collie_defconfig | 3 +- arch/arm/configs/multi_v4t_defconfig | 3 +- arch/arm/configs/omap1_defconfig | 3 +- arch/arm/configs/pxa_defconfig | 3 +- arch/arm/configs/tct_hammer_defconfig | 3 +- arch/arm/configs/xcep_defconfig | 3 +- arch/openrisc/configs/or1ksim_defconfig | 3 +- arch/openrisc/configs/simple_smp_defconfig | 3 +- arch/riscv/configs/nommu_k210_defconfig | 3 +- arch/riscv/configs/nommu_k210_sdcard_defconfig | 3 +- arch/riscv/configs/nommu_virt_defconfig | 3 +- arch/sh/configs/rsk7201_defconfig | 3 +- arch/sh/configs/rsk7203_defconfig | 3 +- arch/sh/configs/se7206_defconfig | 3 +- arch/sh/configs/shmin_defconfig | 3 +- arch/sh/configs/shx3_defconfig | 3 +- include/linux/kasan.h | 5 +- include/linux/percpu.h | 2 +- include/linux/slab.h | 64 ++- include/linux/slab_def.h | 2 + include/linux/slub_def.h | 8 +- kernel/configs/tiny.config | 5 +- lib/Kconfig.kasan | 2 +- lib/slub_kunit.c | 57 ++- mm/Kconfig | 38 +- mm/Kconfig.debug | 2 +- mm/kasan/generic.c | 19 +- mm/migrate.c | 15 +- mm/slab.c | 113 +++-- mm/slab.h | 86 ++-- mm/slab_common.c | 27 +- mm/slub.c | 553 +++++++++++++++++-------- tools/vm/slabinfo.c | 6 +- 35 files changed, 713 insertions(+), 344 deletions(-)