mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [Bug 7505] Linux-2.6.18 fails to boot on AMD64 machine
@ 2006-12-20  9:59 Chuck Ebbert
  2006-12-20 10:12 ` Yinghai Lu
  2006-12-20 10:37 ` Andrew Morton
  0 siblings, 2 replies; 37+ messages in thread
From: Chuck Ebbert @ 2006-12-20  9:59 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: ard, take, agalanin, linux-kernel, bugme-daemon,
	Eric W. Biederman, Zhang Yanmin, Andrew Morton

> On 12/19/06, Chuck Ebbert <76306.1226@compuserve.com> wrote:
> > So an external interrupt occurred, the system tried to use interrupt
> > descriptor #39 decimal (irq 7), but the descriptor was invalid.
> 
> but the irq is disabled at that time.
> 
> can you use attached diff to verify if the irq is enable somehow?

But it seems interrupts are on--look at the flags:

        RSP: 0018:ffffffff803cdf68  EFLAGS: 00010246

-- 
MBTI: IXTP

^ permalink raw reply	[flat|nested] 37+ messages in thread
* RE: [Bug 7505] Linux-2.6.18 fails to boot on AMD64 machine
@ 2006-12-22  4:41 Zhang, Yanmin
  2006-12-22  8:22 ` Ard -kwaak- van Breemen
  0 siblings, 1 reply; 37+ messages in thread
From: Zhang, Yanmin @ 2006-12-22  4:41 UTC (permalink / raw)
  To: Ard -kwaak- van Breemen
  Cc: Andrew Morton, Chuck Ebbert, Yinghai Lu, take, agalanin,
	linux-kernel, bugme-daemon, Eric W. Biederman

>>-----Original Message-----
>>From: Ard -kwaak- van Breemen [mailto:ard@telegraafnet.nl]
>>Sent: 2006年12月22日 5:06
>>To: Zhang, Yanmin
>>Cc: Andrew Morton; Chuck Ebbert; Yinghai Lu; take@libero.it; agalanin@mera.ru; linux-kernel@vger.kernel.org;
>>bugme-daemon@bugzilla.kernel.org; Eric W. Biederman
>>Subject: Re: [Bug 7505] Linux-2.6.18 fails to boot on AMD64 machine
>>
>>On Thu, Dec 21, 2006 at 04:04:04PM +0800, Zhang, Yanmin wrote:
>>> I couldn't reproduce it on my EM64T machine. I instrumented function start_kernel and
>>> didn't find irq was enabled before calling init_IRQ. It'll be better if the reporter could
>>> instrument function start_kernel to capture which function enables irq.
>>
>>Editing init/main.c:
>>        preempt_disable();
>>        if (!irqs_disabled())
>>                printk("start_kernel(): bug: interrupts were enabled early\n");
>>                printk("BLAAT17");
>>        build_all_zonelists();
>>        if (!irqs_disabled())
>>                printk("start_kernel(): bug: interrupts were enabled early\n");
>>                printk("BLAAT18");
>>        page_alloc_init();
>>        if (!irqs_disabled())
>>                printk("start_kernel(): bug: interrupts were enabled early\n");
>>                printk("BLAAT19");
>>        printk(KERN_NOTICE "Kernel command line: %s\n", saved_command_line);
>>        parse_early_param();
>>        if (!irqs_disabled())
>>                printk("start_kernel(): bug: interrupts were enabled early\n");
>>                printk("BLAAT20");
>>        parse_args("Booting kernel", command_line, __start___param,
>>                   __stop___param - __start___param,
>>                   &unknown_bootoption);
>>                printk("BLAAT21");
>>        if (!irqs_disabled())
>>                printk("start_kernel(): bug: interrupts were enabled early\n");
>>        sort_main_extable();
>>        if (!irqs_disabled())
>>                printk("start_kernel(): bug: interrupts were enabled early\n");
>>                printk("BLAAT22");
>>        trap_init();
>>        if (!irqs_disabled())
>>                printk("start_kernel(): bug: interrupts were enabled early\n");
>>                printk("BLAAT23");
>>
>>Results in:
>>^MAllocating PCI resources starting at 88000000 (gap: 80000000:60000000)
>>^MBLAAT12BLAAT13<6>PERCPU: Allocating 32960 bytes of per cpu data
>>^MBLAAT14BLAAT15BLAAT16BLAAT17Built 2 zonelists.  Total pages: 1032635
>>^MBLAAT18BLAAT19<5>Kernel command line: console=tty0 console=ttyS0,115200 hdb=noprobe hdc=noprobe hdd=noprobe root=/dev/md0 ro panic=30
>>earlyprintk=serial,ttyS0,115200
>>^MBLAAT20<6>ide_setup: hdb=noprobe
>>^Mide_setup: hdc=noprobe
>>^Mide_setup: hdd=noprobe
>>^MBLAAT21start_kernel(): bug: interrupts were enabled early
>>^Mstart_kernel(): bug: interrupts were enabled early
>>^MBLAAT22Initializing CPU#0
>>
>>Hmmm, that actually doesn't make sense to me (unless parse_args is able to enable irq's).
I think parse_args enables irq when it calls callbacks.
Could you try below?
1) Test Andrew's patch of sema down_write;
2) Apply below patch and see what the output is when booting. If the output has
"[BUG]..address.", Pls. map the address to function name by System.map.

--- linux-2.6.19/kernel/params.c	2006-12-08 15:32:49.000000000 +0800
+++ linux-2.6.19_work/kernel/params.c	2006-12-22 12:28:38.000000000 +0800
@@ -53,13 +53,22 @@ static int parse_one(char *param,
 		     int (*handle_unknown)(char *param, char *val))
 {
 	unsigned int i;
+	int result;
+	int irq_is_disabled;
 
 	/* Find parameter */
 	for (i = 0; i < num_params; i++) {
 		if (parameq(param, params[i].name)) {
 			DEBUGP("They are equal!  Calling %p\n",
 			       params[i].set);
-			return params[i].set(val, &params[i]);
+			irq_is_disabled = irqs_disabled();
+			result = params[i].set(val, &params[i]);
+			if (irq_is_disabled && !irqs_disabled())
+			{
+				printk("[BUG] parse_one: function %p enabled irq!\n",
+						params[i].set);
+			}
+			return result;
 		}
 	}
 
--- linux-2.6.19/init/main.c	2006-12-08 15:32:49.000000000 +0800
+++ linux-2.6.19_work/init/main.c	2006-12-22 12:28:50.000000000 +0800
@@ -181,6 +181,7 @@ static int __init obsolete_checksetup(ch
 {
 	struct obs_kernel_param *p;
 	int had_early_param = 0;
+	int result, irq_is_disabled;
 
 	p = __setup_start;
 	do {
@@ -197,8 +198,17 @@ static int __init obsolete_checksetup(ch
 				printk(KERN_WARNING "Parameter %s is obsolete,"
 				       " ignored\n", p->str);
 				return 1;
-			} else if (p->setup_func(line + n))
-				return 1;
+			} else {
+				irq_is_disabled = irqs_disabled();
+				result = p->setup_func(line + n);
+				if (irq_is_disabled && !irqs_disabled())
+				{
+					printk("[BUG] obsolete_checksetup: function %p enabled irq!\n",
+							p->setup_func);
+				}
+				if (result)
+					return 1;
+			}
 		}
 		p++;
 	} while (p < __setup_end);

^ permalink raw reply	[flat|nested] 37+ messages in thread
* RE: [Bug 7505] Linux-2.6.18 fails to boot on AMD64 machine
@ 2006-12-21  8:04 Zhang, Yanmin
  2006-12-21 19:52 ` Ard -kwaak- van Breemen
                   ` (2 more replies)
  0 siblings, 3 replies; 37+ messages in thread
From: Zhang, Yanmin @ 2006-12-21  8:04 UTC (permalink / raw)
  To: Andrew Morton, Chuck Ebbert
  Cc: Yinghai Lu, ard, take, agalanin, linux-kernel, bugme-daemon,
	Eric W. Biederman

>>-----Original Message-----
>>From: Andrew Morton [mailto:akpm@osdl.org]
>>Sent: 2006年12月20日 18:38
>>To: Chuck Ebbert
>>Cc: Yinghai Lu; ard@telegraafnet.nl; take@libero.it; agalanin@mera.ru; linux-kernel@vger.kernel.org; bugme-daemon@bugzilla.kernel.org;
>>Eric W. Biederman; Zhang, Yanmin
>>Subject: Re: [Bug 7505] Linux-2.6.18 fails to boot on AMD64 machine
>>
>>On Wed, 20 Dec 2006 04:59:19 -0500
>>Chuck Ebbert <76306.1226@compuserve.com> wrote:
>>
>>> > On 12/19/06, Chuck Ebbert <76306.1226@compuserve.com> wrote:
>>> > > So an external interrupt occurred, the system tried to use interrupt
>>> > > descriptor #39 decimal (irq 7), but the descriptor was invalid.
>>> >
>>> > but the irq is disabled at that time.
>>> >
>>> > can you use attached diff to verify if the irq is enable somehow?
>>>
>>> But it seems interrupts are on--look at the flags:
>>>
>>>         RSP: 0018:ffffffff803cdf68  EFLAGS: 00010246
>>>
>>
>>down_write()->__down_write()->__down_write_nested()->spin_unlock_irq()->dead
>>
>>Could someone please test this?
I couldn't reproduce it on my EM64T machine. I instrumented function start_kernel and
didn't find irq was enabled before calling init_IRQ. It'll be better if the reporter could
instrument function start_kernel to capture which function enables irq.

^ permalink raw reply	[flat|nested] 37+ messages in thread
* Re: [Bug 7505] Linux-2.6.18 fails to boot on AMD64 machine
@ 2006-12-20  6:42 Chuck Ebbert
  2006-12-20  9:11 ` Yinghai Lu
  0 siblings, 1 reply; 37+ messages in thread
