Received: by 10.192.165.148 with SMTP id m20csp987908imm; Wed, 25 Apr 2018 10:43:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx48jMYgZGLzn1PUVe784VvBdv+yQfMIxBYbt59HN5ap1ERIHQCl210dsJIJF3qAkDFNcivOQ X-Received: by 2002:a17:902:8e83:: with SMTP id bg3-v6mr29447095plb.144.1524678184093; Wed, 25 Apr 2018 10:43:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524678184; cv=none; d=google.com; s=arc-20160816; b=Fwsrq9cIowrPBpMy9veZb75doZfeDCki2YR3xxRXu1V5j0tePmVjosG1aOibAquglI iQm9YdPcrhNCIizVMYsuZVqpZY/00ibGZlTAb4w+UgloeTW25AtM3M0cqKLNPIM9UHPD ahYDAGWBJ4Bxg/X32CkqXFEIe6pgqzvJWqgJ3jK9oN9qjGoNPBXWbN+osjN3covEaQPD LdOGmKD8p48559W8JgmWPHxGZSbXIBqr3nFfQxZytgCQSczK139OMyRBMQbkzvxmWnH5 weADkSSf6JnQ+9lzXxftrsn7l/ZjlDKcobpszPec+69tPB0uYDuQAwEPsKiEQAoLTYrB y73w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fbvFkbeEPkeJCOnl0WZ5/g5HRaMsamF61VcPIj6xJ20=; b=DEnhNMo+QG6XjyOEDTs3FAPjYaIedgMojE8pJFjutCdvxiBiTX2Ff4uVH2eXFm71As va7tAKx13bI2j8ZfTfqVlGz3eaqhq+xXIymZOdrziDUxoqEsG2DxHz0gQ9zXY5XoHiO9 YFVeKDtmDf/KwsFIGESmdXX9iHKzVUtoAiXcCVq4VSYKdurgRp1hbbEdaKTHD7EI1qPo KyaQKcQz5fWWTxDgi8xrAQ9sOBpp+6DNG7Qo+1/DeXYQpAZXrDNZKEeQu+Tfq8AQG6Wh ve4M7/8nXhnC6Ajf/r1D9k71gDMS/QIROLp0eceIjHtN39TcBfiF6vPwUg3fzjO1SdHq erEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7-v6si14932844ple.585.2018.04.25.10.42.49; Wed, 25 Apr 2018 10:43:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756024AbeDYRlP (ORCPT + 99 others); Wed, 25 Apr 2018 13:41:15 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60766 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754654AbeDYRlK (ORCPT ); Wed, 25 Apr 2018 13:41:10 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BCFA18D685; Wed, 25 Apr 2018 17:41:09 +0000 (UTC) Received: from krava.brq.redhat.com (unknown [10.43.17.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id B7B8A83B61; Wed, 25 Apr 2018 17:41:08 +0000 (UTC) From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann Cc: lkml , netdev@vger.kernel.org, Quentin Monnet Subject: [PATCHv2 0/3] bpf: Store/dump license string for loaded program Date: Wed, 25 Apr 2018 19:41:05 +0200 Message-Id: <20180425174108.6586-1-jolsa@kernel.org> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 25 Apr 2018 17:41:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 25 Apr 2018 17:41:09 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jolsa@kernel.org' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi, sending the change to store and dump the license info for loaded BPF programs. It's important for us get the license info, when investigating on screwed up machine. v2 changes: - dumping only the GPL compatible bool, without storing the whole license string Adding change to bpftool to dump the license GPL compatible info via: # bpftool prog list 3: kprobe name func_begin tag 57cd311f2e27366b license GPL NON compatible loaded_at Apr 25/11:20 uid 0 xlated 16B not jited memlock 4096B # bpftool prog list 4: kprobe name func_begin tag 57cd311f2e27366b license GPL compatible loaded_at Apr 25/11:20 uid 0 xlated 16B not jited memlock 4096B # bpftool prog show --json [{"id":3,"type":"kprobe","name":"func ... ,"gpl_compatible":false,"loade... Also available at: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/license thanks, jirka --- Jiri Olsa (3): bpf: Add gpl_compatible flag to struct bpf_prog_info tools bpf: Sync bpf.h uapi header tools bpftool: Display license GPL compatible in prog show/list include/uapi/linux/bpf.h | 1 + kernel/bpf/syscall.c | 1 + tools/bpf/bpftool/prog.c | 3 +++ tools/include/uapi/linux/bpf.h | 1 + 4 files changed, 6 insertions(+)