From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39016 invoked by alias); 2 Jul 2019 15:38:56 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 38981 invoked by uid 48); 2 Jul 2019 15:38:52 -0000 From: "me at serhei dot io" To: systemtap@sourceware.org Subject: [Bug bpf/24758] New: stapbpf-next: more robust and generous userspace interpreter Date: Tue, 02 Jul 2019 15:38:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: bpf X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: me at serhei dot io X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q3/txt/msg00000.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24758 Bug ID: 24758 Summary: stapbpf-next: more robust and generous userspace interpreter Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: bpf Assignee: systemtap at sourceware dot org Reporter: me at serhei dot io Target Milestone: --- The BPF interpreter (in stapbpf/bpfinterp.cxx) is still a cobbled-together thing with some holes and probable bugs lurking. It needs a pass over the c= ode to be brought up to standard bytecode-interpreter 'best practice'. No need = for fancy performance tricks, but: - It could be more robust (runtime errors handled properly, memory manageme= nt with fewer pitfalls). - It could be more generous (some of the kernel bpf restrictions are still duplicated in userspace where there's no need for them -- pr24528 allows us= to generate different code for userspace probes). - It could maybe use fewer hacky C++ interfaces. - It could maybe do with refactoring to include some code from the lkm runt= ime where functionality is being duplicated. (We already use lkm code in-usersp= ace for the dyninst backend, so reusing it here is not totally shocking.) The only thing that's needed for certain is 'more robust' so I am filing ju= st one PR for now to track this work. --=20 You are receiving this mail because: You are the assignee for the bug.