Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 May 2010 00:28:56 -0700
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= <fernando.apesteguia@gmail.com>
Cc:        FreeBSD-Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Converting pointer to vm_offset_t
Message-ID:  <r2k7d6fde3d1005070028q7d10c03t4b652acf8b0c422c@mail.gmail.com>
In-Reply-To: <k2x1bd550a01005062331qf34279b1j1ad5c9e21ec9f6a0@mail.gmail.com>
References:  <p2y1bd550a01005052344peb3994c4r4d34f5f0cade1b32@mail.gmail.com> <r2u7d6fde3d1005061908rc25a80dfr2241416946079817@mail.gmail.com> <k2x1bd550a01005062331qf34279b1j1ad5c9e21ec9f6a0@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2010/5/6 Fernando Apestegu=EDa <fernando.apesteguia@gmail.com>:
> 2010/5/7 Garrett Cooper <yanefbsd@gmail.com>:
>> 2010/5/5 Fernando Apestegu=EDa <fernando.apesteguia@gmail.com>:
>>> Hi all,
>>>
>>> Is there a way to convert a (char *) pointer (or in general any
>>> pointer) to a vm_offset_t type?
>>
>> Be wary that char * is not compat layer friendly though :(...
>
> Ummm... I'm asking this because I want to access an array of strings
> that resides in user space. If I'm not wrong, I need to copy in with
> proc_rwmem the array itself and then, every one of the strings,
> right?. I can easily locate the array through the
> proc->p_sysent->sv_psstrings (that is actually a vm_offset_t), but how
> can I specify the offset for the strings?

    void* is the preferred method I'm told for direct address
translation (32-bit to 32-bit or 64-bit to 64-bit). Not sure about the
compatibility types (kind of why I was waiting for a reply from
someone more knowledgeable). I know the equivalent for Linux, not
FreeBSD [yet].
Thanks,
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?r2k7d6fde3d1005070028q7d10c03t4b652acf8b0c422c>