1. 14 2月, 2015 4 次提交
  2. 06 2月, 2015 1 次提交
    • R
      module: set ksymtab/kcrctab* section addresses to 0x0 · 5d8591bc
      Rabin Vincent 提交于
      These __ksymtab*/__kcrctab* sections currently have non-zero addresses.
      Non-zero section addresses in a relocatable ELF confuse GDB and it ends
      up not relocating all symbols when add-symbol-file is used on modules
      which have exports.  The kernel's module loader does not care about
      these addresses, so let's just set them to zero.
      
       Before:
      
        $ readelf -S lib/notifier-error-inject.ko   | grep 'Name\| __ksymtab_gpl'
          [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
          [ 8] __ksymtab_gpl     PROGBITS        0000000c 0001b4 000010 00   A  0   0  4
      
        (gdb) add-symbol-file lib/notifier-error-inject.ko 0x500000 -s .bss 0x700000
        add symbol table from file "lib/notifier-error-inject.ko" at
           .text_addr = 0x500000
           .bss_addr = 0x700000
        (gdb) p &notifier_err_inject_dir
        $3 = (struct dentry **) 0x0
      
       After:
      
        $ readelf -S lib/notifier-error-inject.ko   | grep 'Name\| __ksymtab_gpl'
          [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
          [ 8] __ksymtab_gpl     PROGBITS        00000000 0001b4 000010 00   A  0   0  4
      
        (gdb) add-symbol-file lib/notifier-error-inject.ko 0x500000 -s .bss 0x700000
        add symbol table from file "lib/notifier-error-inject.ko" at
           .text_addr = 0x500000
           .bss_addr = 0x700000
        (gdb) p &notifier_err_inject_dir
        $3 = (struct dentry **) 0x700000
      Signed-off-by: NRabin Vincent <rabin.vincent@axis.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      5d8591bc
  3. 29 1月, 2015 2 次提交
  4. 23 1月, 2015 1 次提交
  5. 20 1月, 2015 1 次提交
  6. 02 1月, 2015 1 次提交
  7. 20 12月, 2014 1 次提交
  8. 11 12月, 2014 14 次提交
  9. 09 12月, 2014 1 次提交
  10. 08 12月, 2014 1 次提交
  11. 03 12月, 2014 1 次提交
  12. 28 11月, 2014 1 次提交
  13. 26 11月, 2014 2 次提交
  14. 25 11月, 2014 1 次提交
    • M
      bugon.cocci: fix Options at the macro · 7426977c
      Mauro Carvalho Chehab 提交于
      The comma after --no-includes makes coccinelle to not run the script:
      
      /usr/bin/spatch -D report --very-quiet --no-show-diff --cocci-file ./scripts/coccinelle/misc/bugon.cocci --no-includes, --include-headers --patch . --dir drivers/media/platform/coda/ -I ./arch/x86/include -I arch/x86/include/generated -I include -I ./arch/x86/include/uapi -I arch/x86/include/generated/uapi -I ./include/uapi -I include/generated/uapi -I ./include/linux/kconfig.h
      Usage: spatch.opt --sp-file <SP> <infile> [-o <outfile>] [--iso-file <iso>] [options]
      Options are:
        --sp-file                    <file> the semantic patch file
        -o                           <file> the output file
        --in-place                   do the modification on the file directly
        --backup-suffix              suffix to use when making a backup for inplace
      ...
      
      At least with Fedora 20 coccinelle package:
      	coccinelle-1.0.0-0.rc20.1.fc21.x86_64
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
      Tested-by: NWolfram Sang <wsa@the-dreams.de>
      Fixes: 5be1df66 (Coccinelle: Script to replace if and BUG with BUG_ON)
      Cc: stable@vger.kernel.org
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      7426977c
  15. 20 11月, 2014 1 次提交
  16. 09 11月, 2014 1 次提交
  17. 08 11月, 2014 1 次提交
    • V
      checkkconfigsymbols.sh: reimplementation in python · 24fe1f03
      Valentin Rothberg 提交于
      The scripts/checkkconfigsymbols.sh script searches Kconfig features
      in the source code that are not defined in Kconfig. Such identifiers
      always evaluate to false and are the source of various kinds of bugs.
      However, the shell script is slow and it does not detect such broken
      references in Kbuild and Kconfig files (e.g., ``depends on UNDEFINED´´).
      Furthermore, it generates false positives. The script is also hard to
      read and understand, and is thereby difficult to maintain.
      
      This patch replaces the shell script with an implementation in Python,
      which:
          (a) detects the same bugs, but does not report previous false positives
          (b) additionally detects broken references in Kconfig and all
              non-Kconfig files, such as Kbuild, .[cSh], .txt, .sh, defconfig, etc.
          (c) is up to 75 times faster than the shell script
          (d) only checks files under version control
      
      The new script reduces the runtime on my machine (i7-2620M, 8GB RAM, SSD)
      from 3m47s to 0m3s, and reports 938 broken references in Linux v3.17-rc1;
      419 additional reports of which 16 are located in Kconfig files,
      287 in defconfigs, 63 in ./Documentation, 1 in Kbuild.
      
      Moreover, we intentionally include references in comments, which have been
      ignored until now. Such comments may be leftovers of features that have
      been removed or renamed in Kconfig (e.g., ``#endif /* CONFIG_MPC52xx */´´).
      These references can be misleading and should be removed or replaced.
      
      Note that the output format changed from (file list <tab> feature) to
      (feature <tab> file list) as it simplifies the detection of the Kconfig
      feature for long file lists.
      Signed-off-by: NValentin Rothberg <valentinrothberg@gmail.com>
      Signed-off-by: NStefan Hengelein <stefan.hengelein@fau.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      24fe1f03
  18. 07 11月, 2014 1 次提交
  19. 27 10月, 2014 1 次提交
    • H
      s390/ftrace,kprobes: allow to patch first instruction · c933146a
      Heiko Carstens 提交于
      If the function tracer is enabled, allow to set kprobes on the first
      instruction of a function (which is the function trace caller):
      
      If no kprobe is set handling of enabling and disabling function tracing
      of a function simply patches the first instruction. Either it is a nop
      (right now it's an unconditional branch, which skips the mcount block),
      or it's a branch to the ftrace_caller() function.
      
      If a kprobe is being placed on a function tracer calling instruction
      we encode if we actually have a nop or branch in the remaining bytes
      after the breakpoint instruction (illegal opcode).
      This is possible, since the size of the instruction used for the nop
      and branch is six bytes, while the size of the breakpoint is only
      two bytes.
      Therefore the first two bytes contain the illegal opcode and the last
      four bytes contain either "0" for nop or "1" for branch. The kprobes
      code will then execute/simulate the correct instruction.
      
      Instruction patching for kprobes and function tracer is always done
      with stop_machine(). Therefore we don't have any races where an
      instruction is patched concurrently on a different cpu.
      Besides that also the program check handler which executes the function
      trace caller instruction won't be executed concurrently to any
      stop_machine() execution.
      
      This allows to keep full fault based kprobes handling which generates
      correct pt_regs contents automatically.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      c933146a
  20. 22 10月, 2014 2 次提交
  21. 14 10月, 2014 1 次提交