public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kernel mode console
@ 2004-03-03  3:52 Billy Rose
  2004-03-03  3:57 ` H. Peter Anvin
  2004-03-03 16:49 ` Tim Bird
  0 siblings, 2 replies; 9+ messages in thread
From: Billy Rose @ 2004-03-03  3:52 UTC (permalink / raw)
  To: linux-kernel

i have some bandwidth i can dedicate to writting a kernel module that provides 
a command interpreter running in kernel space (think of it as the god mode 
console in quake). the purpose for this would be primarily aimed at the 
kernel developers so they can reach in and grab variables, dump certain 
sections of memory, walk memory, dump code segments, dump processes 
(including the kernel data structures for them), anything else i/you can 
think of. is this a waste of time, or would that get used?

-------------------
. ~billyrose/make

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

* Re: kernel mode console
  2004-03-03  3:52 kernel mode console Billy Rose
@ 2004-03-03  3:57 ` H. Peter Anvin
  2004-03-03 17:09   ` Matt Mackall
  2004-03-03 16:49 ` Tim Bird
  1 sibling, 1 reply; 9+ messages in thread
From: H. Peter Anvin @ 2004-03-03  3:57 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <200403022152.06950.billyrose@cox-internet.com>
By author:    Billy Rose <billyrose@cox-internet.com>
In newsgroup: linux.dev.kernel
>
> i have some bandwidth i can dedicate to writting a kernel module that provides 
> a command interpreter running in kernel space (think of it as the god mode 
> console in quake). the purpose for this would be primarily aimed at the 
> kernel developers so they can reach in and grab variables, dump certain 
> sections of memory, walk memory, dump code segments, dump processes 
> (including the kernel data structures for them), anything else i/you can 
> think of. is this a waste of time, or would that get used?
> 

Google(kgdb).

	-hpa

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

* Re: kernel mode console
  2004-03-03  3:52 kernel mode console Billy Rose
  2004-03-03  3:57 ` H. Peter Anvin
@ 2004-03-03 16:49 ` Tim Bird
  2004-03-04  4:12   ` Krishnakumar. R
  1 sibling, 1 reply; 9+ messages in thread
From: Tim Bird @ 2004-03-03 16:49 UTC (permalink / raw)
  To: Billy Rose; +Cc: linux-kernel

Billy Rose wrote:
> i have some bandwidth i can dedicate to writting a kernel module that provides 
> a command interpreter running in kernel space (think of it as the god mode 
> console in quake). the purpose for this would be primarily aimed at the 
> kernel developers so they can reach in and grab variables, dump certain 
> sections of memory, walk memory, dump code segments, dump processes 
> (including the kernel data structures for them), anything else i/you can 
> think of. is this a waste of time, or would that get used?

I think it would be valuable, especially for embedded developers
when they have trouble getting user space up on a new platform.
Also, it could be something simple and solid.  It's a pain to
set up a remote debug session just to poke around in the kernel.
Remote debug setup is complex and often fragile.

I'd be willing to test this if you get something running, and
give you some feedback.  For me, it would be best if the module
could be statically linked.

How do you plan to handle symbolic information?

=============================
Tim Bird
Architecture Group Co-Chair
CE Linux Forum
Senior Staff Engineer
Sony Electronics
E-mail: Tim.Bird@am.sony.com
=============================


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

* Re: kernel mode console
  2004-03-03  3:57 ` H. Peter Anvin
@ 2004-03-03 17:09   ` Matt Mackall
  0 siblings, 0 replies; 9+ messages in thread
From: Matt Mackall @ 2004-03-03 17:09 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: linux-kernel

On Wed, Mar 03, 2004 at 03:57:24AM +0000, H. Peter Anvin wrote:
> Followup to:  <200403022152.06950.billyrose@cox-internet.com>
> By author:    Billy Rose <billyrose@cox-internet.com>
> In newsgroup: linux.dev.kernel
> >
> > i have some bandwidth i can dedicate to writting a kernel module that provides 
> > a command interpreter running in kernel space (think of it as the god mode 
> > console in quake). the purpose for this would be primarily aimed at the 
> > kernel developers so they can reach in and grab variables, dump certain 
> > sections of memory, walk memory, dump code segments, dump processes 
> > (including the kernel data structures for them), anything else i/you can 
> > think of. is this a waste of time, or would that get used?
> > 
> 
> Google(kgdb).

Or kdb for that matter.

-- 
Matt Mackall : http://www.selenic.com : Linux development and consulting

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

* Re: kernel mode console
       [not found] <200403022152.06950.billyrose@cox-internet.com.suse.lists.linux.kernel>
@ 2004-03-03 17:18 ` Andi Kleen
  0 siblings, 0 replies; 9+ messages in thread
From: Andi Kleen @ 2004-03-03 17:18 UTC (permalink / raw)
  To: Billy Rose; +Cc: linux-kernel

Billy Rose <billyrose@cox-internet.com> writes:

> i have some bandwidth i can dedicate to writting a kernel module that provides 
> a command interpreter running in kernel space (think of it as the god mode 
> console in quake). the purpose for this would be primarily aimed at the 
> kernel developers so they can reach in and grab variables, dump certain 
> sections of memory, walk memory, dump code segments, dump processes 
> (including the kernel data structures for them), anything else i/you can 
> think of. is this a waste of time, or would that get used?

It sounds like you're trying to reinvent kdb, sysrq, kgdb, lcrash/crash,
gdb vmlinux /proc/vmlinux

-Andi

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

* Re: kernel mode console
  2004-03-03 16:49 ` Tim Bird
@ 2004-03-04  4:12   ` Krishnakumar. R
  2004-03-05  0:58     ` Billy Rose
  0 siblings, 1 reply; 9+ messages in thread
