All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Kent Gibson <warthog618@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [libgpiod][PATCH 6/6] core: add the kernel uapi header to the repository
Date: Tue, 26 Jan 2021 18:11:39 +0100	[thread overview]
Message-ID: <YBBNSzKHYNXki6NY@kroah.com> (raw)
In-Reply-To: <CAMRc=Mc4gK6BXKV8-b9qBTgm8m5DqW35UPxPWn7PbfJ-8LB4Yw@mail.gmail.com>

On Tue, Jan 26, 2021 at 04:07:47PM +0100, Bartosz Golaszewski wrote:
> On Mon, Jan 25, 2021 at 6:55 AM Kent Gibson <warthog618@gmail.com> wrote:
> >
> 
> [snip!]
> 
> > >
> > > I don't like the ifdef hell so I prefer to bundle the header. I'm open
> > > to other suggestions, although I can't come up with anything else.
> > >
> >
> > Going off on a bit of a tangent, but I'm trying to add support for
> > decoding the GPIO ioctls into strace and am running up against a similar
> > issue.
> >
> > The way strace does it is to check the uAPI header on the host and use
> > it if possible.  To handle where it may be stale, local types are
> > defined that mirror any types that may have been added since the header
> > was originally released.  If the corresponding type is available in the
> > linux header then it is used, else the local type.
> >
> > This obviously creates a lot of pointless boilerplate code and
> > preprocessor chicanery so I floated the idea of just including the latest
> > header in the strace tree, as you are doing here for libgpiod.
> > But that raised the issue of licencing, specifically if you copy the
> > linux/gpio.h into a source tree does that mean that the whole project
> > becomes GPL 2.0?  That is an issue for strace as it is LGPL 2.1 - as is
> > libgpiod.
> >
> > The Linux uAPI headers are under the GPL-2.0 WITH Linux-syscall-note,
> > which is also not totally clear on this point[1].
> >
> > My gut feeling was that using and even copying API headers doesn't
> > constitute a derived work, as per the FSF view quoted in [1], and
> > ethically might even be less of a violation than copying and re-defining
> > individual types, but I'd rather not rely on a gut feeling.
> >
> > Is there some clear opinion or precedent on this point?
> > i.e. are libgpiod and strace in legal licence jeopardy if they include
> > gpio.h in their source tree?
> >
> > Cheers,
> > Kent.
> >
> > [1] https://lkml.org/lkml/2020/2/21/2193
> 
> Thanks for pointing that out. I lack the legal knowledge to have an
> opinion of my own on this.
> 
> Cc'ing Greg KH for help.
> 
> Greg: do you know if it's fine to bundle a 'GPL-2.0 WITH
> Linux-syscall-note' uAPI header together with an LGPL-v2.1-or-later
> user-space shared library?

How would you "bundle" such a thing as that is not what is in the kernel
source tree?  If you are going to copy files out of the kernel and do
other things with them, well, I recommend asking a lawyer as I am not
one :)

good luck!

greg k-h

  reply	other threads:[~2021-01-27 10:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 13:34 [libgpiod][PATCH 0/6] treewide: remove more cruft and Bartosz Golaszewski
2021-01-11 13:34 ` [libgpiod][PATCH 1/6] treewide: remove helpers for opening chips by name & number Bartosz Golaszewski
2021-01-11 13:34 ` [libgpiod][PATCH 2/6] treewide: simplify the active-low line property Bartosz Golaszewski
2021-01-11 13:34 ` [libgpiod][PATCH 3/6] treewide: rename BIAS_AS_IS to BIAS_NONE Bartosz Golaszewski
2021-01-11 14:31   ` Kent Gibson
2021-01-11 13:34 ` [libgpiod][PATCH 4/6] treewide: make drive settings an enum Bartosz Golaszewski
2021-01-11 14:39   ` Kent Gibson
2021-01-11 14:48     ` Bartosz Golaszewski
2021-01-11 13:34 ` [libgpiod][PATCH 5/6] bindings: cxx: line: reorder bias mapping entries Bartosz Golaszewski
2021-01-11 13:34 ` [libgpiod][PATCH 6/6] core: add the kernel uapi header to the repository Bartosz Golaszewski
2021-01-11 13:46   ` Andy Shevchenko
2021-01-11 14:06     ` Bartosz Golaszewski
2021-01-11 14:46       ` Andy Shevchenko
2021-01-11 15:15         ` Bartosz Golaszewski
2021-01-25  5:55           ` Kent Gibson
2021-01-25 10:54             ` Andy Shevchenko
2021-01-26 15:07             ` Bartosz Golaszewski
2021-01-26 17:11               ` Greg Kroah-Hartman [this message]
2021-01-26 19:08                 ` Bartosz Golaszewski
2021-01-27 11:43                   ` Greg Kroah-Hartman
2021-01-28  3:26                     ` Kent Gibson
2021-01-28  7:51                       ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YBBNSzKHYNXki6NY@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=warthog618@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.