Re: [head tinderbox] failure on amd64/amd64

From: Eygene Ryabinkin <rea-fbsd_at_codelabs.ru>
Date: Mon, 8 Jun 2009 11:31:27 +0400
Mon, Jun 08, 2009 at 11:00:56AM +0400, Eygene Ryabinkin wrote:
> Looks like that
> -----
> 		ifr->ifr_data = (caddr_t)(size_t)options;
> -----
> will be more correct and will disable this warning -- it will convert
> u_int to the proper type that will be able to carry addresses for the
> given platform.

Hmm, looking a bit into the code of gif_ioctl, I am under impression
that 'options' will not be initialized at the GIFSOPTS processing.
And the statement
-----
                if ((error = copyin(&options, &sc->gif_options,
                                sizeof(sc->gif_options)))) {
-----
looks strange -- (&options) is in the kernel space (stack space),
so why one is passing it as the userland address?  Judging by the
contents of newly added setgifopts() inside ifgif.c, I would assume
that one wants 'ifr->ifr_data' instead of '&options'.

Am I missing something?
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook
    {_.-``-'         {_/            #
Received on Mon Jun 08 2009 - 05:31:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:49 UTC