From: ebiederm@xmission.com (Eric W. Biederman)
To: Anton Altaparmakov <anton@tuxera.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: i_uid_read()/i_uid_write() and friends
Date: Fri, 10 Apr 2015 23:04:04 -0500 [thread overview]
Message-ID: <87d23bz4y3.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <0227447F-5665-4B5C-A71D-8DAB5452360A@tuxera.com> (Anton Altaparmakov's message of "Sat, 11 Apr 2015 02:29:39 +0000")
Anton Altaparmakov <anton@tuxera.com> writes:
> Hi,
>
> Is it intended that non-gpl file systems cannot use functions like
> i_uid_read() and i_uid_write() (introduced by Eric Biederman in 3.5
> kernel)?
>
> They resolve to the below (in include/linux/fs.h):
>
> static inline uid_t i_uid_read(const struct inode *inode)
> {
> return from_kuid(&init_user_ns, inode->i_uid);
> }
>
> static inline void i_uid_write(struct inode *inode, uid_t uid)
> {
> inode->i_uid = make_kuid(&init_user_ns, uid);
> }
>
> And both from_kuid() and make_kuid() are EXPORT_SYMBOL() so they are
> fine but the problem is that init_user_ns is EXPORT_SYMBOL_GPL() and
> because i_uid_read() and i_uid_write() are static inline it causes
> them to be unusable from non-gpl kernel modules...
>
> Same thing applies to i_gid_read() and i_gid_write().
>
> These seem pretty fundamental calls that a non-gpl file system should
> be able to call, no?
I believe you are asking should a deriviative work of a GPL'd piece of
software be licenseable under something other than the GPL. I don't see
any provision in the GPLv2 for such a thing.
I am pretty certain that kuid_t is unique to the linux kernel and any
use of it makes your software a derivative work.
All EXPORT_SYMBOL_GPL does is provide a hint that the author could not
imagine that you could possibly use it in something that was not a
derivative work. EXPORT_SYMBOL makes no comment whatsoever.
As long as you are complying with the license of the kernel I don't see
how the question of a non-gpl file system can make any sense.
Eric
prev parent reply other threads:[~2015-04-11 4:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-11 2:29 Anton Altaparmakov
2015-04-11 4:04 ` Eric W. Biederman [this message]
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=87d23bz4y3.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=anton@tuxera.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®