Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2663379pxp; Mon, 14 Mar 2022 02:03:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuGzxWhx4dAK1amTSRVhw6ZkUftaCEq58XyC/zC5/iB2/H2ItnYUd2d1MXekk9pQ/NzdEY X-Received: by 2002:a17:906:2486:b0:6cf:ced9:e4cc with SMTP id e6-20020a170906248600b006cfced9e4ccmr18070756ejb.201.1647248621101; Mon, 14 Mar 2022 02:03:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647248621; cv=none; d=google.com; s=arc-20160816; b=DAF5rn0WQUtkSl2AU+3S1U4e9ICU4R8WutPEHZ9IX1KjM/j2jRZlNOJuvQowbK3QRf aKUBNiU4lG6xcJ++GfSN0ThO6uRWKRSqHjj8sY4QteCe2cCoJI7t8imqXK64Az/VSPwJ 46PcvAU2YHyhx216LKgNKGpZSbseyQO5YzDo553eeC9anziRbpIMXmCJdhPfnfffqhAg I6bcHl7fBuApytHuy3zmBZtbiwbsCfoKch3YquaGT3D9jGdldhXd9B305WwWEpBDszvI vJKZ33Eixl+UjI+EW9iqXFqr1slgRl0qGKHfzRyx6QCKnLuib/OaXS5nc/lQLKynKv+8 LTAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=IYDs9sc8CZWwGN2YWUzzkzbqy9h9TzeQqqKGJhDYOyg=; b=nZY9HHfXmxtS1FKuntxiBRiIiIgXz9RT8+kUGWyu1GiizISoE5WPJ2Wz1ljSmhgueD /RmP22rs5VkoGqW1skVzXtXSOOFTjIzb0UTTDadQyjbxR/tu0AmujxpSnwdGuHwD3OQT /AoEi6aR0bROVawqUfQo2v71+SepYqRYQGku86EiEzkJhl3A4pgwgaktmg7JVnfNOUvQ xAL1hiIw9zWQq/COZYtOSxEAPsz5Ghc7bNiJq6hX4Pckyp6g+vt3qUfQcc4NGWiqhufK TuBxwYiCT4Yme5c7l0zBeq8tvpAcaXGesCLRXNilrImVCCU//2lnWbeApy6fToJqI4E+ wV4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm3 header.b=VaNMMY6h; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=btOWXUv+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a05640250d000b00416648c941esi9830792edb.473.2022.03.14.02.03.15; Mon, 14 Mar 2022 02:03:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dxuuu.xyz header.s=fm3 header.b=VaNMMY6h; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=btOWXUv+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235614AbiCMXCy (ORCPT + 99 others); Sun, 13 Mar 2022 19:02:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235529AbiCMXCx (ORCPT ); Sun, 13 Mar 2022 19:02:53 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFD9678058; Sun, 13 Mar 2022 16:01:44 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 72E905C0175; Sun, 13 Mar 2022 19:01:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 13 Mar 2022 19:01:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dxuuu.xyz; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; bh=IYDs9sc8CZWwGN2YWUzzkzbqy9h9TzeQqqKGJhDYOyg=; b=VaNMM Y6htFQ1IOtt3JepcdIIILrK8Nrs1VHjfmT4r+I9Pnd2CR/e4FgqNmmmrJtRlOB+/ Ad+EBCBSvT1bafkDnfYEEA3YcvowA/rgo3pZEijzaY46ulHg/3CMu/HBce1GiTm5 LcRZy8UFPx6I2sm50NugEq6+zQv4PLHgZCvyz8G/eYe8iXMTyPmFfDKBVQe8iPKg r306pNNnt3NqUvYQ0VLb6kKrSG3PWY/6TOCVttdQ5Fe0soA4loRkKGySUNw/7ZKj 0bmggydtyAEwIbFtzytJlf9IKiFirx4HpzwqkbOcymBw03UNn1V4JPVfx20VBQH1 G6b8F6giVqxak2XNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=IYDs9sc8CZWwGN2YWUzzkzbqy9h9T zeQqqKGJhDYOyg=; b=btOWXUv+FylGBCjdTzkEvmw7dtHXJOLFVpcMheEt5RzGD G5OtqWBJGwDNkwPDu4aUbX/4WipE7t0v1oRESRwmGelFoF7UxQa55aZEcsebIC/P ixb7J1CjZQWDtt4H0+r/7FX+rjxdg0/9h3LBICbyr61Zqf90VXE+D0HLD37sZuiH O6kc3Qw3VagpQr1C5MwoTe/sRi2Ss8YflBr0ShQNOI8u3RJZOqSZr6F/rN2IxsA6 aUgL3s8VLBcRABoTLjNoht3eXLJW1MbVoMcuW/eKLrmYU64ojWHDhQUwWD/KtvvN vgrM7sPbM54AZvPsU7AKwc65F1uxqFoJ9wyV7dKnw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddvjedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpefhvf fufffkofgggfestdekredtredttdenucfhrhhomhepffgrnhhivghlucgiuhcuoegugihu segugihuuhhurdighiiiqeenucggtffrrghtthgvrhhnpeeifffgledvffeitdeljedvte effeeivdefheeiveevjeduieeigfetieevieffffenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpegugihusegugihuuhhurdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 13 Mar 2022 19:01:41 -0400 (EDT) From: Daniel Xu To: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org Cc: Daniel Xu , linux-kernel@vger.kernel.org Subject: [PATCH bpf-next] bpftool: Add SPDX identifier to btf-dump-file output Date: Sun, 13 Mar 2022 16:01:26 -0700 Message-Id: <1d2931e80c03f4d3f7263beaf8f19a4867e9fe32.1647212431.git.dxu@dxuuu.xyz> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, FROM_SUSPICIOUS_NTLD_FP,PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A concern about potential GPL violations came up at the new $DAYJOB when I tried to vendor the vmlinux.h output. The central point was that the generated vmlinux.h does not embed a license string -- making the licensing of the file non-obvious. This commit adds a LGPL-2.1 OR BSD-2-Clause SPDX license identifier to the generated vmlinux.h output. This is line with what bpftool generates in object file skeletons. Signed-off-by: Daniel Xu --- tools/bpf/bpftool/btf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c index a2c665beda87..fca810a27768 100644 --- a/tools/bpf/bpftool/btf.c +++ b/tools/bpf/bpftool/btf.c @@ -425,6 +425,7 @@ static int dump_btf_c(const struct btf *btf, if (err) return err; + printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */\n\n"); printf("#ifndef __VMLINUX_H__\n"); printf("#define __VMLINUX_H__\n"); printf("\n"); -- 2.35.1