Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1495778rwd; Thu, 8 Jun 2023 20:04:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6KD5XkUe3DYH0iGIxeat87xcZwVM8RzuhEI5pwgn7k18IbdPqb7kO4Wtf/9V9ErsKR1gGG X-Received: by 2002:a05:6a21:170e:b0:10b:78d6:a2c8 with SMTP id nv14-20020a056a21170e00b0010b78d6a2c8mr36940pzb.15.1686279895884; Thu, 08 Jun 2023 20:04:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686279895; cv=none; d=google.com; s=arc-20160816; b=BEBOQulVLTiIm0krpPW0bZWtWloN6gkJoJpvmUmzNKB6nMozA8/+7Ybee7w8CyjZqI wztnrjC1NpEOwQfn0x2KbZVDCyhxPt4K+HLrmPlPGBJst4VSgzDuZFwMcpT6XBaEyUKH +pLDMsImnq/hHasjKwH/NiB9Q0NVO7JHduti8qZxNKL5OqPHNUZPrF+mk1PbpSXZ+hRj K1iygXhJtpQDI2rp14U756u0r0EgRcXGjjDtPG+Cm91cDFpOPuEyyUlmzj1xXwqa2wpl 3aW6iGSD/RVgIamKi7orUvFruG83hSTX6S8+r60H1qrSmOfUzjLdaTfBAZ4t3vnhOJmZ frPg== 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=O0dr2RCR8de9AHgGFM/BsL//DnL2oGg8Z2a/flMORU8=; b=LSqfO6T095YP69KYzz79wbYpwfOhrpCuxvTXAd2rOJzN+fAEAtUCW0HyKcrcwlpWLV azo1h4O8PzSaB2ldmen97Wbqwt6kZrARhzoifrebPwvUcpuTJ0HhCl5gZyAjOgv73l19 Cd9hKOlLtRkaCP9Jm9iRFfcNMbrkbcAEylPIqN2sGPZvuLlLAsHj4eWmlkobRYbRTlWm DP6q8ZTwsWENWU+QKDCE+mYNh3+OSG3/+A/Pf0+ILOF083/Zea9HhiecasQ/WDkVCIyo eChmkGDCJ4NvhqCY3GsE3vOzvDHuCasNBKZymCsm6+EeDfufHcXI5pRnzXbx+gM4boyw MY8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=cMTFvoqU; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020aa79850000000b0064d6ca3ca97si1718686pfq.344.2023.06.08.20.04.41; Thu, 08 Jun 2023 20:04:55 -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=@linux-foundation.org header.s=google header.b=cMTFvoqU; 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 S237720AbjFICcL (ORCPT + 99 others); Thu, 8 Jun 2023 22:32:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237665AbjFICcJ (ORCPT ); Thu, 8 Jun 2023 22:32:09 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C22CA1993 for ; Thu, 8 Jun 2023 19:32:08 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4f6454a21a9so1564316e87.3 for ; Thu, 08 Jun 2023 19:32:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1686277927; x=1688869927; 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=O0dr2RCR8de9AHgGFM/BsL//DnL2oGg8Z2a/flMORU8=; b=cMTFvoqUVQ9p1eoibPIKsrYwUpbFHBpds+nB87abGuKmei79zCBFxO97bVJkpCNfKk 3E4n/FDS3SSRTBnX1jaSBdd2PksEZ8SPN2j7zaySDThjXb5/EGGRiiMaD9ZPvOh/LLw6 7VqD9bouyhcuFdIRIsZ16aAOE4Wfagxr/0GjQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686277927; x=1688869927; 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=O0dr2RCR8de9AHgGFM/BsL//DnL2oGg8Z2a/flMORU8=; b=U/MHvlvLPXdEnUZubDM+rb4xL6gYPwHcKvLi74FFO3zJ21bYYlJbvs+8etRkF6valm Vy5vcJ7idOvoohgnJkwUHZHHna8+Kv2BiCiu/NXI0HlVkFizfD61kNFxc/SVDfBu9s4+ Ytn9QERcLHVMmpmjQZBKPwpwB5YhhSMVgJBUyhhpUhJI3SBvqHFyOPnkMI++Yp91EDNQ XR5Dhzv11rHyZKZjTgobFa9croQHmKWnVwtoqsfwm3rIbCw7nsXR/lfwYDbkc8UGCtlg PyM/vB69WG+nK0IYJe6MZCVYvlnpfshO+edvpYf6R9S20nj6Su83Icak9SX74yo9guNG EItg== X-Gm-Message-State: AC+VfDzQfbXIj8gMeYz3Mw2pupLxi9N86abN0A4+EK/PkY55jfW7Bckj HgJW1pp0rH6HZ+yFAT2qR7yBDHgnyKnxzCeG6/cxopig X-Received: by 2002:a19:5619:0:b0:4f1:4d66:ac96 with SMTP id k25-20020a195619000000b004f14d66ac96mr44588lfb.19.1686277926781; Thu, 08 Jun 2023 19:32:06 -0700 (PDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id t12-20020ac2548c000000b004efae490c51sm373033lfk.240.2023.06.08.19.32.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Jun 2023 19:32:06 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-4f642a24568so1567559e87.2 for ; Thu, 08 Jun 2023 19:32:06 -0700 (PDT) X-Received: by 2002:a17:907:728b:b0:969:9fd0:7cf2 with SMTP id dt11-20020a170907728b00b009699fd07cf2mr271573ejc.10.1686277544358; Thu, 08 Jun 2023 19:25:44 -0700 (PDT) MIME-Version: 1.0 References: <20230530092342.GA149947@hirez.programming.kicks-ass.net> <20230606094251.GA907347@hirez.programming.kicks-ass.net> <20230606134005.GE905437@hirez.programming.kicks-ass.net> <20230606180806.GA942082@hirez.programming.kicks-ass.net> <20230607094101.GA964354@hirez.programming.kicks-ass.net> <20230608085248.GA1002251@hirez.programming.kicks-ass.net> <20230608200618.GA1020752@hirez.programming.kicks-ass.net> In-Reply-To: <20230608200618.GA1020752@hirez.programming.kicks-ass.net> From: Linus Torvalds Date: Thu, 8 Jun 2023 19:25:27 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/2] Lock and Pointer guards To: Peter Zijlstra Cc: keescook@chromium.org, gregkh@linuxfoundation.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, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, rcu@vger.kernel.org, tj@kernel.org, tglx@linutronix.de, linux-toolchains@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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 Thu, Jun 8, 2023 at 1:06=E2=80=AFPM Peter Zijlstra wrote: > > struct obj *p __free(kfree) =3D kmalloc(...); Yeah, the above actually looks really good to me - I like the naming here, and the use looks very logical to me. Of course, maybe once I see the patches that use this I go "uhh", but at least for now I think you've hit on a rather legible syntax. I'm still a bit unsure of the "no_free_ptr(p)" naming, but at least it's pretty clear about what it does. So my only worry is that it's not pretty and to the point like your "__free(kfree)" syntax. But it feels workable and not misleading, so unless somebody can come up with a better name, I think it's ok. Linus