Skip to content
Snippets Groups Projects
  1. Oct 13, 2012
    • Jeff Layton's avatar
      vfs: define struct filename and have getname() return it · 91a27b2a
      Jeff Layton authored
      
      getname() is intended to copy pathname strings from userspace into a
      kernel buffer. The result is just a string in kernel space. It would
      however be quite helpful to be able to attach some ancillary info to
      the string.
      
      For instance, we could attach some audit-related info to reduce the
      amount of audit-related processing needed. When auditing is enabled,
      we could also call getname() on the string more than once and not
      need to recopy it from userspace.
      
      This patchset converts the getname()/putname() interfaces to return
      a struct instead of a string. For now, the struct just tracks the
      string in kernel space and the original userland pointer for it.
      
      Later, we'll add other information to the struct as it becomes
      convenient.
      
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      91a27b2a
  2. Oct 12, 2012
    • Jason Wessel's avatar
      mips,kgdb: fix recursive page fault with CONFIG_KPROBES · f0a996ee
      Jason Wessel authored
      
      This fault was detected using the kgdb test suite on boot and it
      crashes recursively due to the fact that CONFIG_KPROBES on mips adds
      an extra die notifier in the page fault handler.  The crash signature
      looks like this:
      
      kgdbts:RUN bad memory access test
      KGDB: re-enter exception: ALL breakpoints killed
      Call Trace:
      [<807b7548>] dump_stack+0x20/0x54
      [<807b7548>] dump_stack+0x20/0x54
      
      The fix for now is to have kgdb return immediately if the fault type
      is DIE_PAGE_FAULT and allow the kprobe code to decide what is supposed
      to happen.
      
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      f0a996ee
  3. Oct 09, 2012
  4. Oct 05, 2012
  5. Oct 03, 2012
    • Jean Delvare's avatar
      kbuild: Fix gcc -x syntax · b1e0d8b7
      Jean Delvare authored
      
      The correct syntax for gcc -x is "gcc -x assembler", not
      "gcc -xassembler". Even though the latter happens to work, the former
      is what is documented in the manual page and thus what gcc wrappers
      such as icecream do expect.
      
      This isn't a cosmetic change. The missing space prevents icecream from
      recognizing compilation tasks it can't handle, leading to silent kernel
      miscompilations.
      
      Besides me, credits go to Michael Matz and Dirk Mueller for
      investigating the miscompilation issue and tracking it down to this
      incorrect -x parameter syntax.
      
      Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: stable@vger.kernel.org
      Cc: Bernhard Walle <bernhard@bwalle.de>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      b1e0d8b7
  6. Oct 02, 2012
  7. Oct 01, 2012
  8. Sep 29, 2012
  9. Sep 28, 2012
    • David Howells's avatar
      Make most arch asm/module.h files use asm-generic/module.h · 786d35d4
      David Howells authored
      
      Use the mapping of Elf_[SPE]hdr, Elf_Addr, Elf_Sym, Elf_Dyn, Elf_Rel/Rela,
      ELF_R_TYPE() and ELF_R_SYM() to either the 32-bit version or the 64-bit version
      into asm-generic/module.h for all arches bar MIPS.
      
      Also, use the generic definition mod_arch_specific where possible.
      
      To this end, I've defined three new config bools:
      
       (*) HAVE_MOD_ARCH_SPECIFIC
      
           Arches define this if they don't want to use the empty generic
           mod_arch_specific struct.
      
       (*) MODULES_USE_ELF_RELA
      
           Arches define this if their modules can contain RELA records.  This causes
           the Elf_Rela mapping to be emitted and allows apply_relocate_add() to be
           defined by the arch rather than have the core emit an error message.
      
       (*) MODULES_USE_ELF_REL
      
           Arches define this if their modules can contain REL records.  This causes
           the Elf_Rel mapping to be emitted and allows apply_relocate() to be
           defined by the arch rather than have the core emit an error message.
      
      Note that it is possible to allow both REL and RELA records: m68k and mips are
      two arches that do this.
      
      With this, some arch asm/module.h files can be deleted entirely and replaced
      with a generic-y marker in the arch Kbuild file.
      
      Additionally, I have removed the bits from m32r and score that handle the
      unsupported type of relocation record as that's now handled centrally.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      786d35d4
    • Ralf Baechle's avatar
      MIPS: Fix module.c build for 32 bit · 6ede8123
      Ralf Baechle authored
      
      Fixes build failure introduced by "Make most arch asm/module.h files use
      asm-generic/module.h" by moving all the RELA processing code to a
      separate file to be used only for RELA processing on 64-bit kernels.
      
        CC      arch/mips/kernel/module.o
      arch/mips/kernel/module.c:250:14: error: 'reloc_handlers_rela' defined but not
      used [-Werror=unused-variable]
      cc1: all warnings being treated as errors
      
      make[6]: *** [arch/mips/kernel/module.o] Error 1
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      6ede8123
  10. Sep 26, 2012
  11. Sep 25, 2012
  12. Sep 22, 2012
  13. Sep 18, 2012
  14. Sep 17, 2012
    • Ralf Baechle's avatar
      MIPS: Malta: Don't crash on spurious interrupt. · e376fdf4
      Ralf Baechle authored
      
      48d480b0 [[MIPS] Malta: Fix off by one bug in interrupt
      handler.] did not take in account that irq_ffs() will also return 0 if for some reason
      the set of pending interrupts happens to be empty.
      
      This is trivial to trigger with a RM5261 CPU module running a 64-bit kernel and results
      in something like the following:
      
      CPU 0 Unable to handle kernel paging request at virtual address 0000000000000000, epc == ffffffff801772d0, ra == ffffffff8017ad24
      Oops[#1]:
      Cpu 0
      $ 0   : 0000000000000000 ffffffff9000a4e0 ffffffff9000a4e0 ffffffff9000a4e0
      $ 4   : ffffffff80592be0 0000000000000000 00000000000000d6 ffffffff80322ed0
      $ 8   : ffffffff805fe538 0000000000000000 ffffffff9000a4e0 ffffffff80590000
      $12   : 00000000000000d6 0000000000000000 ffffffff80600000 ffffffff805fe538
      $16   : 0000000000000000 0000000000000010 ffffffff80592be0 0000000000000010
      $20   : 0000000000000000 0000000000500001 0000000000000000 ffffffff8051e078
      $24   : 0000000000000028 ffffffff803226e8
      $28   : 9800000003828000 980000000382b900 ffffffff8051e060 ffffffff8017ad24
      Hi    : 0000000000000000
      Lo    : 0000006388974000
      epc   : ffffffff801772d0 handle_irq_event_percpu+0x70/0x2f0
          Not tainted
      ra    : ffffffff8017ad24 handle_percpu_irq+0x54/0x88
      Status: 9000a4e2    KX SX UX KERNEL EXL
      Cause : 00808008
      BadVA : 0000000000000000
      PrId  : 000028a0 (Nevada)
      Modules linked in:
      Process init (pid: 1, threadinfo=9800000003828000, task=9800000003827968, tls=0000000077087490)
      Stack : ffffffff80592be0 ffffffff8058d248 0000000000000040 0000000000000000
              ffffffff80613340 0000000000500001 ffffffff805a0000 0000000000000882
              9800000003b89000 ffffffff8017ad24 00000000000000d5 0000000000000010
              ffffffff9000a4e1 ffffffff801769f4 ffffffff9000a4e0 ffffffff801037f8
              0000000000000000 ffffffff80101c44 0000000000000000 ffffffff9000a4e0
              0000000000000000 9000000018000000 90000000180003f9 0000000000000001
              0000000000000000 00000000000000ff 0000000000000018 0000000000000001
              0000000000000001 00000000003fffff 0000000000000020 ffffffff802cf7ac
              ffffffff80208918 000000007fdadf08 ffffffff80612d88 ffffffff9000a4e1
              0000000000000040 0000000000000000 ffffffff80613340 0000000000500001
              ...
      Call Trace:
      [<ffffffff801772d0>] handle_irq_event_percpu+0x70/0x2f0
      [<ffffffff8017ad24>] handle_percpu_irq+0x54/0x88
      [<ffffffff801769f4>] generic_handle_irq+0x44/0x60
      [<ffffffff801037f8>] do_IRQ+0x48/0x70
      [<ffffffff80101c44>] ret_from_irq+0x0/0x4
      [<ffffffff80326170>] serial8250_startup+0x310/0x870
      [<ffffffff8032175c>] uart_startup.part.7+0x9c/0x330
      [<ffffffff80321b4c>] uart_open+0x15c/0x1b0
      [<ffffffff80302034>] tty_open+0x1fc/0x720
      [<ffffffff801bffac>] chrdev_open+0x7c/0x180
      [<ffffffff801b9ab8>] do_dentry_open.isra.14+0x288/0x390
      [<ffffffff801bac5c>] nameidata_to_filp+0x5c/0xc0
      [<ffffffff801ca700>] do_last.isra.33+0x330/0x8f0
      [<ffffffff801caf3c>] path_openat+0xbc/0x440
      [<ffffffff801cb3c8>] do_filp_open+0x38/0xa8
      [<ffffffff801bade4>] do_sys_open+0x124/0x218
      [<ffffffff80110538>] handle_sys+0x118/0x13c
      
      Code: 02d5a825  12800012  02a0b02d <de820000> de850008  0040f809  0220202d  0040a82d  40026000
      ---[ end trace 5d8e7b9a86badd2d ]---
      Kernel panic - not syncing: Fatal exception in interrupt
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      e376fdf4
  15. Sep 14, 2012
    • Maciej W. Rozycki's avatar
      MIPS: Malta: Remove RTC Data Mode bootstrap breakage · 636221b8
      Maciej W. Rozycki authored
      
       YAMON requires and enforces the RTC Data Mode (Register B, DM bit) to
      binary, that is the bit is set every time the board goes through the
      firmware bootstrap sequence.  Likewise its calendar manipulation commands
      interpret or set the RTC registers unconditionally as binary, never
      actually checking what the value of the DM bit is, under the (correct)
      assumption that it has been previously set, to indicate the binary mode.
      
       A change to Linux a while ago however introduced a platform-specific
      tweak that clears that bit and therefore forces the data mode to BCD.
      This causes clock corruption and misinterpretation that has to be fixed up
      by user-mode tools in system startup scripts as the initial clock is often
      incorrect according to the BCD interpretation forced.
      
       This change removes the hack; a comment included refers to alarm code,
      but even if it was broken at one point by requiring the BCD mode, it
      should have been trivially corrected and even if not, given how rarely the
      alarm feature is used, that was not really a reasonable justification to
      break the system clock that is indeed used by virtually everything.  And
      either way the alarm code has been since fixed anyway.
      
      Signed-off-by: default avatarMaciej W. Rozycki <macro@codesourcery.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/4336/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      636221b8
  16. Sep 13, 2012
Loading