lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Nov 2017 18:12:02 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     netdev@...r.kernel.org
Cc:     oss-drivers@...ronome.com, daniel@...earbox.net,
        Jakub Kicinski <jakub.kicinski@...ronome.com>
Subject: [PATCH iproute2/master 05/11] bpf: rename bpf_parse_common() to bpf_parse_and_load_common()

bpf_parse_common() parses and loads the program.  Rename it
accordingly.

Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@...ronome.com>
Acked-by: Daniel Borkmann <daniel@...earbox.net>
---
 include/bpf_util.h    | 4 ++--
 ip/iplink_xdp.c       | 2 +-
 ip/iproute_lwtunnel.c | 2 +-
 lib/bpf.c             | 4 ++--
 tc/f_bpf.c            | 2 +-
 tc/m_bpf.c            | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/bpf_util.h b/include/bpf_util.h
index 8e39a2d489db..da2dee8bb3aa 100644
--- a/include/bpf_util.h
+++ b/include/bpf_util.h
@@ -259,8 +259,8 @@ struct bpf_cfg_in {
 		.off   = 0,					\
 		.imm   = 0 })
 
-int bpf_parse_common(struct bpf_cfg_in *cfg, const struct bpf_cfg_ops *ops,
-		     void *nl);
+int bpf_parse_and_load_common(struct bpf_cfg_in *cfg,
+			      const struct bpf_cfg_ops *ops, void *nl);
 
 const char *bpf_prog_to_default_section(enum bpf_prog_type type);
 
diff --git a/ip/iplink_xdp.c b/ip/iplink_xdp.c
index 993e44d7878a..edaec2a250e7 100644
--- a/ip/iplink_xdp.c
+++ b/ip/iplink_xdp.c
@@ -75,7 +75,7 @@ int xdp_parse(int *argc, char ***argv, struct iplink_req *req, bool generic,
 			return xdp_delete(&xdp);
 	}
 
-	if (bpf_parse_common(&cfg, &bpf_cb_ops, &xdp))
+	if (bpf_parse_and_load_common(&cfg, &bpf_cb_ops, &xdp))
 		return -1;
 
 	*argc = cfg.argc;
diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c
index 9f0f647e261f..2280c7a7b192 100644
--- a/ip/iproute_lwtunnel.c
+++ b/ip/iproute_lwtunnel.c
@@ -884,7 +884,7 @@ static int lwt_parse_bpf(struct rtattr *rta, size_t len,
 	int err;
 
 	nest = rta_nest(rta, len, attr);
-	err = bpf_parse_common(&cfg, &bpf_cb_ops, &x);
+	err = bpf_parse_and_load_common(&cfg, &bpf_cb_ops, &x);
 	if (err < 0) {
 		fprintf(stderr, "Failed to parse eBPF program: %s\n",
 			strerror(-err));
diff --git a/lib/bpf.c b/lib/bpf.c
index 52f7c790065f..9a0867124fc4 100644
--- a/lib/bpf.c
+++ b/lib/bpf.c
@@ -953,8 +953,8 @@ static int bpf_parse_opt_tbl(struct bpf_cfg_in *cfg,
 	return 0;
 }
 
-int bpf_parse_common(struct bpf_cfg_in *cfg, const struct bpf_cfg_ops *ops,
-		     void *nl)
+int bpf_parse_and_load_common(struct bpf_cfg_in *cfg,
+			      const struct bpf_cfg_ops *ops, void *nl)
 {
 	bool opt_tbl[BPF_MODE_MAX] = {};
 
diff --git a/tc/f_bpf.c b/tc/f_bpf.c
index a38ec2ab7786..21ba759c4b01 100644
--- a/tc/f_bpf.c
+++ b/tc/f_bpf.c
@@ -107,7 +107,7 @@ static int bpf_parse_opt(struct filter_util *qu, char *handle,
 			cfg.argc = argc;
 			cfg.argv = argv;
 
-			if (bpf_parse_common(&cfg, &bpf_cb_ops, n))
+			if (bpf_parse_and_load_common(&cfg, &bpf_cb_ops, n))
 				return -1;
 
 			argc = cfg.argc;
diff --git a/tc/m_bpf.c b/tc/m_bpf.c
index f2ce3892e4ed..e275afd01fb3 100644
--- a/tc/m_bpf.c
+++ b/tc/m_bpf.c
@@ -102,7 +102,7 @@ static int bpf_parse_opt(struct action_util *a, int *ptr_argc, char ***ptr_argv,
 			cfg.argc = argc;
 			cfg.argv = argv;
 
-			if (bpf_parse_common(&cfg, &bpf_cb_ops, n))
+			if (bpf_parse_and_load_common(&cfg, &bpf_cb_ops, n))
 				return -1;
 
 			argc = cfg.argc;
-- 
2.14.1

Powered by blists - more mailing lists