Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751861AbbDKEIP (ORCPT ); Sat, 11 Apr 2015 00:08:15 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:37690 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750805AbbDKEIM (ORCPT ); Sat, 11 Apr 2015 00:08:12 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Anton Altaparmakov Cc: Al Viro , Linus Torvalds , Andrew Morton , linux-fsdevel , Linux Kernel Mailing List References: <0227447F-5665-4B5C-A71D-8DAB5452360A@tuxera.com> Date: Fri, 10 Apr 2015 23:04:04 -0500 In-Reply-To: <0227447F-5665-4B5C-A71D-8DAB5452360A@tuxera.com> (Anton Altaparmakov's message of "Sat, 11 Apr 2015 02:29:39 +0000") Message-ID: <87d23bz4y3.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX1/2jdDQr/V7kwdeqmi+LIazH+2RVeTrlYI= X-SA-Exim-Connect-IP: 97.119.22.70 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa05 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa05 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Anton Altaparmakov X-Spam-Relay-Country: X-Spam-Timing: total 719 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 5 (0.7%), b_tie_ro: 3.5 (0.5%), parse: 1.15 (0.2%), extract_message_metadata: 17 (2.4%), get_uri_detail_list: 2.00 (0.3%), tests_pri_-1000: 4.5 (0.6%), tests_pri_-950: 1.24 (0.2%), tests_pri_-900: 1.01 (0.1%), tests_pri_-400: 18 (2.6%), check_bayes: 17 (2.4%), b_tokenize: 4.8 (0.7%), b_tok_get_all: 6 (0.8%), b_comp_prob: 1.69 (0.2%), b_tok_touch_all: 2.8 (0.4%), b_finish: 0.66 (0.1%), tests_pri_0: 191 (26.6%), tests_pri_500: 476 (66.2%), poll_dns_idle: 470 (65.4%), rewrite_mail: 0.00 (0.0%) Subject: Re: i_uid_read()/i_uid_write() and friends X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1835 Lines: 50 Anton Altaparmakov 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/