Skip to content

eBPF-based security platform

treewide: add the missing SPDX tags and normalise the .c form

Daniel Borkmannce7a7c226749
diff --git a/bpf/lib/shirudo_decoder.h b/bpf/lib/shirudo_decoder.h
index 6ccba15e..bf42d788 100644
--- a/bpf/lib/shirudo_decoder.h
+++ b/bpf/lib/shirudo_decoder.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
/*
* Copyright (c) 2026 Authors of shirudo
*
diff --git a/completion/shirudo.bash b/completion/shirudo.bash
index 7bc9fa52..77503a7b 100644
--- a/completion/shirudo.bash
+++ b/completion/shirudo.bash
@@ -1,4 +1,7 @@
-# bash completion for shirudo -*- shell-script -*-
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (c) 2026 Authors of shirudo
+#
+# bash completion for shirudo
#
# Command and subcommand name lists are pulled live from the binary via
# `shirudo <command> --list-cmds`, so adding a (sub)command in the
diff --git a/contrib/build-kernel-package.sh b/contrib/build-kernel-package.sh
index 0c36b11b..5a5fdc63 100755
--- a/contrib/build-kernel-package.sh
+++ b/contrib/build-kernel-package.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (c) 2026 Authors of shirudo
set -euo pipefail
KERNEL_TAG="${KERNEL_TAG:-bpf-next}"
diff --git a/systemd/shirudo-initrd.service.in b/systemd/shirudo-initrd.service.in
index a146b58b..3238ec20 100644
--- a/systemd/shirudo-initrd.service.in
+++ b/systemd/shirudo-initrd.service.in
@@ -1,3 +1,6 @@
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (c) 2026 Authors of shirudo
+#
# shirudo initrd unit: the first half of bringing enforcement up.
#
# Runs `shirudo init` while the initrd still runs, with the root file
diff --git a/systemd/shirudo.service.in b/systemd/shirudo.service.in
index 51cf7853..6964eda9 100644
--- a/systemd/shirudo.service.in
+++ b/systemd/shirudo.service.in
@@ -1,3 +1,6 @@
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (c) 2026 Authors of shirudo
+#
# shirudo reboot-persistence unit: the root file system's half.
#
# bpffs and the kernel keyrings do not survive a reboot, so the BPF LSM
diff --git a/testing/fixtures/decoders/counters.lua b/testing/fixtures/decoders/counters.lua
index 179eb09a..70668925 100644
--- a/testing/fixtures/decoders/counters.lua
+++ b/testing/fixtures/decoders/counters.lua
@@ -1,3 +1,6 @@
+-- SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+-- Copyright (c) 2026 Authors of shirudo
+
function decode(input)
if not input.data.serialized or input.data.serialized_bytes ~= 48 then
error("unexpected serialized counter payload")
diff --git a/testing/fixtures/decoders/first.lua b/testing/fixtures/decoders/first.lua
index 3ac1fd1d..a99e7609 100644
--- a/testing/fixtures/decoders/first.lua
+++ b/testing/fixtures/decoders/first.lua
@@ -1,3 +1,6 @@
+-- SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+-- Copyright (c) 2026 Authors of shirudo
+
function decode(input)
return {
upatch = input.upatch,
diff --git a/testing/fixtures/decoders/log.lua b/testing/fixtures/decoders/log.lua
index 518d0b05..e584831a 100644
--- a/testing/fixtures/decoders/log.lua
+++ b/testing/fixtures/decoders/log.lua
@@ -1,3 +1,6 @@
+-- SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+-- Copyright (c) 2026 Authors of shirudo
+
function decode(input)
return {
schema = 1,
diff --git a/testing/fixtures/decoders/metric.lua b/testing/fixtures/decoders/metric.lua
index f58b7905..f4232602 100644
--- a/testing/fixtures/decoders/metric.lua
+++ b/testing/fixtures/decoders/metric.lua
@@ -1,3 +1,6 @@
+-- SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+-- Copyright (c) 2026 Authors of shirudo
+
function decode(input)
return {{
name = "shirudo.otel.backend",
diff --git a/testing/fixtures/decoders/second.lua b/testing/fixtures/decoders/second.lua
index 62603583..3f1adf1f 100644
--- a/testing/fixtures/decoders/second.lua
+++ b/testing/fixtures/decoders/second.lua
@@ -1,3 +1,6 @@
+-- SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+-- Copyright (c) 2026 Authors of shirudo
+
function decode(input)
return {{
name = "shirudo.map_export.second",
diff --git a/testing/kernel-obs/kernel_obs_events.py b/testing/kernel-obs/kernel_obs_events.py
index ac5dee78..2fb262b2 100755
--- a/testing/kernel-obs/kernel_obs_events.py
+++ b/testing/kernel-obs/kernel_obs_events.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (c) 2026 Authors of shirudo
"""Generate activity that exercises every table of the kernel-obs upatch."""
import argparse
diff --git a/util/bpm_tree.c b/util/bpm_tree.c
index 7c54c037..eaf70bc0 100644
--- a/util/bpm_tree.c
+++ b/util/bpm_tree.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
+// SPDX-License-Identifier: BSD-2-Clause
/* Copyright (c) 2026 Authors of shirudo */
#include <ctype.h>
diff --git a/util/bpm_tree_state.c b/util/bpm_tree_state.c
index cd12ddb2..d41523a0 100644
--- a/util/bpm_tree_state.c
+++ b/util/bpm_tree_state.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
+// SPDX-License-Identifier: BSD-2-Clause
/*
* Copyright (c) 2026 Authors of shirudo
*
diff --git a/util/io.c b/util/io.c
index 396d0b1a..6a89119d 100644
--- a/util/io.c
+++ b/util/io.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
+// SPDX-License-Identifier: BSD-2-Clause
/* Copyright (c) 2026 Authors of shirudo */
#include <errno.h>
diff --git a/util/kernel_build_id.c b/util/kernel_build_id.c
index a33e924c..ff43a70f 100644
--- a/util/kernel_build_id.c
+++ b/util/kernel_build_id.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
+// SPDX-License-Identifier: BSD-2-Clause
/* Copyright (c) 2026 Authors of shirudo */
#include <errno.h>
diff --git a/util/kernel_release.c b/util/kernel_release.c
index 9f61fa79..502a2cbc 100644
--- a/util/kernel_release.c
+++ b/util/kernel_release.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
+// SPDX-License-Identifier: BSD-2-Clause
/* Copyright (c) 2026 Authors of shirudo */
#include <string.h>