Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: bert hubert <ahu@vvtp.tn.tudelft.nl>
Subject: Re: Regarding earlier mail, compiling joe, Oops &amp; VFS weirdness..
Date: Thu, 1 May 1997 03:37:51 +0200 (MET DST)	[thread overview]
Message-ID: <c1df85527edf39633833881b56a46dba.axp-list@archive.invalid> (raw)
In-Reply-To: <Pine.LNX.3.91.970430232724.1110B-100000@vvtp.tn.tudelft.nl>

On Wed, 30 Apr 1997, bert hubert wrote:

> In my mail from yesterday I mentioned that sometimes it caused an Oops 0 
> message, and quoted it, but also said that it sometimes gave VFS errors. 
> I have now been able to reproduce this one:

Ok, I've sussed it! It turns out that this is a bug relevant to (at 
least) linux 2.0.27 to 2.1.24, all platforms! That is, unless I'm 
terribly mistaken, this is only my second attempt at kernel-hacking.

When trying to dump core on an ELF system, it includes the first 80 bytes 
of arguments which were passed to the program. This is an char arguments[80] 
kind of string. If more than 80 characters were passed, the string is 
terminated like this: arguments[80]=0;, which results in an overrun to 
the inode pointer!

To fix this, use something like this patch, which works on anything I've 
tried since 2.0.27:

--- binfmt_elf.c	Thu May  1 03:27:19 1997
+++ binfmt_elf.c        Thu May  1 03:28:05 1997
@@ -1146,7 +1146,7 @@
                for(i = 0; i < len; i++)
                        if (psinfo.pr_psargs[i] == 0)
                                psinfo.pr_psargs[i] = ' ';
-               psinfo.pr_psargs[len] = 0;
+               psinfo.pr_psargs[len-1] = 0;

                set_fs(KERNEL_DS);
        }

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

       reply	other threads:[~1997-05-01  1:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.3.91.970430232724.1110B-100000@vvtp.tn.tudelft.nl>
1997-05-01  1:37 ` bert hubert [this message]
1997-04-30 21:38 Regarding earlier mail, compiling joe, Oops &amp; VFS weirdness bert hubert
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox