From patchwork Sat Jan 27 02:01:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 19530 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp265884dyb; Fri, 26 Jan 2024 18:01:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnm1oyTCaRHhCGj+GQQxSJFhPfqQkLR38xT1cvFaAs8yHgFBhKt2SL0c97P/QWwoT1H4nm X-Received: by 2002:a17:90b:1983:b0:28e:8267:1308 with SMTP id mv3-20020a17090b198300b0028e82671308mr1000626pjb.7.1706320917958; Fri, 26 Jan 2024 18:01:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706320917; cv=pass; d=google.com; s=arc-20160816; b=spKUlgjzaYXHY8wmFVjnaxKKqoyn8WzhUuDORMX4vEUaWWZPHrBEkx8uNSuTAHTKAp FkIGGytfMV2Qu2Og/LdilRSpwmDV1d/D0d+upjoHNDoUqrYoZzy5uatOjjhGdwnSgAde KF63WmePgZn/TncmVcJllQKPdLM/n96dUu/LEe9GBYTlDSuEmu5XRWSZ56S3Np+/mb6i Xxdsh53psokuNdBeoqAoekIWeheLNW+R9tp+Cr2iHbpnQR23RXCs6K8OSWc2iBI/aphp k+qGvWl2kTAbo26E54N/68E0i20XU98abXt4yHdFZszZG7k4R68k1xBO5pZkW0U5c3YH bNOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=3mxHfQelYlqL6oP1Hnoe6QZezCLAhWkLAbAnrEYZUDY=; fh=0UIAGl0E4wRbBfdUoF7pqM3CUJarYucrbeDSpW3ZHvo=; b=AYcsSxxkYqely/QxEl0e1XvooeJyFLHHosqkt+Mf3FppbSC7HZOUNfVms3TN8p4X1z cA3lUjgkMbBpALsbJOsA7DJx9yR8EM+ArVWGfGKdgIw+rzktl9ttpRX9dO5TzSt9e6op rbnDf/IMgdwg5dRIpE2QSD+iVKOIHgxvfpURQgyi1KPIrL4PpJSwrQ8eXbN8BnXuInj2 aG8tDqW9w//wN+4je/r4lGnO5tj8LALNsk2kEKXGJDjmQRD1VtDsrZRt2U3s85qZEgDN iJpFPvvfv7HD2uzbKiD9gApTPCnxNkg2Siutt1CZ2YyqctbrejUjBf8kcvqfbK/RAQR7 uuhg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=jTFswpDR; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-40975-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40975-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y7-20020a17090a644700b00290ef34bc86si2073825pjm.85.2024.01.26.18.01.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 18:01:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40975-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=jTFswpDR; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-40975-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40975-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B8FB828C6CC for ; Sat, 27 Jan 2024 02:01:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13E3B11C86; Sat, 27 Jan 2024 02:01:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="jTFswpDR" Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6378A2F3A; Sat, 27 Jan 2024 02:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706320884; cv=none; b=n18KofAukUBzVwqygr6f6XCcS++U6zx0IPnB3iECSMT4pEhSANqIHbszLt4X46hqI/wFh8gMbNssyz5tnlJ4I6X8NEvdSnTmuDUwCQ1bT3O75i/yzWKjc689vxz5+alp+1T/cW0/DCzezu4q7UwDc/ikqjep+2W1SmeexkVm+dg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706320884; c=relaxed/simple; bh=iy4bbPlcTHR5BujKxgwpeH6pLrpzI4Fhpz5iOUvrDBk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rsIJQuaAzXrT3+h4bE3ALKTMGPtoByr/13u5MzEAjs9c0TbEvuGRjDI3k3KGfH1OOiVSDPhv8mmW3QOW6EFDxCpWHZuWLK29XX9tsKhdy+ss095u9/gx2sL17urRNCXJstk9YUEbl9pWxYTHFJuO3bGJm8+ZOeU4W7hP+EK0zH0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=jTFswpDR; arc=none smtp.client-ip=95.215.58.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1706320879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3mxHfQelYlqL6oP1Hnoe6QZezCLAhWkLAbAnrEYZUDY=; b=jTFswpDRYA+jkiETjI/gfWRf08taHsK/aVZvXqWCGXMdjSIgz69OD0xCLALCZwEQ28TjAA VNv4HhxX4J4c4A7y7jsuhMHrs+I/Pa4txUGFkqiFJ9ycOBUEKlhQVZaatFlM22qCKibxTg DM5z9B9BdJCqHFaWR/Aaj+g93ZO1hD4= From: Kent Overstreet To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-fsdevel@vgerkernel.org Cc: Kent Overstreet , peterz@infradead.org, boqun.feng@gmail.com Subject: [PATCH 0/4] lockdep cmp fn conversions Date: Fri, 26 Jan 2024 21:01:04 -0500 Message-ID: <20240127020111.487218-1-kent.overstreet@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789207162461946735 X-GMAIL-MSGID: 1789207162461946735 rationale: *_lock_nested() is fundamentally broken - in order for lockdep to work we need to be able to check that we're following some defined ordering, and it's not possible to define a total ordering of an arbitrary number of objects with only a small fixed size enum. so it needs to go. awhile back I added the ability to set a comparison function for a lock class, and this is the start of hopefully a slow steady trickle of patches as time allows to convert code to use it. Kent Overstreet (4): fs/pipe: Convert to lockdep_cmp_fn pktcdvd: kill mutex_lock_nested() usage net: Convert sk->sk_peer_lock to lock_set_cmp_fn_ptr_order() af_unix: convert to lock_cmp_fn drivers/block/pktcdvd.c | 8 ++--- fs/pipe.c | 77 ++++++++++++++++------------------------ include/linux/lockdep.h | 3 ++ include/net/af_unix.h | 3 -- kernel/locking/lockdep.c | 6 ++++ net/core/sock.c | 1 + net/unix/af_unix.c | 24 ++++++------- net/unix/diag.c | 2 +- 8 files changed, 55 insertions(+), 69 deletions(-)