Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers

UAPI headers licensed under GPL are supposed to have exception
"WITH Linux-syscall-note" so that they can be included into non-GPL
user space application code.

The exception note is missing in some UAPI headers.

Some of them slipped in by the treewide conversion commit b24413180f56
("License cleanup: add SPDX GPL-2.0 license identifier to files with
no license"). Just run:

$ git show --oneline b24413180f56 -- arch/x86/include/uapi/asm/

I believe they are not intentional, and should be fixed too.

This patch was generated by the following script:

git grep -l --not -e Linux-syscall-note --and -e SPDX-License-Identifier \
-- :arch/*/include/uapi/asm/*.h :include/uapi/ :^*/Kbuild |
while read file
do
sed -i -e '/[[:space:]]OR[[:space:]]/s/\(GPL-[^[:space:]]*\)/(\1 WITH Linux-syscall-note)/g' \
-e '/[[:space:]]or[[:space:]]/s/\(GPL-[^[:space:]]*\)/(\1 WITH Linux-syscall-note)/g' \
-e '/[[:space:]]OR[[:space:]]/!{/[[:space:]]or[[:space:]]/!s/\(GPL-[^[:space:]]*\)/\1 WITH Linux-syscall-note/g}' $file
done

After this patch is applied, there are 5 UAPI headers that do not contain
"WITH Linux-syscall-note". They are kept untouched since this exception
applies only to GPL variants.

$ git grep --not -e Linux-syscall-note --and -e SPDX-License-Identifier \
-- :arch/*/include/uapi/asm/*.h :include/uapi/ :^*/Kbuild
include/uapi/drm/panfrost_drm.h:/* SPDX-License-Identifier: MIT */
include/uapi/linux/batman_adv.h:/* SPDX-License-Identifier: MIT */
include/uapi/linux/qemu_fw_cfg.h:/* SPDX-License-Identifier: BSD-3-Clause */
include/uapi/linux/vbox_err.h:/* SPDX-License-Identifier: MIT */
include/uapi/linux/virtio_iommu.h:/* SPDX-License-Identifier: BSD-3-Clause */

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Masahiro Yamada and committed by
Greg Kroah-Hartman
d9c52522 5f9e832c

+49 -49
+1 -1
arch/arm64/include/uapi/asm/bpf_perf_event.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _UAPI__ASM_BPF_PERF_EVENT_H__ 3 3 #define _UAPI__ASM_BPF_PERF_EVENT_H__ 4 4
+1 -1
arch/csky/include/uapi/asm/byteorder.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 3 3 4 4 #ifndef __ASM_CSKY_BYTEORDER_H
+1 -1
arch/csky/include/uapi/asm/cachectl.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 3 3 #ifndef __ASM_CSKY_CACHECTL_H 4 4 #define __ASM_CSKY_CACHECTL_H
+1 -1
arch/csky/include/uapi/asm/perf_regs.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2019 Hangzhou C-SKY Microsystems co.,ltd. 3 3 4 4 #ifndef _ASM_CSKY_PERF_REGS_H
+1 -1
arch/csky/include/uapi/asm/ptrace.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 3 3 4 4 #ifndef _CSKY_PTRACE_H
+1 -1
arch/csky/include/uapi/asm/sigcontext.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 3 3 4 4 #ifndef __ASM_CSKY_SIGCONTEXT_H
+1 -1
arch/csky/include/uapi/asm/unistd.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 3 3 4 4 #define __ARCH_WANT_SYS_CLONE
+1 -1
arch/nds32/include/uapi/asm/auxvec.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2005-2017 Andes Technology Corporation 3 3 4 4 #ifndef __ASM_AUXVEC_H
+1 -1
arch/nds32/include/uapi/asm/byteorder.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2005-2017 Andes Technology Corporation 3 3 4 4 #ifndef __NDS32_BYTEORDER_H__
+1 -1
arch/nds32/include/uapi/asm/cachectl.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 1994, 1995, 1996 by Ralf Baechle 3 3 // Copyright (C) 2005-2017 Andes Technology Corporation 4 4 #ifndef _ASM_CACHECTL
+1 -1
arch/nds32/include/uapi/asm/fp_udfiex_crtl.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 /* Copyright (C) 2005-2019 Andes Technology Corporation */ 3 3 #ifndef _FP_UDF_IEX_CRTL_H 4 4 #define _FP_UDF_IEX_CRTL_H
+1 -1
arch/nds32/include/uapi/asm/param.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2005-2017 Andes Technology Corporation 3 3 4 4 #ifndef __ASM_NDS32_PARAM_H
+1 -1
arch/nds32/include/uapi/asm/ptrace.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2005-2017 Andes Technology Corporation 3 3 4 4 #ifndef __UAPI_ASM_NDS32_PTRACE_H
+1 -1
arch/nds32/include/uapi/asm/sigcontext.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2005-2017 Andes Technology Corporation 3 3 4 4 #ifndef _ASMNDS32_SIGCONTEXT_H
+1 -1
arch/nds32/include/uapi/asm/unistd.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 // Copyright (C) 2005-2017 Andes Technology Corporation 3 3 4 4 #define __ARCH_WANT_STAT64
+1 -1
arch/powerpc/include/uapi/asm/bpf_perf_event.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _UAPI__ASM_BPF_PERF_EVENT_H__ 3 3 #define _UAPI__ASM_BPF_PERF_EVENT_H__ 4 4
+1 -1
arch/riscv/include/uapi/asm/auxvec.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 1 + /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 2 /* 3 3 * Copyright (C) 2012 ARM Ltd. 4 4 * Copyright (C) 2015 Regents of the University of California
+1 -1
arch/riscv/include/uapi/asm/bitsperlong.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 1 + /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 2 /* 3 3 * Copyright (C) 2012 ARM Ltd. 4 4 * Copyright (C) 2015 Regents of the University of California
+1 -1
arch/riscv/include/uapi/asm/byteorder.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 1 + /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 2 /* 3 3 * Copyright (C) 2012 ARM Ltd. 4 4 * Copyright (C) 2015 Regents of the University of California
+1 -1
arch/riscv/include/uapi/asm/hwcap.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 1 + /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 2 /* 3 3 * Copied from arch/arm64/include/asm/hwcap.h 4 4 *
+1 -1
arch/riscv/include/uapi/asm/ptrace.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 1 + /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 2 /* 3 3 * Copyright (C) 2012 Regents of the University of California 4 4 */
+1 -1
arch/riscv/include/uapi/asm/sigcontext.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 1 + /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 2 /* 3 3 * Copyright (C) 2012 Regents of the University of California 4 4 */
+1 -1
arch/riscv/include/uapi/asm/ucontext.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 1 + /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 2 /* 3 3 * Copyright (C) 2012 ARM Ltd. 4 4 * Copyright (C) 2017 SiFive, Inc.
+1 -1
arch/s390/include/uapi/asm/bpf_perf_event.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _UAPI__ASM_BPF_PERF_EVENT_H__ 3 3 #define _UAPI__ASM_BPF_PERF_EVENT_H__ 4 4
+1 -1
arch/s390/include/uapi/asm/ipl.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _ASM_S390_UAPI_IPL_H 3 3 #define _ASM_S390_UAPI_IPL_H 4 4
+1 -1
arch/sh/include/uapi/asm/setup.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #include <asm-generic/setup.h>
+1 -1
arch/sh/include/uapi/asm/types.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #include <asm-generic/types.h>
+1 -1
arch/sparc/include/uapi/asm/oradax.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-or-later */ 1 + /* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */ 2 2 /* 3 3 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. 4 4 */
+1 -1
arch/x86/include/uapi/asm/byteorder.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _ASM_X86_BYTEORDER_H 3 3 #define _ASM_X86_BYTEORDER_H 4 4
+1 -1
arch/x86/include/uapi/asm/hwcap2.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _ASM_X86_HWCAP2_H 3 3 #define _ASM_X86_HWCAP2_H 4 4
+1 -1
arch/x86/include/uapi/asm/sigcontext32.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _ASM_X86_SIGCONTEXT32_H 3 3 #define _ASM_X86_SIGCONTEXT32_H 4 4
+1 -1
arch/x86/include/uapi/asm/types.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _ASM_X86_TYPES_H 3 3 #define _ASM_X86_TYPES_H 4 4
+1 -1
include/uapi/linux/bpfilter.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _UAPI_LINUX_BPFILTER_H 3 3 #define _UAPI_LINUX_BPFILTER_H 4 4
+1 -1
include/uapi/linux/ipmi_bmc.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 /* 3 3 * Copyright (c) 2015-2018, Intel Corporation. 4 4 */
+1 -1
include/uapi/linux/isst_if.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 /* 3 3 * Intel Speed Select Interface: OS to hardware Interface 4 4 * Copyright (c) 2019, Intel Corporation.
+1 -1
include/uapi/linux/netfilter/nf_synproxy.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _NF_SYNPROXY_H 3 3 #define _NF_SYNPROXY_H 4 4
+1 -1
include/uapi/linux/psp-sev.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 1 + /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 2 /* 3 3 * Userspace interface for AMD Secure Encrypted Virtualization (SEV) 4 4 * platform management commands.
+1 -1
include/uapi/linux/rxrpc.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-or-later */ 1 + /* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */ 2 2 /* Types and definitions for AF_RXRPC. 3 3 * 4 4 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
+1 -1
include/uapi/linux/usb/g_uvc.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0+ */ 1 + /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2 2 /* 3 3 * g_uvc.h -- USB Video Class Gadget driver API 4 4 *
+1 -1
include/uapi/linux/vbox_vmmdev_types.h
··· 1 - /* SPDX-License-Identifier: (GPL-2.0 OR CDDL-1.0) */ 1 + /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR CDDL-1.0) */ 2 2 /* 3 3 * Virtual Device for Guest <-> VMM/Host communication, type definitions 4 4 * which are also used for the vboxguest ioctl interface / by vboxsf
+1 -1
include/uapi/linux/vboxguest.h
··· 1 - /* SPDX-License-Identifier: (GPL-2.0 OR CDDL-1.0) */ 1 + /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR CDDL-1.0) */ 2 2 /* 3 3 * VBoxGuest - VirtualBox Guest Additions Driver Interface. 4 4 *
+1 -1
include/uapi/linux/virtio_pmem.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 1 + /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause */ 2 2 /* 3 3 * Definitions for virtio-pmem devices. 4 4 *
+1 -1
include/uapi/linux/vmcore.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 #ifndef _UAPI_VMCORE_H 3 3 #define _UAPI_VMCORE_H 4 4
+1 -1
include/uapi/linux/wmi.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 1 + /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 2 /* 3 3 * User API methods for ACPI-WMI mapping driver 4 4 *
+1 -1
include/uapi/misc/fastrpc.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 3 3 #ifndef __QCOM_FASTRPC_H__ 4 4 #define __QCOM_FASTRPC_H__
+1 -1
include/uapi/rdma/rvt-abi.h
··· 1 - /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ 1 + /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 2 2 3 3 /* 4 4 * This file contains defines, structures, etc. that are used
+1 -1
include/uapi/rdma/siw-abi.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */ 1 + /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) or BSD-3-Clause */ 2 2 3 3 /* Authors: Bernard Metzler <bmt@zurich.ibm.com> */ 4 4 /* Copyright (c) 2008-2019, IBM Corporation */
+1 -1
include/uapi/scsi/scsi_bsg_ufs.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 /* 3 3 * UFS Transport SGIO v4 BSG Message Support 4 4 *
+1 -1
include/uapi/sound/skl-tplg-interface.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 2 /* 3 3 * skl-tplg-interface.h - Intel DSP FW private data interface 4 4 *