public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug bpf/23860] New: unknown opcode 0x8f in string manipulation code
@ 2018-11-04 18:38 fche at redhat dot com
  2018-11-04 21:16 ` [Bug bpf/23860] " mark at klomp dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: fche at redhat dot com @ 2018-11-04 18:38 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug bpf/23860] unknown opcode 0x8f in string manipulation code
  2018-11-04 18:38 [Bug bpf/23860] New: unknown opcode 0x8f in string manipulation code fche at redhat dot com
@ 2018-11-04 21:16 ` mark at klomp dot org
  2018-11-05 22:01 ` me at serhei dot io
  2018-11-05 22:03 ` me at serhei dot io
  2 siblings, 0 replies; 4+ messages in thread
From: mark at klomp dot org @ 2018-11-04 21:16 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug bpf/23860] unknown opcode 0x8f in string manipulation code
  2018-11-04 18:38 [Bug bpf/23860] New: unknown opcode 0x8f in string manipulation code fche at redhat dot com
  2018-11-04 21:16 ` [Bug bpf/23860] " mark at klomp dot org
@ 2018-11-05 22:01 ` me at serhei dot io
  2018-11-05 22:03 ` me at serhei dot io
  2 siblings, 0 replies; 4+ messages in thread
From: me at serhei dot io @ 2018-11-05 22:01 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug bpf/23860] unknown opcode 0x8f in string manipulation code
  2018-11-04 18:38 [Bug bpf/23860] New: unknown opcode 0x8f in string manipulation code fche at redhat dot com
  2018-11-04 21:16 ` [Bug bpf/23860] " mark at klomp dot org
  2018-11-05 22:01 ` me at serhei dot io
@ 2018-11-05 22:03 ` me at serhei dot io
  2 siblings, 0 replies; 4+ messages in thread
From: me at serhei dot io @ 2018-11-05 22:03 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-05 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-04 18:38 [Bug bpf/23860] New: unknown opcode 0x8f in string manipulation code fche at redhat dot com
2018-11-04 21:16 ` [Bug bpf/23860] " mark at klomp dot org
2018-11-05 22:01 ` me at serhei dot io
2018-11-05 22:03 ` me at serhei dot io

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).