Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp33592104rwd; Sat, 8 Jul 2023 16:02:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHPjmTgZgasrzFdetmLJvuDsaolPXNi1buJQDpcLgJTkqLhVCP/TdKLT/JnIzUfn0PcB4jc X-Received: by 2002:a05:6a00:2e09:b0:67b:f249:35e2 with SMTP id fc9-20020a056a002e0900b0067bf24935e2mr10977154pfb.21.1688857375424; Sat, 08 Jul 2023 16:02:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688857375; cv=none; d=google.com; s=arc-20160816; b=EfIALzmbrHNEQHGbkTiA5iRcQg+wou4CgYYcj2zxBduTpTY+UtLEw3MXrOY54CfqtI 4ZEiHWgzgRBTou0TlF9vI93yJB9Fpd4IP8bsqAzcoZ1PFf6LtXxmzi3jEbfMpoKXEZpV wIkV/RSZsNkgGhPlRlAqEX/vET/Pzxb7/fIsJz1AET/rwbj+IF2raMVHcu0Es6GDlSY+ pUyi7nkG/FukNr2eFApHZiKHya4Rn9wqaA5jkgqPAvf5ILtrKXTiR/P8imqqrGQUPDWg AlPYLlwUiSHfCa8f7NmHECoYiGQh4UfJD5yCciXIJ22hgVZI4w/H4JC3dMbhTwJifD3P YsmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=usdNVu3zHxYIxjv6CIUqKF4RVb+FJwD+QutAZ+SONzU=; fh=BPJ4Jj+UlSdu+Y9/wtYGmdjQOrb3kVHo4A5Vsx9VAoM=; b=t1xfLx3NXS9rsqV95JehTUDpdb/1Mr6Sh7bhDdWt0vCJrTqocTj9QmmAxLg3mDGWHT o3wmbBADDrSCVWi8toQYVsg+lp65vyEyxasOeZ0FGPIu9VLIlP7t0aP842+rwlAhbZYV D5F6B572GTQ6ljmN/rNoY+bVTBjSO6eyyrSwd0ot2qyRZbqDgvbYUipAqllSoqSBdr7a N5sidbWO1b6dI8pQs6weXFOyPhfmyiSuOIxhrs1Qun3FypKhickiMxdZx9F+R2ytk1e0 EpAz8c0prgg3aXMsgNbTeFQndSXWfQy8mo1FopX095nx7HKDyW0DEPbiqphmYPZZIhAN TRmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm1 header.b=Na9HAOrB; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=gLSbU0FM; 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 q14-20020a63e94e000000b0054f96f7bcf3si6305940pgj.105.2023.07.08.16.02.33; Sat, 08 Jul 2023 16:02: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=@dxuuu.xyz header.s=fm1 header.b=Na9HAOrB; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=gLSbU0FM; 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 S229941AbjGHWCy (ORCPT + 99 others); Sat, 8 Jul 2023 18:02:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjGHWCx (ORCPT ); Sat, 8 Jul 2023 18:02:53 -0400 Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4D0DE4A; Sat, 8 Jul 2023 15:02:51 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id E322A580114; Sat, 8 Jul 2023 18:02:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 08 Jul 2023 18:02:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1688853770; x=1688860970; bh=us dNVu3zHxYIxjv6CIUqKF4RVb+FJwD+QutAZ+SONzU=; b=Na9HAOrBe8T77a5nS8 52BWoRWX8ndJggaCp8w2hNy4K/Hx05IOEQ4yQObUd9fMIYSzLmsi2a/O6epJ5qvc W1eTLx5OU8Jpuw71pSiX/7bL+A0gmS5EnPpo/ZvAQxOl34rA2JhaTspyfWvR9mew LjdBY1z3zRDNj8gDVFEsrg9hI9I1rE8aXIgux5JIzDTevLhwYasC8HlujidS2Rg3 oeJkgsDN6rPckNAf5xIuvB3MIfc0wa1XzXyA6XJCvKOhB1PfUmFuV1F+DA/txx2C TFbBrfHD+x1kG8ttvq4wr/4p9E7RxfKkXhuqHUKMqWFPPPaxDCC9Ys4dGOFy+4cQ awtw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1688853770; x=1688860970; bh=usdNVu3zHxYIx jv6CIUqKF4RVb+FJwD+QutAZ+SONzU=; b=gLSbU0FM8ylBPR+gKikOZL72bXg4z IHWrM01pn4v4sFGSuTAMa0jUmx/6nKepFuAczDtUIN4J3C94mnWcSypEkGGgS2J1 mGy8lR05n3puher+YyQNfmzSlL2GU9mMD1DhIJTcKumAT+QtdDJ0A/u4JJJYSvZv eyDq7SxbHIFPFOBMY/8d1jvV7iUaGKioK5hI2U4ZQ+D+s19Q3lbUD4T0bRHPbtp0 uzaetPHGfbgo4RgY/uG0DkOAY7dr+2bPrjfsd1QcQj26CDDuX3yjsA6QAA85mPbQ 90OruCSXhseKCEN1UWdnOGtaxese77/MFKkNpfXIkFMWubac2wkQXSo2w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrvdeggddtiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepfffhvf evuffkfhggtggujgesthdtsfdttddtvdenucfhrhhomhepffgrnhhivghlucgiuhcuoegu gihusegugihuuhhurdighiiiqeenucggtffrrghtthgvrhhnpedvfeekteduudefieegtd ehfeffkeeuudekheduffduffffgfegiedttefgvdfhvdenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegugihusegugihuuhhurdighiii X-ME-Proxy: Feedback-ID: i6a694271:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 8 Jul 2023 18:02:48 -0400 (EDT) Date: Sat, 8 Jul 2023 16:02:47 -0600 From: Daniel Xu To: Leon Hwang Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, hawk@kernel.org, tangyeechou@gmail.com, kernel-patches-bot@fb.com, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH bpf-next v2 0/2] bpf: Introduce user log Message-ID: References: <20230708040750.72570-1-hffilwlqm@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230708040750.72570-1-hffilwlqm@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Hi Leon, On Sat, Jul 08, 2023 at 12:07:48PM +0800, Leon Hwang wrote: > This series introduces bpf user log to transfer error message from > kernel space to user space when users provide buffer to receive the > error message. > > Especially, when to attach XDP to device, it can transfer the error > message along with errno from dev_xdp_attach() to user space, if error > happens in dev_xdp_attach(). Have you considered adding a tracepoint instead? With some TP_printk() stuff I think you can achieve a similar result without having to do go through changing uapi. > > Leon Hwang (2): > bpf: Introduce bpf generic log > bpf: Introduce bpf user log > > include/linux/bpf.h | 3 ++ > include/uapi/linux/bpf.h | 8 ++++++ > kernel/bpf/log.c | 52 ++++++++++++++++++++++++++++++++++ > net/core/dev.c | 4 ++- > tools/include/uapi/linux/bpf.h | 8 ++++++ > 5 files changed, 74 insertions(+), 1 deletion(-) > > > base-commit: 622f876ab3ced325fe3c2363c6e9c128b7e6c73a > -- > 2.41.0 > > Thanks, Daniel