Message ID | 20230626125726.GU4253@hirez.programming.kicks-ass.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7462802vqr; Mon, 26 Jun 2023 06:01:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7d90cMUeWXkALTmeMpiSiIX9F+mfbbsGasMnJu4K/Fd+9V1iMrFkcc74lrq2u96nzOokuH X-Received: by 2002:a05:6870:a4c1:b0:19a:34ed:db04 with SMTP id k1-20020a056870a4c100b0019a34eddb04mr19551444oal.32.1687784462451; Mon, 26 Jun 2023 06:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687784462; cv=none; d=google.com; s=arc-20160816; b=I0hlqpBnAlASv/MLze+ONVaqhHCLudWk7LQp/Qy4KpAGGGRWG8/WbOtmPHrcPNvO1F R+DybExtDHWVnYF0EYhLQPHJKAFl8dSdw4s2g4WqPJgyEd3+fLxwMIQX0jT6qLFpDmlW DN0NVqx+SohBAxZbf8z7ZeQvDqXTyvD99tLQ5bYq/OCqtZMxIuv1QhqppOcAUYVZ8IaN DSKHYgVsa9z3fdTUvoi6q6zJs9T4nEjzCoQp68PE1IxK1OCMAh4O40RlWVAMiOkVNzYd epGSDUeDBd1zj+TqfFD8/s1kteyfT6vzy+sEK/0I6tXlzxTqkZ2tX1LPklGxkWFJo7qp whTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=GxYPusAHHmA57+FfzyNNkDuavK6OclY5W645TKe3VLE=; fh=bsMIICAnLA6uSiNjv+cIY38Ak7XWkftPJzXrc17xjwo=; b=0CjIhn64O4E5IR/IM1H4NV2hhuWF5jA2L7Gv5yz5J8w7gFT7wJvT/0Jr3FJcY7VS+m cZbr9ztAMJ4B+CMihCwe1vqZmC4TFpyLJR0c9WXX4R1vWWkj3ElwysnBBaYU/SC05OWw 8UwDvuZpKyRUO69Ur3mTROM81EzvxdjMZZF+tz5/BVqUF4soAMTgddR/1/8Nlyc+Xy4Y P1tB2oEfMRtkUUXEajx8GmH07G+gg06jG9ge2Y+NXrzc+Jw1mt9Zh3bA9PU4TNfeUILT jgNq0UNQy9Np0mGXXdDnR2ZklNvpqaGtbm/c/ZaVEsBI/0rjnGbk+Hjmhahs8PWPYBl/ /frA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=lbdKzqqM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l191-20020a6388c8000000b0055ae81d6e2bsi1484921pgd.531.2023.06.26.06.00.41; Mon, 26 Jun 2023 06:01:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=lbdKzqqM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230284AbjFZM5m (ORCPT <rfc822;filip.gregor98@gmail.com> + 99 others); Mon, 26 Jun 2023 08:57:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjFZM5h (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 26 Jun 2023 08:57:37 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 071C2A0 for <linux-kernel@vger.kernel.org>; Mon, 26 Jun 2023 05:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=GxYPusAHHmA57+FfzyNNkDuavK6OclY5W645TKe3VLE=; b=lbdKzqqMVEueG40pBLztLfTT8R ZcwUDBqDGaQWkNxnawFEYKve9MGWuxcNyq+SrEblm6lPp7aRhkhvHxpyyu4LNa/reKcOUwz3A8sMt NWQJe8dobHLHxq78nTHPpncYYJBq16bm3KVK/RCp8u7FAf09TQBIk78DyCLe3J+IOLHLDnj+GOXm6 Y1Ok3g7LKA7+zcqMoLmRLXMvChtqzqW1u++gQ43occneutLnnthLqEib6xgyXmSon9Si9BjRp3CBY 1qhJKNf63witmolLtlD6s3eV59yXEq7BoY0oTf/qpsrXTzzM8p+NyRgvmvpabJcpR2gAiiK8p/DJ1 Qu5tatHQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qDlma-003zRs-00; Mon, 26 Jun 2023 12:57:28 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A380A300561; Mon, 26 Jun 2023 14:57:26 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8010420BC62B5; Mon, 26 Jun 2023 14:57:26 +0200 (CEST) Date: Mon, 26 Jun 2023 14:57:26 +0200 From: Peter Zijlstra <peterz@infradead.org> To: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Kees Cook <keescook@chromium.org>, x86@kernel.org Subject: [GIT PULL] Scope-based Resource Management for 6.5 Message-ID: <20230626125726.GU4253@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769770280538129911?= X-GMAIL-MSGID: =?utf-8?q?1769770280538129911?= |
Series |
[GIT,PULL] Scope-based Resource Management for 6.5
|
|
Pull-request
git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git tags/core_guards_for_6.5_rc1Message
Peter Zijlstra
June 26, 2023, 12:57 p.m. UTC
Hi Linus, Please consider pulling the SBRM infrastructure so that people can start building upon it. Specifically Greg also wants to start using this soon. Once this lands, I'll start to trickle in the conversions I've done for the next release. Thanks! --- The following changes since commit 6995e2de6891c724bfeb2db33d7b87775f913ad1: Linux 6.4 (2023-06-25 16:29:58 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git tags/core_guards_for_6.5_rc1 for you to fetch changes up to b5ec6fd286dfa466f64cb0e56ed768092d0342ae: kbuild: Drop -Wdeclaration-after-statement (2023-06-26 11:14:19 +0200) ---------------------------------------------------------------- Scope-based Resource Management infrastructure These are the first few patches in the Scope-based Resource Management series that introduce the infrastructure but not any conversions as of yet. Adding the infrastructure now allows multiple people to start using them. Of note is that Sparse will need some work since it doesn't yet understand this attribute and might have decl-after-stmt issues -- but I think that's being worked on. ---------------------------------------------------------------- Peter Zijlstra (4): dmaengine: ioat: Free up __cleanup() name apparmor: Free up __cleanup() name locking: Introduce __cleanup() based infrastructure kbuild: Drop -Wdeclaration-after-statement Makefile | 6 +- arch/arm64/kernel/vdso32/Makefile | 2 - drivers/dma/ioat/dma.c | 12 +-- include/linux/cleanup.h | 171 ++++++++++++++++++++++++++++++++++++ include/linux/compiler-clang.h | 9 ++ include/linux/compiler_attributes.h | 6 ++ include/linux/device.h | 7 ++ include/linux/file.h | 6 ++ include/linux/irqflags.h | 7 ++ include/linux/mutex.h | 4 + include/linux/percpu.h | 4 + include/linux/preempt.h | 5 ++ include/linux/rcupdate.h | 3 + include/linux/rwsem.h | 8 ++ include/linux/sched/task.h | 2 + include/linux/slab.h | 3 + include/linux/spinlock.h | 31 +++++++ include/linux/srcu.h | 5 ++ scripts/checkpatch.pl | 2 +- security/apparmor/include/lib.h | 6 +- 20 files changed, 282 insertions(+), 17 deletions(-) create mode 100644 include/linux/cleanup.h
Comments
On Mon, 26 Jun 2023 at 05:57, Peter Zijlstra <peterz@infradead.org> wrote: > > Please consider pulling the SBRM infrastructure so that people can start > building upon it. Specifically Greg also wants to start using this soon. > > Once this lands, I'll start to trickle in the conversions I've done for > the next release. So things are quiet (partly presumably due to July 4th in the US) and I've mostly emptied my merge window queue, so I've pulled this since I obviously was happy with the final syntax. However, let's agree to not really use it for 6.5 yet, and consider it all purely infrastructure for the next release, and for testing it all out in linux-next etc. We should probably also strive to avoid it for bug-fixes that end up going to stable. I'm sure this will all be backported to stable eventually, but I'd at least personally be happier if that started happening only after we actually have some more interaction with this. I hope - and expect - that the core compiler infrastructure should be stable due to C++ uses of destructors, but I also note that at least in the system headers I have, the only use of the __cleanup__ attribute seems to be a very special pthread_cleanup_push() helper, and some (fairly minimal) glib use in the g_auto*() types. So this attribute has been around forever, and the low-level functionality has presumably gotten a lot of testing, but at the same time it really looks like the C interface is somewhat limited in its use. I did do a Debian core search on g_autoptr() use, and in the first ten pages, most uses seemed to be either comments or tests. But there are certainly *some* real users too. Anyway, I did find enough use that I'm not worried, but I'd still like us to take this somewhat slowly. Let's *not* treat this as a "W00t! Black Friday at Walmart! Everybody rush in at once!" Linus
The pull request you sent on Mon, 26 Jun 2023 14:57:26 +0200:
> git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git tags/core_guards_for_6.5_rc1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/04f2933d375e3f90d4435b7b518d3065afd1fa25
Thank you!
On Tue, Jul 04, 2023 at 02:11:05PM -0700, Linus Torvalds wrote: > On Mon, 26 Jun 2023 at 05:57, Peter Zijlstra <peterz@infradead.org> wrote: > > > > Please consider pulling the SBRM infrastructure so that people can start > > building upon it. Specifically Greg also wants to start using this soon. > > > > Once this lands, I'll start to trickle in the conversions I've done for > > the next release. > > So things are quiet (partly presumably due to July 4th in the US) and > I've mostly emptied my merge window queue, so I've pulled this since I > obviously was happy with the final syntax. > > However, let's agree to not really use it for 6.5 yet, and consider it > all purely infrastructure for the next release, and for testing it all > out in linux-next etc. Sounds good to me. > We should probably also strive to avoid it for bug-fixes that end up > going to stable. I'm sure this will all be backported to stable > eventually, but I'd at least personally be happier if that started > happening only after we actually have some more interaction with this. Yeah, it will probably need to be backported to maybe 6.1.y if some real bugfix needs it, but for all of the trivial "clean up the error path" patches that we constantly get, we'll resist that for the stable tree if they use the cleanup logic. That might actually be a good thing overall anyway. > I hope - and expect - that the core compiler infrastructure should be > stable due to C++ uses of destructors, but I also note that at least > in the system headers I have, the only use of the __cleanup__ > attribute seems to be a very special pthread_cleanup_push() helper, > and some (fairly minimal) glib use in the g_auto*() types. > > So this attribute has been around forever, and the low-level > functionality has presumably gotten a lot of testing, but at the same > time it really looks like the C interface is somewhat limited in its > use. > > I did do a Debian core search on g_autoptr() use, and in the first ten > pages, most uses seemed to be either comments or tests. But there are > certainly *some* real users too. systemd has been using it for a long time so the infrastructure has been there and should be stable, but I'm sure we will find out if not. thanks, greg k-h