15 Oct, 2012

1 commit

  • Pull module signing support from Rusty Russell:
    "module signing is the highlight, but it's an all-over David Howells frenzy..."

    Hmm "Magrathea: Glacier signing key". Somebody has been reading too much HHGTTG.

    * 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (37 commits)
    X.509: Fix indefinite length element skip error handling
    X.509: Convert some printk calls to pr_devel
    asymmetric keys: fix printk format warning
    MODSIGN: Fix 32-bit overflow in X.509 certificate validity date checking
    MODSIGN: Make mrproper should remove generated files.
    MODSIGN: Use utf8 strings in signer's name in autogenerated X.509 certs
    MODSIGN: Use the same digest for the autogen key sig as for the module sig
    MODSIGN: Sign modules during the build process
    MODSIGN: Provide a script for generating a key ID from an X.509 cert
    MODSIGN: Implement module signature checking
    MODSIGN: Provide module signing public keys to the kernel
    MODSIGN: Automatically generate module signing keys if missing
    MODSIGN: Provide Kconfig options
    MODSIGN: Provide gitignore and make clean rules for extra files
    MODSIGN: Add FIPS policy
    module: signature checking hook
    X.509: Add a crypto key parser for binary (DER) X.509 certificates
    MPILIB: Provide a function to read raw data into an MPI
    X.509: Add an ASN.1 decoder
    X.509: Add simple ASN.1 grammar compiler
    ...

    Linus Torvalds
     

13 Oct, 2012

1 commit

  • 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: Jeff Layton
    Signed-off-by: Al Viro

    Jeff Layton
     

12 Oct, 2012

1 commit

  • Pull pile 2 of execve and kernel_thread unification work from Al Viro:
    "Stuff in there: kernel_thread/kernel_execve/sys_execve conversions for
    several more architectures plus assorted signal fixes and cleanups.

    There'll be more (in particular, real fixes for the alpha
    do_notify_resume() irq mess)..."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (43 commits)
    alpha: don't open-code trace_report_syscall_{enter,exit}
    Uninclude linux/freezer.h
    m32r: trim masks
    avr32: trim masks
    tile: don't bother with SIGTRAP in setup_frame
    microblaze: don't bother with SIGTRAP in setup_rt_frame()
    mn10300: don't bother with SIGTRAP in setup_frame()
    frv: no need to raise SIGTRAP in setup_frame()
    x86: get rid of duplicate code in case of CONFIG_VM86
    unicore32: remove pointless test
    h8300: trim _TIF_WORK_MASK
    parisc: decide whether to go to slow path (tracesys) based on thread flags
    parisc: don't bother looping in do_signal()
    parisc: fix double restarts
    bury the rest of TIF_IRET
    sanitize tsk_is_polling()
    bury _TIF_RESTORE_SIGMASK
    unicore32: unobfuscate _TIF_WORK_MASK
    mips: NOTIFY_RESUME is not needed in TIF masks
    mips: merge the identical "return from syscall" per-ABI code
    ...

    Conflicts:
    arch/arm/include/asm/thread_info.h

    Linus Torvalds
     

10 Oct, 2012

1 commit

  • Pull generic execve() changes from Al Viro:
    "This introduces the generic kernel_thread() and kernel_execve()
    functions, and switches x86, arm, alpha, um and s390 over to them."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (26 commits)
    s390: convert to generic kernel_execve()
    s390: switch to generic kernel_thread()
    s390: fold kernel_thread_helper() into ret_from_fork()
    s390: fold execve_tail() into start_thread(), convert to generic sys_execve()
    um: switch to generic kernel_thread()
    x86, um/x86: switch to generic sys_execve and kernel_execve
    x86: split ret_from_fork
    alpha: introduce ret_from_kernel_execve(), switch to generic kernel_execve()
    alpha: switch to generic kernel_thread()
    alpha: switch to generic sys_execve()
    arm: get rid of execve wrapper, switch to generic execve() implementation
    arm: optimized current_pt_regs()
    arm: introduce ret_from_kernel_execve(), switch to generic kernel_execve()
    arm: split ret_from_fork, simplify kernel_thread() [based on patch by rmk]
    generic sys_execve()
    generic kernel_execve()
    new helper: current_pt_regs()
    preparation for generic kernel_thread()
    um: kill thread->forking
    um: let signal_delivered() do SIGTRAP on singlestepping into handler
    ...

    Linus Torvalds
     

09 Oct, 2012

