diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-09 13:57:31 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-09 13:57:31 +0100 |
commit | bc774f62436c4fe5082f0a70c6620fa0fdf823a9 (patch) | |
tree | 07963f45b2cdaccf12281712e2eef179dbce1fee /libcpu | |
parent | 5da108a40dd24c7d3e4183ec9ae1904bb3f01575 (diff) | |
parent | 4ea9a2db164caadf836a65d5cdffb09a2d5a37ce (diff) |
Merge tag 'elfutils-0.175'
elfutils 0.175 release
Change-Id: I409f41767af349d0521351dd733879ad31c65aab
Diffstat (limited to 'libcpu')
-rw-r--r-- | libcpu/ChangeLog | 5 | ||||
-rw-r--r-- | libcpu/bpf_disasm.c | 26 |
2 files changed, 30 insertions, 1 deletions
diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog index c6ef82fc..8c85e7a3 100644 --- a/libcpu/ChangeLog +++ b/libcpu/ChangeLog @@ -2,6 +2,11 @@ * Makefile.am: Link gendis agaist libgnu.a if requested. +2018-11-04 Mark Wielaard <mark@klomp.org> + + * bpf_disasm.c (bpf_disasm): Recognize BPF_JLT, BPF_JLE, BPF_JSLT + and BPF_JSLE. + 2018-02-09 Joshua Watt <JPEWhacker@gmail.com> * i386_disasm.c (i386_disasm): Use FALLTHOUGH macro instead of diff --git a/libcpu/bpf_disasm.c b/libcpu/bpf_disasm.c index 054aba2b..3d92d014 100644 --- a/libcpu/bpf_disasm.c +++ b/libcpu/bpf_disasm.c @@ -1,5 +1,5 @@ /* Disassembler for BPF. - Copyright (C) 2016 Red Hat, Inc. + Copyright (C) 2016, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -346,6 +346,18 @@ bpf_disasm (Ebl *ebl, const uint8_t **startp, const uint8_t *end, case BPF_JMP | BPF_JSGE | BPF_K: code_fmt = J64(REGS(1), >=, IMMS(2)); goto do_dst_imm_jmp; + case BPF_JMP | BPF_JLT | BPF_K: + code_fmt = J64(REG(1), <, IMMS(2)); + goto do_dst_imm_jmp; + case BPF_JMP | BPF_JLE | BPF_K: + code_fmt = J64(REG(1), <=, IMMS(2)); + goto do_dst_imm_jmp; + case BPF_JMP | BPF_JSLT | BPF_K: + code_fmt = J64(REGS(1), <, IMMS(2)); + goto do_dst_imm_jmp; + case BPF_JMP | BPF_JSLE | BPF_K: + code_fmt = J64(REGS(1), <=, IMMS(2)); + goto do_dst_imm_jmp; case BPF_JMP | BPF_JEQ | BPF_X: code_fmt = J64(REG(1), ==, REG(2)); @@ -368,6 +380,18 @@ bpf_disasm (Ebl *ebl, const uint8_t **startp, const uint8_t *end, case BPF_JMP | BPF_JSGE | BPF_X: code_fmt = J64(REGS(1), >=, REGS(2)); goto do_dst_src_jmp; + case BPF_JMP | BPF_JLT | BPF_X: + code_fmt = J64(REG(1), <, REG(2)); + goto do_dst_src_jmp; + case BPF_JMP | BPF_JLE | BPF_X: + code_fmt = J64(REG(1), <=, REG(2)); + goto do_dst_src_jmp; + case BPF_JMP | BPF_JSLT | BPF_X: + code_fmt = J64(REGS(1), <, REGS(2)); + goto do_dst_src_jmp; + case BPF_JMP | BPF_JSLE | BPF_X: + code_fmt = J64(REGS(1), <=, REGS(2)); + goto do_dst_src_jmp; case BPF_LDX | BPF_MEM | BPF_B: code_fmt = LOAD(u8); |