Re: Unable to handle kernel paging request

Jon Lewis (jlewis@inorganic5.fdt.net)
Mon, 24 Feb 1997 16:11:45 -0500 (EST)


On Mon, 24 Feb 1997, Ion Badulescu wrote:

> Very weird.. I ran it, too, and it simply segfaults, no oops, no state D,
> no problem whatsoever.
>
> There are two possibilities here:
> 1. file "test" doesn't exist, so mmap returns -1 (??? it should return
> NULL), the first attempt to dereference the pointer segfaults, end of
> story.
> 2. file "test" does exist, mmap returns a valid pointer, the first attempt
> to read from that memory region segfaults because of PROT_WRITE protection
> (no reading allowed). End of story.

Odd. I figured I should give it a file to play with, so all my tests were
run with a test file that is a copy of /etc/hosts. It's owned by me and
rw.

> Kernel 2.0.29 with minimal modifications, libc 5.4.23.

libc 5.4.17 here. I compiled the program with debugging, got a core dump,
and gdb says the program segfaulted trying to access a bad memory location
during the strncpy (buf, p, 100).

------------------------------------------------------------------
Jon Lewis <jlewis@fdt.net> | Unsolicited commercial e-mail will
Network Administrator | be proof-read for $199/hr.
________Finger jlewis@inorganic5.fdt.net for PGP public key_______