1. 18 Oct, 2016 1 commit
    • Linus Torvalds's avatar
      mm: remove gup_flags FOLL_WRITE games from __get_user_pages() · 19be0eaf
      Linus Torvalds authored
      This is an ancient bug that was actually attempted to be fixed once
      (badly) by me eleven years ago in commit 4ceb5db9 ("Fix
      get_user_pages() race for write access") but that was then undone due to
      problems on s390 by commit f33ea7f4 ("fix get_user_pages bug").
      
      In the meantime, the s390 situation has long been fixed, and we can now
      fix it by checking the pte_dirty() bit properly (and do it better).  The
      s390 dirty bit was implemented in abf09bed ("s390/mm: implement
      software dirty bits") which made it into v3.9.  Earlier kernels will
      have to look at the page state itself.
      
      Also, the VM has become more scalable, and what used a purely
      theoretical race back then has become easier to trigger.
      
      To fix it, we introduce a new internal FOLL_COW flag to mark the "yes,
      we already did a COW" rather than play racy games with FOLL_WRITE that
      is very fundamental, and then use the pte dirty flag to validate that
      the FOLL_COW flag is still valid.
      Reported-and-tested-by: default avatarPhil "not Paul" Oester <kernel@linuxace.com>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Reviewed-by: default avatarMichal Hocko <mhocko@suse.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Willy Tarreau <w@1wt.eu>
      Cc: Nick Piggin <npiggin@gmail.com>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      19be0eaf
  2. 12 Oct, 2016 2 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux · 6b25e21f
      Linus Torvalds authored
      Pull drm updates from Dave Airlie:
       "Core:
         - Fence destaging work
         - DRIVER_LEGACY to split off legacy drm drivers
         - drm_mm refactoring
         - Splitting drm_crtc.c into chunks and documenting better
         - Display info fixes
         - rbtree support for prime buffer lookup
         - Simple VGA DAC driver
      
        Panel:
         - Add Nexus 7 panel
         - More simple panels
      
        i915:
         - Refactoring GEM naming
         - Refactored vma/active tracking
         - Lockless request lookups
         - Better stolen memory support
         - FBC fixes
         - SKL watermark fixes
         - VGPU improvements
         - dma-buf fencing support
         - Better DP dongle support
      
        amdgpu:
         - Powerplay for Iceland asics
         - Improved GPU reset support
         - UVD/VEC powergating support for CZ/ST
         - Preinitialised VRAM buffer support
         - Virtual display support
         - Initial SI support
         - GTT rework
         - PCI shutdown callback support
         - HPD IRQ storm fixes
      
        amdkfd:
         - bugfixes
      
        tilcdc:
         - Atomic modesetting support
      
        mediatek:
         - AAL + GAMMA engine support
         - Hook up gamma LUT
         - Temporal dithering support
      
        imx:
         - Pixel clock from devicetree
         - drm bridge support for LVDS bridges
         - active plane reconfiguration
         - VDIC deinterlacer support
         - Frame synchronisation unit support
         - Color space conversion support
      
        analogix:
         - PSR support
         - Better panel on/off support
      
        rockchip:
         - rk3399 vop/crtc support
         - PSR support
      
        vc4:
         - Interlaced vblank timing
         - 3D rendering CPU overhead reduction
         - HDMI output fixes
      
        tda998x:
         - HDMI audio ASoC support
      
        sunxi:
         - Allwinner A33 support
         - better TCON support
      
        msm:
         - DT binding cleanups
         - Explicit fence-fd support
      
        sti:
         - remove sti415/416 support
      
        etnaviv:
         - MMUv2 refactoring
         - GC3000 support
      
        exynos:
         - Refactoring HDMI DCC/PHY
         - G2D pm regression fix
         - Page fault issues with wait for vblank
      
        There is no nouveau work in this tree, as Ben didn't get a pull
        request in, and he was fighting moving to atomic and adding mst
        support, so maybe best it waits for a cycle"
      
      * tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux: (1412 commits)
        drm/crtc: constify drm_crtc_index parameter
        drm/i915: Fix conflict resolution from backmerge of v4.8-rc8 to drm-next
        drm/i915/guc: Unwind GuC workqueue reservation if request construction fails
        drm/i915: Reset the breadcrumbs IRQ more carefully
        drm/i915: Force relocations via cpu if we run out of idle aperture
        drm/i915: Distinguish last emitted request from last submitted request
        drm/i915: Allow DP to work w/o EDID
        drm/i915: Move long hpd handling into the hotplug work
        drm/i915/execlists: Reinitialise context image after GPU hang
        drm/i915: Use correct index for backtracking HUNG semaphores
        drm/i915: Unalias obj->phys_handle and obj->userptr
        drm/i915: Just clear the mmiodebug before a register access
        drm/i915/gen9: only add the planes actually affected by ddb changes
        drm/i915: Allow PCH DPLL sharing regardless of DPLL_SDVO_HIGH_SPEED
        drm/i915/bxt: Fix HDMI DPLL configuration
        drm/i915/gen9: fix the watermark res_blocks value
        drm/i915/gen9: fix plane_blocks_per_line on watermarks calculations
        drm/i915/gen9: minimum scanlines for Y tile is not always 4
        drm/i915/gen9: fix the WaWmMemoryReadLatency implementation
        drm/i915/kbl: KBL also needs to run the SAGV code
        ...
      6b25e21f
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · a379f71a
      Linus Torvalds authored
      Merge more updates from Andrew Morton:
      
       - a few block updates that fell in my lap
      
       - lib/ updates
      
       - checkpatch
      
       - autofs
      
       - ipc
      
       - a ton of misc other things
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits)
        mm: split gfp_mask and mapping flags into separate fields
        fs: use mapping_set_error instead of opencoded set_bit
        treewide: remove redundant #include <linux/kconfig.h>
        hung_task: allow hung_task_panic when hung_task_warnings is 0
        kthread: add kerneldoc for kthread_create()
        kthread: better support freezable kthread workers
        kthread: allow to modify delayed kthread work
        kthread: allow to cancel kthread work
        kthread: initial support for delayed kthread work
        kthread: detect when a kthread work is used by more workers
        kthread: add kthread_destroy_worker()
        kthread: add kthread_create_worker*()
        kthread: allow to call __kthread_create_on_node() with va_list args
        kthread/smpboot: do not park in kthread_create_on_cpu()
        kthread: kthread worker API cleanup
        kthread: rename probe_kthread_data() to kthread_probe_data()
        scripts/tags.sh: enable code completion in VIM
        mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping
        kdump, vmcoreinfo: report memory sections virtual addresses
        ipc/sem.c: add cond_resched in exit_sme
        ...
      a379f71a
  3. 11 Oct, 2016 37 commits