17 Aug, 2015

1 commit

  • commit 3c00cb5e68dc719f2fc73a33b1b230aadfcb1309 upstream.

    This function can leak kernel stack data when the user siginfo_t has a
    positive si_code value. The top 16 bits of si_code descibe which fields
    in the siginfo_t union are active, but they are treated inconsistently
    between copy_siginfo_from_user32, copy_siginfo_to_user32 and
    copy_siginfo_to_user.

    copy_siginfo_from_user32 is called from rt_sigqueueinfo and
    rt_tgsigqueueinfo in which the user has full control overthe top 16 bits
    of si_code.

    This fixes the following information leaks:
    x86: 8 bytes leaked when sending a signal from a 32-bit process to
    itself. This leak grows to 16 bytes if the process uses x32.
    (si_code = __SI_CHLD)
    x86: 100 bytes leaked when sending a signal from a 32-bit process to
    a 64-bit process. (si_code = -1)
    sparc: 4 bytes leaked when sending a signal from a 32-bit process to a
    64-bit process. (si_code = any)

    parsic and s390 have similar bugs, but they are not vulnerable because
    rt_[tg]sigqueueinfo have checks that prevent sending a positive si_code
    to a different process. These bugs are also fixed for consistency.

    Signed-off-by: Amanieu d'Antras
    Cc: Oleg Nesterov
    Cc: Ingo Molnar
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Chris Metcalf
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Amanieu d'Antras
     

11 Aug, 2015

1 commit


28 Apr, 2015

1 commit


21 Apr, 2015

1 commit

  • Pull final removal of deprecated cpus_* cpumask functions from Rusty Russell:
    "This is the final removal (after several years!) of the obsolete
    cpus_* functions, prompted by their mis-use in staging.

    With these function removed, all cpu functions should only iterate to
    nr_cpu_ids, so we finally only allocate that many bits when cpumasks
    are allocated offstack"

    * tag 'cpumask-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (25 commits)
    cpumask: remove __first_cpu / __next_cpu
    cpumask: resurrect CPU_MASK_CPU0
    linux/cpumask.h: add typechecking to cpumask_test_cpu
    cpumask: only allocate nr_cpumask_bits.
    Fix weird uses of num_online_cpus().
    cpumask: remove deprecated functions.
    mips: fix obsolete cpumask_of_cpu usage.
    x86: fix more deprecated cpu function usage.
    ia64: remove deprecated cpus_ usage.
    powerpc: fix deprecated CPU_MASK_CPU0 usage.
    CPU_MASK_ALL/CPU_MASK_NONE: remove from deprecated region.
    staging/lustre/o2iblnd: Don't use cpus_weight
    staging/lustre/libcfs: replace deprecated cpus_ calls with cpumask_
    staging/lustre/ptlrpc: Do not use deprecated cpus_* functions
    blackfin: fix up obsolete cpu function usage.
    parisc: fix up obsolete cpu function usage.
    tile: fix up obsolete cpu function usage.
    arm64: fix up obsolete cpu function usage.
    mips: fix up obsolete cpu function usage.
    x86: fix up obsolete cpu function usage.
    ...

    Linus Torvalds
     

18 Apr, 2015

9 commits

  • Pull arch/tile updates from Chris Metcalf:
    "These are mostly nohz_full changes, plus a smattering of minor fixes
    (notably a couple for ftrace)"

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    tile: nohz: warn if nohz_full uses hypervisor shared cores
    tile: ftrace: fix function_graph tracer issues
    tile: map data region shadow of kernel as R/W
    tile: support CONTEXT_TRACKING and thus NOHZ_FULL
    tile: support arch_irq_work_raise
    arch: tile: fix null pointer dereference on pt_regs pointer
    tile/elf: reorganize notify_exec()
    tile: use si_int instead of si_ptr for compat_siginfo

    Linus Torvalds
     
  • The "hypervisor shared" cores are ones that the Tilera hypervisor
    uses to receive interrupts to manage hypervisor-owned devices.
    It's a bad idea to try to use those cores with nohz_full, since
    they will get interrupted unpredictably -- and invisibly to Linux
    tracing tools, since the interrupts are delivered at a higher
    privilege level to the Tilera hypervisor.

    Generate a clear warning at boot up that this doesn't end well
    for the nohz_full cores in question.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • - Add support for ARCH_SUPPORTS_FTRACE_OPS
    - Replace the instruction in ftrace_call with the bundle {move r10, lr;
    jal ftrace_stub}, so that the lr contains the right value after returning
    from ftrace_stub. An alternative fix might be to leave the instruction
    in ftrace_call alone when it is being updated with ftrace_stub.

    Signed-off-by: Tony Lu
    Signed-off-by: Chris Metcalf

    Tony Lu
     
  • This is necessary for things like reading /proc/kcore, doing ftrace,
    etc. It happens by default when using huge pages to map the kernel
    data, but not when using small pages.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Add the TIF_NOHZ flag appropriately.

    Add call to user_exit() on entry to do_work_pending() and on entry
    to syscalls via do_syscall_trace_enter(), and also the top of
    do_syscall_trace_exit() just because it's done in x86.

    Add call to user_enter() at the bottom of do_work_pending() once we
    have no more work to do before returning to userspace.

    Wrap all the trap code in exception_enter() / exception_exit().

    Signed-off-by: Chris Metcalf
    Acked-by: Frederic Weisbecker

    Chris Metcalf
     
  • Tile includes a hypervisor hook to deliver messages to arbitrary
    tiles, so we can use that to raise an interrupt as soon as
    possible on our own core. Unfortunately the Tilera hypervisor
    disabled that support on principle in previous releases, but
    it will be available in MDE 4.3.4 and later.

    Signed-off-by: Chris Metcalf
    Acked-by: Frederic Weisbecker

    Chris Metcalf
     
  • Cppcheck reports the following issue:
    [arch/tile/kernel/stack.c:116]: (error) Possible null
    pointer dereference: p

    In this case, on reporting on an odd fault, p is set to NULL
    and immediately afterwords p is dereferenced iff
    !kbt->profile is false. Rather than doing this check just
    return NULL rather than falling through to the potential
    null pointer dereference (since the original intentional
    outcome would be to return NULL anyhow) for this odd fault
    case.

    Signed-off-by: Colin Ian King
    Signed-off-by: Chris Metcalf [tweaked lightly]

    Colin Ian King
     
  • In the future mm->exe_file will be done without mmap_sem
    serialization, thus isolate and reorganize the tile elf
    code to make the transition easier. Good users will, make
    use of the more standard get_mm_exe_file(), requiring only
    holding the mmap_sem to read the value, and relying on reference
    counting to make sure that the exe file won't dissappear
    underneath us.

    The visible effects of this patch are:

    o We now take and drop the mmap_sem more often. Instead of
    just in arch_setup_additional_pages(), we also do it in:

    1) get_mm_exe_file()
    2) to get the mm->vm_file and notify the simulator.

    [Note that 1) will disappear once we change the locking
    rules for exe_file.]

    o We avoid getting a free page and doing d_path() while
    holding the mmap_sem. This requires reordering the checks.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Chris Metcalf

    Davidlohr Bueso
     
  • To be compatible with the generic get_compat_sigevent(), the
    copy_siginfo_to_user32() and thus copy_siginfo_from_user32()
    have to use si_int instead of si_ptr. Using si_ptr means that
    for the case of ILP32 compat code running in big-endian mode,
    we would end up copying the high 32 bits of the pointer value
    into si_int instead of the desired low 32 bits.

    Signed-off-by: Chris Metcalf
    Cc: Catalin Marinas

    Chris Metcalf
     

16 Apr, 2015

2 commits

  • Pull exec domain removal from Richard Weinberger:
    "This series removes execution domain support from Linux.

    The idea behind exec domains was to support different ABIs. The
    feature was never complete nor stable. Let's rip it out and make the
    kernel signal handling code less complicated"

    * 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc: (27 commits)
    arm64: Removed unused variable
    sparc: Fix execution domain removal
    Remove rest of exec domains.
    arch: Remove exec_domain from remaining archs
    arc: Remove signal translation and exec_domain
    xtensa: Remove signal translation and exec_domain
    xtensa: Autogenerate offsets in struct thread_info
    x86: Remove signal translation and exec_domain
    unicore32: Remove signal translation and exec_domain
    um: Remove signal translation and exec_domain
    tile: Remove signal translation and exec_domain
    sparc: Remove signal translation and exec_domain
    sh: Remove signal translation and exec_domain
    s390: Remove signal translation and exec_domain
    mn10300: Remove signal translation and exec_domain
    microblaze: Remove signal translation and exec_domain
    m68k: Remove signal translation and exec_domain
    m32r: Remove signal translation and exec_domain
    m32r: Autogenerate offsets in struct thread_info
    frv: Remove signal translation and exec_domain
    ...

    Linus Torvalds
     
  • Pull networking updates from David Miller:

    1) Add BQL support to via-rhine, from Tino Reichardt.

    2) Integrate SWITCHDEV layer support into the DSA layer, so DSA drivers
    can support hw switch offloading. From Floria Fainelli.

    3) Allow 'ip address' commands to initiate multicast group join/leave,
    from Madhu Challa.

    4) Many ipv4 FIB lookup optimizations from Alexander Duyck.

    5) Support EBPF in cls_bpf classifier and act_bpf action, from Daniel
    Borkmann.

    6) Remove the ugly compat support in ARP for ugly layers like ax25,
    rose, etc. And use this to clean up the neigh layer, then use it to
    implement MPLS support. All from Eric Biederman.

    7) Support L3 forwarding offloading in switches, from Scott Feldman.

    8) Collapse the LOCAL and MAIN ipv4 FIB tables when possible, to speed
    up route lookups even further. From Alexander Duyck.

    9) Many improvements and bug fixes to the rhashtable implementation,
    from Herbert Xu and Thomas Graf. In particular, in the case where
    an rhashtable user bulk adds a large number of items into an empty
    table, we expand the table much more sanely.

    10) Don't make the tcp_metrics hash table per-namespace, from Eric
    Biederman.

    11) Extend EBPF to access SKB fields, from Alexei Starovoitov.

    12) Split out new connection request sockets so that they can be
    established in the main hash table. Much less false sharing since
    hash lookups go direct to the request sockets instead of having to
    go first to the listener then to the request socks hashed
    underneath. From Eric Dumazet.

    13) Add async I/O support for crytpo AF_ALG sockets, from Tadeusz Struk.

    14) Support stable privacy address generation for RFC7217 in IPV6. From
    Hannes Frederic Sowa.

    15) Hash network namespace into IP frag IDs, also from Hannes Frederic
    Sowa.

    16) Convert PTP get/set methods to use 64-bit time, from Richard
    Cochran.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1816 commits)
    fm10k: Bump driver version to 0.15.2
    fm10k: corrected VF multicast update
    fm10k: mbx_update_max_size does not drop all oversized messages
    fm10k: reset head instead of calling update_max_size
    fm10k: renamed mbx_tx_dropped to mbx_tx_oversized
    fm10k: update xcast mode before synchronizing multicast addresses
    fm10k: start service timer on probe
    fm10k: fix function header comment
    fm10k: comment next_vf_mbx flow
    fm10k: don't handle mailbox events in iov_event path and always process mailbox
    fm10k: use separate workqueue for fm10k driver
    fm10k: Set PF queues to unlimited bandwidth during virtualization
    fm10k: expose tx_timeout_count as an ethtool stat
    fm10k: only increment tx_timeout_count in Tx hang path
    fm10k: remove extraneous "Reset interface" message
    fm10k: separate PF only stats so that VF does not display them
    fm10k: use hw->mac.max_queues for stats
    fm10k: only show actual queues, not the maximum in hardware
    fm10k: allow creation of VLAN on default vid
    fm10k: fix unused warnings
    ...

    Linus Torvalds
     

15 Apr, 2015

1 commit


14 Apr, 2015

