Re: Kernel oops in read()

From: David Addison (addy@quadrics.com)
Date: Mon Jun 05 2000 - 03:58:28 EST


Hmmm, I have posted stuff before about very simple system calls causing oops on
axp linux.
(See 'vmlinux .got size > 64k and Oops' posted 31/3/2000 on axp-list)

It seems that the standard RH kernel builds (certainly 6.0, 6.1) generate
kernels under which
the got table size is >64k. This breaks the exception table handling in the
kernel.
So when system calls do protected reads from user space they are not actually
protected
and generate oops if the user supplies bad addresses.

Anyway the fix/workaround is to uncomment the -relax option in the
arch/alpha/Makefile.
This (in most cases) reduces the got table to be <64k and so avoids the problem.

Perhaps RedHat should start doing this by default too ?

Addy.

Larry Sendlosky wrote:

> Resend - I forgot to include kernel version on XP1000, and original
> mail had bogus mail addr for axp-list..... larry
>
> On a DP264 running 2.4-test1 (RedHat 6.1, or 6.2, I forget) libc 2.1.3.
> Program loops and strace shows
>
> read(3, 0, 1768849408) = -1 EFAULT (Bad address)
> read(3, 0, 1768849408) = -1 EFAULT (Bad address)
> ....
>
> On a XP1000 2.2.15 with RedHat 6.1, libc 2.1.2
> The program segfaults..
>
> > ./test
> fd = 3
> Segmentation fault
> >
>
> > 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. (Note:
> > this malloc is supposed to fail. If it gets that much RAM on your
> > system, buy a slower box <g>)
> >

-
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 : Wed Jun 07 2000 - 21:00:20 EST