On Tue, Dec 05, 2000 at 04:13:28PM -0800, Rajagopal Ananthanarayanan wrote:
> In porting XFS to mips64 I ran into a problem where if memmove is called
> with zero length, the code gets into a bogus loop. Ideally, memmove with
> zero length should be a no-op ...
>
> Is it possible to fix this in MIPS64 so we don't have to work-around this
> problem in XFS?
>
> Also, memset & memcpy should also behave similarly --- if called with zero
> length then it should be a no-op.
memcpy, memmove and __copy_{to,from}_user are all unified in one fat
routine, so fixing one will fix all of them.
The bug fix is critical because via copy_{to,from}_user functions that
can be turned into an exploitable DoS attack. 32-bit kernel is also
affected.
memset & clear_user should already handles the zero length problem correctly.
Ralf
|