From 9ea216fc9837eb6922ce365aa3eedafdb8564d94 Mon Sep 17 00:00:00 2001 From: Jeffrey Hutzelman Date: Wed, 8 Nov 2006 18:56:08 +0000 Subject: [PATCH] amd64-better-range-checking-20061108 FIXES 44198 check entire mapped space --- src/afs/LINUX/osi_probe.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/afs/LINUX/osi_probe.c b/src/afs/LINUX/osi_probe.c index d70235d76..06364ca68 100644 --- a/src/afs/LINUX/osi_probe.c +++ b/src/afs/LINUX/osi_probe.c @@ -1010,7 +1010,12 @@ static void *try(probectl *P, tryctl *T, PROBETYPE *aptr, ptr = aptr; #endif if ((unsigned long)ptr < init_mm.start_code || - (unsigned long)ptr > init_mm.end_data) { +#if defined(AFS_AMD64_LINUX20_ENV) + (unsigned long)ptr > init_mm.brk) +#else + (unsigned long)ptr > init_mm.end_data) +#endif + { /* printk("address 0x%lx (from 0x%lx %d) is out of range in check_table. wtf?\n", (unsigned long)x, (unsigned long)ptr, i);*/ continue; } @@ -1119,8 +1124,13 @@ static void *try_harder(probectl *P, PROBETYPE *ptr, unsigned long datalen) printk("<7>osi_probe: %s try_harder\n", P->symbol); #endif for (offset = 0; offset < datalen; offset++, ptr++) { - if ((unsigned long)ptr < init_mm.start_code || - (unsigned long)ptr > init_mm.end_data) { + if ((unsigned long)ptr < init_mm.start_code || +#if defined(AFS_AMD64_LINUX20_ENV) + (unsigned long)ptr > init_mm.brk) +#else + (unsigned long)ptr > init_mm.end_data) +#endif + { /* printk("address 0x%lx (from 0x%lx %d) is out of range in check_table. wtf?\n", (unsigned long)x, (unsigned long)ptr, i);*/ continue; } -- 2.39.5