From: Chuck Ebbert @ 2006-12-20  6:42 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Zhang Yanmin, Eric W. Biederman, bugme-daemon, linux-kernel

In-Reply-To: <20061219172900.37312b38.akpm@osdl.org>

On Tue, 19 Dec 2006 17:29:00 -0800, Andrew Morton wrote:

> Quoting the bug report:

> general protection fault: 013b [1] PREEMPT 

That '013b' is critical information.

Bit 0: 1: exception source is external to the processor
Bit 1: 1: there is a problem with an interrupt descriptor in the IDT
Bit 2: n/a
Bits 15-3: index of the problem descriptor

So an external interrupt occurred, the system tried to use interrupt
descriptor #39 decimal (irq 7), but the descriptor was invalid.
-- 
MBTI: IXTP


^ permalink raw reply	[flat|nested] 37+ messages in thread
[parent not found: <200612181543.kBIFhcIc001555@fire-2.osdl.org>]

end of thread, other threads:[~2006-12-29 15:42 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-20  9:59 [Bug 7505] Linux-2.6.18 fails to boot on AMD64 machine Chuck Ebbert
2006-12-20 10:12 ` Yinghai Lu
2006-12-20 10:37 ` Andrew Morton
2006-12-20 10:55   ` Arjan van de Ven
  -- strict thread matches above, loose matches on Subject: below --
2006-12-22  4:41 Zhang, Yanmin
2006-12-22  8:22 ` Ard -kwaak- van Breemen
2006-12-22  8:30   ` Andrew Morton
2006-12-22  9:32     ` Stefano Takekawa
2006-12-22  9:43       ` Andrew Morton
2006-12-22 13:23         ` Stefano Takekawa
2006-12-22 10:30     ` Ard -kwaak- van Breemen
2006-12-22 14:00       ` Ard -kwaak- van Breemen
2006-12-22 14:16         ` Ard -kwaak- van Breemen
2006-12-22 19:10           ` Andrew Morton
2006-12-22 14:35     ` Ard -kwaak- van Breemen
2006-12-29 15:08       ` Ard -kwaak- van Breemen
2006-12-22 14:41     ` Ard -kwaak- van Breemen
2006-12-22 15:42       ` Ard -kwaak- van Breemen
2006-12-28 23:51         ` Andrew Morton
2006-12-29 10:18           ` Stefano Takekawa
2006-12-29 12:51           ` Ard -kwaak- van Breemen
2006-12-29 13:27             ` Ard -kwaak- van Breemen
2006-12-29 14:10               ` Ard -kwaak- van Breemen
2006-12-29 15:01                 ` Ard -kwaak- van Breemen
2006-12-29 15:05                   ` Ard -kwaak- van Breemen
2006-12-29 15:24                   ` Ard -kwaak- van Breemen
2006-12-29 15:42                   ` Ard -kwaak- van Breemen
2006-12-21  8:04 Zhang, Yanmin
2006-12-21 19:52 ` Ard -kwaak- van Breemen
2006-12-21 20:11   ` Andrew Morton
2006-12-21 21:05 ` Ard -kwaak- van Breemen
2006-12-22 18:42 ` Ard -kwaak- van Breemen
2006-12-22 19:39   ` Stefano Takekawa
2006-12-20  6:42 Chuck Ebbert
2006-12-20  9:11 ` Yinghai Lu
     [not found] <200612181543.kBIFhcIc001555@fire-2.osdl.org>
2006-12-18 16:48 ` Eric W. Biederman
2006-12-20  1:29   ` Andrew Morton

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

all inboxes | Powered by JetHome®