31 Jul, 2012

1 commit


22 Jul, 2012

2 commits

  • The locked variants are prone to deadlocks (suppose we got to the
    debugger w/ the logbuf lock held), so let's switch to nolock variants.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • The kgdb dmesg command is broken after the printk rework. The old logic
    in kdb code makes no sense in terms of current printk/logging storage
    format, and KDB simply hangs forever.

    This patch revives the command by switching to kmsg_dumper iterator.

    The code is now much more simpler and shorter.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     

23 Mar, 2012

1 commit

  • This fixes the following problems:
    1) Typematic-repeat of 'enter' gives warning message
    and leaks make/break if KDB exits. Repeats
    look something like 0x1c 0x1c .... 0x9c
    2) Use of 'keypad enter' gives warning message and
    leaks the ENTER break/make code out if KDB exits.
    KP ENTER repeats look someting like 0xe0 0x1c
    0xe0 0x1c ... 0xe0 0x9c.
    3) Lag on the order of seconds between "break" and "make" when
    expecting the enter "break" code. Seen under virtualized
    environments such as VMware ESX.

    The existing special enter handler tries to glob the enter break code,
    but this fails if the other (KP) enter was used, or if there was a key
    repeat. It also fails if you mashed some keys along with enter, and
    you ended up with a non-enter make or non-enter break code coming
    after the enter make code. So first, we modify the handler to handle
    these cases. But performing these actions on every enter is annoying
    since now you can't hold ENTER down to scroll d messages in
    KDB. Since this special behaviour is only necessary to handle the
    exiting KDB ('g' + ENTER) without leaking scancodes to the OS. This
    cleanup needs to get executed anytime the kdb_main loop exits.

    Tested on QEMU. Set a bp on atkbd.c to verify no scan code was leaked.

    Cc: Andrei Warkentin
    [jason.wessel@windriver.com: move cleanup calls to kdb_main.c]
    Signed-off-by: Andrei Warkentin
    Signed-off-by: Jason Wessel

    Andrei Warkentin
     

13 Jan, 2012

1 commit

  • module_ref contains two "unsigned int" fields.

    Thats now too small, since some machines can open more than 2^32 files.

    Check commit 518de9b39e8 (fs: allow for more than 2^31 files) for
    reference.

    We can add an aligned(2 * sizeof(unsigned long)) attribute to force
    alloc_percpu() allocating module_ref areas in single cache lines.

    Signed-off-by: Eric Dumazet
    CC: Rusty Russell
    CC: Tejun Heo
    CC: Robin Holt
    CC: David Miller
    Signed-off-by: Rusty Russell

    Eric Dumazet
     

02 Aug, 2011

2 commits


31 Mar, 2011

1 commit


26 Mar, 2011

2 commits


23 Dec, 2010

1 commit


18 Nov, 2010

2 commits


02 Nov, 2010

1 commit

  • "gadget", "through", "command", "maintain", "maintain", "controller", "address",
    "between", "initiali[zs]e", "instead", "function", "select", "already",
    "equal", "access", "management", "hierarchy", "registration", "interest",
    "relative", "memory", "offset", "already",

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Jiri Kosina

    Uwe Kleine-König
     

30 Oct, 2010

2 commits

  • The kdb_current legally be equal to NULL in the early boot of the x86
    arch. The problem pcan be observed by booting with the kernel arguments:

    earlyprintk=vga ekgdboc=kbd kgdbwait

    The kdb shell will oops on entry and recursively fault because it
    cannot get past the final stage of shell initialization.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • Rusty pointed out that the per_cpu command uses up lots of space on
    the stack and the cpu supress mask is probably not needed.

    This patch removes the need for the supress mask as well as fixing up
    the following problems with the kdb per_cpu command:
    * The per_cpu command should allow an address as an argument
    * When you have more data than can be displayed on one screen allow
    the user to break out of the print loop.

    Reported-by: Rusty Russell
    Signed-off-by: Jason Wessel

    Jason Wessel
     

23 Oct, 2010

3 commits

  • The kdb shell needs to enforce switching back to the original CPU that
    took the exception before restoring normal kernel execution. Resuming
    from a different CPU than what took the original exception will cause
    problems with spin locks that are freed from the a different processor
    than had taken the lock.

    The special logic in dbg_cpu_switch() can go away entirely with
    because the state of what cpus want to be masters or slaves will
    remain unchanged between entry and exit of the debug_core exception
    context.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • Nothing should try to use kdb_commands directly as sometimes it is
    null. Instead, use the for_each_kdbcmd() iterator.

    This particular problem dates back to the initial kdb merge (2.6.35),
    but at that point nothing was dynamically unregistering commands from
    the kdb shell.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • In order to allow kernel modules to dynamically add a command to the
    kdb shell the kdb_register, kdb_register_repeat, kdb_unregister, and
    kdb_printf need to be exported as GPL symbols.

    Any kernel module that adds a dynamic kdb shell function should only
    need to include linux/kdb.h.

    Signed-off-by: Jason Wessel

    Jason Wessel
     

