[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] mincore is potentially unsafe on kernel's older than 2
From: |
Don Maghrak |
Subject: |
[Libunwind-devel] mincore is potentially unsafe on kernel's older than 2.6.21 |
Date: |
Tue, 13 Jul 2010 19:24:01 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 |
Hello,
I recently installed the latest git sources on one of the lab
systems we support which runs a 2.6.18 kernel. The code
autoreconfed and compiled fine. But make check yielded 20
failures out of 26 tests. After reviewing the recent commits
I saw that mincore is used over msync in Ginit.c for x86 and
x86_64 systems.
According to the BUGS section in the manpage for mincore on
my fedora 13 laptop):
BUGS
Before kernel 2.6.21, mincore() did not return correct informa-
tion for MAP_PRIVATE mappings, or for non-linear mappings
(established using remap_file_pages(2)).
The manpage on the affected linux 2.6.18 system states:
BUGS
Up to now (Linux 2.6.5), mincore() does not return correct information
for MAP_PRIVATE mappings.
I edited include/config.h to undefine HAVE_MINCORE and rebuilt
libunwind. With that the only 4 tests fail (which is what I believe
is the expected failure count for x86_64).
Is there a way to have configure ensure that mincore is only
used at linux 2.6.21 or later?
For now we are undefining HAVE_MINCORE in our builds but that makes
deployment on multiple systems difficult.
thanks,
Don