From: Bruce D. <bru...@gm...> - 2007-04-24 20:35:58
|
Doug Chapman wrote: > > On Tue, 2007-04-24 at 13:50 -0500, Bruce Dubbs wrote: > > >> >> In any case, I downloaded ltp-full-20070331.tgz and tried to apply your >> >> patch and got: >> >> >> >> $ patch -Np1 -i ../mincore01.patch >> >> patching file testcases/kernel/syscalls/mincore/mincore01.c >> >> Hunk #1 FAILED at 27. >> >> Hunk #3 FAILED at 95. >> >> Hunk #4 FAILED at 194. >> >> 3 out of 4 hunks FAILED -- saving rejects to file >> >> testcases/kernel/syscalls/mincore/mincore01.c.rej > > > > odd, it applies cleanly for me: > > > > [root@kona1 ~]# rm -rf ltp-full-20070331 > > [root@kona1 ~]# tar zxf ltp-full-20070331.tgz > > [root@kona1 ~]# cd ltp-full-20070331 > > [root@kona1 ltp-full-20070331]# patch -p1 < ../mincore01.patch > > patching file testcases/kernel/syscalls/mincore/mincore01.c > > [root@kona1 ltp-full-20070331]# > > > > > > The patch likely got mangled by your email client. I took the mail and > > saved it as a text file and tried it that way as well and it still > > applied cleanly. I did use your method and it applied cleanly. I'm sure it was me, but I'm not sure why it failed. In any case, its OK. > > I saw your email on that when I went digging through the archives. I > > agree that in theory this case is possible but since it maps the memory > > itself and then runs the test the only way it could fail is if somehow > > it allocated another page and it just happened to end up at the same > > virtual address and the page we just unmapped. > > > > Have you actually seen the test fail (i.e. mincore pass unexpectedly) in > > this way? Yes, but it doesn't always fail. However, I have had it fail and I got others to confirm it. See the thread at starting at: http://linuxfromscratch.org/pipermail/lfs-dev/2007-March/059128.html As I dug through the kernel source to see what was happening, there is no tie between memory being in core and a specific process instance that I could see. The 'unexpected pass' seemed to be specific to IA32 builds. I sent in a patch to LKML to change the functionality of the mincore system call (tie the call to a single mmapped file), but it was rejected. The -21 kernel will return success to an anonymous mmapped region. That will certainly increase the chances that the test will unexpectedly pass. http://lkml.org/lkml/2007/3/22/385 http://lkml.org/lkml/2007/3/25/90 -- Bruce |