Skip to content
Snippets Groups Projects
  1. Jan 30, 2008
    • Bernhard Kaindl's avatar
      x86: early boot debugging via FireWire (ohci1394_dma=early) · f212ec4b
      Bernhard Kaindl authored
      This patch adds a new configuration option, which adds support for a new
      early_param which gets checked in arch/x86/kernel/setup_{32,64}.c:setup_arch()
      to decide wether OHCI-1394 FireWire controllers should be initialized and
      enabled for physical DMA access to allow remote debugging of early problems
      like issues ACPI or other subsystems which are executed very early.
      
      If the config option is not enabled, no code is changed, and if the boot
      paramenter is not given, no new code is executed, and independent of that,
      all new code is freed after boot, so the config option can be even enabled
      in standard, non-debug kernels.
      
      With specialized tools, it is then possible to get debugging information
      from machines which have no serial ports (notebooks) such as the printk
      buffer contents, or any data which can be referenced from global pointers,
      if it is stored below the 4GB limit and even memory dumps of of the physical
      RAM region below the 4GB limit can be taken without any cooperation from the
      CPU of the host, so the machine can be crashed early, it does not matter.
      
      In the extreme, even kernel debuggers can be accessed in this way. I wrote
      a small kgdb module and an accompanying gdb stub for FireWire which allows
      to gdb to talk to kgdb using remote remory reads and writes over FireWire.
      
      An version of the gdb stub fore FireWire is able to read all global data
      from a system which is running a a normal kernel without any kernel debugger,
      without any interruption or support of the system's CPU. That way, e.g. the
      task struct and so on can be read and even manipulated when the physical DMA
      access is granted.
      
      A HOWTO is included in this patch, in Documentation/debugging-via-ohci1394.txt
      and I've put a copy online at
      ftp://ftp.suse.de/private/bk/firewire/docs/debugging-via-ohci1394.txt
      
      It also has links to all the tools which are available to make use of it
      another copy of it is online at:
      ftp://ftp.suse.de/private/bk/firewire/kernel/ohci1394_dma_early-v2.diff
      
      
      
      Signed-Off-By: default avatarBernhard Kaindl <bk@suse.de>
      Tested-By: default avatarThomas Renninger <trenn@suse.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      f212ec4b
    • Arjan van de Ven's avatar
      x86: add a simple backtrace test module · 6dab2778
      Arjan van de Ven authored
      
      During the work on the x86 32 and 64 bit backtrace code I found it useful
      to have a simple test module to test a process and irq context backtrace.
      Since the existing backtrace code was buggy, I figure it might be useful
      to have such a test module in the kernel so that maybe we can even
      detect such bugs earlier..
      
      [ mingo@elte.hu: build fix ]
      
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      6dab2778
    • Ingo Molnar's avatar
      x86: fix UML and -regparm=3 · d50efc6c
      Ingo Molnar authored
      
      introduce the "asmregparm" calling convention: for functions
      implemented in assembly with a fixed regparm input parameters
      calling convention.
      
      mark the semaphore and rwsem slowpath functions with that.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      d50efc6c
    • Ananth N Mavinakayanahalli's avatar
      x86: kprobes: add kprobes smoke tests that run on boot · 8c1c9356
      Ananth N Mavinakayanahalli authored
      
      Here is a quick and naive smoke test for kprobes. This is intended to
      just verify if some unrelated change broke the *probes subsystem. It is
      self contained, architecture agnostic and isn't of any great use by itself.
      
      This needs to be built in the kernel and runs a basic set of tests to
      verify if kprobes, jprobes and kretprobes run fine on the kernel. In case
      of an error, it'll print out a message with a "BUG" prefix.
      
      This is a start; we intend to add more tests to this bucket over time.
      
      Thanks to Jim Keniston and Masami Hiramatsu for comments and suggestions.
      
      Tested on x86 (32/64) and powerpc.
      
      Signed-off-by: default avatarAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Acked-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8c1c9356
  2. Jan 28, 2008
    • Aneesh Kumar K.V's avatar
      ext4: Add ext4_find_next_bit() · aa02ad67
      Aneesh Kumar K.V authored
      
      This function is used by the ext4 multi block allocator patches.
      
      Also add generic_find_next_le_bit
      
      Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      aa02ad67
    • Eric Dumazet's avatar
      [LIB] pcounter : unline too big functions · 571e7682
      Eric Dumazet authored
      
      Before pushing pcounter to Linus tree, I would like to make some adjustments.
      
      Goal is to reduce kernel text size, by unlining too big functions.
      
      When a pcounter is bound to a statically defined per_cpu variable,
      we define two small helpers functions. (No more folding function
      using the fat for_each_possible_cpu(cpu) ... )
      
      static DEFINE_PER_CPU(int, NAME##_pcounter_values);
      static void NAME##_pcounter_add(struct pcounter *self, int val)
      {
             __get_cpu_var(NAME##_pcounter_values) += val;
      }
      static int NAME##_pcounter_getval(const struct pcounter *self, int cpu)
      {
             return per_cpu(NAME##_pcounter_values, cpu);
      }
      
      Fast path is therefore unchanged, while folding/alloc/free is now unlined.
      
      This saves 228 bytes on i386
      
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      571e7682
    • Arnaldo Carvalho de Melo's avatar
      [LIB]: Introduce struct pcounter · de4d1db3
      Arnaldo Carvalho de Melo authored
      
      This just generalises what was introduced by Eric Dumazet for the struct proto
      inuse field in 286ab3d4:
      
          [NET]: Define infrastructure to keep 'inuse' changes in an efficent SMP/NUMA way.
      
      Please look at the comment in there to see the rationale.
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de4d1db3
    • Sam Ravnborg's avatar
      kbuild: add verbose option to Section mismatch reporting in modpost · 588ccd73
      Sam Ravnborg authored
      
      If the config option CONFIG_SECTION_MISMATCH is not set and
      we see a Section mismatch present the following to the user:
      
      modpost: Found 1 section mismatch(es).
      To see additional details select "Enable full Section mismatch analysis"
      in the Kernel Hacking menu (CONFIG_SECTION_MISMATCH).
      
      If the option CONFIG_SECTION_MISMATCH is selected
      then be verbose in the Section mismatch reporting from mdopost.
      Sample outputs:
      
      WARNING: o-x86_64/vmlinux.o(.text+0x7396): Section mismatch in reference from the function discover_ebda() to the variable .init.data:ebda_addr
      The function  discover_ebda() references
      the variable __initdata ebda_addr.
      This is often because discover_ebda lacks a __initdata
      annotation or the annotation of ebda_addr is wrong.
      
      WARNING: o-x86_64/vmlinux.o(.data+0x74d58): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
      The variable pci_serial_quirks references
      the function __devexit pci_plx9050_exit()
      If the reference is valid then annotate the
      variable with __exit* (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      
      WARNING: o-x86_64/vmlinux.o(__ksymtab+0x630): Section mismatch in reference from the variable __ksymtab_arch_register_cpu to the function .cpuinit.text:arch_register_cpu()
      The symbol arch_register_cpu is exported and annotated __cpuinit
      Fix this by removing the __cpuinit annotation of arch_register_cpu or drop the export.
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      588ccd73
    • Sam Ravnborg's avatar
      kbuild: introduce new option to enhance section mismatch analysis · 91341d4b
      Sam Ravnborg authored
      
      Setting the option DEBUG_SECTION_MISMATCH will
      report additional section mismatch'es but this
      should in the end makes it possible to get rid of
      all of them.
      
      See help text in lib/Kconfig.debug for details.
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      91341d4b
    • James Bottomley's avatar
      SG: work with the SCSI fixed maximum allocations. · 7cedb1f1
      James Bottomley authored
      
      SCSI sg table allocation has a maximum size (of SCSI_MAX_SG_SEGMENTS,
      currently 128) and this will cause a BUG_ON() in SCSI if something
      tries an allocation over it.  This patch adds a size limit to the
      chaining allocator to allow the specification of the maximum
      allocation size for chaining, so we always chain in units of the
      maximum SCSI allocation size.
      
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      7cedb1f1
    • Jens Axboe's avatar
      SG: Move functions to lib/scatterlist.c and add sg chaining allocator helpers · 0db9299f
      Jens Axboe authored
      
      Manually doing chained sg lists is not trivial, so add some helpers
      to make sure that drivers get it right.
      
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      0db9299f
  3. Jan 25, 2008
  4. Jan 24, 2008
Loading