From: Krishnakumar. R @ 2004-03-04  4:12 UTC (permalink / raw)
  To: Tim Bird, Billy Rose; +Cc: linux-kernel

Hi,

> set up a remote debug session just to poke around in the kernel.
> Remote debug setup is complex and often fragile.

There is framework called "Kprobes" available, which may
be of use in the cases were remote debugging is a no-no.

After you have applied the kprobes patch, you can put probes
at different portions of the kernel and can dump registers
variables etc.

More details can be found at  
http://www-124.ibm.com/linux/projects/kprobes.


Regards,
KK.
-- 
HomePage: http://puggy.symonds.net/~krishnakumar



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

* Re: kernel mode console
  2004-03-04  4:12   ` Krishnakumar. R
@ 2004-03-05  0:58     ` Billy Rose
  2004-03-05  3:20       ` Rob Couto
  2004-03-05 11:47       ` John Bradford
  0 siblings, 2 replies; 9+ messages in thread
From: Billy Rose @ 2004-03-05  0:58 UTC (permalink / raw)
  To: krishnakumar, Tim Bird; +Cc: linux-kernel

On Wednesday 03 March 2004 10:12 pm, Krishnakumar. R wrote:
> Hi,
>
> > set up a remote debug session just to poke around in the kernel.
> > Remote debug setup is complex and often fragile.
>
> There is framework called "Kprobes" available, which may
> be of use in the cases were remote debugging is a no-no.
>
> After you have applied the kprobes patch, you can put probes
> at different portions of the kernel and can dump registers
> variables etc.
>
> More details can be found at
> http://www-124.ibm.com/linux/projects/kprobes.
>
>
> Regards,
> KK.

i think perhaps i need to expound upon what i have a vision of. a kernel mode 
console is just that: a console designed to run in kernel mode. it could have 
built in commands to allow for quick and dirty examination of stuff (anything 
really, like memory dumps) and a command processor for scripted stuff, but 
the true power of it comes in when you issue a command that is not internal 
to the console. it could run a special debugger, an application that installs 
a probe, a memory monitor, etc., etc. in short it is not a debugger per-say, 
but a "god mode" console for the linux kernel. that is what i had a vision 
of. the executables it would run would necessarily be compiled for that. 
again, i ask is that worth the time coding it?
-- 
. ~billyrose/make

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

* Re: kernel mode console
  2004-03-05  0:58     ` Billy Rose
@ 2004-03-05  3:20       ` Rob Couto
  2004-03-05 11:47       ` John Bradford
  1 sibling, 0 replies; 9+ messages in thread
From: Rob Couto @ 2004-03-05  3:20 UTC (permalink / raw)
  To: Billy Rose; +Cc: linux-kernel

On Thursday 04 March 2004 07:58 pm, you wrote:
> i think perhaps i need to expound upon what i have a vision of. a kernel
> mode console is just that: a console designed to run in kernel mode. it
> could have built in commands to allow for quick and dirty examination of
> stuff (anything really, like memory dumps) and a command processor for
> scripted stuff, but the true power of it comes in when you issue a command
> that is not internal to the console. it could run a special debugger, an
> application that installs a probe, a memory monitor, etc., etc. in short it
> is not a debugger per-say, but a "god mode" console for the linux kernel.
> that is what i had a vision of. the executables it would run would
> necessarily be compiled for that. again, i ask is that worth the time
> coding it?

a kbash? ksh is taken... kash would become instantly confusing to some 
english-speakers... fun for some, but others would hear it and think 'cache' 
and immediately be thrown out of sync ;)

you could extend proc (or is it just sys?) that way, creating files that can 
trigger events ('echo (desired range) > /proc/sh/memdump/range', 'echo 1 
> /proc/sh/memdump/go' or even simply 'cat /proc/sh/memdump/out' after 
inputting range) and stick with the cat/echo control... some of your 
userspace shell's commands could simply be wrappers for ordinary 'echo foo 
> /proc/foo' already

OTOH, someone said proc's been abused already, having it do things that aren't 
its job and causing disorganization in the kernel. i dunno, that's why im not 
in charge

-- 
Rob Couto
rpc@cafe4111.org
Rules for computing success:
1) Attitude is no substitute for competence.
2) Ease of use is no substitute for power.
3) Safety matters; use a static-free hammer.
--

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

* Re: kernel mode console
  2004-03-05  0:58     ` Billy Rose
  2004-03-05  3:20       ` Rob Couto
@ 2004-03-05 11:47       ` John Bradford
  1 sibling, 0 replies; 9+ messages in thread
From: John Bradford @ 2004-03-05 11:47 UTC (permalink / raw)
  To: Billy Rose, krishnakumar, Tim Bird; +Cc: linux-kernel

> i think perhaps i need to expound upon what i have a vision of. a
> kernel mode console is just that: a console designed to run in
> kernel mode.

It could be quite useful for debugging heavily embedded systems where
you don't really have a 'standard' userspace.

John.

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

end of thread, other threads:[~2004-03-05 11:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-03  3:52 kernel mode console Billy Rose
2004-03-03  3:57 ` H. Peter Anvin
2004-03-03 17:09   ` Matt Mackall
2004-03-03 16:49 ` Tim Bird
2004-03-04  4:12   ` Krishnakumar. R
2004-03-05  0:58     ` Billy Rose
2004-03-05  3:20       ` Rob Couto
2004-03-05 11:47       ` John Bradford
     [not found] <200403022152.06950.billyrose@cox-internet.com.suse.lists.linux.kernel>
2004-03-03 17:18 ` Andi Kleen

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