Subject: Re: copystr
To: David Laight <>
From: Jaromir Dolecek <>
List: tech-kern
Date: 09/03/2002 12:12:52
David Laight wrote:
> > actually, doesn't kernel bcopy() not work for overlapping
> > regions of memory, by design?  they are not exactly the same.
> FWIW memmove() check for overlapped copies and memcpy()
> should not (and would be expected to copy 'forwards').

Yes, this is exactly how our kernel and userland memcpy() and memmove()

There used to be difference between kernel bcopy() and userland
bcopy(), in that userland bcopy() did check and handled overlapping
regions, but kernel bcopy() did not (for performance reasons).
There used to be ovbcopy() in kernel, which did handled overlapping
regions, but it was removed altogether in favour of memmove().

Jaromir Dolecek <>  
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-