Skip to content

Commit

Permalink
kbuild: detect missing "WITH Linux-syscall-note" for uapi headers
Browse files Browse the repository at this point in the history
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.

Unfortunately, people often miss to add it. Break 'make headers'
when any of exported headers lacks the exception note so that the
0-day bot can easily catch it.

Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
masahir0y committed Jul 29, 2019
1 parent 609488b commit 6224455
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/headers_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ TMPFILE=$OUTFILE.tmp

trap 'rm -f $OUTFILE $TMPFILE' EXIT

# SPDX-License-Identifier with GPL variants must have "WITH Linux-syscall-note"
if [ -n "$(sed -n -e "/SPDX-License-Identifier:.*GPL-/{/WITH Linux-syscall-note/!p}" $INFILE)" ]; then
echo "error: $INFILE: missing \"WITH Linux-syscall-note\" for SPDX-License-Identifier" >&2
exit 1
fi

sed -E -e '
s/([[:space:](])(__user|__force|__iomem)[[:space:]]/\1/g
s/__attribute_const__([[:space:]]|$)/\1/g
Expand Down

0 comments on commit 6224455

Please sign in to comment.