summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2017-11-03 13:56:30 -0700
committerDavid S. Miller <davem@davemloft.net>2017-11-05 22:26:20 +0900
commitb37a530613104aa3f592376c67a462823298759c (patch)
tree8993f6c89d54cc54d2fb083635abe832d4f3b5bb /net/core
parentc6c580d7bc390f864488c66153a487057e76d9d8 (diff)
downloadlinux-stable-b37a530613104aa3f592376c67a462823298759c.tar.gz
linux-stable-b37a530613104aa3f592376c67a462823298759c.tar.bz2
linux-stable-b37a530613104aa3f592376c67a462823298759c.zip
bpf: remove old offload/analyzer
Thanks to the ability to load a program for a specific device, running verifier twice is no longer needed. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/filter.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index a0112168d6f9..1afa17935954 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -3777,25 +3777,6 @@ static bool tc_cls_act_is_valid_access(int off, int size,
return bpf_skb_is_valid_access(off, size, type, info);
}
-static bool
-tc_cls_act_is_valid_access_analyzer(int off, int size,
- enum bpf_access_type type,
- struct bpf_insn_access_aux *info)
-{
- switch (off) {
- case offsetof(struct sk_buff, len):
- return true;
- case offsetof(struct sk_buff, data):
- info->reg_type = PTR_TO_PACKET;
- return true;
- case offsetof(struct sk_buff, cb) +
- offsetof(struct bpf_skb_data_end, data_end):
- info->reg_type = PTR_TO_PACKET_END;
- return true;
- }
- return false;
-}
-
static bool __is_valid_xdp_access(int off, int size)
{
if (off < 0 || off >= sizeof(struct xdp_md))
@@ -3830,21 +3811,6 @@ static bool xdp_is_valid_access(int off, int size,
return __is_valid_xdp_access(off, size);
}
-static bool xdp_is_valid_access_analyzer(int off, int size,
- enum bpf_access_type type,
- struct bpf_insn_access_aux *info)
-{
- switch (off) {
- case offsetof(struct xdp_buff, data):
- info->reg_type = PTR_TO_PACKET;
- return true;
- case offsetof(struct xdp_buff, data_end):
- info->reg_type = PTR_TO_PACKET_END;
- return true;
- }
- return false;
-}
-
void bpf_warn_invalid_xdp_action(u32 act)
{
const u32 act_max = XDP_REDIRECT;
@@ -4516,10 +4482,6 @@ const struct bpf_verifier_ops tc_cls_act_verifier_ops = {
.gen_prologue = tc_cls_act_prologue,
};
-const struct bpf_verifier_ops tc_cls_act_analyzer_ops = {
- .is_valid_access = tc_cls_act_is_valid_access_analyzer,
-};
-
const struct bpf_prog_ops tc_cls_act_prog_ops = {
.test_run = bpf_prog_test_run_skb,
};
@@ -4530,10 +4492,6 @@ const struct bpf_verifier_ops xdp_verifier_ops = {
.convert_ctx_access = xdp_convert_ctx_access,
};
-const struct bpf_verifier_ops xdp_analyzer_ops = {
- .is_valid_access = xdp_is_valid_access_analyzer,
-};
-
const struct bpf_prog_ops xdp_prog_ops = {
.test_run = bpf_prog_test_run_xdp,
};