public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
From: "Riley Williams" <Riley@Williams.Name>
To: Raghavan <raghavan.viswanathan@wipro.com>
Cc: Linux-8086@Vger.Kernel.Org
Subject: Re: sys_execve("/bin/init",args,18) => 65528
Date: Fri, 11 Jul 2003 19:35:56 +0100	[thread overview]
Message-ID: <BKEGKPICNAKILKJKMHCAGEFNENAA.Riley@Williams.Name> (raw)
In-Reply-To: <0afa01c3476e$f723a970$8c06770a@wipro.com>

[-- Attachment #1: Type: text/plain, Size: 1890 bytes --]

Hi.

 > I  am new to ELKS.
 >
 > I am using elks-0.1.1,elksnet-0.1.1, elkscmd_20020501.tar.gz,
 > Dev86src-0.16.11.tar.gz and I am compiling on a Pentium - Linux
 > Kernel 2.4. I have been able to compile and get all the Binaries.
 > The boot floppy comes up fine. The root floppy is giving me a
 > panic.
 >
 > ***********************
 >
 > ELKS version 0.1.1
 > fd: probing disc in /dev/fd1
 > fd: /dev/fd1 probably has 18 sectors and 80 cylinders
 > VFS: Mounted root (minix filesystem).
 > Loading init
 > sys_execve("/bin/init",args,18) => 65528.

That 65528 is -6 written as an unsigned integer, and indicates a bug
in the printk routine (more specifically in the numout() routine it
calls to actually display the values). I have just committed a patch
to fix that bug, and the patch is enclosed.

 > panic: Oops - trying to access dir
 > apparant call stack:
 > (0) ret addr = 3296 params =  67B4 26C4 2 26D0 2F64 0
 > (1) ret addr = 33F4 params =  3D6 26EA 26EC 67B4 26E6 80
 > (2) ret addr = 35C3 params =  3D6 3 8000 2706 0 3
 > (3) ret addr = 41C0 params =  3D6 2 0 310 FFF8 2268
 > (4) ret addr = 103 params =  0 0 0 0 0 0
 > (5) ret addr = 0 params =  2268 A9 9FC0 2C74 3FF2 1E
 > (6) ret addr = 9C params =  E120 1DA4 E5EC 0 0 1

We really need something to convert those return addresses into actual
routine names, as the addresses themselves are basically meaningless 8(

 > I saw an identical posting by Mark Robson in Mar 03. I did not
 > find a solution to it. It looks like the init is not able to get
 > executed. Has anybody faced this problem ?

Unfortunately, I can't help with your problem itself. Sorry.

Best wishes from Riley.
---
 * Nothing as pretty as a smile, nothing as ugly as a frown.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.500 / Virus Database: 298 - Release Date: 10-Jul-2003

[-- Attachment #2: printk.diff --]
[-- Type: application/octet-stream, Size: 1407 bytes --]

Index: elks/kernel/printk.c
===================================================================
RCS file: /cvsroot/elks/elks/kernel/printk.c,v
retrieving revision 1.11
diff -u -5 -u -r1.11 printk.c
--- elks/kernel/printk.c	22 Jun 2002 09:28:21 -0000	1.11
+++ elks/kernel/printk.c	11 Jul 2003 18:32:10 -0000
@@ -78,33 +78,35 @@
 /************************************************************************
  *
  *	Output a number
  */
 
-char *hex_string = "0123456789ABCDEF"; /* Also used by devices. */
+char *hex_string = "0123456789ABCDEF";		/* Also used by devices. */
 
 static void numout(char *ptr, int len, int base, int useSign)
 {
+    long int vs;
     unsigned long int v;
     register char *bp;
     char buf[16];
 
     bp = buf + 15;
 
-    v = (len == 2)
-	? *((unsigned short *) ptr)
-	: *((unsigned long *) ptr);
-
-    if (useSign && (((long)v) < 0)) {
-	v = -v;
-	*bp = '-';
-	con_write(bp, 1);
-    }
+    if (useSign) {
+	vs = (len == 2) ? *((short *) ptr) : *((long *) ptr);
+	if (vs < 0) {
+	    v = - vs;
+	    *bp = '-';
+	    con_write(bp, 1);
+	} else
+	    v = vs;
+    } else
+	v = (len == 2) ? *((unsigned short *) ptr) : *((unsigned long *) ptr);
 
     *bp = 0;
     do {
-	*--bp = hex_string[(v % base)]; /* Store digit. */
+	*--bp = hex_string[(v % base)]; 	/* Store digit. */
     } while ((v /= base) && (bp > buf));
 
     con_write(bp, buf - bp + sizeof(buf) - 1);
 }
 

  reply	other threads:[~2003-07-11 18:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-11  5:40 sys_execve("/bin/init",args,18) => 65528 Raghavan
2003-07-11 18:35 ` Riley Williams [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-07-11  5:47 Raghavan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BKEGKPICNAKILKJKMHCAGEFNENAA.Riley@Williams.Name \
    --to=riley@williams.name \
    --cc=Linux-8086@Vger.Kernel.Org \
    --cc=raghavan.viswanathan@wipro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox