[Bug bpf/23860] New: unknown opcode 0x8f in string manipulation code

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug bpf/23860] New: unknown opcode 0x8f in string manipulation code

albert.aribaud at 3adev dot fr
https://sourceware.org/bugzilla/show_bug.cgi?id=23860

            Bug ID: 23860
           Summary: unknown opcode 0x8f in string manipulation code
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: bpf
          Assignee: systemtap at sourceware dot org
          Reporter: fche at redhat dot com
  Target Milestone: ---

% stap -p4 --bpf -e 'global e probe kernel.function("vfs_read") { e[execname()]
= 0 }'

% eu-objdump -d stap_FOOBAR.bo

[...]
      d0:    57 00 00 00 ff 00 00 00  r0 &= 255
      d8:    bf 01 00 00 00 00 00 00  r1 = r0
      e0:    8f 01 00 00 00 00 00 00  invalid class alu64
      e8:    4f 01 00 00 00 00 00 00  r1 |= r0
      f0:    bf 13 00 00 00 00 00 00  r3 = r1
      f8:    bf 20 00 00 00 00 00 00  r0 = r2
     100:    77 00 00 00 08 00 00 00  r0 >>= 8
     108:    57 00 00 00 ff 00 00 00  r0 &= 255
     110:    bf 01 00 00 00 00 00 00  r1 = r0
     118:    8f 01 00 00 00 00 00 00  invalid class alu64
     120:    4f 01 00 00 00 00 00 00  r1 |= r0
     128:    5f 13 00 00 00 00 00 00  r3 &= r1
     130:    bf 20 00 00 00 00 00 00  r0 = r2

% stapbpf stap_FOOBAR.bo
(fails with unknown opcode 0x8f)

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug bpf/23860] unknown opcode 0x8f in string manipulation code

albert.aribaud at 3adev dot fr
https://sourceware.org/bugzilla/show_bug.cgi?id=23860

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp dot org

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
If I am decoding this correctly this would be BPF_ALU64 | BPF_NEG | BPF_X.
I am not sure that combination makes sense. I don't believe you can negate a
source operand. You seem to only be able to negate the dest operand (register).

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug bpf/23860] unknown opcode 0x8f in string manipulation code

albert.aribaud at 3adev dot fr
In reply to this post by albert.aribaud at 3adev dot fr
https://sourceware.org/bugzilla/show_bug.cgi?id=23860

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |me at serhei dot io

--- Comment #2 from Serhei Makarov <me at serhei dot io> ---
This was a minor bug in program::mk_unary().

BPF_NEG indeed doesn't fit the pattern for eBPF opcodes: there is no src and
BPF_X is not used even though the disassembly says 'negx'.

Incorrect opcode should be fixed in commit 72ef87bba, but there's another
underlying issue preventing the example from working ('invalid memory access'
according to verifier). Not closing yet.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug bpf/23860] unknown opcode 0x8f in string manipulation code

albert.aribaud at 3adev dot fr
In reply to this post by albert.aribaud at 3adev dot fr
https://sourceware.org/bugzilla/show_bug.cgi?id=23860

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|systemtap at sourceware dot org    |me at serhei dot io

--
You are receiving this mail because:
You are the assignee for the bug.