Re: ethercons: ethernet console driver for 5-current

From: Robert Watson (rwatson_at_freebsd.org)
Date: 10/20/03

  • Next message: Christoph P. Kukulies: "Re: this /rescue thing"
    Date: Mon, 20 Oct 2003 13:41:05 -0400 (EDT)
    To: Steve Kargl <sgk@troutmask.apl.washington.edu>
    
    

    On Mon, 20 Oct 2003, Steve Kargl wrote:

    > On Mon, Oct 20, 2003 at 12:13:27PM -0400, Robert Watson wrote:
    > >
    > > I had a fair amount of time over the last week running in disconnected
    > > operation, and realized I had too many cables under my desk, so I spent a
    > > bit of time exploring the FreeBSD console code. After reading a FREENIX
    > > paper this summer on a Linux ethernet console driver, I took a pass at
    > > implementing ethernet console support for FreeBSD.
    >
    > This looks very interesting! Can we run ddb over the ethercon to debug
    > a wedged machine?

    Not currently. In the current implementation, the ethernet console picks
    up its input, and generates output, using the ethernet layer of the
    network stack. Since the debugger suspends scheduling, this means
    interrupt threads, netisrs, etc, aren't running, so for now, ethercons is
    disabled when "in the debugger" (db_active != 0). This permits other
    console devices, such as serial console, to be used for the debugger,
    however, at the same time.

    To support ethernet debugging, the debugger would need to be able to drive
    polling of the network interface in an interrupt-thread-free environment,
    and reproduce more of the lower level network code (i.e., not use mbufs,
    etc). This is feasible to do, but would probably require adding new
    interfaces to the ethernet driver, and supporting only ethernet cards that
    had these additional debugging interfaces. Compared to serial console,
    you'd also have a lot more situations where the driver/hardware state
    would be sufficiently inconsistent as to make debugging network-related
    crashes difficult. On the other hand, Darwin runs quite well with a
    network debugger; I believe they have a fairly complex UDP/IP
    implementation in the network debugger, although I haven't inspected it.
    Apple has the advantage, though, of providing very few ethernet drivers.

    So I'm happy to look at it, but the level of time investment to get to
    network debugging from the current (and pretty simple) ethercons device
    will be fairly high. I know Jonathan Lemon was looking at network console
    and debugging code previously, but I don't have copies of his patches. If
    I had to guess, I'd assume he had modified the if_fxp driver, and perhaps
    others, to provide an appropriate polled interface for use with a
    debugger, but I don't know for sure. If someone has copies of these
    patches, I'd be happy to take a look at them.

    Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
    robert@fledge.watson.org Network Associates Laboratories

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Christoph P. Kukulies: "Re: this /rescue thing"

    Relevant Pages

    • Re: network type console and /etc/ttys
      ... with a single Ethernet cable between the ... > network, and definitely without telnet, ssh, and other network ... Most console servers do that by providing ethernet access ... Maybe the RS-232 serial ports will disappear, ...
      (freebsd-questions)
    • Re: mtx_lock_do_what_i_mean()
      ... kernel from anything to which we have a TTY attached. ... things that go into the message buffer to the console becomes 1) ... debugger is a problem all by itself... ... still normally goes to the same device as user and kernel i/o, ...
      (freebsd-arch)
    • [Full-Disclosure] sandboxing
      ... It is the author's courtesy to let you know there's an anti-debugging ... > code that detected your debugger / tracer, ... I remember i was analysing a linux binary once.. ... see if it was network aware in some way.. ...
      (Full-Disclosure)
    • Re: Breakpoint on Operative system
      ... All the info you need to configure the device and download the ... Luca Calligaris ... Build Options -> Enable kernel debugger. ... I have enabled KITL and connect my board through ethernet, ...
      (microsoft.public.windowsce.platbuilder)
    • Re: Debugger stops right after starting
      ... It still happens when disconnected from network. ... the debugger does not crash. ... Viking Electronic Services ... do you get the same error message if you disconnect from the ...
      (microsoft.public.vstudio.general)