From owner-freebsd-current Mon Jan 6 7:56:36 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BE0737B401; Mon, 6 Jan 2003 07:56:34 -0800 (PST) Received: from espresso.q9media.com (espresso.q9media.com [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id F093243ED1; Mon, 6 Jan 2003 07:56:33 -0800 (PST) (envelope-from mike@espresso.q9media.com) Received: by espresso.q9media.com (Postfix, from userid 1002) id ABE1F9BC3; Mon, 6 Jan 2003 10:45:36 -0500 (EST) Date: Mon, 6 Jan 2003 10:45:36 -0500 From: Mike Barcroft To: Robert Watson Cc: current@freebsd.org Subject: Re: alpha tinderbox failure Message-ID: <20030106104536.C24442@espresso.q9media.com> References: <200301061201.h06C1VOx027972@beast.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200301061201.h06C1VOx027972@beast.freebsd.org>; from des@FreeBSD.org on Mon, Jan 06, 2003 at 04:01:31AM -0800 Organization: The FreeBSD Project Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dag-Erling Smorgrav writes: > -------------------------------------------------------------- > >>> Kernel build for LINT started on Mon Jan 6 03:35:12 PST 2003 > -------------------------------------------------------------- > ===> vinum > "Makefile", line 4445: warning: duplicate script for target "geom_bsd.o" [...] > /h/des/src/sys/dev/lmc/if_lmc.c:32:2: warning: #warning "The lmc driver i [...] > /h/des/src/sys/dev/pdq/pdq.c: In function `pdq_initialize': > /h/des/src/sys/dev/pdq/pdq.c:1606: warning: cast discards qualifiers from [...] > /h/des/src/sys/pci/meteor.c:149:2: warning: #warning "The meteor driver i [...] > /h/des/src/sys/pci/simos.c:30:2: warning: #warning "The simos driver is b [...] > cc1: warnings being treated as errors > /h/des/src/sys/security/mac_lomac/mac_lomac.c: In function `mac_lomac_ass [...] > /h/des/src/sys/security/mac_lomac/mac_lomac.c:1070: warning: passing arg [...] > /h/des/src/sys/security/mac_lomac/mac_lomac.c:1081: warning: int format, [...] > *** Error code 1 These new truncated lines only make problems harder to solve. Anyway, the problem is the 5th argument to vn_extattr_get() should be an int *, but it's passing a size_t *. It looks like most consumers of vn_extattr_get() would prefer a size_t *, so maybe the interface should be changed. This patch should resolve the problem without changing vn_extattr_get()'s interface: %%% Index: mac_lomac.c =================================================================== RCS file: /work/repo/src/sys/security/mac_lomac/mac_lomac.c,v retrieving revision 1.6 diff -u -r1.6 mac_lomac.c --- mac_lomac.c 10 Dec 2002 16:20:33 -0000 1.6 +++ mac_lomac.c 6 Jan 2003 15:53:02 -0000 @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -1067,7 +1068,7 @@ bzero(&temp, buflen); error = vn_extattr_get(vp, IO_NODELOCKED, MAC_LOMAC_EXTATTR_NAMESPACE, - MAC_LOMAC_EXTATTR_NAME, &buflen, (char *)&temp, curthread); + MAC_LOMAC_EXTATTR_NAME, (int *)&buflen, (char *)&temp, curthread); if (error == ENOATTR || error == EOPNOTSUPP) { /* Fall back to the fslabel. */ mac_lomac_copy_single(source, dest); @@ -1077,8 +1078,9 @@ if (buflen != sizeof(temp)) { if (buflen != sizeof(temp) - sizeof(temp.ml_auxsingle)) { - printf("mac_lomac_associate_vnode_extattr: bad size %d\n", - buflen); + printf( + "mac_lomac_associate_vnode_extattr: bad size %ju\n", + (uintmax_t)buflen); return (EPERM); } bzero(&temp.ml_auxsingle, sizeof(temp.ml_auxsingle)); %%% Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message