mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re:Re: [PATCH][2.6-mm] Fix 4G/4G X11/vm86 oops
@ 2003-11-18 23:48 Jon Foster
  2003-11-19  3:24 ` Zwane Mwaikambo
  0 siblings, 1 reply; 24+ messages in thread
From: Jon Foster @ 2003-11-18 23:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: zwane

Hi,

> The other thing I've found printks to hide before is timing bugs / races.
> Unfortunately I can't see one here, but maybe someone else can ;-)
> Maybe inserting a 1ms delay or something in place of the printk would
> have the same effect?

One of my colleagues had an interesting bug caused by an
uninitialized variable - a printk() in the right place happened
to set the variable (which gcc had put in a register) to the
correct value for his code to work.

I've tried looking for uses of uninitialized registers in entry.S,
but the assembly there isn't easy to follow.

What happens if you replace the printk with assembly code
that clobbers eax, ecx, edx and (most of) eflags?  (Assuming
I've remembered the calling convention correctly, those are
the registers that printk will be overwriting).

Kind regards,

Jon


^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: 2.6.0-test9-mm3
@ 2003-11-14 21:47 Linus Torvalds
  2003-11-15  0:55 ` 2.6.0-test9-mm3 Zwane Mwaikambo
  0 siblings, 1 reply; 24+ messages in thread
From: Linus Torvalds @ 2003-11-14 21:47 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Zwane Mwaikambo, Andrew Morton, linux-kernel, linux-mm


On Fri, 14 Nov 2003, Martin J. Bligh wrote:
> 
> Linus had some debug thing for triple faults, a few months ago, IIRC ...
> probably in the archives somewhere ...

Triple faults you can't debug, they raise a line outside the CPU, and 
normal PC hardware will cause that to just trigger a reboot.

But double faults do get caught, and that debugging stuff actually is in
the standard kernel. It won't give _nearly_ as good a debug report as a
"normal" oops, since I didn't want the double-fault handler to touch
anything even remotely unsafe, but it often gives a good hint about what
might be wrong. Certainly better than triple-faulting did (which we still
do for _catastrophic_ corruption, eg totally munged kernel page tables etc
- it's just very hard to avoid once you get corrupted enough).

		Linus


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2003-11-20  8:13 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-18 23:48 Re:Re: [PATCH][2.6-mm] Fix 4G/4G X11/vm86 oops Jon Foster
2003-11-19  3:24 ` Zwane Mwaikambo
2003-11-19  5:45   ` Andrew Morton
2003-11-19  6:50     ` Zwane Mwaikambo
2003-11-19  7:24       ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2003-11-14 21:47 2.6.0-test9-mm3 Linus Torvalds
2003-11-15  0:55 ` 2.6.0-test9-mm3 Zwane Mwaikambo
2003-11-15 19:34   ` [PATCH][2.6-mm] Fix 4G/4G X11/vm86 oops Zwane Mwaikambo
2003-11-15 19:52     ` Zwane Mwaikambo
2003-11-17 21:46     ` Zwane Mwaikambo
2003-11-17 22:42       ` Linus Torvalds
2003-11-17 23:01         ` Zwane Mwaikambo
2003-11-17 23:14           ` Zwane Mwaikambo
2003-11-18  7:21             ` Zwane Mwaikambo
2003-11-18 15:47               ` Linus Torvalds
2003-11-18 16:16                 ` Zwane Mwaikambo
2003-11-18 16:37                   ` Linus Torvalds
2003-11-18 17:08                     ` Zwane Mwaikambo
2003-11-18 17:38                       ` Martin J. Bligh
2003-11-18 17:22                         ` Zwane Mwaikambo
2003-11-19 20:32                     ` Matt Mackall
2003-11-19 23:09                       ` Matt Mackall
2003-11-20  7:14                         ` Zwane Mwaikambo
2003-11-20  7:44                         ` Matt Mackall
2003-11-20  7:53                           ` Andrew Morton
2003-11-20  8:13                           ` Matt Mackall

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®