CopyOut Size Limits

Joerg Sonnenberger joerg at britannica.bec.de
Fri Apr 25 15:36:59 UTC 2008


On Fri, Apr 25, 2008 at 09:59:55AM -0400, Adam wrote:
> Hi, I am writing a custom system call that needs to transfer 16kb of data 
> from the kernel to userspace. I am transferring the data out of the kernel 
> by using copyout.  This seems to work for a small struct of data < 4k.

You are not allowed to use more than a bit of stack space. You are
placing a of data on the stack and the kernel stack is typically only a
few pages long. Use malloc for this.

Joerg


More information about the freebsd-hackers mailing list