Date: Mon, 08 Apr 2013 23:18:52 -0700 From: Xin Li <delphij@delphij.net> To: freebsd-hackers@freebsd.org Subject: Re: copyinstr() Message-ID: <5163B2CC.8080004@delphij.net> In-Reply-To: <CALCNsJTtf5UCwGXb5eO8kESQG9GFqyT8%2B6BXdTjfzJ%2BjLW=_CQ@mail.gmail.com> References: <CALCNsJTtf5UCwGXb5eO8kESQG9GFqyT8%2B6BXdTjfzJ%2BjLW=_CQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 4/8/13 6:15 PM, Vijay Singh wrote: > Hi, I was looking for some help with copyinstr() on an amd64 > platform. > > My from address happens to be in the kernel (stack). I am getting > an EFAULT, and I am wondering how to fix that. Since you are doing a copy*in*str, I think "from" address would be the uaddr? In that case, it should be a userland address... > Would using memory from malloc() make a difference? Maybe not... EFAULT means the address is not valid. Cheers, -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJRY7LMAAoJEG80Jeu8UPuzXRcH+gOoKAIelHbF2tp78HHgp0+b zuRF+Cj8mBOxJEyS3zpKEVKdq8HgYEJRq39Tkp2c60xwYOUcU0HRU6ixTJ0whZFo Gbx7tBbp4+89TtkPVm/u/JlqeToQNuQSFJBxNGi1qOjPpJQfuClPQ9EI4N4LDesh g8B7D5N4YoIUhLkg2FEix7c3XrzTeDRCfXYsfHna4f3VMrlNze0R61TpRqh6qx8/ eJDBA25m6+Y6129qo8wdkOZWLT6ZSIPrc6WgQuCP3jTYJemhiM1RdTFLqM87PNBd EGuL1+FGgDUzhieJoOx/FhD01Cypc7/Qs6pxaF1BGxpCaL0SPFyBJ+WBnv9A7DA= =iMeL -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5163B2CC.8080004>