1. 10 Nov, 2020 4 commits
  2. 28 Oct, 2020 1 commit
  3. 27 Oct, 2020 8 commits
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-10-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ed8780e3
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A couple of x86 fixes which missed rc1 due to my stupidity:
      
         - Drop lazy TLB mode before switching to the temporary address space
           for text patching.
      
           text_poke() switches to the temporary mm which clears the lazy mode
           and restores the original mm afterwards. Due to clearing lazy mode
           this might restore a already dead mm if exit_mmap() runs in
           parallel on another CPU.
      
         - Document the x32 syscall design fail vs. syscall numbers 512-547
           properly.
      
         - Fix the ORC unwinder to handle the inactive task frame correctly.
      
           This was unearthed due to the slightly different code generation of
           gcc-10.
      
         - Use an up to date screen_info for the boot params of kexec instead
           of the possibly stale and invalid version which happened to be
           valid when the kexec kernel was loaded"
      
      * tag 'x86-urgent-2020-10-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/alternative: Don't call text_poke() in lazy TLB mode
        x86/syscalls: Document the fact that syscalls 512-547 are a legacy mistake
        x86/unwind/orc: Fix inactive tasks with stack pointer in %sp on GCC 10 compiled kernels
        hyperv_fb: Update screen_info after removing old framebuffer
        x86/kexec: Use up-to-dated screen_info copy to fill boot params
      ed8780e3
    • Linus Torvalds's avatar
      Merge tag 'orphan-handling-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 8c2ab803
      Linus Torvalds authored
      Pull orphan section fixes from Kees Cook:
       "A couple corner cases were found from the link-time orphan section
        handling series:
      
         - arm: handle .ARM.exidx and .ARM.extab sections (Nathan Chancellor)
      
         - x86: collect .ctors.* with .ctors (Kees Cook)"
      
      * tag 'orphan-handling-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        arm/build: Always handle .ARM.exidx and .ARM.extab sections
        vmlinux.lds.h: Keep .ctors.* with .ctors
      8c2ab803
    • Geert Uytterhoeven's avatar
      mm/process_vm_access: Add missing #include <linux/compat.h> · f78f63da
      Geert Uytterhoeven authored
      With e.g. m68k/defconfig:
      
          mm/process_vm_access.c: In function ‘process_vm_rw’:
          mm/process_vm_access.c:277:5: error: implicit declaration of function ‘in_compat_syscall’ [-Werror=implicit-function-declaration]
            277 |     in_compat_syscall());
      	  |     ^~~~~~~~~~~~~~~~~
      
      Fix this by adding #include <linux/compat.h>.
      
      Reported-by: noreply@ellerman.id.au
      Reported-by: default avatardamian <damian.tometzki@familie-tometzki.de>
      Reported-by: default avatarNaresh Kamboju <naresh.kamboju@linaro.org>
      Fixes: 38dc5079 ("Fix compat regression in process_vm_rw()")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f78f63da
    • Nathan Chancellor's avatar
      arm/build: Always handle .ARM.exidx and .ARM.extab sections · c39866f2
      Nathan Chancellor authored
      After turning on warnings for orphan section placement, enabling
      CONFIG_UNWINDER_FRAME_POINTER instead of CONFIG_UNWINDER_ARM causes
      thousands of warnings when clang + ld.lld are used:
      
      $ scripts/config --file arch/arm/configs/multi_v7_defconfig \
                       -d CONFIG_UNWINDER_ARM \
                       -e CONFIG_UNWINDER_FRAME_POINTER
      $ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LLVM=1 defconfig zImage
      ld.lld: warning: init/built-in.a(main.o):(.ARM.extab) is being placed in '.ARM.extab'
      ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
      ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.ref.text) is being placed in '.ARM.extab.ref.text'
      ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
      ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab) is being placed in '.ARM.extab'
      ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
      ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab) is being placed in '.ARM.extab'
      ld.lld: warning: init/built-in.a(do_mounts_initrd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
      ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
      ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab) is being placed in '.ARM.extab'
      ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text'
      ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab) is being placed in '.ARM.extab'
      
      These sections are handled by the ARM_UNWIND_SECTIONS define, which is
      only added to the list of sections when CONFIG_ARM_UNWIND is set.
      CONFIG_ARM_UNWIND is a hidden symbol that is only selected when
      CONFIG_UNWINDER_ARM is set so CONFIG_UNWINDER_FRAME_POINTER never
      handles these sections. According to the help text of
      CONFIG_UNWINDER_ARM, these sections should be discarded so that the
      kernel image size is not affected.
      
      Fixes: 5a17850e ("arm/build: Warn on orphan section placement")
      Link: https://github.com/ClangBuiltLinux/linux/issues/1152Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Review-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Tested-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      [kees: Made the discard slightly more specific]
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Link: https://lore.kernel.org/r/20200928224854.3224862-1-natechancellor@gmail.com
      c39866f2
    • Kees Cook's avatar
      vmlinux.lds.h: Keep .ctors.* with .ctors · 3e663148
      Kees Cook authored
      Under some circumstances, the compiler generates .ctors.* sections. This
      is seen doing a cross compile of x86_64 from a powerpc64el host:
      
      x86_64-linux-gnu-ld: warning: orphan section `.ctors.65435' from `kernel/trace/trace_clock.o' being
      placed in section `.ctors.65435'
      x86_64-linux-gnu-ld: warning: orphan section `.ctors.65435' from `kernel/trace/ftrace.o' being
      placed in section `.ctors.65435'
      x86_64-linux-gnu-ld: warning: orphan section `.ctors.65435' from `kernel/trace/ring_buffer.o' being
      placed in section `.ctors.65435'
      
      Include these orphans along with the regular .ctors section.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Tested-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Fixes: 83109d5d ("x86/build: Warn on orphan section placement")
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Link: https://lore.kernel.org/r/20201005025720.2599682-1-keescook@chromium.org
      3e663148
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 4d09c1d9
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - More binding additionalProperties/unevaluatedProperties additions
      
       - More yamllint fixes on additions in the merge window
      
       - CrOS embedded controller schema updates to fix warnings
      
       - LEDs schema update adding ID_RGB
      
       - A reserved-memory fix for regions starting at address 0x0
      
      * tag 'devicetree-fixes-for-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: Another round of adding missing 'additionalProperties/unevalutatedProperties'
        dt-bindings: Explicitly allow additional properties in board/SoC schemas
        dt-bindings: More whitespace clean-ups in schema files
        mfd: google,cros-ec: add missing properties
        dt-bindings: input: convert cros-ec-keyb to json-schema
        dt-bindings: i2c: convert i2c-cros-ec-tunnel to json-schema
        of: Fix reserved-memory overlap detection
        dt-bindings: mailbox: mtk-gce: fix incorrect mbox-cells value
        dt-bindings: leds: Update devicetree documents for ID_RGB
      4d09c1d9
    • Jens Axboe's avatar
      Fix compat regression in process_vm_rw() · 38dc5079
      Jens Axboe authored
      The removal of compat_process_vm_{readv,writev} didn't change
      process_vm_rw(), which always assumes it's not doing a compat syscall.
      
      Instead of passing in 'false' unconditionally for 'compat', make it
      conditional on in_compat_syscall().
      
      [ Both Al and Christoph point out that trying to access a 64-bit process
        from a 32-bit one cannot work anyway, and is likely better prohibited,
        but that's a separate issue    - Linus ]
      
      Fixes: c3973b40 ("mm: remove compat_process_vm_{readv,writev}")
      Reported-and-tested-by: default avatarKyle Huey <me@kylehuey.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      38dc5079
    • Steven Rostedt (VMware)'s avatar
      tracing, synthetic events: Replace buggy strcat() with seq_buf operations · 761a8c58
      Steven Rostedt (VMware) authored
      There was a memory corruption bug happening while running the synthetic
      event selftests:
      
       kmemleak: Cannot insert 0xffff8c196fa2afe5 into the object search tree (overlaps existing)
       CPU: 5 PID: 6866 Comm: ftracetest Tainted: G        W         5.9.0-rc5-test+ #577
       Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016
       Call Trace:
        dump_stack+0x8d/0xc0
        create_object.cold+0x3b/0x60
        slab_post_alloc_hook+0x57/0x510
        ? tracing_map_init+0x178/0x340
        __kmalloc+0x1b1/0x390
        tracing_map_init+0x178/0x340
        event_hist_trigger_func+0x523/0xa40
        trigger_process_regex+0xc5/0x110
        event_trigger_write+0x71/0xd0
        vfs_write+0xca/0x210
        ksys_write+0x70/0xf0
        do_syscall_64+0x33/0x40
        entry_SYSCALL_64_after_hwframe+0x44/0xa9
       RIP: 0033:0x7fef0a63a487
       Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24
       RSP: 002b:00007fff76f18398 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
       RAX: ffffffffffffffda RBX: 0000000000000039 RCX: 00007fef0a63a487
       RDX: 0000000000000039 RSI: 000055eb3b26d690 RDI: 0000000000000001
       RBP: 000055eb3b26d690 R08: 000000000000000a R09: 0000000000000038
       R10: 000055eb3b2cdb80 R11: 0000000000000246 R12: 0000000000000039
       R13: 00007fef0a70b500 R14: 0000000000000039 R15: 00007fef0a70b700
       kmemleak: Kernel memory leak detector disabled
       kmemleak: Object 0xffff8c196fa2afe0 (size 8):
       kmemleak:   comm "ftracetest", pid 6866, jiffies 4295082531
       kmemleak:   min_count = 1
       kmemleak:   count = 0
       kmemleak:   flags = 0x1
       kmemleak:   checksum = 0
       kmemleak:   backtrace:
            __kmalloc+0x1b1/0x390
            tracing_map_init+0x1be/0x340
            event_hist_trigger_func+0x523/0xa40
            trigger_process_regex+0xc5/0x110
            event_trigger_write+0x71/0xd0
            vfs_write+0xca/0x210
            ksys_write+0x70/0xf0
            do_syscall_64+0x33/0x40
            entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      The cause came down to a use of strcat() that was adding an string that was
      shorten, but the strcat() did not take that into account.
      
      strcat() is extremely dangerous as it does not care how big the buffer is.
      Replace it with seq_buf operations that prevent the buffer from being
      overwritten if what is being written is bigger than the buffer.
      
      Fixes: 10819e25 ("tracing: Handle synthetic event array field type checking correctly")
      Reviewed-by: default avatarTom Zanussi <zanussi@kernel.org>
      Tested-by: default avatarTom Zanussi <zanussi@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      761a8c58
  4. 26 Oct, 2020 15 commits
  5. 25 Oct, 2020 12 commits