All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: detect missing "WITH Linux-syscall-note" for uapi headers
@ 2019-07-25  8:05 Masahiro Yamada
  2019-07-25 11:12 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2019-07-25  8:05 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Greg KH, Masahiro Yamada, linux-kernel

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 <yamada.masahiro@socionext.com>
---

This patch depends on the following:

https://lore.kernel.org/patchwork/patch/1105289/

I will turn on the error after all headers are fixed.


 scripts/headers_install.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
index 47f6f3ea0771..bbaf29386995 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -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
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: detect missing "WITH Linux-syscall-note" for uapi headers
  2019-07-25  8:05 [PATCH] kbuild: detect missing "WITH Linux-syscall-note" for uapi headers Masahiro Yamada
@ 2019-07-25 11:12 ` Greg KH
  2019-07-25 11:17   ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2019-07-25 11:12 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-kbuild, linux-kernel

On Thu, Jul 25, 2019 at 05:05:13PM +0900, Masahiro Yamada wrote:
> 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 <yamada.masahiro@socionext.com>
> ---
> 
> This patch depends on the following:
> 
> https://lore.kernel.org/patchwork/patch/1105289/
> 
> I will turn on the error after all headers are fixed.

I've taken the dependancy here in the spdx tree and will send it to
Linus for 5.3-rc2.  I can also take this now through that tree, or you
can add it to yours afterward, which ever is easier for you.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: detect missing "WITH Linux-syscall-note" for uapi headers
  2019-07-25 11:12 ` Greg KH
@ 2019-07-25 11:17   ` Masahiro Yamada
  0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2019-07-25 11:17 UTC (permalink / raw)
  To: Greg KH; +Cc: Linux Kbuild mailing list, Linux Kernel Mailing List

On Thu, Jul 25, 2019 at 8:13 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Thu, Jul 25, 2019 at 05:05:13PM +0900, Masahiro Yamada wrote:
> > 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 <yamada.masahiro@socionext.com>
> > ---
> >
> > This patch depends on the following:
> >
> > https://lore.kernel.org/patchwork/patch/1105289/
> >
> > I will turn on the error after all headers are fixed.
>
> I've taken the dependancy here in the spdx tree and will send it to
> Linus for 5.3-rc2.

Thanks!

>  I can also take this now through that tree, or you
> can add it to yours afterward, which ever is easier for you.

I will create a branch on top 5.3-rc2
and queue this patch by myself.

Thank you.


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-25 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25  8:05 [PATCH] kbuild: detect missing "WITH Linux-syscall-note" for uapi headers Masahiro Yamada
2019-07-25 11:12 ` Greg KH
2019-07-25 11:17   ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.