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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0D78C001DF for ; Fri, 4 Aug 2023 17:50:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229549AbjHDRu3 (ORCPT ); Fri, 4 Aug 2023 13:50:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjHDRu2 (ORCPT ); Fri, 4 Aug 2023 13:50:28 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67A3C4C00 for ; Fri, 4 Aug 2023 10:50:27 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3fe4cdb724cso3862915e9.1 for ; Fri, 04 Aug 2023 10:50:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691171426; x=1691776226; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Im4dcEZwNsAe1Y2oMqCTaJQsYwxClHXtIW7/6pymoyo=; b=UphmCrMdpkSP7a4kk/vE3lUOeIiuyB34qLRvc1hVE1UR5N24Pb2doPpops1e0fJZO3 l7+Bk3H7d5jOmKNeKhcDLsMZJNuIyHqNmGr75RUO5jWp2HPE5ptjfRqhQ0IrbU7mEv97 MuSxSto9os2ONR7Oe9dcetZWP8f9vvHSvb+t8rF4ZYgDh27z2ODAr7TqttRRHIADws9s Ae5OPXRm1TlbOsahEMKzhYUMk1sQ9dGAdCwA0kmpXEK+3dKfbfK4mxVDVwPW58H6cw05 yLRe304WmuDsKIOPh9865os6tl4CxYMAVH/YKDrjCu9dUNU4OoRCLk4W+tWKgRLfg3Nw KRtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691171426; x=1691776226; h=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=Im4dcEZwNsAe1Y2oMqCTaJQsYwxClHXtIW7/6pymoyo=; b=AjBbp+4PFvWXfTFY4AIzEO+2Q/NExjcMnmr0taeGvGwpoqay15aESReVrtUhMB61P4 sXg0UdpKSQbqfw4gRauJxAoputNibR5Af5aN42V3fTseYuXENsII26OVc/0L/RgxL9By wdDOzdukt9OuOW0Ie6+QhHgBkjAiIa9hsuGOOHbx6VR0HsTfnxdFAne0KiH19JH+Z00t 26ELY98Q0TBggQ//IceX6lDNVut3KQL1hWc9ERlMAMSAYh9feed8+vOgZD5rLK0ppBX8 eXEJ+qmakpDSLLU/2OER1gyCp4CgJoeEb3IxwoqdtSqOtqEvtyxv1PXFmhXFv0cImOIh RhFQ== X-Gm-Message-State: AOJu0YzBEOTyO2ZqC6gqueeI59/U1bH5fEQr5jHlkh5XCtFfdF6ZEoFN +A8IOOutHwoQskbipDli1q5TpV6U9Xs7jsjwxYEryA== X-Google-Smtp-Source: AGHT+IFCpKdw5xT0hmDqmMcqVOJlFAgL0wRRdu5YxGtWnPb4KKrgp8kcqaD2UASnRwTjmhmQD6u7JjQJgAG5sZzFLQo= X-Received: by 2002:a1c:cc08:0:b0:3fe:485f:ed13 with SMTP id h8-20020a1ccc08000000b003fe485fed13mr2162276wmb.29.1691171425779; Fri, 04 Aug 2023 10:50:25 -0700 (PDT) MIME-Version: 1.0 References: <20230804090621.400-1-elver@google.com> <20230804090621.400-2-elver@google.com> <20230804120308.253c5521@gandalf.local.home> In-Reply-To: <20230804120308.253c5521@gandalf.local.home> From: Marco Elver Date: Fri, 4 Aug 2023 19:49:48 +0200 Message-ID: Subject: Re: [PATCH v2 2/3] list_debug: Introduce inline wrappers for debug checks To: Steven Rostedt Cc: Andrew Morton , Kees Cook , Guenter Roeck , Peter Zijlstra , Mark Rutland , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Nathan Chancellor , Nick Desaulniers , Tom Rix , Miguel Ojeda , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Dmitry Vyukov , Alexander Potapenko , kasan-dev@googlegroups.com, linux-toolchains@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Fri, 4 Aug 2023 at 18:03, Steven Rostedt wrote: > > On Fri, 4 Aug 2023 11:02:57 +0200 > Marco Elver wrote: > > > Turn the list debug checking functions __list_*_valid() into inline > > functions that wrap the out-of-line functions. Care is taken to ensure > > the inline wrappers are always inlined, so that additional compiler > > instrumentation (such as sanitizers) does not result in redundant > > outlining. > > > > This change is preparation for performing checks in the inline wrappers. > > > > No functional change intended. > > I think the entire underscoring functions calling more underscoring > functions in the kernel is an abomination. Yes, there's lots of precedence > to this craziness, but let's not extend it. > > Can we give actual real names to why the function is "special" besides that > it now has another underscore added to it? > > I've been guilty of this madness myself, but I have learned the errors of > my ways, and have been avoiding doing so in any new code I write. That's fair. We can call them __list_*_valid() (inline), and __list_*_valid_or_report() ?