5 commits

  • Merge patches from Andrew Morton:
    "A few misc things and very nearly all of the MM tree. A tremendous
    amount of stuff (again), including a significant rbtree library
    rework."

    * emailed patches from Andrew Morton : (160 commits)
    sparc64: Support transparent huge pages.
    mm: thp: Use more portable PMD clearing sequenece in zap_huge_pmd().
    mm: Add and use update_mmu_cache_pmd() in transparent huge page code.
    sparc64: Document PGD and PMD layout.
    sparc64: Eliminate PTE table memory wastage.
    sparc64: Halve the size of PTE tables
    sparc64: Only support 4MB huge pages and 8KB base pages.
    memory-hotplug: suppress "Trying to free nonexistent resource " warning
    mm: memcg: clean up mm_match_cgroup() signature
    mm: document PageHuge somewhat
    mm: use %pK for /proc/vmallocinfo
    mm, thp: fix mlock statistics
    mm, thp: fix mapped pages avoiding unevictable list on mlock
    memory-hotplug: update memory block's state and notify userspace
    memory-hotplug: preparation to notify memory block's state at memory hot remove
    mm: avoid section mismatch warning for memblock_type_name
    make GFP_NOTRACK definition unconditional
    cma: decrease cc.nr_migratepages after reclaiming pagelist
    CMA: migrate mlocked pages
    kpageflags: fix wrong KPF_THP on non-huge compound pages
    ...

    Linus Torvalds
     
  • .fault now can retry. The retry can break state machine of .fault. In
    filemap_fault, if page is miss, ra->mmap_miss is increased. In the second
    try, since the page is in page cache now, ra->mmap_miss is decreased. And
    these are done in one fault, so we can't detect random mmap file access.

    Add a new flag to indicate .fault is tried once. In the second try, skip
    ra->mmap_miss decreasing. The filemap_fault state machine is ok with it.

    I only tested x86, didn't test other archs, but looks the change for other
    archs is obvious, but who knows :)

    Signed-off-by: Shaohua Li
    Cc: Rik van Riel
    Cc: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shaohua Li
     
  • The x86 implementation of atomic_dec_if_positive is quite generic, so make
    it available to all architectures.

    This is needed for "swap: add a simple detector for inappropriate swapin
    readahead".

    [akpm@linux-foundation.org: do the "#define foo foo" trick in the conventional manner]
    Signed-off-by: Shaohua Li
    Cc: Stephen Rothwell
    Cc: "David S. Miller"
    Cc: Rik van Riel
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Benjamin Herrenschmidt
    Cc: Michal Simek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shaohua Li
     
  • Introduce HAVE_DEBUG_KMEMLEAK config option and select it in corresponding
    architecture Kconfig files. DEBUG_KMEMLEAK now only depends on
    HAVE_DEBUG_KMEMLEAK.

    Signed-off-by: Catalin Marinas
    Cc: Russell King
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Catalin Marinas
     
  • Pull asm-generic updates from Arnd Bergmann:
    "This has three changes for asm-generic that did not really fit into
    any other branch as normal asm-generic changes do. One is a fix for a
    build warning, the other two are more interesting:

    * A patch from Mark Brown to allow using the common clock
    infrastructure on all architectures, so we can use the clock API in
    architecture independent device drivers.

    * The UAPI split patches from David Howells for the asm-generic
    files. There are other architecture specific series that are going
    through the arch maintainer tree and that depend on this one.

    There may be a few small merge conflicts between Mark's patch and the
    following arch header file split patches. In each case the solution
    will be to keep the new "generic-y += clkdev.h" line, even if it ends
    up being the only line in the Kbuild file."

    * tag 'asm-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    UAPI: (Scripted) Disintegrate include/asm-generic
    asm-generic: Add default clkdev.h
    asm-generic: xor: mark static functions as __maybe_unused

    Linus Torvalds
     

07 Oct, 2012

1 commit

  • Pull microblaze arch updates from Michal Simek.

    * 'next' of git://git.monstr.eu/linux-2.6-microblaze:
    Revert "microblaze_mmu_v2: Update signal returning address"
    microblaze: Added more support for PCI
    microblaze: Prefer to use pr_XXX instead of printk(KERN_XX)
    microblaze: Fix bug with passing command line
    microblaze: Remove PAGE properties duplication
    microblaze: Remove additional andi which has been already done
    microblaze: Use predefined macro for ESR_DIZ
    microblaze: Support 4k/16k/64k pages
    microblaze: Do not used hardcoded value in exception handler
    microblaze: Added fdt chosen capability for timer
    microblaze: Add support for ioreadXX/iowriteXX_rep
    microblaze: Improve failure handling for GPIO reset
    microblaze: clinkage.h

    Linus Torvalds
     

