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 21C9EC04AA5 for ; Thu, 25 Aug 2022 13:16:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7C6C2940008; Thu, 25 Aug 2022 09:16:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 775B2940007; Thu, 25 Aug 2022 09:16:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 63E34940008; Thu, 25 Aug 2022 09:16:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 54CDB940007 for ; Thu, 25 Aug 2022 09:16:58 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2A71880312 for ; Thu, 25 Aug 2022 13:16:58 +0000 (UTC) X-FDA: 79838165316.14.A45BFEF Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf24.hostedemail.com (Postfix) with ESMTP id 4DDD6180013 for ; Thu, 25 Aug 2022 13:16:57 +0000 (UTC) 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-out1.suse.de (Postfix) with ESMTPS id 25DA334A04; Thu, 25 Aug 2022 13:16:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1661433416; 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: in-reply-to:in-reply-to:references:references; bh=E+S0s4GZQl9sl9NYFdqoiPsIknkHhXwhZKZxhIw6cDk=; b=ji1izw3x+chLRA8doBXaXOHZ38fTJhn1llIgJNU/48kXfTigYkn+x9oJvgWMFWGRF7fDWY OlJIgKUTQYFDq7Kf9dtKVVEOnLbwpgu/Y0d99doYlfmmF6EET3YS2y988hXdb/cKJVelEl HqCo58KidYh0y0/Rq19r3Iq8bvCx/SQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1661433416; 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: in-reply-to:in-reply-to:references:references; bh=E+S0s4GZQl9sl9NYFdqoiPsIknkHhXwhZKZxhIw6cDk=; b=B4vPz49mecrieuh4ACrZwcQLkHrE7dUpsnvJtaxC82CHN3mEAFWJh7AIuwiZPlLktDWzJG vAwP1Qe8AJ+nxABw== 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 E49E313517; Thu, 25 Aug 2022 13:16:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Gu0SN0d2B2M1LAAAMHmgww (envelope-from ); Thu, 25 Aug 2022 13:16:55 +0000 Message-ID: Date: Thu, 25 Aug 2022 15:16:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH v2 0/5] mm/slub: fix validation races and cleanup locking Content-Language: en-US To: Rongwei Wang , Christoph Lameter , Joonsoo Kim , David Rientjes , Pekka Enberg , Feng Tang Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Roman Gushchin , linux-mm@kvack.org, Sebastian Andrzej Siewior , Thomas Gleixner , Mike Galbraith References: <20220823170400.26546-1-vbabka@suse.cz> From: Vlastimil Babka In-Reply-To: <20220823170400.26546-1-vbabka@suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=ji1izw3x; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=B4vPz49m; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661433417; a=rsa-sha256; cv=none; b=d+LsQO0Z3MOJYdrSwIu2LbEPdFrhJ9BWCeYEwk4SvokThlYDkaxjqFsmj1AeXLIftQZLCe E9DISwYyqv41I5ddjqkY7IR3BCdBv56MB/gn92GSrRGhqwGKXx/OjNegEwg703WmW/uVVd JFydCtRQdcrDwANiotYGV/qMSk5dI4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661433417; 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:in-reply-to:references:references:dkim-signature; bh=E+S0s4GZQl9sl9NYFdqoiPsIknkHhXwhZKZxhIw6cDk=; b=7fkqJ+vm5xwGDwi4vKdRRhqoxlQh63p3SMV9qGXg5Ajv0eXRpn9kkRu2JysVQpBQIkTjJ1 DuUQ0z9Bx7JBcnLhBjwv9SDsbKGSdAAH/xUCnTSCi6rnB4YwW3q9p9PKN7gUg2gwchXXtP p4CnHK4nJ+g3MXtnw6Zc6VDc4SDWmoE= X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 4DDD6180013 X-Rspam-User: X-Stat-Signature: radpofi8kway8hzwaohxo6yza5knn317 Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=ji1izw3x; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=B4vPz49m; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-HE-Tag: 1661433417-148354 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: On 8/23/22 19:03, Vlastimil Babka wrote: > This series builds on the validation races fix posted previously [1] > that became patch 2 here and contains all the details in its > description. > > Thanks to Hyeonggon Yoo's observation, patch 3 removes more slab_lock() > usage that became unnecessary after patch 2. > > This made it possible to further simplify locking code in patches 4 and > 5. Since those are related to PREEMPT_RT, I'm CCing relevant people on > this series. > > Changes since v1 [2]: > > - add acks/reviews from Hyeonggon and David > - minor fixes to patch 2 as reported by Hyeonggon > - patch 5 reworked to rely on disabled preemption by bit_spin_lock() > which should be sufficient without disabled interrupts on RT > > git version: > > https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git/log/?h=slub-validate-fix-v2r2 > > I plan to add this series to slab.git for-next in few days. Thanks for the reviews, fixup suggestions and patch 6/5, now all pushed to slab.git for-6.1/slub_validation_locking and merged to for-next. > > [1] https://lore.kernel.org/all/20220809140043.9903-1-vbabka@suse.cz/ > [2] https://lore.kernel.org/all/20220812091426.18418-1-vbabka@suse.cz/ > > Vlastimil Babka (5): > mm/slub: move free_debug_processing() further > mm/slub: restrict sysfs validation to debug caches and make it safe > mm/slub: remove slab_lock() usage for debug operations > mm/slub: convert object_map_lock to non-raw spinlock > mm/slub: simplify __cmpxchg_double_slab() and slab_[un]lock() > > mm/slub.c | 417 ++++++++++++++++++++++++++++++++---------------------- > 1 file changed, 251 insertions(+), 166 deletions(-) >