Re: Should this happen?

From: Jes Sorensen (Jes.Sorensen@cern.ch)
Date: Fri May 05 2000 - 08:57:17 EST


>>>>> "Craig" == Craig Whitmore <craig@igrin.co.nz> writes:

Craig> 1. (*) text/plain ( ) text/html With 2.3.99-pre6 (haven't
Craig> checked any other versions)

Please switch off the html junk

Craig> [root@lennon /proc]# more misc Segmentation fault [root@lennon
Craig> /proc]# cat misc 175 agpgart 63 tdfx 1 psaux

Craig> I don't think this should happen..

from 'strace -f more /proc/misc'

stat("/proc/misc", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
open("/proc/misc", O_RDONLY) = 3
read(3, "135 rtc\n134 apm\n 1 psaux\n", 2) = 26
read(3, "", 4294967272) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000
_llseek(3, 0, [0], SEEK_SET) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

Note the mmap - you're not supposed to mmap() a /proc file - question
is whether we need to change the kernel to report an error on a mmap()
in /proc.

Jes

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:17 EST