Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3874323ybf; Tue, 3 Mar 2020 14:46:07 -0800 (PST) X-Google-Smtp-Source: ADFU+vvkm46Ta/nERIrP00X3UKWGZSfI3YDmUuTCh4RdqgbBkl+xFAmfqsvgCjONMNF4Sq9eXkfd X-Received: by 2002:aca:37c3:: with SMTP id e186mr572585oia.155.1583275567523; Tue, 03 Mar 2020 14:46:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583275567; cv=none; d=google.com; s=arc-20160816; b=t1Ult9lXDLch54kuYKb0PrbVTVSBoxDoUQare0kCD35E2wlAs32i0e7Nig0mqD+NHF cYkOwAlYFjLLcPCnLYr9W1axUGbOO/RaXpxrLOPh/p5HeBpzMUGpgFmD//wTM9YlDBeq 3QudbhXhbrfAYn6bqaMZ7V7RgjjKjMvMv1Kv8Qc8DqAzFMVb0kAxUxuLZAYDM4yI8gHz +YngPKO9skFT7vLqOmGb5obvXZJCLEJNJc41+DWzFrVHX8w8jStklK568OWRI6SNEwED 31vuRCFYOpT2mOAQ3PgQ9zXftxNzf/D6d8EcYbIb5Gc03rsJfY+rGETQG2udvkXSqrQ6 7SYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KRYpfQvxA0g2SoZmyZxwe6OFdPqUr/LPLdrZmjK0Gas=; b=KlDuFiFVJNWUBx0Yy5GtAvrD4Wf9Sw2ZdH6vg4ZlvDVpz/ba1gGcbxi/orlUY074vH ioYTJqqdto7ww70XirE63SR6g5WFMQJ2rGUvVve2IX18Zp4saZY4o9Om/CV0zdO2tqrs h+906NfI13y7tbMuNku/WMrp+a981BQkVhVQ0NIpLngxqC0qaJBTnVtS5B5DBu+5Z4Q1 7Y/gS++YE2EK8ZbpeJY7JXMYSiN0z6/uZl3lZSMx3vBZfENfRRNq2mNUZemuLibl2XLp RBxUs7JMRUOaYWvsBEyFyJeQ4Q7NmPUv6nPEjkSMgABMq4n3oQjAJlY9cCanIbS5YUUZ h9zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u2DmQbOV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si94093oic.57.2020.03.03.14.45.55; Tue, 03 Mar 2020 14:46:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u2DmQbOV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727902AbgCCWpZ (ORCPT + 99 others); Tue, 3 Mar 2020 17:45:25 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:43979 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbgCCWpZ (ORCPT ); Tue, 3 Mar 2020 17:45:25 -0500 Received: by mail-qt1-f196.google.com with SMTP id v22so4189252qtp.10; Tue, 03 Mar 2020 14:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KRYpfQvxA0g2SoZmyZxwe6OFdPqUr/LPLdrZmjK0Gas=; b=u2DmQbOVVWFnkDoUK/m6UVdK9PPO880OwQEJUXD4BNSO/+zKf9YAo6tF/ZWBRZ8T5o gOSUuAIQtwg+Tg0IFA8nbSs+eHXNCyG1ZixOohp+m4UJyEsAI2IgmHcJrAtY7y+z5/NQ WuyZFpUjz2gbewKVgeDIt5Y3eCE35PAQQEiJHV799hq34+B+wP+1YWmDO48eMVEniIy9 QLD7GPHoEQFQc4z0pzoNV0mDtInQ2Y2wGnLLUcJ7TLccbA2V2DyYo/9kZU6t/Qm+mQAd mWD+NHlMboSh5Z551bbC4AgUOrPm21Ub6ityxfqo5o5ifGaxFouBPpXvGOGhgOOf3Dr3 eL5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KRYpfQvxA0g2SoZmyZxwe6OFdPqUr/LPLdrZmjK0Gas=; b=NI4tDShbEXJyW9QXUIPiCqFRpGOe+HaCyFwLI5kV0l0sdc0ridgh4mmIcuKcvOiBJt RiMSd8o+ZeCfP0381OiGEqAwAkb8Zz8b74P429prwaG0ciMatszerUdoNwPWB/DbQVl8 p6yoPe8DVLjyKDMo+l5btXtyTy1tkRhN+l31xUZF4DsBhJubKb/MQXv1aoW53UVYc8Op idJaYZtzzDNAlUYpEhnAV2ITyUY0m9H8MLQA4MVd4pNYRxkyPkmlTtP4F+UC2npn2hdm kFBs8LVdWzy102rk7pQXwU4wl9qnohr5+34edkMV7mce01gs96Q09yF1zYLw2e9KfTh2 I7GA== X-Gm-Message-State: ANhLgQ16nUflfyTAAn9DMUOwalDWrtiLFDrmvj/rIjgt127NyxjIqn+/ YvVGAUgm+I+7tqblbulZ2lo/d06STSRexDCU6T0= X-Received: by 2002:ac8:4d4b:: with SMTP id x11mr6436947qtv.171.1583275523055; Tue, 03 Mar 2020 14:45:23 -0800 (PST) MIME-Version: 1.0 References: <20200303140950.6355-1-kpsingh@chromium.org> <20200303140950.6355-6-kpsingh@chromium.org> In-Reply-To: <20200303140950.6355-6-kpsingh@chromium.org> From: Andrii Nakryiko Date: Tue, 3 Mar 2020 14:45:12 -0800 Message-ID: Subject: Re: [PATCH bpf-next 5/7] tools/libbpf: Add support for BPF_MODIFY_RETURN To: KP Singh Cc: open list , bpf , Alexei Starovoitov , Daniel Borkmann , Paul Turner , Florent Revest , Brendan Jackman Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 3, 2020 at 6:12 AM KP Singh wrote: > > From: KP Singh > > Signed-off-by: KP Singh > --- Acked-by: Andrii Nakryiko > tools/lib/bpf/libbpf.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c > index f8c4042e5855..223be01dc466 100644 > --- a/tools/lib/bpf/libbpf.c > +++ b/tools/lib/bpf/libbpf.c > @@ -6288,6 +6288,10 @@ static const struct bpf_sec_def section_defs[] = { > .expected_attach_type = BPF_TRACE_FENTRY, > .is_attach_btf = true, > .attach_fn = attach_trace), > + SEC_DEF("fmod_ret/", TRACING, > + .expected_attach_type = BPF_MODIFY_RETURN, > + .is_attach_btf = true, > + .attach_fn = attach_trace), > SEC_DEF("fexit/", TRACING, > .expected_attach_type = BPF_TRACE_FEXIT, > .is_attach_btf = true, > -- > 2.20.1 >