From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 1 19:02:00 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DE4F9E9C; Mon, 1 Apr 2013 19:02:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id BDC1B9C9; Mon, 1 Apr 2013 19:02:00 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 28F93B98D; Mon, 1 Apr 2013 15:02:00 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Subject: Re: extattr_set_* return type Date: Mon, 1 Apr 2013 14:24:19 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201304011424.19784.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Apr 2013 15:02:00 -0400 (EDT) Cc: mdf@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 19:02:00 -0000 On Saturday, March 30, 2013 5:30:21 pm mdf@freebsd.org wrote: > Despite the man page correctly describing the return value for > extattr_set_*, I thought recently that they returned 0/-1 for > success/failure, not the number of bytes written, like write(2). This is > because extattr_set_* is declared as returning an int, not an ssize_t. > Both extattr_get and extattr_list return ssize_t, so this is inconsistent. > > The patch at > http://people.freebsd.org/~mdf/0001-Fix-return-type-of-extattr_set_-and-fix- rmextattr-8-.patchfixes > this. It compiles but it's untested. > > I don't think any compat shims are needed, since an old application will > still sign extend and this will work (it's very unlikely anyone does > extattr_set for 2GB or more). > > If anyone actually uses extattr on 64-bit, please test a new kernel but old > userspace to be sure nothing is broken. I plan to commit this next week if > I don't hear otherwise. Hmm, the patch URL doesn't work, but please fix this. There is an old thread we are both on from Dec 2011 where I ran into the same thing. I also think we don't need compat shims. -- John Baldwin