Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2008 17:35:12 +0200
From:      Joerg Sonnenberger <joerg@britannica.bec.de>
To:        freebsd-hackers@freebsd.org
Subject:   Re: CopyOut Size Limits
Message-ID:  <20080425153511.GB11467@britannica.bec.de>
In-Reply-To: <DAB770F2-C987-4AEB-BD02-BD1AEF099702@signallake.com>
References:  <DAB770F2-C987-4AEB-BD02-BD1AEF099702@signallake.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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