06 Oct, 2012

1 commit

  • Historically, the top three bytes of personality have been used for
    things such as ADDR_NO_RANDOMIZE, which made sense only for specific
    architectures.

    We now however have a flag there that is general no matter the
    architecture (UNAME26); generally we have to be careful to preserve the
    personality flags across exec().

    This patch tries to fix all architectures that forcefully overwrite
    personality flags during exec() (ppc32 and s390 have been fixed recently
    by commits f9783ec862ea ("[S390] Do not clobber personality flags on
    exec") and 59e4c3a2fe9c ("powerpc/32: Don't clobber personality flags on
    exec") in a similar way already).

    Signed-off-by: Jiri Kosina
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Mike Frysinger
    Cc: Mark Salter
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Richard Kuo
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Koichi Yasutake
    Cc: Jonas Bonn
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Kosina
     

05 Oct, 2012

2 commits

  • …s/linux-headers into asm-generic

    Patches from David Howells <dhowells@redhat.com>:

    This is to complete part of the UAPI disintegration for which the
    preparatory patches were pulled recently.

    Note that there are some fixup patches which are at the base of the
    branch aimed at you, plus all arches get the asm-generic branch merged in too.

    * 'disintegrate-asm-generic' of git://git.infradead.org/users/dhowells/linux-headers:
    UAPI: (Scripted) Disintegrate include/asm-generic
    UAPI: Fix conditional header installation handling (notably kvm_para.h on m68k)
    c6x: remove c6x signal.h
    UAPI: Split compound conditionals containing __KERNEL__ in Arm64
    UAPI: Fix the guards on various asm/unistd.h files

    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

    Arnd Bergmann
     
  • This reverts commit 8b28626a6b1522b39f75d0bf80d5dec23c931f5a.

    Offset -8 is wrong because when it is applied then one instruction
    before brki r14, 8 is called again when we return.
    Offset -4 is correct and brki instruction is called again.

    This change came from ancient MMU kernel.

    Signed-off-by: Michal Simek

    Michal Simek
     

04 Oct, 2012

13 commits


03 Oct, 2012

2 commits


01 Oct, 2012

3 commits


28 Sep, 2012

1 commit

  • 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: David Howells
    Acked-by: Sam Ravnborg
    Signed-off-by: Rusty Russell

    David Howells
     

20 Sep, 2012

1 commit


04 Aug, 2012

1 commit

  • Pull m68k updates from Geert Uytterhoeven.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k: Make sys_atomic_cmpxchg_32 work on classic m68k
    m68k/apollo: Rename "timer" to "apollo_timer"
    zorro: Remove unused zorro_bus.devices
    m68k: Remove never used asm/shm.h
    m68k/sun3: Remove unselectable code in prom_init()
    m68k: Use asm-generic version of
    m68k: Replace m68k-specific _[se]bss by generic __bss_{start,stop}
    mtd/uclinux: Use generic __bss_stop instead of _ebss
    m68knommu: Allow ColdFire CPUs to use unaligned accesses
    m68k: Remove five unused headers
    m68k: CPU32 does not support unaligned accesses
    m68k: Introduce config option CPU_HAS_NO_UNALIGNED
    m68k: delay, muldi3 - Use CONFIG_CPU_HAS_NO_MULDIV64
    m68k: Move CPU_HAS_* config options
    m68k: Remove duplicate FPU config option
    m68knommu: Clean up printing of sections
    m68k: Use asm-generic version of
    m68k: Use Kbuild logic to import asm-generic headers

    Linus Torvalds
     

31 Jul, 2012

1 commit

  • Rather than #define the options manually in the architecture code, add
    Kconfig options for them and select them there instead. This also allows
    us to select the compat IPC version parsing automatically for platforms
    using the old compat IPC interface.

    Reported-by: Andrew Morton
    Signed-off-by: Will Deacon
    Cc: Arnd Bergmann
    Cc: Chris Metcalf
    Cc: Catalin Marinas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Deacon
     

25 Jul, 2012

1 commit

  • Pull PCI changes from Bjorn Helgaas:
    "Host bridge hotplug:
    - Add MMCONFIG support for hot-added host bridges (Jiang Liu)
    Device hotplug:
    - Move fixups from __init to __devinit (Sebastian Andrzej Siewior)
    - Call FINAL fixups for hot-added devices, too (Myron Stowe)
    - Factor out generic code for P2P bridge hot-add (Yinghai Lu)
    - Remove all functions in a slot, not just those with _EJx (Amos
    Kong)
    Dynamic resource management:
    - Track bus number allocation (struct resource tree per domain)
    (Yinghai Lu)
    - Make P2P bridge 1K I/O windows work with resource reassignment
    (Bjorn Helgaas, Yinghai Lu)
    - Disable decoding while updating 64-bit BARs (Bjorn Helgaas)
    Power management:
    - Add PCIe runtime D3cold support (Huang Ying)
    Virtualization:
    - Add VFIO infrastructure (ACS, DMA source ID quirks) (Alex
    Williamson)
    - Add quirks for devices with broken INTx masking (Jan Kiszka)
    Miscellaneous:
    - Fix some PCI Express capability version issues (Myron Stowe)
    - Factor out some arch code with a weak, generic, pcibios_setup()
    (Myron Stowe)"

    * tag 'for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (122 commits)
    PCI: hotplug: ensure a consistent return value in error case
    PCI: fix undefined reference to 'pci_fixup_final_inited'
    PCI: build resource code for M68K architecture
    PCI: pciehp: remove unused pciehp_get_max_lnk_width(), pciehp_get_cur_lnk_width()
    PCI: reorder __pci_assign_resource() (no change)
    PCI: fix truncation of resource size to 32 bits
    PCI: acpiphp: merge acpiphp_debug and debug
    PCI: acpiphp: remove unused res_lock
    sparc/PCI: replace pci_cfg_fake_ranges() with pci_read_bridge_bases()
    PCI: call final fixups hot-added devices
    PCI: move final fixups from __init to __devinit
    x86/PCI: move final fixups from __init to __devinit
    MIPS/PCI: move final fixups from __init to __devinit
    PCI: support sizing P2P bridge I/O windows with 1K granularity
    PCI: reimplement P2P bridge 1K I/O windows (Intel P64H2)
    PCI: disable MEM decoding while updating 64-bit MEM BARs
    PCI: leave MEM and IO decoding disabled during 64-bit BAR sizing, too
    PCI: never discard enable/suspend/resume_early/resume fixups
    PCI: release temporary reference in __nv_msi_ht_cap_quirk()
    PCI: restructure 'pci_do_fixups()'
    ...

    Linus Torvalds
     

06 Jul, 2012

3 commits

  • The pattern (np ? np->full_name : "") is rather common in the
    kernel, but can also make for quite long lines. This patch adds a new
    inline function, of_node_full_name() so that the test for a valid node
    pointer doesn't need to be open coded at all call sites.

    Signed-off-by: Grant Likely
    Cc: Paul Mundt
    Cc: Benjamin Herrenschmidt
    Cc: Thomas Gleixner
    Signed-off-by: Rob Herring

    Grant Likely
     
  • * pci/myron-pcibios_setup:
    xtensa/PCI: factor out pcibios_setup()
    x86/PCI: adjust section annotations for pcibios_setup()
    unicore32/PCI: adjust section annotations for pcibios_setup()
    tile/PCI: factor out pcibios_setup()
    sparc/PCI: factor out pcibios_setup()
    sh/PCI: adjust section annotations for pcibios_setup()
    sh/PCI: factor out pcibios_setup()
    powerpc/PCI: factor out pcibios_setup()
    parisc/PCI: factor out pcibios_setup()
    MIPS/PCI: adjust section annotations for pcibios_setup()
    MIPS/PCI: factor out pcibios_setup()
    microblaze/PCI: factor out pcibios_setup()
    ia64/PCI: factor out pcibios_setup()
    cris/PCI: factor out pcibios_setup()
    alpha/PCI: factor out pcibios_setup()
    PCI: pull pcibios_setup() up into core

    Bjorn Helgaas
     
  • The PCI core provides a generic pcibios_setup() routine. Drop this
    architecture-specific version in favor of that.

    Acked-by: Michal Simek
    Signed-off-by: Myron Stowe
    Signed-off-by: Bjorn Helgaas

    Myron Stowe
     

27 Jun, 2012

1 commit

  • The standard (see BSS_SECTION() in and
    ) symbol for the end of BSS is __bss_stop.
    This allows to remove all local declarations that have been added to
    several architectures just to please CONFIG_MTD_UCLINUX.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Paul Mundt
    Acked-by: Mike Frysinger
    Acked-by: Michal Simek
    Acked-by: Greg Ungerer

    Geert Uytterhoeven