picking apart a source package (regards kernel mremap() patch)
After some google-ing, I found the recent mremap() kernel patch. I've
tacked it to the end of this message just for completeness.
How could I have gotten this information using Debian tools and/or
infrastructure (rather than google etc.)?
I tried:
apt-get update
apt-get source kernel-source-2.4.18
... which I know from http://www.debian.org/security/2004/dsa-413 has
the diff in there, but it's not separated out into a debian/patches
directory like I've seen in some source packages; it's combined with
many other patches in a single file:
kernel-source-2.4.18_2.4.18-14.1.diff.gz
Should I stick to google or is there a better way...?
Thanks,
- Tor (Redhat Oldie, Debian Newbie)
PS -
Is a debian/patches directory (a la dpatch or dbs) for source archives
the wave of the future? It seems preferable to me (but then, I'm not
a maintainer...).
------------------------------------------------------------------------
--- kernel-source-2.4.18-2.4.18.orig/mm/mremap.c
+++ kernel-source-2.4.18-2.4.18/mm/mremap.c
@@ -236,6 +236,14 @@
if (new_len > TASK_SIZE || new_addr > TASK_SIZE - new_len)
goto out;
+
+ /*
+ * Allow new_len == 0 only if new_addr == addr
+ * to preserve truncation in place (that was working
+ * safe and some app may depend on it).
+ */
+ if (unlikely(!new_len && new_addr != addr))
+ goto out;
/* Check if the location we're moving into overlaps * the
* old location at all, and fail if it does.
Reply to: