1. 11 Oct, 2018 8 commits
  2. 10 Oct, 2018 12 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'for-4.19/dm-fixes-3' of... · b8db9e69
      Greg Kroah-Hartman authored
      Merge tag 'for-4.19/dm-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Mike writes:
        "device mapper fixes for 4.19 final
      
         - Fix a DM cache module init error path bug that doesn't properly
           cleanup a KMEM_CACHE if target registration fails.
      
         - Two stable@ fixes for DM zoned target; 4.20 will have changes that
           eliminate this code entirely but <= 4.19 needs these changes."
      
      * tag 'for-4.19/dm-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm linear: eliminate linear_end_io call if CONFIG_DM_ZONED disabled
        dm: fix report zone remapping to account for partition offset
        dm cache: destroy migration_cache if cache target registration failed
      b8db9e69
    • Greg Kroah-Hartman's avatar
      Merge tag 'trace-v4.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 588b5938
      Greg Kroah-Hartman authored
      Steven writes:
        "vsprint fix:
      
         It was reported that trace_printk() was not reporting properly
         values that came after a dereference pointer.
      
         trace_printk() utilizes vbin_printf() and bstr_printf() to keep the
         overhead of tracing down. vbin_printf() does not do any conversions
         and just stors the string format and the raw arguments into the
         buffer. bstr_printf() is used to read the buffer and does the
         conversions to complete the printf() output.
      
         This can be troublesome with dereferenced pointers because the
         reference may be different from the time vbin_printf() is called to
         the time bstr_printf() is called. To fix this, a prior commit changed
         vbin_printf() to convert dereferenced pointers into strings and load
         the converted string into the buffer. But the change to bstr_printf()
         had an off-by-one error and didn't account for the nul character at
         the end of the string and this corrupted the rest of the values in
         the format that came after a dereferenced pointer."
      
      * tag 'trace-v4.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        vsprintf: Fix off-by-one bug in bstr_printf() processing dereferenced pointers
      588b5938
    • Greg Kroah-Hartman's avatar
      Merge tag 'devicetree-fixes-for-4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · f7e59f38
      Greg Kroah-Hartman authored
      Rob writes:
        "Devicetree fixes for 4.19, part 3:
      
         - Fix DT unittest on Oldworld MAC systems"
      
      * tag 'devicetree-fixes-for-4.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of: unittest: Disable interrupt node tests for old world MAC systems
      f7e59f38
    • Masahiro Yamada's avatar
      samples: disable CONFIG_SAMPLES for UML · 5318321d
      Masahiro Yamada authored
      Some samples require headers installation, so commit 3fca1700
      ("kbuild: make samples really depend on headers_install") added
      such dependency in the top Makefile. However, UML fails to build
      with CONFIG_SAMPLES=y because UML does not support headers_install.
      
      Fixes: 3fca1700 ("kbuild: make samples really depend on headers_install")
      Reported-by: default avatarKees Cook <keescook@chromium.org>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      5318321d
    • Mike Snitzer's avatar
      dm linear: eliminate linear_end_io call if CONFIG_DM_ZONED disabled · beb9caac
      Mike Snitzer authored
      It is best to avoid any extra overhead associated with bio completion.
      DM core will indirectly call a DM target's .end_io if it is defined.
      In the case of DM linear, there is no need to do so (for every bio that
      completes) if CONFIG_DM_ZONED is not enabled.
      
      Avoiding an extra indirect call for every bio completion is very
      important for ensuring DM linear doesn't incur more overhead that
      further widens the performance gap between dm-linear and raw block
      devices.
      
      Fixes: 0be12c1c ("dm linear: add support for zoned block devices")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      beb9caac
    • Guenter Roeck's avatar
      of: unittest: Disable interrupt node tests for old world MAC systems · 88948914
      Guenter Roeck authored
      On systems with OF_IMAP_OLDWORLD_MAC set in of_irq_workarounds, the
      devicetree interrupt parsing code is different, causing unit tests of
      devicetree interrupt nodes to fail. Due to a bug in unittest code, which
      tries to dereference an uninitialized pointer, this results in a crash.
      
      OF: /testcase-data/phandle-tests/consumer-a: arguments longer than property
      Unable to handle kernel paging request for data at address 0x00bc616e
      Faulting instruction address: 0xc08e9468
      Oops: Kernel access of bad area, sig: 11 [#1]
      BE PREEMPT PowerMac
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.72-rc1-yocto-standard+ #1
      task: cf8e0000 task.stack: cf8da000
      NIP:  c08e9468 LR: c08ea5bc CTR: c08ea5ac
      REGS: cf8dbb50 TRAP: 0300   Not tainted  (4.14.72-rc1-yocto-standard+)
      MSR:  00001032 <ME,IR,DR,RI>  CR: 82004044  XER: 00000000
      DAR: 00bc616e DSISR: 40000000
      GPR00: c08ea5bc cf8dbc00 cf8e0000 c13ca517 c13ca517 c13ca8a0 00000066 00000002
      GPR08: 00000063 00bc614e c0b05865 000affff 82004048 00000000 c00047f0 00000000
      GPR16: c0a80000 c0a9cc34 c13ca517 c0ad1134 05ffffff 000affff c0b05860 c0abeef8
      GPR24: cecec278 cecec278 c0a8c4d0 c0a885e0 c13ca8a0 05ffffff c13ca8a0 c13ca517
      
      NIP [c08e9468] device_node_gen_full_name+0x30/0x15c
      LR [c08ea5bc] device_node_string+0x190/0x3c8
      Call Trace:
      [cf8dbc00] [c007f670] trace_hardirqs_on_caller+0x118/0x1fc (unreliable)
      [cf8dbc40] [c08ea5bc] device_node_string+0x190/0x3c8
      [cf8dbcb0] [c08eb794] pointer+0x25c/0x4d0
      [cf8dbd00] [c08ebcbc] vsnprintf+0x2b4/0x5ec
      [cf8dbd60] [c08ec00c] vscnprintf+0x18/0x48
      [cf8dbd70] [c008e268] vprintk_store+0x4c/0x22c
      [cf8dbda0] [c008ecac] vprintk_emit+0x94/0x130
      [cf8dbdd0] [c008ff54] printk+0x5c/0x6c
      [cf8dbe10] [c0b8ddd4] of_unittest+0x2220/0x26f8
      [cf8dbea0] [c0004434] do_one_initcall+0x4c/0x184
      [cf8dbf00] [c0b4534c] kernel_init_freeable+0x13c/0x1d8
      [cf8dbf30] [c0004814] kernel_init+0x24/0x118
      [cf8dbf40] [c0013398] ret_from_kernel_thread+0x5c/0x64
      
      The problem was observed when running a qemu test for the g3beige machine
      with devicetree unittests enabled.
      
      Disable interrupt node tests on affected systems to avoid both false
      unittest failures and the crash.
      
      With this patch in place, unittest on the affected system passes with
      the following message.
      
      	dt-test ### end of unittest - 144 passed, 0 failed
      
      Fixes: 53a42093 ("of: Add device tree selftests")
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: default avatarFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      88948914
    • Greg Kroah-Hartman's avatar
      Merge tag 'tag-chrome-platform-fixes-for-v4.19-rc8' of... · bb2d8f2f
      Greg Kroah-Hartman authored
      Merge tag 'tag-chrome-platform-fixes-for-v4.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform
      
      Benson writes:
        "chrome-platform fix for v4.19-rc8
      
         This contains a fix to 57e94c8b ("mfd: cros-ec: Increase maximum
         mkbp event size"), which caused cros_ec based chromebooks to truncate
         an entire column of their built-in keyboard."
      
      * tag 'tag-chrome-platform-fixes-for-v4.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform:
        mfd: cros-ec: copy the whole event in get_next_event_xfer
      bb2d8f2f
    • Greg Kroah-Hartman's avatar
      Merge branch 'for-4.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu · c350a1d4
      Greg Kroah-Hartman authored
      Dennis writes:
        "percpu fixes for-4.19-rc8
      
         The new percpu allocator introduced in 4.14 had a missing free for
         the percpu metadata. This caused a memory leak when percpu memory is
         being churned resulting in the allocation and deallocation of percpu
         memory chunks"
      
      * 'for-4.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
        percpu: stop leaking bitmap metadata blocks
      c350a1d4
    • Greg Kroah-Hartman's avatar
      Merge tag 'gfs2-4.19.fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 3a0671e7
      Greg Kroah-Hartman authored
      Andreas writes:
        "gfs2 4.19 fix:
      
         This fixes a regression introduced in commit 64bc06bb "gfs2:
         iomap buffered write support""
      
      * tag 'gfs2-4.19.fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Fix iomap buffered write support for journaled files
      3a0671e7
    • Greg Kroah-Hartman's avatar
      Merge tag 's390-4.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 3d647e62
      Greg Kroah-Hartman authored
      Martin writes:
        "s390 fixes for 4.19-rc8
      
         Four more patches for 4.19:
          - Fix resume after suspend-to-disk if resume-CPU != suspend-CPU
          - Fix vfio-ccw check for pinned pages
          - Two patches to avoid a usercopy-whitelist warning in vfio-ccw"
      
      * tag 's390-4.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/cio: Fix how vfio-ccw checks pinned pages
        s390/cio: Refactor alloc of ccw_io_region
        s390/cio: Convert ccw_io_region to pointer
        s390/hibernate: fix error handling when suspend cpu != resume cpu
      3d647e62
    • Greg Kroah-Hartman's avatar
      Merge tag 'mips_fixes_4.19_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 701f2eb6
      Greg Kroah-Hartman authored
      Paul writes:
        "A few MIPS fixes for 4.19:
      
         - Avoid suboptimal placement of our VDSO when using the legacy mmap
           layout, which can prevent statically linked programs that were able
           to allocate large amounts of memory using the brk syscall prior to
           the introduction of our VDSO from functioning correctly.
      
         - Fix up CONFIG_CMDLINE handling for platforms which ought to ignore
           DT arguments but have incorrectly used them & lost other arguments
           since v3.16.
      
         - Fix a path in MAINTAINERS to use valid wildcards.
      
         - Fixup a regression from v4.17 in memset() for systems using
           CPU_DADDI_WORKAROUNDS."
      
      * tag 'mips_fixes_4.19_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: memset: Fix CPU_DADDI_WORKAROUNDS `small_fixup' regression
        MAINTAINERS: MIPS/LOONGSON2 ARCHITECTURE - Use the normal wildcard style
        MIPS: Fix CONFIG_CMDLINE handling
        MIPS: VDSO: Always map near top of user memory
      701f2eb6
    • Emil Karlson's avatar
      mfd: cros-ec: copy the whole event in get_next_event_xfer · d4d2313a
      Emil Karlson authored
      Commit 57e94c8b caused cros-ec keyboard events
      be truncated on many chromebooks so that Left and Right keys on Column 12 were
      always 0. Use ret as memcpy len to fix this.
      
      The old code was using ec_dev->event_size, which is the event payload/data size
      excluding event_type header, for the length of the memcpy operation. Use ret
      as memcpy length to avoid the off by one and copy the whole msg->data.
      
      Fixes: 57e94c8b ("mfd: cros-ec: Increase maximum mkbp event size")
      Acked-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
      Tested-by: default avatarEmil Renner Berthing <kernel@esmil.dk>
      Signed-off-by: default avatarEmil Karlson <jekarlson@gmail.com>
      Signed-off-by: default avatarBenson Leung <bleung@chromium.org>
      d4d2313a
  3. 09 Oct, 2018 7 commits
    • Damien Le Moal's avatar
      dm: fix report zone remapping to account for partition offset · 9864cd5d
      Damien Le Moal authored
      If dm-linear or dm-flakey are layered on top of a partition of a zoned
      block device, remapping of the start sector and write pointer position
      of the zones reported by a report zones BIO must be modified to account
      for the target table entry mapping (start offset within the device and
      entry mapping with the dm device).  If the target's backing device is a
      partition of a whole disk, the start sector on the physical device of
      the partition must also be accounted for when modifying the zone
      information.  However, dm_remap_zone_report() was not considering this
      last case, resulting in incorrect zone information remapping with
      targets using disk partitions.
      
      Fix this by calculating the target backing device start sector using
      the position of the completed report zones BIO and the unchanged
      position and size of the original report zone BIO. With this value
      calculated, the start sector and write pointer position of the target
      zones can be correctly remapped.
      
      Fixes: 10999307 ("dm: introduce dm_remap_zone_report()")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      9864cd5d
    • Shenghui Wang's avatar
      dm cache: destroy migration_cache if cache target registration failed · c7cd5550
      Shenghui Wang authored
      Commit 7e6358d2 ("dm: fix various targets to dm_register_target
      after module __init resources created") inadvertently introduced this
      bug when it moved dm_register_target() after the call to KMEM_CACHE().
      
      Fixes: 7e6358d2 ("dm: fix various targets to dm_register_target after module __init resources created")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarShenghui Wang <shhuiw@foxmail.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      c7cd5550
    • Andreas Gruenbacher's avatar
      gfs2: Fix iomap buffered write support for journaled files · dc480feb
      Andreas Gruenbacher authored
      Commit 64bc06bb broke buffered writes to journaled files (chattr
      +j): we'll try to journal the buffer heads of the page being written to
      in gfs2_iomap_journaled_page_done.  However, the iomap code no longer
      creates buffer heads, so we'll BUG() in gfs2_page_add_databufs.  Fix
      that by creating buffer heads ourself when needed.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      dc480feb
    • Greg Kroah-Hartman's avatar
      Merge tag 'arc-4.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · 64c5e530
      Greg Kroah-Hartman authored
      Vineet writes:
         "ARC updates for 4.19-rc8
          - Fix clone syscall to update Thread pointer register
          - Make/build updates (needed for AGL/OE builds)   [Alexey]
          - Typo fix [Colin Ian King]"
      
      * tag 'arc-4.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: clone syscall to setp r25 as thread pointer
        ARC: build: Don't set CROSS_COMPILE in arch's Makefile
        ARC: fix spelling mistake "entires" -> "entries"
        ARC: build: Get rid of toolchain check
        ARCv2: build: use mcpu=hs38 iso generic mcpu=archs
      64c5e530
    • Kees Cook's avatar
      x86/mm: Avoid VLA in pgd_alloc() · 184d47f0
      Kees Cook authored
      Arnd Bergmann reported that turning on -Wvla found a new (unintended) VLA usage:
      
        arch/x86/mm/pgtable.c: In function 'pgd_alloc':
        include/linux/build_bug.h:29:45: error: ISO C90 forbids variable length array 'u_pmds' [-Werror=vla]
        arch/x86/mm/pgtable.c:190:34: note: in expansion of macro 'static_cpu_has'
         #define PREALLOCATED_USER_PMDS  (static_cpu_has(X86_FEATURE_PTI) ? \
                                          ^~~~~~~~~~~~~~
        arch/x86/mm/pgtable.c:431:16: note: in expansion of macro 'PREALLOCATED_USER_PMDS'
          pmd_t *u_pmds[PREALLOCATED_USER_PMDS];
                      ^~~~~~~~~~~~~~~~~~~~~~
      
      Use the actual size of the array that is used for X86_FEATURE_PTI,
      which is known at build time, instead of the variable size.
      
      [ mingo: Squashed original fix with followup fix to avoid bisection breakage, wrote new changelog. ]
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Original-written-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reported-by: default avatarBorislav Petkov <bp@alien8.de>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Toshi Kani <toshi.kani@hpe.com>
      Fixes: 1be3f247c288 ("x86/mm: Avoid VLA in pgd_alloc()")
      Link: http://lkml.kernel.org/r/20181008235434.GA35035@beastSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      184d47f0
    • Srikar Dronamraju's avatar
      mm, sched/numa: Remove remaining traces of NUMA rate-limiting · e0546375
      Srikar Dronamraju authored
      Remove the leftover pglist_data::numabalancing_migrate_lock and its
      initialization, we stopped using this lock with:
      
        efaffc5e ("mm, sched/numa: Remove rate-limiting of automatic NUMA balancing migration")
      
      [ mingo: Rewrote the changelog. ]
      Signed-off-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Acked-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Linux-MM <linux-mm@kvack.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rik van Riel <riel@surriel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1538824999-31230-1-git-send-email-srikar@linux.vnet.ibm.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e0546375
    • Reinette Chatre's avatar
      x86/intel_rdt: Fix out-of-bounds memory access in CBM tests · 49e00eee
      Reinette Chatre authored
      While the DOC at the beginning of lib/bitmap.c explicitly states that
      "The number of valid bits in a given bitmap does _not_ need to be an
      exact multiple of BITS_PER_LONG.", some of the bitmap operations do
      indeed access BITS_PER_LONG portions of the provided bitmap no matter
      the size of the provided bitmap. For example, if bitmap_intersects()
      is provided with an 8 bit bitmap the operation will access
      BITS_PER_LONG bits from the provided bitmap. While the operation
      ensures that these extra bits do not affect the result, the memory
      is still accessed.
      
      The capacity bitmasks (CBMs) are typically stored in u32 since they
      can never exceed 32 bits. A few instances exist where a bitmap_*
      operation is performed on a CBM by simply pointing the bitmap operation
      to the stored u32 value.
      
      The consequence of this pattern is that some bitmap_* operations will
      access out-of-bounds memory when interacting with the provided CBM. This
      is confirmed with a KASAN test that reports:
      
       BUG: KASAN: stack-out-of-bounds in __bitmap_intersects+0xa2/0x100
      
      and
      
       BUG: KASAN: stack-out-of-bounds in __bitmap_weight+0x58/0x90
      
      Fix this by moving any CBM provided to a bitmap operation needing
      BITS_PER_LONG to an 'unsigned long' variable.
      
      [ tglx: Changed related function arguments to unsigned long and got rid
      	of the _cbm extra step ]
      
      Fixes: 72d50505 ("x86/intel_rdt: Add utilities to test pseudo-locked region possibility")
      Fixes: 49f7b4ef ("x86/intel_rdt: Enable setting of exclusive mode")
      Fixes: d9b48c86 ("x86/intel_rdt: Display resource groups' allocations' size in bytes")
      Fixes: 95f0b77e ("x86/intel_rdt: Initialize new resource group with sane defaults")
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: fenghua.yu@intel.com
      Cc: tony.luck@intel.com
      Cc: gavin.hindman@intel.com
      Cc: jithu.joseph@intel.com
      Cc: dave.hansen@intel.com
      Cc: hpa@zytor.com
      Link: https://lkml.kernel.org/r/69a428613a53f10e80594679ac726246020ff94f.1538686926.git.reinette.chatre@intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      49e00eee
  4. 08 Oct, 2018 10 commits
  5. 07 Oct, 2018 3 commits