Skip to content

Commit

Permalink
libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause
Browse files Browse the repository at this point in the history
libbpf is maturing as a library and gaining features that no other bpf libraries support
(BPF Type Format, bpf to bpf calls, etc)
Many Apache2 licensed projects (like bcc, bpftrace, gobpf, cilium, etc)
would like to use libbpf, but cannot do this yet, since Apache Foundation explicitly
states that LGPL is incompatible with Apache2.
Hence let's relicense libbpf as dual license LGPL-2.1 or BSD-2-Clause,
since BSD-2 is compatible with Apache2.
Dual LGPL or Apache2 is invalid combination.
Fix license mistake in Makefile as well.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrey Ignatov <rdna@fb.com>
Acked-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: David Beckett <david.beckett@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Joe Stringer <joe@ovn.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Roman Gushchin <guro@fb.com>
Acked-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
  • Loading branch information
Alexei Starovoitov authored and Daniel Borkmann committed Oct 8, 2018
1 parent 541d7fd commit 1bc38b8
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 62 deletions.
2 changes: 1 addition & 1 deletion tools/lib/bpf/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
# Most of this file is copied from tools/lib/traceevent/Makefile

BPF_VERSION = 0
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/bpf/bpf.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: LGPL-2.1
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)

/*
* common eBPF ELF operations.
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/bpf/bpf.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1 */
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */

/*
* common eBPF ELF operations.
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/bpf/btf.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: LGPL-2.1
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2018 Facebook */

#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/bpf/btf.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1 */
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/* Copyright (c) 2018 Facebook */

#ifndef __LIBBPF_BTF_H
Expand Down
15 changes: 1 addition & 14 deletions tools/lib/bpf/libbpf.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: LGPL-2.1
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)

/*
* Common eBPF ELF object loading operations.
Expand All @@ -7,19 +7,6 @@
* Copyright (C) 2015 Wang Nan <wangnan0@huawei.com>
* Copyright (C) 2015 Huawei Inc.
* Copyright (C) 2017 Nicira, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License (not later!)
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, see <http://www.gnu.org/licenses>
*/

#define _GNU_SOURCE
Expand Down
15 changes: 1 addition & 14 deletions tools/lib/bpf/libbpf.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1 */
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */

/*
* Common eBPF ELF object loading operations.
*
* Copyright (C) 2013-2015 Alexei Starovoitov <ast@kernel.org>
* Copyright (C) 2015 Wang Nan <wangnan0@huawei.com>
* Copyright (C) 2015 Huawei Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License (not later!)
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, see <http://www.gnu.org/licenses>
*/
#ifndef __LIBBPF_LIBBPF_H
#define __LIBBPF_LIBBPF_H
Expand Down
15 changes: 1 addition & 14 deletions tools/lib/bpf/libbpf_errno.c
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
// SPDX-License-Identifier: LGPL-2.1
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)

/*
* Copyright (C) 2013-2015 Alexei Starovoitov <ast@kernel.org>
* Copyright (C) 2015 Wang Nan <wangnan0@huawei.com>
* Copyright (C) 2015 Huawei Inc.
* Copyright (C) 2017 Nicira, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License (not later!)
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, see <http://www.gnu.org/licenses>
*/

#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/bpf/netlink.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: LGPL-2.1
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/* Copyright (c) 2018 Facebook */

#include <stdlib.h>
Expand Down
7 changes: 1 addition & 6 deletions tools/lib/bpf/nlattr.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
// SPDX-License-Identifier: LGPL-2.1
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)

/*
* NETLINK Netlink attributes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
*/

Expand Down
7 changes: 1 addition & 6 deletions tools/lib/bpf/nlattr.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1 */
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */

/*
* NETLINK Netlink attributes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
*/

Expand Down
2 changes: 1 addition & 1 deletion tools/lib/bpf/str_error.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: LGPL-2.1
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
#undef _GNU_SOURCE
#include <string.h>
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/bpf/str_error.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: LGPL-2.1
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
#ifndef __LIBBPF_STR_ERROR_H
#define __LIBBPF_STR_ERROR_H

Expand Down

0 comments on commit 1bc38b8

Please sign in to comment.