All of lore.kernel.org
 help / color / mirror / Atom feed
* Posix ACL on non-GPL modules.
@ 2013-10-11 23:30 Massimo Maggi
  2013-10-12  8:14 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Massimo Maggi @ 2013-10-11 23:30 UTC (permalink / raw)
  To: linux-fsdevel

Dear Sirs,
Every Posix ACL-related symbol is currently exported also for non-GPL
modules.
But the quite important function "posix_acl_release", declared inline in
include/linux/posix_acl.h, uses the GPL-only symbol "kfree_call_rcu".
So Posix ACL-related functionalities can't be used from non-GPL modules.
Can someone please clarify this situation? It seems an unwanted side-effect.
Small example pasted at the end of this message.
If this is effectively unwanted and a fix gets pulled by Linus, can
someone recommend a workaround for older kernels?

Thank you,
Massimo Maggi
PS:I'm interested in using Posix ACL functions from code in another Open
Source Initiative-approved license, NOT in proprietary closed-source code.

Building this module:
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/posix_acl.h>

MODULE_LICENSE("CDDL");

static int __init startup(void)
{
        struct posix_acl *a = posix_acl_alloc(1,0);
        //DO SOMETHING POTENTIALLY USEFUL
        posix_acl_release(a);
        return 0;
}


module_init(startup);

Leads to this error:
FATAL: modpost: GPL-incompatible module testmodule.ko uses GPL-only
symbol 'kfree_call_rcu'

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

* Re: Posix ACL on non-GPL modules.
  2013-10-11 23:30 Posix ACL on non-GPL modules Massimo Maggi
@ 2013-10-12  8:14 ` Christoph Hellwig
  2013-10-12 12:51   ` Massimo Maggi
       [not found]   ` <CAOPrR7qkkBbYi2esgwbN3-OrkPeP=W9OG59ArUSqLf67ia8DSg@mail.gmail.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2013-10-12  8:14 UTC (permalink / raw)
  To: Massimo Maggi; +Cc: linux-fsdevel

On Sat, Oct 12, 2013 at 01:30:35AM +0200, Massimo Maggi wrote:
> PS:I'm interested in using Posix ACL functions from code in another Open
> Source Initiative-approved license, NOT in proprietary closed-source code.

That doens't really matter.  It's still a derived work of the Linux
kernel if you write to Linux filesystem APIs, and it still won't be
distributable.  If you want to hack on it privately anyway you're of
course more than free to do so, but you should not expect help.  Not
that'd you'd need it as you can hack anything you want into your private
non-redistributed tree.

Without sounding mean, but please go away with your attempts to bypas
the license we put on the code and vilationg our copyrights.

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

* Re: Posix ACL on non-GPL modules.
  2013-10-12  8:14 ` Christoph Hellwig
@ 2013-10-12 12:51   ` Massimo Maggi
       [not found]   ` <CAOPrR7qkkBbYi2esgwbN3-OrkPeP=W9OG59ArUSqLf67ia8DSg@mail.gmail.com>
  1 sibling, 0 replies; 4+ messages in thread
From: Massimo Maggi @ 2013-10-12 12:51 UTC (permalink / raw)
  To: linux-fsdevel

On 12/10/2013 10:14, Christoph Hellwig wrote:
> attempts to bypas the license we put on the code and vilationg our copyrights.

I seriously appreciate the clear description of what you were thinking
when reading my message.
I will also be clear: My intention is to fully respect developer's
decisions to protect APIs and (obviously) respect laws.
Original author's decision in this regard is clear:
posix_acl_init,posix_acl_alloc,posix_acl_valid,posix_acl_equiv_mode,posix_acl_from_mode,posix_acl_chmod,
posix_acl_create are explicitly exported for modules with _ANY_ license.
Therefore I'm authorized to use them in a CDDL-licensed module.
There is one function, posix_acl_release, whose use is clearly related
to posix_acl_alloc, which does not have a clearly expressed export
policy, as it is an inline function written in a header file. Through
multiple macro expansions, it calls a GPL-only symbol. Being an inline
function, the linker won't allow that.
Do you agree with me that this is a quite weak to express the decision
to not allow the use of Posix ACL's functions in non-GPL modules?
This is the reason why I tought this might be an oversight.
If original authors think that Posix ACL APIs should not be used from
non-GPL modules, I suggest you to export also:
posix_acl_init
posix_acl_alloc
posix_acl_valid
posix_acl_equiv_mode
posix_acl_from_mode
posix_acl_chmod
posix_acl_create

as GPL-only symbols. Currently, they are available to modules with any
license. Your intent of protecting Filesystem APIs will be clear to
anyone and will be respected without any more questions on this mailing
list.
This is an inconsistency that IMHO should be fixed. Fixing it in a more
liberal way or in a more strict way is up to the original authors.
Sorry for the long message, but I felt misunderstood and wanted to make
my point clear.
Regards,
Massimo Maggi


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

* Re: Posix ACL on non-GPL modules.
       [not found]   ` <CAOPrR7qkkBbYi2esgwbN3-OrkPeP=W9OG59ArUSqLf67ia8DSg@mail.gmail.com>
@ 2013-10-12 14:48     ` Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2013-10-12 14:48 UTC (permalink / raw)
  To: Massimo Maggi; +Cc: Christoph Hellwig, linux-fsdevel

On Sat, Oct 12, 2013 at 02:45:38PM +0200, Massimo Maggi wrote:
> posix_acl_create are explicitly exported for modules with _ANY_ license.
> Therefore I'm authorized to use them in a CDDL-licensed module.

You're not.  Read the GPL again.


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

end of thread, other threads:[~2013-10-12 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-11 23:30 Posix ACL on non-GPL modules Massimo Maggi
2013-10-12  8:14 ` Christoph Hellwig
2013-10-12 12:51   ` Massimo Maggi
     [not found]   ` <CAOPrR7qkkBbYi2esgwbN3-OrkPeP=W9OG59ArUSqLf67ia8DSg@mail.gmail.com>
2013-10-12 14:48     ` Christoph Hellwig

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.