1 commit

  • Pull PCI changes from Bjorn Helgaas:
    "Enumeration
    - Read capability list as dwords, not bytes (Sean O. Stalley)

    Resource management
    - Don't check for PNP overlaps with unassigned PCI BARs (Bjorn Helgaas)
    - Mark invalid BARs as unassigned (Bjorn Helgaas)
    - Show driver, BAR#, and resource on pci_ioremap_bar() failure (Bjorn Helgaas)
    - Fail pci_ioremap_bar() on unassigned resources (Bjorn Helgaas)
    - Assign resources before drivers claim devices (Yijing Wang)
    - Claim bus resources before pci_bus_add_devices() (Yijing Wang)

    Power management
    - Optimize device state transition delays (Aaron Lu)
    - Don't clear ASPM bits when the FADT declares it's unsupported (Matthew Garrett)

    Virtualization
    - Add ACS quirks for Intel 1G NICs (Alex Williamson)

    IOMMU
    - Add ptr to OF node arg to of_iommu_configure() (Murali Karicheri)
    - Move of_dma_configure() to device.c to help re-use (Murali Karicheri)
    - Fix size when dma-range is not used (Murali Karicheri)
    - Add helper functions pci_get[put]_host_bridge_device() (Murali Karicheri)
    - Add of_pci_dma_configure() to update DMA configuration (Murali Karicheri)
    - Update DMA configuration from DT (Murali Karicheri)
    - dma-mapping: limit IOMMU mapping size (Murali Karicheri)
    - Calculate device DMA masks based on DT dma-range size (Murali Karicheri)

    ARM Versatile host bridge driver
    - Check for devm_ioremap_resource() failures (Jisheng Zhang)

    Broadcom iProc host bridge driver
    - Add Broadcom iProc PCIe driver (Ray Jui)

    Marvell MVEBU host bridge driver
    - Add suspend/resume support (Thomas Petazzoni)

    Renesas R-Car host bridge driver
    - Fix position of MSI enable bit (Nobuhiro Iwamatsu)
    - Write zeroes to reserved PCIEPARL bits (Nobuhiro Iwamatsu)
    - Change PCIEPARL and PCIEPARH to PCIEPALR and PCIEPAUR (Nobuhiro Iwamatsu)
    - Verify that mem_res is 64K-aligned (Nobuhiro Iwamatsu)

    Samsung Exynos host bridge driver
    - Fix INTx enablement statement termination error (Jaehoon Chung)

    Miscellaneous
    - Make a shareable UUID for PCI firmware ACPI _DSM (Aaron Lu)
    - Clarify policy for vendor IDs in pci.txt (Michael S. Tsirkin)"

    * tag 'pci-v4.1-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (36 commits)
    PCI: Read capability list as dwords, not bytes
    PCI: layerscape: Simplify platform_get_resource_byname() failure checking
    PCI: keystone: Don't dereference possible NULL pointer
    PCI: versatile: Check for devm_ioremap_resource() failures
    PCI: Don't clear ASPM bits when the FADT declares it's unsupported
    PCI: Clarify policy for vendor IDs in pci.txt
    PCI/ACPI: Optimize device state transition delays
    PCI: Export pci_find_host_bridge() for use inside PCI core
    PCI: Make a shareable UUID for PCI firmware ACPI _DSM
    PCI: Fix typo in Thunderbolt kernel message
    PCI: exynos: Fix INTx enablement statement termination error
    PCI: iproc: Add Broadcom iProc PCIe support
    PCI: iproc: Add DT docs for Broadcom iProc PCIe driver
    PCI: Export symbols required for loadable host driver modules
    PCI: Add ACS quirks for Intel 1G NICs
    PCI: mvebu: Add suspend/resume support
    PCI: Cleanup control flow
    sparc/PCI: Claim bus resources before pci_bus_add_devices()
    PCI: Assign resources before drivers claim devices (pci_scan_root_bus())
    PCI: Fail pci_ioremap_bar() on unassigned resources
    ...

    Linus Torvalds
     

13 Apr, 2015

1 commit


01 Apr, 2015

1 commit

  • This driver is 64 bit only, and so this driver and device are ready
    for 2038. This patch changes the driver to the new PHC and also
    carries the timespec64 parameter on out to the gxio_mpipe_get-
    set_timestamp functions, making explicit the fact that the tv_sec
    field is 64 bits wide.

    Not even compile tested.

    Signed-off-by: Richard Cochran
    Acked-by: Chris Metcalf
    Signed-off-by: David S. Miller

    Richard Cochran
     

27 Mar, 2015

1 commit

  • In preparation of adding another tkr field, rename this one to
    tkr_mono. Also rename tk_read_base::base_mono to tk_read_base::base,
    since the structure is not specific to CLOCK_MONOTONIC and the mono
    name got added to the tk_read_base instance.

    Lots of trivial churn.

    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: John Stultz
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20150319093400.344679419@infradead.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

19 Mar, 2015

1 commit

  • Previously, pci_scan_root_bus() created a root PCI bus, enumerated the
    devices on it, and called pci_bus_add_devices(), which made the devices
    available for drivers to claim them.

    Most callers assigned resources to devices after pci_scan_root_bus()
    returns, which may be after drivers have claimed the devices. This is
    incorrect; the PCI core should not change device resources while a driver
    is managing the device.

    Remove pci_bus_add_devices() from pci_scan_root_bus() and do it after any
    resource assignment in the callers.

    Note that ARM's pci_common_init_dev() already called pci_bus_add_devices()
    after pci_scan_root_bus(), so we only need to remove the first call:

    pci_common_init_dev
    pcibios_init_hw
    pci_scan_root_bus
    pci_bus_add_devices # first call
    pci_bus_assign_resources
    pci_bus_add_devices # second call

    [bhelgaas: changelog, drop "root_bus" var in alpha common_init_pci(),
    return failure earlier in mn10300, add "return" in x86 pcibios_scan_root(),
    return early if xtensa platform_pcibios_fixup() fails]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas
    CC: Richard Henderson
    CC: Ivan Kokshaysky
    CC: Matt Turner
    CC: David Howells
    CC: Tony Luck
    CC: Michal Simek
    CC: Ralf Baechle
    CC: Koichi Yasutake
    CC: Sebastian Ott
    CC: "David S. Miller"
    CC: Chris Metcalf
    CC: Chris Zankel
    CC: Max Filippov
    CC: Thomas Gleixner

    Yijing Wang
     

