From owner-freebsd-current@FreeBSD.ORG Mon Jun 8 07:56:11 2009 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3986C1065768; Mon, 8 Jun 2009 07:56:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (unknown [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id E80F48FC08; Mon, 8 Jun 2009 07:56:10 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from delta.allbsd.org (p3185-ipbf514funabasi.chiba.ocn.ne.jp [123.225.96.185]) (authenticated bits=128) by mail.allbsd.org (8.14.3/8.14.3) with ESMTP id n587ro8S019888; Mon, 8 Jun 2009 16:54:01 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (alph.allbsd.org [192.168.0.10]) (authenticated bits=0) by delta.allbsd.org (8.13.4/8.13.4) with ESMTP id n587rYUO068939; Mon, 8 Jun 2009 16:53:38 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 08 Jun 2009 16:53:25 +0900 (JST) Message-Id: <20090608.165325.225640915.hrs@allbsd.org> To: rea-fbsd@codelabs.ru From: Hiroki Sato In-Reply-To: References: <20090608025715.499087302F@freebsd-current.sentex.ca> <8LPG99US2/4EsGlonyfMSkDb40o@XX1fo6zQUfC4h0jjRC6IBz3oNH4> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.2.51 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart0(Mon_Jun__8_16_53_25_2009_309)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (mail.allbsd.org [133.31.130.32]); Mon, 08 Jun 2009 16:54:01 +0900 (JST) Cc: amd64@FreeBSD.org, current@FreeBSD.org Subject: Re: [head tinderbox] failure on amd64/amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 07:56:11 -0000 ----Security_Multipart0(Mon_Jun__8_16_53_25_2009_309)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Mon_Jun__8_16_53_25_2009_586)--" Content-Transfer-Encoding: 7bit ----Next_Part(Mon_Jun__8_16_53_25_2009_586)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Eygene Ryabinkin wrote in : re> Mon, Jun 08, 2009 at 11:00:56AM +0400, Eygene Ryabinkin wrote: re> > Looks like that re> > ----- re> > ifr->ifr_data = (caddr_t)(size_t)options; re> > ----- re> > will be more correct and will disable this warning -- it will convert re> > u_int to the proper type that will be able to carry addresses for the re> > given platform. re> re> Hmm, looking a bit into the code of gif_ioctl, I am under impression re> that 'options' will not be initialized at the GIFSOPTS processing. re> And the statement re> ----- re> if ((error = copyin(&options, &sc->gif_options, re> sizeof(sc->gif_options)))) { re> ----- re> looks strange -- (&options) is in the kernel space (stack space), re> so why one is passing it as the userland address? Judging by the re> contents of newly added setgifopts() inside ifgif.c, I would assume re> that one wants 'ifr->ifr_data' instead of '&options'. re> re> Am I missing something? Gr, certainly this looks strange. I meant the attached patch. Thanks for pointing out it. I will fix the build error as soon as I return home. -- Hiroki ----Next_Part(Mon_Jun__8_16_53_25_2009_586)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if_gif.c.diff" Index: if_gif.c =================================================================== --- if_gif.c (revision 193673) +++ if_gif.c (working copy) @@ -914,10 +914,10 @@ case GIFSOPTS: if ((error = priv_check(curthread, PRIV_NET_GIF)) != 0) break; - if ((error = copyin(&options, &sc->gif_options, - sizeof(sc->gif_options)))) { + if ((error = copyin(ifr->ifr_data, &options, + sizeof(options)))) { if ((options | GIF_FULLOPTS) == GIF_FULLOPTS) - ifr->ifr_data = (caddr_t)options; + sc->gif_options = options; else error = EINVAL; } ----Next_Part(Mon_Jun__8_16_53_25_2009_586)---- ----Security_Multipart0(Mon_Jun__8_16_53_25_2009_309)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkosw3UACgkQTyzT2CeTzy3swgCgv3g8llQDGWKj1ZBU88LGwcPa nxMAn31mmln/T7dDnuwBQcQecQz55hr0 =iFvg -----END PGP SIGNATURE----- ----Security_Multipart0(Mon_Jun__8_16_53_25_2009_309)----