mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* i_uid_read()/i_uid_write() and friends
@ 2015-04-11  2:29 Anton Altaparmakov
  2015-04-11  4:04 ` Eric W. Biederman
  0 siblings, 1 reply; 2+ messages in thread
From: Anton Altaparmakov @ 2015-04-11  2:29 UTC (permalink / raw)
  To: Al Viro
  Cc: Linus Torvalds, Andrew Morton, Eric W. Biederman, linux-fsdevel,
	Linux Kernel Mailing List

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?

Best regards,

	Anton
-- 
Anton Altaparmakov <anton at tuxera.com> (replace at with @)
Lead in File System Development, Tuxera Inc., http://www.tuxera.com/
Linux NTFS maintainer


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

end of thread, other threads:[~2015-04-11  4:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-11  2:29 i_uid_read()/i_uid_write() and friends Anton Altaparmakov
2015-04-11  4:04 ` Eric W. Biederman

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®