21 Aug, 2010

1 commit

  • Sysrq operations do not accept tty argument anymore so no need to pass
    it to us.

    [Stephen Rothwell : fix build breakage in drm code
    caused by sysrq using bool but not including linux/types.h]

    [Sachin Sant : fix build breakage in s390 keyboadr
    driver]

    Acked-by: Alan Cox
    Acked-by: Jason Wessel
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Dmitry Torokhov

    Dmitry Torokhov
     

07 Aug, 2010

1 commit

  • …x/kernel/git/tip/linux-2.6-tip

    * 'timers-timekeeping-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    um: Fix read_persistent_clock fallout
    kgdb: Do not access xtime directly
    powerpc: Clean up obsolete code relating to decrementer and timebase
    powerpc: Rework VDSO gettimeofday to prevent time going backwards
    clocksource: Add __clocksource_updatefreq_hz/khz methods
    x86: Convert common clocksources to use clocksource_register_hz/khz
    timekeeping: Make xtime and wall_to_monotonic static
    hrtimer: Cleanup direct access to wall_to_monotonic
    um: Convert to use read_persistent_clock
    timkeeping: Fix update_vsyscall to provide wall_to_monotonic offset
    powerpc: Cleanup xtime usage
    powerpc: Simplify update_vsyscall
    time: Kill off CONFIG_GENERIC_TIME
    time: Implement timespec_add
    x86: Fix vtime/file timestamp inconsistencies

    Trivial conflicts in Documentation/feature-removal-schedule.txt

    Much less trivial conflicts in arch/powerpc/kernel/time.c resolved as
    per Thomas' earlier merge commit 47916be4e28c ("Merge branch
    'powerpc.cherry-picks' into timers/clocksource")

    Linus Torvalds
     

05 Aug, 2010

1 commit

  • The kdb shell specification includes the ability to get and set
    architecture specific registers by name.

    For the time being individual register get and set will be implemented
    on a per architecture basis. If an architecture defines
    DBG_MAX_REG_NUM > 0 then kdb and the gdbstub will use the capability
    for individually getting and setting architecture specific registers.

    Signed-off-by: Jason Wessel

    Jason Wessel
     

29 Jul, 2010

1 commit


22 Jul, 2010

3 commits


05 Jun, 2010

1 commit


21 May, 2010

2 commits

  • Certain calls from the kdb shell will call out to printk(), and any of
    these calls should get vectored back to the kdb_printf() so that the
    kdb pager and processing can be used, as well as to properly channel
    I/O to the polled I/O devices.

    CC: Randy Dunlap
    Signed-off-by: Jason Wessel
    Acked-by: Andrew Morton

    Jason Wessel
     
  • This patch contains only the kdb core. Because the change set was
    large, it was split. The next patch in the series includes the
    instrumentation into the core kernel which are mainly helper functions
    for kdb.

    This work is directly derived from kdb v4.4 found at:

    ftp://oss.sgi.com/projects/kdb/download/v4.4/

    The kdb internals have been re-organized to make them mostly platform
    independent and to connect everything to the debug core which is used by
    gdbstub (which has long been known as kgdb).

    The original version of kdb was 58,000 lines worth of changes to
    support x86. From that implementation only the kdb shell, and basic
    commands for memory access, runcontrol, lsmod, and dmesg where carried
    forward.

    This is a generic implementation which aims to cover all the current
    architectures using the kgdb core: ppc, arm, x86, mips, sparc, sh and
    blackfin. More archictectures can be added by implementing the
    architecture specific kgdb functions.

    [mort@sgi.com: Compile fix with hugepages enabled]
    [mort@sgi.com: Clean breakpoint code renaming kdba_ -> kdb_]
    [mort@sgi.com: fix new line after printing registers]
    [mort@sgi.com: Remove the concept of global vs. local breakpoints]
    [mort@sgi.com: Rework kdb_si_swapinfo to use more generic name]
    [mort@sgi.com: fix the information dump macros, remove 'arch' from the names]
    [sfr@canb.auug.org.au: include fixup to include linux/slab.h]

    CC: linux-arch@vger.kernel.org
    Signed-off-by: Jason Wessel
    Signed-off-by: Martin Hicks

    Jason Wessel