Re: No need for 2.4.23 (re compromise)
Mark C <lists@funkypenguin.net> writes:
> same here from the debian sources, but with a few added patches,
> there is no need to download a new kernel, just get the source you have
> for the currently running kernel, apply this patch:
>
> ---------------------- cut ---------------------
> --- 1.31/mm/mmap.c Fri Sep 12 06:44:06 2003
> +++ 1.32/mm/mmap.c Thu Oct 2 01:18:19 2003
> @@ -1041,6 +1041,9 @@
> if (!len)
> return addr;
>
> + if ((addr + len) > TASK_SIZE || (addr + len) < addr)
> + return -EINVAL;
> +
> /*
> * mlock MCL_FUTURE?
> */
> ---------------------- cut ---------------------
>
> and recompile, this was taken originally from, Debian Planet.
With 2.4.21 I get:
$ patch -p1 < mm.patch
patching file mm/mmap.c
Hunk #1 FAILED at 1041.
1 out of 1 hunk FAILED -- saving rejects to file mm/mmap.c.rej
In mmap.c.rej I find:
**************
*** 1041,1046 ****
if (!len)
return addr;
/*
* mlock MCL_FUTURE?
*/
--- 1041,1049 ----
if (!len)
return addr;
+ if ((addr + len) > TASK_SIZE || (addr + len) < addr)
+ return -EINVAL;
+
/*
* mlock MCL_FUTURE?
*/
What am I doing wrong?
Andreas Goesele
--
Omnis enim res, quae dando non deficit, dum habetur et non datur,
nondum habetur, quomodo habenda est.
Augustinus, De doctrina christiana
Reply to: