Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2761035rwd; Fri, 26 May 2023 10:48:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4XKBRiszw3zrrf53fNcRPFFGQM8XIHurKehQ9YsXMpwmHOs8QCUv/i3rhBFsObhGqgzUM5 X-Received: by 2002:a05:6a00:188f:b0:64d:411b:3a0c with SMTP id x15-20020a056a00188f00b0064d411b3a0cmr9684212pfh.14.1685123281795; Fri, 26 May 2023 10:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685123281; cv=none; d=google.com; s=arc-20160816; b=Dp1WgazQ9tIJyasUvum92F88tmahh0eySpBez835Y8Kb6W9uK8v6B8cOsRHOYXJ8Ds W2OluwZx2iYVxm/xge9HSrv6hl4y4VQVzTRqd79ENS2a/UsR+bzAL3d0eLxFHyVMc8Tc vTzpeXvtNx9p3vLTOrCNjXGMSpunG2z6n7/FPz/PfopVOqVLpbkvwl9KdCweP/IdgjUa Lt/vKK+rWyNWqV1TgkURac2vMl62N8KgIvO1AaE8ePu+rFhiRF/yIOcNGmCXcpTySTX9 e4d1XXv5Bfjh3RpN/9nc+7wQmuXdzojjpLdxuMnI4NcU/waWlZihquZsXzUBKM+u7F/7 f4Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xrAsusgkfBvmmmiwPVcpmH1+bX7KkadAb7REhNybOik=; b=G48sNElC/pUwt/piSfLTOhIyXW3g/A290OudwB7vUb2YueHWmG1tw6AAXM0J3XDRFI rTbsupMDN4rCjMA1qk2v7SFTpb/gSzHR4V0Fa/oU+QBcNZon9s5DGisPIskEuP7D83jD 31FvT9yT3NQORRVpgAweH9ddjyxqy99/cBJlT17YmnwA0ID1KohvepYTvKpv2A3EjWbE N28CAuVb91lNxI8bdSZDQGwLWQBIi7T5VZcqLdOOe+FrzW4PYW08DuiAa3EvptO5DUSs 4tkalEVhYMIxZl4EtYrdroeQ5JLttQGrEqqHFQm3Q8Vvcd8hzXJDz2qQqaXWConnfi6M rYLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=cyk1Fl5s; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020aa78bd2000000b00643970acd01si3732150pfd.319.2023.05.26.10.47.49; Fri, 26 May 2023 10:48:01 -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=@gmail.com header.s=20221208 header.b=cyk1Fl5s; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242855AbjEZRln (ORCPT + 99 others); Fri, 26 May 2023 13:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242778AbjEZRlg (ORCPT ); Fri, 26 May 2023 13:41:36 -0400 Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDEC6A4; Fri, 26 May 2023 10:41:16 -0700 (PDT) Received: by mail-yb1-xb34.google.com with SMTP id 3f1490d57ef6-b9a6eec8611so2867988276.0; Fri, 26 May 2023 10:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685122876; x=1687714876; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xrAsusgkfBvmmmiwPVcpmH1+bX7KkadAb7REhNybOik=; b=cyk1Fl5sFjYFPxobyF1bLxe3S0/gPVKrhd38Hn0JZz4PQsHfkIBTjZdlekhgVzzZa6 EqE4rUtlOZLKt/z4GJTDeTJWW8W9i5VvakM8hmqXfzvA3kAfV2VCNWnWcLomEypvh0GI cF2Ft1vg4IkxYxcLenMisHvrfa/0YbQTipzDKVcngH5IHo48aGXieUzu0H5YTABE84ev 4GNqVUxB4k1uT5Ga1JBkvAGFW3bXBqNWKo7VA8Vn3UonIdckb+IKx/vRL+83m4wVCG7j hiu6zF0/4sa4w61VuBa52Nxubh66xK5uwIgi3mboqX2E3jZBPbxsQrtKlntyjtUpTJSo fY5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685122876; x=1687714876; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xrAsusgkfBvmmmiwPVcpmH1+bX7KkadAb7REhNybOik=; b=d8CApYypOVVbrWCVoC9BIKUVZiacbtSZHI/XLNYVa3cVWbJRXwXRxtYcFOZjAzIgLq JpLYzy76akUqyUqE00BksgPq7T9VImnlbPgeTCh3AFNycKaWaO+kN+DRgatkuEc6zcAM MZbbMHl5Nj4qdMeqAY5M5hkyR8Prrweay5pS0T6WvR6HWSf6nAvfNVSlm312A4KC1qpb ekiiFJGvtlLapkQs/XcieAcc20kvTd1k47TvhnxdQ7RsGc/27k5LDmwQHX99HWkm8LGB llqt7xH6tdfU1QDRwA6A5pPFXy6lxzqsVtjGN778cmri3DmX0/X0ercwuEr0JWRWKMeO p9qw== X-Gm-Message-State: AC+VfDwf1QwVgkuyE8CXyiUWsHTcKGS5HaIPRc3sELcaLvAyeNJmOa4H zwDVckfYt005xr1/Yowp67TG7xGKhTt2bTegnoA= X-Received: by 2002:a05:690c:84d:b0:561:fc3a:30f3 with SMTP id bz13-20020a05690c084d00b00561fc3a30f3mr3014315ywb.8.1685122876075; Fri, 26 May 2023 10:41:16 -0700 (PDT) MIME-Version: 1.0 References: <20230526150549.250372621@infradead.org> <20230526151947.027972233@infradead.org> <2023052626-blunderer-delegator-4b82@gregkh> <202305261006.01B34DB4C@keescook> In-Reply-To: <202305261006.01B34DB4C@keescook> From: Miguel Ojeda Date: Fri, 26 May 2023 19:41:04 +0200 Message-ID: Subject: Re: [RFC][PATCH 2/2] sched: Use fancy new guards To: Kees Cook Cc: Mathieu Desnoyers , Greg KH , Peter Zijlstra , torvalds@linux-foundation.org, pbonzini@redhat.com, linux-kernel@vger.kernel.org, ojeda@kernel.org, ndesaulniers@google.com, mingo@redhat.com, will@kernel.org, longman@redhat.com, boqun.feng@gmail.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, paulmck@kernel.org, frederic@kernel.org, quic_neeraju@quicinc.com, joel@joelfernandes.org, josh@joshtriplett.org, jiangshanlai@gmail.com, qiang1.zhang@intel.com, rcu@vger.kernel.org, tj@kernel.org, tglx@linutronix.de Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 26, 2023 at 7:08=E2=80=AFPM Kees Cook w= rote: > > > FWIW C++ has std::scoped_lock. So perhaps using a similar wording may h= elp ? > > Yeah, I like "scoped_*" and "guarded_*" for naming. IMO, it reads better. FWIW in the Rust side we called the general facility `ScopeGuard`, then we also have lock `Guard`s and Rust stdlib has things like `MutexGuard`. Cheers, Miguel