From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 31934 invoked from network); 5 Jun 2000 08:58:35 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 5 Jun 2000 08:58:35 -0000 Received: from diplodocus.quadrics.com (diplodocus.quadrics.com [194.202.174.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id EAA09238 for ; Mon, 5 Jun 2000 04:58:34 -0400 Received: from quadrics.com (diplodocus [194.202.174.2]) by diplodocus.quadrics.com (8.9.3/8.9.3) with ESMTP id JAA24199; Mon, 5 Jun 2000 09:58:28 +0100 (BST) Sender: addy@quadrics.com Message-ID: <393B6BB4.FB5438A0@quadrics.com> Date: Mon, 05 Jun 2000 09:58:28 +0100 From: David Addison Organization: Quadrics Supercomputers World X-Mailer: Mozilla 4.72 [en] (X11; I; SunOS 5.6 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com CC: jgoerzen@complete.org, linux-kernel@vger.rutgers.edu, dhd@debian.org Subject: Re: Kernel oops in read() References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 ) > >