From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78273C5DF63 for ; Wed, 6 Nov 2019 16:50:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B6652067B for ; Wed, 6 Nov 2019 16:50:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LTnoDHJZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732202AbfKFQu2 (ORCPT ); Wed, 6 Nov 2019 11:50:28 -0500 Received: from mail-il1-f195.google.com ([209.85.166.195]:45530 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732201AbfKFQu2 (ORCPT ); Wed, 6 Nov 2019 11:50:28 -0500 Received: by mail-il1-f195.google.com with SMTP id o18so10222653ils.12 for ; Wed, 06 Nov 2019 08:50:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-transfer-encoding; bh=5wxp6064vtbUA3e8vt70AU0dvT4fLHGdgzA451ZJs1I=; b=LTnoDHJZ7evwG2h7kwFUTx3nEzkmfrrzXZ3fGtkNapUk74YVZYVGV6LrVZiFTLNg55 wWjXww4dJnrxFHnYcHEfv2Olh5INpqp4FRHD3L6od90ITHohiI0895dm8DhdzazlmfY4 aGuHgJXQHWaRozGneEAM5aTe2aNE+bUvmgizCUmUGI9BIg3tfI0NXvjrj9nttSIadKcQ FlYdQVgQHU/QVuvCpQqtH02BSuekenUpFkyRfqPxOX5Jp/q/qKsIBZ2NDb3JlJETP2/b E0nlZESQIdU0KKq6xme0plAYMmmKMuKcGQYQRhDWX4Id3joiIXLHJRAyoKRmgtZ/QqMT DsZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version:content-transfer-encoding; bh=5wxp6064vtbUA3e8vt70AU0dvT4fLHGdgzA451ZJs1I=; b=QlC6I706dw6rGKSGoxSdaqQtRoPfZmrjmVXPfOQlPAk4VMSaoHdLwYaCWHv5K0YbJE qEQg+1PLv4G08sn1ectdMWsaX9uzswotk5qCeWcKxwREFCeA1wHxYBdfZQ12Lcpq1sqK eaXg8x+RmPyCtd6hLIE6vBIq4d9EsCLk1SC/+WDaDRDQ1QAZfVh/KDsbengYE7AS6QLN +PIe5YKVn2e0mV4cm3+WHcxTiM/Pqkg7QT1IytWXD6Bc0qhcjNurtHjzGin5EOLEc34T zvX2N45Umk0bSVBmvsoogeIa55uiFUCHkWoya+DKManvRjdQHs50kP/73HpdqlKDu/o2 wOUA== X-Gm-Message-State: APjAAAVc+dMZZ54QiFXxMnfXZzMXXIZktD+5wdsXzX37ndTagdsjScU/ ++3o7FZlI9QLN+LHLqAU8F0= X-Google-Smtp-Source: APXvYqwXP8eEsAgg0kHMAZjQbltPzeJzByxGGf1f8Y+4Urh/HH9McCruUDeB8y5hEQtxP9kz0aKbTQ== X-Received: by 2002:a92:1793:: with SMTP id 19mr3693185ilx.3.1573059027992; Wed, 06 Nov 2019 08:50:27 -0800 (PST) Received: from localhost ([184.63.162.180]) by smtp.gmail.com with ESMTPSA id a11sm2287213ios.27.2019.11.06.08.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 08:50:27 -0800 (PST) Date: Wed, 06 Nov 2019 08:50:19 -0800 From: John Fastabend To: Ilya Leoshkevich , Alexei Starovoitov Cc: Daniel Borkmann , Alexei Starovoitov , bpf , Heiko Carstens , Vasily Gorbik Message-ID: <5dc2f9cbb002d_23152aba75b6a5bcfd@john-XPS-13-9370.notmuch> In-Reply-To: <10A60D54-07EB-4B5D-AD3B-59C6D8D7CF9D@linux.ibm.com> References: <20191106161204.87261-1-iii@linux.ibm.com> <10A60D54-07EB-4B5D-AD3B-59C6D8D7CF9D@linux.ibm.com> Subject: Re: [RFC PATCH bpf-next] bpf: allow JIT debugging if CONFIG_BPF_JIT_ALWAYS_ON is set Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Ilya Leoshkevich wrote: > > Am 06.11.2019 um 17:15 schrieb Alexei Starovoitov : > > > > On Wed, Nov 6, 2019 at 8:12 AM Ilya Leoshkevich wrote: > >> > >> Currently it's not possible to set bpf_jit_enable = 2 when > >> CONFIG_BPF_JIT_ALWAYS_ON is set, which makes debugging certain problems > >> harder. > > > > This is obsolete way of debugging. > > Please use bpftool dump jited instead. > > Is there a way to integrate bpftool nicely with e.g. test_verifier? > With bpf_jit_enable = 2, I can see JITed code for each test right away, > without pausing it (via gdb or rebuilding with added sleep()) and > running bpftool. On the library side we can set the log_level causing the verifier logic steps to be printed. I guess adding it to bpftool might be nice. At least I would find it useful. I'll probably get to it sometime if its not already there somewhere and/or someone doesn't beat me to it.