05 Mar, 2015

1 commit


14 Feb, 2015

2 commits


13 Feb, 2015

1 commit

  • If an attacker can cause a controlled kernel stack overflow, overwriting
    the restart block is a very juicy exploit target. This is because the
    restart_block is held in the same memory allocation as the kernel stack.

    Moving the restart block to struct task_struct prevents this exploit by
    making the restart_block harder to locate.

    Note that there are other fields in thread_info that are also easy
    targets, at least on some architectures.

    It's also a decent simplification, since the restart code is more or less
    identical on all architectures.

    [james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
    Signed-off-by: Andy Lutomirski
    Cc: Thomas Gleixner
    Cc: Al Viro
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: David Miller
    Acked-by: Richard Weinberger
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Steven Miao
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Richard Kuo
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Jonas Bonn
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Acked-by: Michael Ellerman (powerpc)
    Tested-by: Michael Ellerman (powerpc)
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: Oleg Nesterov
    Cc: Guenter Roeck
    Signed-off-by: James Hogan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     

12 Feb, 2015

2 commits

  • LKP has triggered a compiler warning after my recent patch "mm: account
    pmd page tables to the process":

    mm/mmap.c: In function 'exit_mmap':
    >> mm/mmap.c:2857:2: warning: right shift count >= width of type [enabled by default]

    The code:

    > 2857 WARN_ON(mm_nr_pmds(mm) >
    2858 round_up(FIRST_USER_ADDRESS, PUD_SIZE) >> PUD_SHIFT);

    In this, on tile, we have FIRST_USER_ADDRESS defined as 0. round_up() has
    the same type -- int. PUD_SHIFT.

    I think the best way to fix it is to define FIRST_USER_ADDRESS as unsigned
    long. On every arch for consistency.

    Signed-off-by: Kirill A. Shutemov
    Reported-by: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     
  • Currently we have many duplicates in definitions around
    follow_huge_addr(), follow_huge_pmd(), and follow_huge_pud(), so this
    patch tries to remove the m. The basic idea is to put the default
    implementation for these functions in mm/hugetlb.c as weak symbols
    (regardless of CONFIG_ARCH_WANT_GENERAL_HUGETL B), and to implement
    arch-specific code only when the arch needs it.

    For follow_huge_addr(), only powerpc and ia64 have their own
    implementation, and in all other architectures this function just returns
    ERR_PTR(-EINVAL). So this patch sets returning ERR_PTR(-EINVAL) as
    default.

    As for follow_huge_(pmd|pud)(), if (pmd|pud)_huge() is implemented to
    always return 0 in your architecture (like in ia64 or sparc,) it's never
    called (the callsite is optimized away) no matter how implemented it is.
    So in such architectures, we don't need arch-specific implementation.

    In some architecture (like mips, s390 and tile,) their current
    arch-specific follow_huge_(pmd|pud)() are effectively identical with the
    common code, so this patch lets these architecture use the common code.

    One exception is metag, where pmd_huge() could return non-zero but it
    expects follow_huge_pmd() to always return NULL. This means that we need
    arch-specific implementation which returns NULL. This behavior looks
    strange to me (because non-zero pmd_huge() implies that the architecture
    supports PMD-based hugepage, so follow_huge_pmd() can/should return some
    relevant value,) but that's beyond this cleanup patch, so let's keep it.

    Justification of non-trivial changes:
    - in s390, follow_huge_pmd() checks !MACHINE_HAS_HPAGE at first, and this
    patch removes the check. This is OK because we can assume MACHINE_HAS_HPAGE
    is true when follow_huge_pmd() can be called (note that pmd_huge() has
    the same check and always returns 0 for !MACHINE_HAS_HPAGE.)
    - in s390 and mips, we use HPAGE_MASK instead of PMD_MASK as done in common
    code. This patch forces these archs use PMD_MASK, but it's OK because
    they are identical in both archs.
    In s390, both of HPAGE_SHIFT and PMD_SHIFT are 20.
    In mips, HPAGE_SHIFT is defined as (PAGE_SHIFT + PAGE_SHIFT - 3) and
    PMD_SHIFT is define as (PAGE_SHIFT + PAGE_SHIFT + PTE_ORDER - 3), but
    PTE_ORDER is always 0, so these are identical.

    Signed-off-by: Naoya Horiguchi
    Acked-by: Hugh Dickins
    Cc: James Hogan
    Cc: David Rientjes
    Cc: Mel Gorman
    Cc: Johannes Weiner
    Cc: Michal Hocko
    Cc: Rik van Riel
    Cc: Andrea Arcangeli
    Cc: Luiz Capitulino
    Cc: Nishanth Aravamudan
    Cc: Lee Schermerhorn
    Cc: Steve Capper
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Naoya Horiguchi
     

11 Feb, 2015

3 commits

  • Merge misc updates from Andrew Morton:
    "Bite-sized chunks this time, to avoid the MTA ratelimiting woes.

    - fs/notify updates

    - ocfs2

    - some of MM"

    That laconic "some MM" is mainly the removal of remap_file_pages(),
    which is a big simplification of the VM, and which gets rid of a *lot*
    of random cruft and special cases because we no longer support the
    non-linear mappings that it used.

    From a user interface perspective, nothing has changed, because the
    remap_file_pages() syscall still exists, it's just done by emulating the
    old behavior by creating a lot of individual small mappings instead of
    one non-linear one.

    The emulation is slower than the old "native" non-linear mappings, but
    nobody really uses or cares about remap_file_pages(), and simplifying
    the VM is a big advantage.

    * emailed patches from Andrew Morton : (78 commits)
    memcg: zap memcg_slab_caches and memcg_slab_mutex
    memcg: zap memcg_name argument of memcg_create_kmem_cache
    memcg: zap __memcg_{charge,uncharge}_slab
    mm/page_alloc.c: place zone_id check before VM_BUG_ON_PAGE check
    mm: hugetlb: fix type of hugetlb_treat_as_movable variable
    mm, hugetlb: remove unnecessary lower bound on sysctl handlers"?
    mm: memory: merge shared-writable dirtying branches in do_wp_page()
    mm: memory: remove ->vm_file check on shared writable vmas
    xtensa: drop _PAGE_FILE and pte_file()-related helpers
    x86: drop _PAGE_FILE and pte_file()-related helpers
    unicore32: drop pte_file()-related helpers
    um: drop _PAGE_FILE and pte_file()-related helpers
    tile: drop pte_file()-related helpers
    sparc: drop pte_file()-related helpers
    sh: drop _PAGE_FILE and pte_file()-related helpers
    score: drop _PAGE_FILE and pte_file()-related helpers
    s390: drop pte_file()-related helpers
    parisc: drop _PAGE_FILE and pte_file()-related helpers
    openrisc: drop _PAGE_FILE and pte_file()-related helpers
    nios2: drop _PAGE_FILE and pte_file()-related helpers
    ...

    Linus Torvalds
     
  • Pull PCI changes from Bjorn Helgaas:
    "Enumeration
    - Move domain assignment from arm64 to generic code (Lorenzo Pieralisi)
    - ARM: Remove artificial dependency on pci_sys_data domain (Lorenzo Pieralisi)
    - ARM: Move to generic PCI domains (Lorenzo Pieralisi)
    - Generate uppercase hex for modalias var in uevent (Ricardo Ribalda Delgado)
    - Add and use generic config accessors on ARM, PowerPC (Rob Herring)

    Resource management
    - Free resources on failure in of_pci_get_host_bridge_resources() (Lorenzo Pieralisi)
    - Fix infinite loop with ROM image of size 0 (Michel Dänzer)

    PCI device hotplug
    - Handle surprise add even if surprise removal isn't supported (Bjorn Helgaas)

    Virtualization
    - Mark AMD/ATI VGA devices that don't reset on D3hot->D0 transition (Alex Williamson)
    - Add DMA alias quirk for Adaptec 3405 (Alex Williamson)
    - Add Wellsburg (X99) to Intel PCH root port ACS quirk (Alex Williamson)
    - Add ACS quirk for Emulex NICs (Vasundhara Volam)

    MSI
    - Fail MSI-X mappings if there's no space assigned to MSI-X BAR (Yijing Wang)

    Freescale Layerscape host bridge driver
    - Fix platform_no_drv_owner.cocci warnings (Julia Lawall)

    NVIDIA Tegra host bridge driver
    - Remove unnecessary tegra_pcie_fixup_bridge() (Lucas Stach)

    Renesas R-Car host bridge driver
    - Fix error handling of irq_of_parse_and_map() (Dmitry Torokhov)

    TI Keystone host bridge driver
    - Fix error handling of irq_of_parse_and_map() (Dmitry Torokhov)
    - Fix misspelling of current function in debug output (Julia Lawall)

    Xilinx AXI host bridge driver
    - Fix harmless format string warning (Arnd Bergmann)

    Miscellaneous
    - Use standard parsing functions for ASPM sysfs setters (Chris J Arges)
    - Add pci_device_to_OF_node() stub for !CONFIG_OF (Kevin Hao)
    - Delete unnecessary NULL pointer checks (Markus Elfring)
    - Add and use defines for PCIe Max_Read_Request_Size (Rafał Miłecki)
    - Include clk.h instead of clk-private.h (Stephen Boyd)"

    * tag 'pci-v3.20-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (48 commits)
    PCI: Add pci_device_to_OF_node() stub for !CONFIG_OF
    PCI: xilinx: Convert to use generic config accessors
    PCI: xgene: Convert to use generic config accessors
    PCI: tegra: Convert to use generic config accessors
    PCI: rcar: Convert to use generic config accessors
    PCI: generic: Convert to use generic config accessors
    powerpc/powermac: Convert PCI to use generic config accessors
    powerpc/fsl_pci: Convert PCI to use generic config accessors
    ARM: ks8695: Convert PCI to use generic config accessors
    ARM: sa1100: Convert PCI to use generic config accessors
    ARM: integrator: Convert PCI to use generic config accessors
    PCI: versatile: Add DT-based ARM Versatile PB PCIe host driver
    ARM: dts: versatile: add PCI controller binding
    of/pci: Free resources on failure in of_pci_get_host_bridge_resources()
    PCI: versatile: Add DT docs for ARM Versatile PB PCIe driver
    PCI: Fail MSI-X mappings if there's no space assigned to MSI-X BAR
    r8169: use PCI define for Max_Read_Request_Size
    [SCSI] esas2r: use PCI define for Max_Read_Request_Size
    tile: use PCI define for Max_Read_Request_Size
    rapidio/tsi721: use PCI define for Max_Read_Request_Size
    ...

    Linus Torvalds
     
  • We've replaced remap_file_pages(2) implementation with emulation. Nobody
    creates non-linear mapping anymore.

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

10 Feb, 2015

1 commit

  • Pull RCU updates from Ingo Molnar:
    "The main RCU changes in this cycle are:

    - Documentation updates.

    - Miscellaneous fixes.

    - Preemptible-RCU fixes, including fixing an old bug in the
    interaction of RCU priority boosting and CPU hotplug.

    - SRCU updates.

    - RCU CPU stall-warning updates.

    - RCU torture-test updates"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (54 commits)
    rcu: Initialize tiny RCU stall-warning timeouts at boot
    rcu: Fix RCU CPU stall detection in tiny implementation
    rcu: Add GP-kthread-starvation checks to CPU stall warnings
    rcu: Make cond_resched_rcu_qs() apply to normal RCU flavors
    rcu: Optionally run grace-period kthreads at real-time priority
    ksoftirqd: Use new cond_resched_rcu_qs() function
    ksoftirqd: Enable IRQs and call cond_resched() before poking RCU
    rcutorture: Add more diagnostics in rcu_barrier() test failure case
    torture: Flag console.log file to prevent holdovers from earlier runs
    torture: Add "-enable-kvm -soundhw pcspk" to qemu command line
    rcutorture: Handle different mpstat versions
    rcutorture: Check from beginning to end of grace period
    rcu: Remove redundant rcu_batches_completed() declaration
    rcutorture: Drop rcu_torture_completed() and friends
    rcu: Provide rcu_batches_completed_sched() for TINY_RCU
    rcutorture: Use unsigned for Reader Batch computations
    rcutorture: Make build-output parsing correctly flag RCU's warnings
    rcu: Make _batches_completed() functions return unsigned long
    rcutorture: Issue warnings on close calls due to Reader Batch blows
    documentation: Fix smp typo in memory-barriers.txt
    ...

    Linus Torvalds
     

30 Jan, 2015

1 commit

  • The core VM already knows about VM_FAULT_SIGBUS, but cannot return a
    "you should SIGSEGV" error, because the SIGSEGV case was generally
    handled by the caller - usually the architecture fault handler.

    That results in lots of duplication - all the architecture fault
    handlers end up doing very similar "look up vma, check permissions, do
    retries etc" - but it generally works. However, there are cases where
    the VM actually wants to SIGSEGV, and applications _expect_ SIGSEGV.

    In particular, when accessing the stack guard page, libsigsegv expects a
    SIGSEGV. And it usually got one, because the stack growth is handled by
    that duplicated architecture fault handler.

    However, when the generic VM layer started propagating the error return
    from the stack expansion in commit fee7e49d4514 ("mm: propagate error
    from stack expansion even for guard page"), that now exposed the
    existing VM_FAULT_SIGBUS result to user space. And user space really
    expected SIGSEGV, not SIGBUS.

    To fix that case, we need to add a VM_FAULT_SIGSEGV, and teach all those
    duplicate architecture fault handlers about it. They all already have
    the code to handle SIGSEGV, so it's about just tying that new return
    value to the existing code, but it's all a bit annoying.

    This is the mindless minimal patch to do this. A more extensive patch
    would be to try to gather up the mostly shared fault handling logic into
    one generic helper routine, and long-term we really should do that
    cleanup.

    Just from this patch, you can generally see that most architectures just
    copied (directly or indirectly) the old x86 way of doing things, but in
    the meantime that original x86 model has been improved to hold the VM
    semaphore for shorter times etc and to handle VM_FAULT_RETRY and other
    "newer" things, so it would be a good idea to bring all those
    improvements to the generic case and teach other architectures about
    them too.

    Reported-and-tested-by: Takashi Iwai
    Tested-by: Jan Engelhardt
    Acked-by: Heiko Carstens # "s390 still compiles and boots"
    Cc: linux-arch@vger.kernel.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

27 Jan, 2015

1 commit


20 Jan, 2015

2 commits

  • Nothing needs the module pointer any more, and the next patch will
    call it from RCU, where the module itself might no longer exist.
    Removing the arg is the safest approach.

    This just codifies the use of the module_alloc/module_free pattern
    which ftrace and bpf use.

    Signed-off-by: Rusty Russell
    Acked-by: Alexei Starovoitov
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: Ralf Baechle
    Cc: Ley Foon Tan
    Cc: Benjamin Herrenschmidt
    Cc: Chris Metcalf
    Cc: Steven Rostedt
    Cc: x86@kernel.org
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Cc: Masami Hiramatsu
    Cc: linux-cris-kernel@axis.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: nios2-dev@lists.rocketboards.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: sparclinux@vger.kernel.org
    Cc: netdev@vger.kernel.org

    Rusty Russell
     
  • Archs have been abusing module_free() to clean up their arch-specific
    allocations. Since module_free() is also (ab)used by BPF and trace code,
    let's keep it to simple allocations, and provide a hook called before
    that.

    This means that avr32, ia64, parisc and s390 no longer need to implement
    their own module_free() at all. avr32 doesn't need module_finalize()
    either.

    Signed-off-by: Rusty Russell
    Cc: Chris Metcalf
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linux-s390@vger.kernel.org

    Rusty Russell
     

14 Jan, 2015

2 commits


13 Jan, 2015

1 commit


07 Jan, 2015

1 commit

  • SRCU is not necessary to be compiled by default in all cases. For tinification
    efforts not compiling SRCU unless necessary is desirable.

    The current patch tries to make compiling SRCU optional by introducing a new
    Kconfig option CONFIG_SRCU which is selected when any of the components making
    use of SRCU are selected.

    If we do not select CONFIG_SRCU, srcu.o will not be compiled at all.

    text data bss dec hex filename
    2007 0 0 2007 7d7 kernel/rcu/srcu.o

    Size of arch/powerpc/boot/zImage changes from

    text data bss dec hex filename
    831552 64180 23944 919676 e087c arch/powerpc/boot/zImage : before
    829504 64180 23952 917636 e0084 arch/powerpc/boot/zImage : after

    so the savings are about ~2000 bytes.

    Signed-off-by: Pranith Kumar
    CC: Paul E. McKenney
    CC: Josh Triplett
    CC: Lai Jiangshan
    Signed-off-by: Paul E. McKenney
    [ paulmck: resolve conflict due to removal of arch/ia64/kvm/Kconfig. ]

    Pranith Kumar
     

17 Dec, 2014

1 commit

  • Pull arch/tile updates from Chris Metcalf:
    "Note that one of the changes converts my old cmetcalf@tilera.com email
    in MAINTAINERS to the cmetcalf@ezchip.com email that you see on this
    email"

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile: update MAINTAINERS email to EZchip
    tile: avoid undefined behavior with regs[TREG_TP] etc
    arch: tile: kernel: kgdb.c: Use memcpy() instead of pointer copy one by one
    tile: Use the more common pr_warn instead of pr_warning
    arch: tile: gxio: Export symbols for module using in 'mpipe.c'
    arch: tile: kernel: signal.c: Use __copy_from/to_user() instead of __get/put_user()

    Linus Torvalds