| 718 | } |
| 719 | |
| 720 | static const char * |
| 721 | eval_bele(struct bpf_verifier *bvf, const struct ebpf_insn *ins) |
| 722 | { |
| 723 | uint64_t msk; |
| 724 | struct bpf_eval_state *st; |
| 725 | struct bpf_reg_val *rd; |
| 726 | const char *err; |
| 727 | |
| 728 | msk = RTE_LEN2MASK(ins->imm, uint64_t); |
| 729 | |
| 730 | st = bvf->evst; |
| 731 | rd = st->rv + ins->dst_reg; |
| 732 | |
| 733 | err = eval_defined(rd, NULL); |
| 734 | if (err != NULL) |
| 735 | return err; |
| 736 | |
| 737 | #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN |
| 738 | if (ins->code == (BPF_ALU | EBPF_END | EBPF_TO_BE)) |
| 739 | eval_max_bound(rd, msk); |
| 740 | else |
| 741 | eval_apply_mask(rd, msk); |
| 742 | #else |
| 743 | if (ins->code == (BPF_ALU | EBPF_END | EBPF_TO_LE)) |
| 744 | eval_max_bound(rd, msk); |
| 745 | else |
| 746 | eval_apply_mask(rd, msk); |
| 747 | #endif |
| 748 | |
| 749 | return NULL; |
| 750 | } |
| 751 | |
| 752 | static const char * |
| 753 | eval_ptr(struct bpf_verifier *bvf, struct bpf_reg_val *rm, uint32_t opsz, |
nothing calls this directly
no test coverage detected