Skip to content
  1. Jan 31, 2018
  2. Jan 30, 2018
    • Bob Peterson's avatar
      GFS2: Don't try to end a non-existent transaction in unlink · 2eb5909d
      Bob Peterson authored
      
      
      Before this patch, if function gfs2_unlink failed to get a valid
      transaction (for example, not enough journal blocks) it would go
      to label out_end_trans which did gfs2_trans_end. But if the
      trans_begin failed, there's no transaction to end, and trying to
      do so results in: kernel BUG at fs/gfs2/trans.c:117!
      
      This patch changes the goto so that it does not try to end a
      non-existent transaction.
      
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      2eb5909d
  3. Jan 26, 2018
  4. Jan 23, 2018
  5. Jan 22, 2018
  6. Jan 19, 2018
  7. Jan 17, 2018
  8. Dec 22, 2017
    • Abhi Das's avatar
      gfs2: Trim the ordered write list in gfs2_ordered_write() · 1f23bc78
      Abhi Das authored
      
      
      We iterate through the entire ordered writes list in
      gfs2_ordered_write() to write out inodes. It's a good
      place to try and shrink the list by throwing out inodes
      that don't have any pages.
      
      Signed-off-by: default avatarAbhi Das <adas@redhat.com>
      Acked-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      1f23bc78
    • Bob Peterson's avatar
      GFS2: Reduce code redundancy writing log headers · 588bff95
      Bob Peterson authored
      
      
      Before this patch, there was a lot of code redundancy between functions
      log_write_header (which uses bio) and clean_journal (which uses
      buffer_head). This patch reduces the redundancy to simplify the code
      and make log header writing more consistent. We want more consistency
      and reduced redundancy because we plan to add a bunch of new fields
      to improve performance (by eliminating the local statfs and quota files)
      improve metadata integrity (by adding new crcs and such) and for better
      debugging (by adding new fields to track when and where metadata was
      pushed through the journals.) We don't want to duplicate setting these
      new fields, nor allow for human error in the process.
      
      This reduction in code redundancy is accomplished by introducing a new
      helper function, gfs2_write_log_header which uses bio rather than bh.
      That simplifies recovery function clean_journal() to use the new helper
      function and iomap rather than redundancy and block_map (and eventually
      we can maybe remove block_map). It also reduces our dependency on
      buffer_heads.
      
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      588bff95
  9. Dec 18, 2017
    • Linus Torvalds's avatar
      Linux 4.15-rc4 · 1291a0d5
      Linus Torvalds authored
      1291a0d5
    • Kees Cook's avatar
      Revert "exec: avoid RLIMIT_STACK races with prlimit()" · 779f4e1c
      Kees Cook authored
      This reverts commit 04e35f44
      
      .
      
      SELinux runs with secureexec for all non-"noatsecure" domain transitions,
      which means lots of processes end up hitting the stack hard-limit change
      that was introduced in order to fix a race with prlimit(). That race fix
      will need to be redesigned.
      
      Reported-by: default avatarLaura Abbott <labbott@redhat.com>
      Reported-by: default avatarTomáš Trnka <trnka@scm.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      779f4e1c
    • Linus Torvalds's avatar
      Merge branch 'WIP.x86-pti.base-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f8940a0f
      Linus Torvalds authored
      Pull Page Table Isolation (PTI) v4.14 backporting base tree from Ingo Molnar:
       "This tree contains the v4.14 PTI backport preparatory tree, which
        consists of four merges of upstream trees and 7 cherry-picked commits,
        which the upcoming PTI work depends on"
      
      NOTE! The resulting tree is exactly the same as the original base tree
      (ie the diff between this commit and its immediate first parent is
      empty).
      
      The only reason for this merge is literally to have a common point for
      the actual PTI changes so that the commits can be shared in both the
      4.15 and 4.14 trees.
      
      * 'WIP.x86-pti.base-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm/kasan: Don't use vmemmap_populate() to initialize shadow
        locking/barriers: Convert users of lockless_dereference() to READ_ONCE()
        locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()
        bpf: fix build issues on um due to mising bpf_perf_event.h
        perf/x86: Enable free running PEBS for REGS_USER/INTR
        x86: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD
        x86/cpufeature: Add User-Mode Instruction Prevention definitions
      f8940a0f
    • Linus Torvalds's avatar
      Merge branch 'WIP.x86-pti.base.prep-for-linus' of... · 6ba64fef
      Linus Torvalds authored
      Merge branch 'WIP.x86-pti.base.prep-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull Page Table Isolation (PTI) preparatory tree from Ingo Molnar:
       "This does a rename to free up linux/pti.h to be used by the upcoming
        page table isolation feature"
      
      * 'WIP.x86-pti.base.prep-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        drivers/misc/intel/pti: Rename the header file to free up the namespace
      6ba64fef
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2ffb448c
      Linus Torvalds authored
      Pull timer fix from Thomas Gleixner:
       "A single bugfix which prevents arbitrary sigev_notify values in
        posix-timers"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        posix-timer: Properly check sigevent->sigev_notify
      2ffb448c
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-4.15-rc4' of git://git.infradead.org/users/vkoul/slave-dma · c4372790
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "This time consisting of fixes in a bunch of drivers and the dmatest
        module:
      
         - Fix for disable clk on error path in fsl-edma driver
         - Disable clk fail fix in jz4740 driver
         - Fix long pending bug in dmatest driver for dangling pointer
         - Fix potential NULL pointer dereference in at_hdmac driver
         - Error handling path in ioat driver"
      
      * tag 'dmaengine-fix-4.15-rc4' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: fsl-edma: disable clks on all error paths
        dmaengine: jz4740: disable/unprepare clk if probe fails
        dmaengine: dmatest: move callback wait queue to thread context
        dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved
        dmaengine: ioat: Fix error handling path
      c4372790
    • Arnd Bergmann's avatar
      cramfs: fix MTD dependency · b9f5fb18
      Arnd Bergmann authored
      With CONFIG_MTD=m and CONFIG_CRAMFS=y, we now get a link failure:
      
        fs/cramfs/inode.o: In function `cramfs_mount': inode.c:(.text+0x220): undefined reference to `mount_mtd'
        fs/cramfs/inode.o: In function `cramfs_mtd_fill_super':
        inode.c:(.text+0x6d8): undefined reference to `mtd_point'
        inode.c:(.text+0xae4): undefined reference to `mtd_unpoint'
      
      This adds a more specific Kconfig dependency to avoid the broken
      configuration.
      
      Alternatively we could make CRAMFS itself depend on "MTD || !MTD" with a
      similar result.
      
      Fixes: 99c18ce5
      
       ("cramfs: direct memory access support")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b9f5fb18
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 73d080d3
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "The alloc_super() one is a regression in this merge window, lazytime
        thing is older..."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        VFS: Handle lazytime in do_mount()
        alloc_super(): do ->s_umount initialization earlier
      73d080d3
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 1c6b942d
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Fix a regression which caused us to fail to interpret symlinks in very
        ancient ext3 file system images.
      
        Also fix two xfstests failures, one of which could cause an OOPS, plus
        an additional bug fix caught by fuzz testing"
      
      * tag 'ext4_for_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix crash when a directory's i_size is too small
        ext4: add missing error check in __ext4_new_inode()
        ext4: fix fdatasync(2) after fallocate(2) operation
        ext4: support fast symlinks from ext3 file systems
      1c6b942d
  10. Dec 17, 2017
    • Andrey Ryabinin's avatar
      x86/mm/kasan: Don't use vmemmap_populate() to initialize shadow · 2aeb0736
      Andrey Ryabinin authored
      [ Note, this is a Git cherry-pick of the following commit:
      
          d17a1d97
      
      : ("x86/mm/kasan: don't use vmemmap_populate() to initialize shadow")
      
        ... for easier x86 PTI code testing and back-porting. ]
      
      The KASAN shadow is currently mapped using vmemmap_populate() since that
      provides a semi-convenient way to map pages into init_top_pgt.  However,
      since that no longer zeroes the mapped pages, it is not suitable for
      KASAN, which requires zeroed shadow memory.
      
      Add kasan_populate_shadow() interface and use it instead of
      vmemmap_populate().  Besides, this allows us to take advantage of
      gigantic pages and use them to populate the shadow, which should save us
      some memory wasted on page tables and reduce TLB pressure.
      
      Link: http://lkml.kernel.org/r/20171103185147.2688-2-pasha.tatashin@oracle.com
      Signed-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
      Signed-off-by: default avatarPavel Tatashin <pasha.tatashin@oracle.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Steven Sistare <steven.sistare@oracle.com>
      Cc: Daniel Jordan <daniel.m.jordan@oracle.com>
      Cc: Bob Picco <bob.picco@oracle.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      2aeb0736
    • Will Deacon's avatar
      locking/barriers: Convert users of lockless_dereference() to READ_ONCE() · 3382290e
      Will Deacon authored
      [ Note, this is a Git cherry-pick of the following commit:
      
          506458ef
      
       ("locking/barriers: Convert users of lockless_dereference() to READ_ONCE()")
      
        ... for easier x86 PTI code testing and back-porting. ]
      
      READ_ONCE() now has an implicit smp_read_barrier_depends() call, so it
      can be used instead of lockless_dereference() without any change in
      semantics.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1508840570-22169-4-git-send-email-will.deacon@arm.com
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3382290e
    • Will Deacon's avatar
      locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE() · c2bc6608
      Will Deacon authored
      [ Note, this is a Git cherry-pick of the following commit:
      
          76ebbe78
      
       ("locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()")
      
        ... for easier x86 PTI code testing and back-porting. ]
      
      In preparation for the removal of lockless_dereference(), which is the
      same as READ_ONCE() on all architectures other than Alpha, add an
      implicit smp_read_barrier_depends() to READ_ONCE() so that it can be
      used to head dependency chains on all architectures.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1508840570-22169-3-git-send-email-will.deacon@arm.com
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c2bc6608
    • Daniel Borkmann's avatar
      bpf: fix build issues on um due to mising bpf_perf_event.h · ab95477e
      Daniel Borkmann authored
      [ Note, this is a Git cherry-pick of the following commit:
      
          a23f06f0 ("bpf: fix build issues on um due to mising bpf_perf_event.h")
      
        ... for easier x86 PTI code testing and back-porting. ]
      
      Since c895f6f7 ("bpf: correct broken uapi for
      BPF_PROG_TYPE_PERF_EVENT program type") um (uml) won't build
      on i386 or x86_64:
      
        [...]
          CC      init/main.o
        In file included from ../include/linux/perf_event.h:18:0,
                         from ../include/linux/trace_events.h:10,
                         from ../include/trace/syscall.h:7,
                         from ../include/linux/syscalls.h:82,
                         from ../init/main.c:20:
        ../include/uapi/linux/bpf_perf_event.h:11:32: fatal error:
        asm/bpf_perf_event.h: No such file or directory #include
        <asm/bpf_perf_event.h>
        [...]
      
      Lets add missing bpf_perf_event.h also to um arch. This seems
      to be the only one still missing.
      
      Fixes: c895f6f7
      
       ("bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type")
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Suggested-by: default avatarRichard Weinberger <richard@sigma-star.at>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Tested-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Richard Weinberger <richard@sigma-star.at>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarRichard Weinberger <richard@nod.at>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ab95477e
    • Andi Kleen's avatar
      perf/x86: Enable free running PEBS for REGS_USER/INTR · 2fe1bc1f
      Andi Kleen authored
      [ Note, this is a Git cherry-pick of the following commit:
      
          a47ba4d7
      
       ("perf/x86: Enable free running PEBS for REGS_USER/INTR")
      
        ... for easier x86 PTI code testing and back-porting. ]
      
      Currently free running PEBS is disabled when user or interrupt
      registers are requested. Most of the registers are actually
      available in the PEBS record and can be supported.
      
      So we just need to check for the supported registers and then
      allow it: it is all except for the segment register.
      
      For user registers this only works when the counter is limited
      to ring 3 only, so this also needs to be checked.
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20170831214630.21892-1-andi@firstfloor.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      2fe1bc1f
    • Rudolf Marek's avatar
      x86: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD · f2dbad36
      Rudolf Marek authored
      
      
      [ Note, this is a Git cherry-pick of the following commit:
      
          2b67799bdf25 ("x86: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD")
      
        ... for easier x86 PTI code testing and back-porting. ]
      
      The latest AMD AMD64 Architecture Programmer's Manual
      adds a CPUID feature XSaveErPtr (CPUID_Fn80000008_EBX[2]).
      
      If this feature is set, the FXSAVE, XSAVE, FXSAVEOPT, XSAVEC, XSAVES
      / FXRSTOR, XRSTOR, XRSTORS always save/restore error pointers,
      thus making the X86_BUG_FXSAVE_LEAK workaround obsolete on such CPUs.
      
      Signed-Off-By: default avatarRudolf Marek <r.marek@assembler.cz>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Tested-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Link: https://lkml.kernel.org/r/bdcebe90-62c5-1f05-083c-eba7f08b2540@assembler.cz
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f2dbad36