Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp3612459lfb; Mon, 9 May 2022 00:02:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9euVn6R0lKSLgiO/arW2I10Ay3u4BzZCJ+nfyevjpQ/fhrUPRZpZ19oYTpYLxpSOyiSCO X-Received: by 2002:a17:902:6901:b0:15e:ed3c:4eaf with SMTP id j1-20020a170902690100b0015eed3c4eafmr13935659plk.168.1652079752948; Mon, 09 May 2022 00:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652079752; cv=none; d=google.com; s=arc-20160816; b=f9YOlfC0Eg9sJb0Uadub/OPgarw483KcEBqpk46BNnxI7SRwxITWZInbLPXiwtz5Q8 MG4V4LmY31zkY7xH8SZCoW7/1yTVs3n2tcky9EQXMB8jje6EcN5tHBJEatwPrUDMMkDo tKVWVKKMQgCxFi6sMBfHdWSSfY0zkIQaCqu0MCr7iG+tMBeARuEgK7K1kZTf/JBmXlTG +kuUB+nMuiAKMcOai32Xb7LUSdkLKlIRVvyKrGuR3k9UQAGsWlJXyi3v99eHscTbShCp HSrF1Y1m1ksaoeU//nqwPndaxuGvXF/XR5OJbDV5fGlnCjIR1XgOlV4VcOqOWIKOrxni jaTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=XptBAx9vOKGo3RfIpYjJwmK4M6WXAF7uac2bEVwZWlc=; b=F1xm5a77tsuqmUholZl9nCLMBcptj7fOu9UBT5vTztwqeNy8vx3g/6IWqN1QYAkVEL wWfhE3CGyQTAY42TJq1umavm4chzjFaor6Sc9wGbCzr2yFygd7GiXprCjFzgXOIOXISR vpVLk3xuK1Ag4xJSKZQKGzKqG26Gy6LJx8ASphVwbEamT9fvpYRPsYOyF92SdxJM1Tm2 dvkbLOi/+XgNuYQxLDpYkgXlS91wcmisA0ySdKFQjw4mFlrOPOBXTIs1mu5pGFX/ZCCS xiDgYQZkp74NMvpmxRhXcBrcU3XakDtfWivEB3uy0nX0pFHMm1O64LFvbLXf8n8RtQ4B ggUg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 13-20020a63124d000000b003a282486e3csi13193388pgs.12.2022.05.09.00.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 00:02:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0554A149132; Mon, 9 May 2022 00:00:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232847AbiEHUzz (ORCPT + 99 others); Sun, 8 May 2022 16:55:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232454AbiEHUzy (ORCPT ); Sun, 8 May 2022 16:55:54 -0400 Received: from relay4.hostedemail.com (relay4.hostedemail.com [64.99.140.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 975F9B84B for ; Sun, 8 May 2022 13:52:03 -0700 (PDT) Received: from omf16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5D82630341; Sun, 8 May 2022 20:52:02 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf16.hostedemail.com (Postfix) with ESMTPA id 0F54C20014; Sun, 8 May 2022 20:51:55 +0000 (UTC) Message-ID: Subject: Re: [PATCH mm] tracing: incorrect gfp_t conversion From: Joe Perches To: Andrew Morton , Vasily Averin Cc: Steven Rostedt , Ingo Molnar , kernel@openvz.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Date: Sun, 08 May 2022 13:51:55 -0700 In-Reply-To: <20220507154835.4d4d737d8eed579969f15938@linux-foundation.org> References: <331d88fe-f4f7-657c-02a2-d977f15fbff6@openvz.org> <20220507123728.f20d977eba9fbb66bddee722@linux-foundation.org> <8b1cfefa-da7d-3376-cf04-1ff77dab8170@openvz.org> <20220507154835.4d4d737d8eed579969f15938@linux-foundation.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.4-1ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Stat-Signature: er99cw5hspnhcj3yju1mp5g1ptmr9tsf X-Rspamd-Server: rspamout06 X-Rspamd-Queue-Id: 0F54C20014 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18Yu0PF9VUwVKahCSWHsG2R6SAcUhY02Eo= X-HE-Tag: 1652043115-837159 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 Sat, 2022-05-07 at 15:48 -0700, Andrew Morton wrote: > On Sun, 8 May 2022 01:28:58 +0300 Vasily Averin wrote: > > > On 5/7/22 22:37, Andrew Morton wrote: > > > On Sat, 7 May 2022 22:02:05 +0300 Vasily Averin wrote: > > > > + {(__force unsigned long)GFP_KERNEL, "GFP_KERNEL"}, \ > > > > + {(__force unsigned long)GFP_NOFS, "GFP_NOFS"}, \ > > > > > > This got all repetitive, line-wrappy and ugly :( > > > > > > What do we think of something silly like this? > > > > > --- a/include/trace/events/mmflags.h~tracing-incorrect-gfp_t-conversion-fix > > > +++ a/include/trace/events/mmflags.h > > > @@ -13,53 +13,57 @@ > > > * Thus most bits set go first. > > > */ > > > > > > +#define FUL __force unsigned long > > > + > > > #define __def_gfpflag_names \ > > > - {(__force unsigned long)GFP_TRANSHUGE, "GFP_TRANSHUGE"}, \ > > > - {(__force unsigned long)GFP_TRANSHUGE_LIGHT, "GFP_TRANSHUGE_LIGHT"}, \ > > ... > > > + {(FUL)GFP_TRANSHUGE, "GFP_TRANSHUGE"}, \ > > > + {(FUL)GFP_TRANSHUGE_LIGHT, "GFP_TRANSHUGE_LIGHT"}, \ > > > > > > I think it's a good idea, and I regret it was your idea and not mine. > > heh > > > Should I resend my patch with these changes or would you prefer > > to keep your patch as a separate one? > > I did the below. I'll squash them together later. Very repetitive indeed. Why not use another stringifying macro? Maybe something like: #define gfpflag_string(GFP) \ {(__force unsigned long)GFP, #GFP)} #define __def_gfpflag_names \ gfp_flag_string(GFP_TRANSHUGE), \ etc...