From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Darrick J. Wong" Subject: Re: Argument type for FS_IOC_GETFLAGS/FS_IOC_SETFLAGS ioctls Date: Thu, 19 Dec 2013 15:30:53 -0800 Message-ID: <20131219233053.GA23894@birch.djwong.org> References: <20131126200559.GH20559@hall.aurel32.net> <20131127010141.GA10273@birch.djwong.org> <87zjnw1z4f.fsf@trouble.defaultvalue.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Aurelien Jarno , Alexander Viro , linux-fsdevel@vger.kernel.org, Robert Edmonds To: Rob Browning Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]:26566 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756572Ab3LSXbd (ORCPT ); Thu, 19 Dec 2013 18:31:33 -0500 Content-Disposition: inline In-Reply-To: <87zjnw1z4f.fsf@trouble.defaultvalue.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Dec 19, 2013 at 12:20:32PM -0600, Rob Browning wrote: > "Darrick J. Wong" writes: > > > On Tue, Nov 26, 2013 at 09:05:59PM +0100, Aurelien Jarno wrote: > > > It also causes problems with FUSE, because the kernel fuse driver expects to be > > able to transfer a ulong to and from userspace, but chattr & friends only > > allocate an int on the stack, so stack mashing seems to happen. > > > > I complained to tytso about it on linux-ext4 a while ago, he suggested > > special-casing fuse... I haven't gotten around to doing that. > > So if we didn't make a mistake, we changed bup to use int as suggested > by this thread, and now it appears to crash at least sometimes when FUSE > is involved: > > https://groups.google.com/forum/#!topic/bup-list/QxcHthbLHjw > > Is the problem (you mentioned above) that FUSE always expects a long, > and if so, is there a way to tell that we're talking to FUSE? I'm still leaning towards fixing FUSE[1], and letting userland keep on using int, like (most?) programs always have. The interface is still in hard shape, but this at least gets us to a place where all the Linux filesystems behave the same -- (int *) argument. --D [1] Look for "[PATCH] fuse: Fix IOC_[GS]ETFLAGS argument size brokenness" on lkml/fsdevel. > > Thanks > -- > Rob Browning > rlb @defaultvalue.org and @debian.org > GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A > GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4