[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [John Goerzen <jgoerzen@complete.org>] Kernel oops in read()



Jay Estabrook <Jay.Estabrook@compaq.com> writes:

> On Thu, Jun 01, 2000 at 08:33:30PM -0500, John Goerzen wrote:
> > 
> > This is kernel 2.2.15 or 2.2.16pre7 (same on both).  The following
> > test program, run as *ANY* user on the system (not just root), causes
> > a segfault (expected) and a kernel oops every time it is run.
> 
> Why do you say that a segfault is expected, because x86 does?

Well I guess I generally expect a segfault when I read data into 0x0
:-)  Not sure that it is proper for read(2) to be divergent or not (is
this POSIX?)  

> >From what I can see of the "read" semantics, IMHO, "read" would be
> justified (on *any* architecture) in returning an error indicating a
> bad address was specified, and no segfault need actually occur or be
> delivered to the user process.
> 
> Proper behavior for that program, again IMHO, thus is an infinite loop
> of failing "reads", because the EFAULT return error is being ignored.
> 
> But yes, of course the Oops is wrong; I have patches to fix that,
> ready for 2.2.16 and 2.4.0-test1.

Excellent!

-- 
John Goerzen <jgoerzen@complete.org>                       www.complete.org
Sr. Software Developer, Progeny Linux Systems, Inc.    www.progenylinux.com
#include <std_disclaimer.h>                     <jgoerzen@progenylinux.com>
The 13,112,877th prime number is 239,059,897.



Reply to: