[PATCH 1/6] selftests/bpf: libarena: Normalize SPDX headers across files
Emil Tsalapatis <[email protected]>
| Newsgroups | org.kernel.vger.bpf |
|---|---|
| Message-ID | <[email protected]> |
Normalize SPDX in libarena for missing/inconsistent headers. There are currently three files missing headers and two of them (both originally authored by Kartikeya, CC'ed below) that are GPLv2 only. This patch ensures all files in libarena have a dual GPLv2/BSD-2-Clause license in the example of other non- kernel BPF codebases, e.g., libbpf. Add the customary BPF selftests/ SPDX tag to the bpf_may_goto.h file that holds the may_goto and can_loop macros for BPF code. The original authors of the code from when it was still in bpf_experimental.h are CC'ed below. Also add the missing SPDX license to the libarena bitmap.h header. For bpf_arena_spinlock.h and bpf_atomic.h, move the license to Dual GPLv2/BSD-2-Clause. This ensures all components have the same license, with the same rationale as libbpf in tools/lib. Cc: Alexei Starovoitov <[email protected]> Cc: Kumar Kartikeya Dwivedi <[email protected]> Cc: Jose Marchesi <[email protected]> Cc: Yonghong Song <[email protected]> Cc: Ilya Leoshkevich <[email protected]> Signed-off-by: Emil Tsalapatis <[email protected]> --- .../selftests/bpf/libarena/include/bpf_arena_spin_lock.h | 2 +- tools/testing/selftests/bpf/libarena/include/bpf_atomic.h | 2 +- tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h | 1 + tools/testing/selftests/bpf/libarena/include/libarena/bitmap.h | 1 + .../testing/selftests/bpf/libarena/selftests/test_bitmap.bpf.c | 3 +++ 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/libarena/include/bpf_arena_spin_lock.h b/tools/testing/selftests/bpf/libarena/include/bpf_arena_spin_lock.h index ae6b72d15bb6..872fa20f29a5 100644 --- a/tools/testing/selftests/bpf/libarena/include/bpf_arena_spin_lock.h +++ b/tools/testing/selftests/bpf/libarena/include/bpf_arena_spin_lock.h @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* Copyright (c) 2025 Meta Platforms, Inc. and affiliates. */ #ifndef BPF_ARENA_SPIN_LOCK_H #define BPF_ARENA_SPIN_LOCK_H diff --git a/tools/testing/selftests/bpf/libarena/include/bpf_atomic.h b/tools/testing/selftests/bpf/libarena/include/bpf_atomic.h index 43c306e17f19..65582b2010ad 100644 --- a/tools/testing/selftests/bpf/libarena/include/bpf_atomic.h +++ b/tools/testing/selftests/bpf/libarena/include/bpf_atomic.h @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause /* Copyright (c) 2025 Meta Platforms, Inc. and affiliates. */ #ifndef BPF_ATOMIC_H #define BPF_ATOMIC_H diff --git a/tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h b/tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h index 9ba90689d6ba..b32a420d4e1a 100644 --- a/tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h +++ b/tools/testing/selftests/bpf/libarena/include/bpf_may_goto.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: LGPL-2.1 OR BSD-2-Clause #pragma once /* diff --git a/tools/testing/selftests/bpf/libarena/include/libarena/bitmap.h b/tools/testing/selftests/bpf/libarena/include/libarena/bitmap.h index e2431ea6fdd6..8c5936ae9958 100644 --- a/tools/testing/selftests/bpf/libarena/include/libarena/bitmap.h +++ b/tools/testing/selftests/bpf/libarena/include/libarena/bitmap.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: LGPL-2.1 OR BSD-2-Clause #pragma once #define BITS_PER_BYTE 8 diff --git a/tools/testing/selftests/bpf/libarena/selftests/test_bitmap.bpf.c b/tools/testing/selftests/bpf/libarena/selftests/test_bitmap.bpf.c index 76319a529f02..e66b3a26ca3d 100644 --- a/tools/testing/selftests/bpf/libarena/selftests/test_bitmap.bpf.c +++ b/tools/testing/selftests/bpf/libarena/selftests/test_bitmap.bpf.c @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: LGPL-2.1 OR BSD-2-Clause +/* Copyright (c) 2026 Meta Platforms, Inc. and affiliates. */ + #include <libarena/common.h> #include <libarena/asan.h> -- 2.54.0