Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3445656ybf; Tue, 3 Mar 2020 06:13:20 -0800 (PST) X-Google-Smtp-Source: ADFU+vvnfyGIuktcZnAoyMTKK9HgNCJmZaw9Ig/vG0CjdhJHE07hEOJqlQPMNgGopVfKm9ZfsAvX X-Received: by 2002:a05:6808:64d:: with SMTP id z13mr2619594oih.104.1583244799902; Tue, 03 Mar 2020 06:13:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583244799; cv=none; d=google.com; s=arc-20160816; b=VYmBywtm45V2HaVql8FPD6fn++Yk94qj2DOcLuds86SU9SVb3sgiKqcuzj2e3EJBQz MlTrFjDROXC0fEjbBz5g3mkAEeTxcZ3fi2gaY7sAD0th0lO+q9HNvt1oiQMpX4PB1qMT 7IQo5F6+1SHWAyBleQtTF5KkHcTWDdUA9aPG0TJIsfNtq9Z8ODXRRljlZUrWBwfcIpfS w9O6RwD7fMks8rt//i/6dwd/YxeEC4ZbQDemrLPpLl1F62o1Ob8rILl6RlWRT6ApS0sX HyFqEbzjYHsyEXjvF9OYnGIcl57bR8R1ytKeewYWLFnZQ3vUZ1UoQUvj9VzNWeHGWTtv GxeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mGFNfxmSybPpi8Hxmqj4rozq0S6s0SBGDpgeol/ec0I=; b=fjxCBvDVY3pFwWPCvYRLJtYdQbWUHSuD+JlAZirdXqJyhmq3sm+D0Lu1ywoiSOE9nO v/TWew5ebCmGkoKNErg/Nm3ZKovC+LwF4PTU3LMKkUfAmdrExEzEdsCfm/5CPIBP6cyA WJidhG0IVu7NZ4Bki3t9N6Ri+kfUjdSDeNNwoUgp2IcBJ1c9TKTnrFN6RkYmobmXnbDc OlgswXGwSLEbHeJL/JRjOyhATngw3r8wjaXcMbztaJ29urYAU+heLfIAocNN4IO+zHA6 hbk5cBN3AcSI/qJPU9/n6frTawx90le7JiD8yQ+Lpn+yhneucxJJVxbKvMtO+ircOMGR IoMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VYjDCqBA; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si8380621oic.183.2020.03.03.06.13.04; Tue, 03 Mar 2020 06:13:19 -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=@chromium.org header.s=google header.b=VYjDCqBA; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729678AbgCCOKU (ORCPT + 99 others); Tue, 3 Mar 2020 09:10:20 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:44854 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729582AbgCCOKH (ORCPT ); Tue, 3 Mar 2020 09:10:07 -0500 Received: by mail-wr1-f65.google.com with SMTP id n7so4450350wrt.11 for ; Tue, 03 Mar 2020 06:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mGFNfxmSybPpi8Hxmqj4rozq0S6s0SBGDpgeol/ec0I=; b=VYjDCqBAbxSTav8zxv1sG9jECNZkU1Dym5p9TwusiD/iRF1iUnhNinGL/PoZGdrGDI 5gk4yUPNEvlwA4ckubT6gKxT2wz8MggXD1BrU6DOvKb9DhzuPCuoMVMwoPKeF6IRAAfN uj5G/oQUMKrjpGuVWEOyfaZVYxUIyg8QN62lI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mGFNfxmSybPpi8Hxmqj4rozq0S6s0SBGDpgeol/ec0I=; b=H8aXfZhmlOSkGBMsmCCRFxEKfZ5Kh9i2w3zpZ1vGa1L7M3HAZr1FdjPBbnMrzH7Osw B81H+bfv8pN5JjaEULUSq/2aKtt+gSVb73cYW6vol/TGYEv51+xP74gQ1g9SCuhKGzTF wmYABmwgsg3i+T5pS6QmK4mJ1E//fTYzGVIfOjAZ4awQTendMRtWH3oX/jeand3Ib7yS rpVhktVjKL9MUWodCNafcMPDnXC1UOcMdHA+5ekFmvc36St1tGI7Q5KJ+j2QMPFA0jad woZtwboYf0d8gQU/SuPqqLYejt3rXkNfCmFMcU49m1UCZVfnSeDXEMvjNcsjGKECFdzI s67g== X-Gm-Message-State: ANhLgQ3OuzJPwvPWzoNJgY+F/Cw2a+DfsyifGMsVGM6es3I+R+ZLoUSJ lbfjEdXyUkUWS1ER9pVa8EmtaNNcfJw= X-Received: by 2002:adf:94a3:: with SMTP id 32mr6123482wrr.276.1583244604871; Tue, 03 Mar 2020 06:10:04 -0800 (PST) Received: from kpsingh-kernel.localdomain ([2a00:79e1:abc:308:2811:c80d:9375:bf8a]) by smtp.gmail.com with ESMTPSA id h20sm11746823wrc.47.2020.03.03.06.10.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2020 06:10:04 -0800 (PST) From: KP Singh To: linux-kernel@vger.kernel.org, bpf@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , Paul Turner , Florent Revest , Brendan Jackman Subject: [PATCH bpf-next 5/7] tools/libbpf: Add support for BPF_MODIFY_RETURN Date: Tue, 3 Mar 2020 15:09:48 +0100 Message-Id: <20200303140950.6355-6-kpsingh@chromium.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200303140950.6355-1-kpsingh@chromium.org> References: <20200303140950.6355-1-kpsingh@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: KP Singh Signed-off-by: KP Singh --- 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