1. 21 Sep, 2022 1 commit
    • David Gow's avatar
      arch: um: Mark the stack non-executable to fix a binutils warning · bd71558d
      David Gow authored
      Since binutils 2.39, ld will print a warning if any stack section is
      executable, which is the default for stack sections on files without a
      .note.GNU-stack section.
      
      This was fixed for x86 in commit ffcf9c57 ("x86: link vdso and boot with -z noexecstack --no-warn-rwx-segments"),
      but remained broken for UML, resulting in several warnings:
      
      /usr/bin/ld: warning: arch/x86/um/vdso/vdso.o: missing .note.GNU-stack section implies executable stack
      /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
      /usr/bin/ld: warning: .tmp_vmlinux.kallsyms1 has a LOAD segment with RWX permissions
      /usr/bin/ld: warning: .tmp_vmlinux.kallsyms1.o: missing .note.GNU-stack section implies executable stack
      /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
      /usr/bin/ld: warning: .tmp_vmlinux.kallsyms2 has a LOAD segment with RWX permissions
      /usr/bin/ld: warning: .tmp_vmlinux.kallsyms2.o: missing .note.GNU-stack section implies executable stack
      /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
      /usr/bin/ld: warning: vmlinux has a LOAD segment with RWX permissions
      
      Link both the VDSO and vmlinux with -z noexecstack, fixing the warnings
      about .note.GNU-stack sections. In addition, pass --no-warn-rwx-segments
      to dodge the remaining warnings about LOAD segments with RWX permissions
      in the kallsyms objects. (Note that this flag is apparently not
      available on lld, so hide it behind a test for BFD, which is what the
      x86 patch does.)
      
      Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ffcf9c5700e49c0aee42dcba9a12ba21338e8136
      Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107Signed-off-by: default avatarDavid Gow <davidgow@google.com>
      Reviewed-by: default avatarLukas Straub <lukasstraub2@web.de>
      Tested-by: default avatarLukas Straub <lukasstraub2@web.de>
      Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      bd71558d
  2. 19 Sep, 2022 4 commits
    • Vincent Whitchurch's avatar
      um: Prevent KASAN splats in dump_stack() · 2975e4a2
      Vincent Whitchurch authored
      Use READ_ONCE_NOCHECK() when reading the stack to prevent KASAN splats
      when dump_stack() is used.
      
      Fixes: 5b301409 ("UML: add support for KASAN under x86_64")
      Signed-off-by: default avatarVincent Whitchurch <vincent.whitchurch@axis.com>
      Reviewed-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      2975e4a2
    • Christian Lamparter's avatar
      um: fix default console kernel parameter · 782b1f70
      Christian Lamparter authored
      OpenWrt's UML with 5.15 was producing odd errors/warnings during preinit
      part of the early userspace portion:
      
      |[    0.000000] Kernel command line: ubd0=root.img root=98:0 console=tty
      |[...]
      |[    0.440000] random: jshn: uninitialized urandom read (4 bytes read)
      |[    0.460000] random: jshn: uninitialized urandom read (4 bytes read)
      |/etc/preinit: line 47: can't create /dev/tty: No such device or address
      |/etc/preinit: line 48: can't create /dev/tty: No such device or address
      |/etc/preinit: line 58: can't open /dev/tty: No such device or address
      |[...] repeated many times
      
      That "/dev/tty" came from the command line (which is automatically
      added if no console= parameter was specified for the uml binary).
      
      The TLDP project tells the following about the /dev/tty:
      <https://tldp.org/HOWTO/Text-Terminal-HOWTO-7.html#ss7.3>
      | /dev/tty stands for the controlling terminal (if any) for the current
      | process.[...]
      | /dev/tty is something like a link to the actually terminal device[..]
      
      The "(if any)" is important here, since it's possible for processes to
      not have a controlling terminal.
      
      I think this was a simple typo and the author wanted tty0 there.
      
      CC: Thomas Meyer <thomas@m3y3r.de>
      Fixes: d7ffac33 ("um: stdio_console: Make preferred console")
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      782b1f70
    • Lukas Straub's avatar
      um: Cleanup compiler warning in arch/x86/um/tls_32.c · d27fff34
      Lukas Straub authored
      arch.tls_array is statically allocated so checking for NULL doesn't
      make sense. This causes the compiler warning below.
      
      Remove the checks to silence these warnings.
      
      ../arch/x86/um/tls_32.c: In function 'get_free_idx':
      ../arch/x86/um/tls_32.c:68:13: warning: the comparison will always evaluate as 'true' for the address of 'tls_array' will never be NULL [-Waddress]
         68 |         if (!t->arch.tls_array)
            |             ^
      In file included from ../arch/x86/um/asm/processor.h:10,
                       from ../include/linux/rcupdate.h:30,
                       from ../include/linux/rculist.h:11,
                       from ../include/linux/pid.h:5,
                       from ../include/linux/sched.h:14,
                       from ../arch/x86/um/tls_32.c:7:
      ../arch/x86/um/asm/processor_32.h:22:31: note: 'tls_array' declared here
         22 |         struct uml_tls_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
            |                               ^~~~~~~~~
      ../arch/x86/um/tls_32.c: In function 'get_tls_entry':
      ../arch/x86/um/tls_32.c:243:13: warning: the comparison will always evaluate as 'true' for the address of 'tls_array' will never be NULL [-Waddress]
        243 |         if (!t->arch.tls_array)
            |             ^
      ../arch/x86/um/asm/processor_32.h:22:31: note: 'tls_array' declared here
         22 |         struct uml_tls_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
            |                               ^~~~~~~~~
      Signed-off-by: default avatarLukas Straub <lukasstraub2@web.de>
      Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      d27fff34
    • Lukas Straub's avatar
      um: Cleanup syscall_handler_t cast in syscalls_32.h · 61670b4d
      Lukas Straub authored
      Like in f4f03f29
      "um: Cleanup syscall_handler_t definition/cast, fix warning",
      remove the cast to to fix the compiler warning.
      Signed-off-by: default avatarLukas Straub <lukasstraub2@web.de>
      Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      61670b4d
  3. 18 Sep, 2022 5 commits
  4. 16 Sep, 2022 9 commits
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · a335366b
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - fix the level-low interrupt type support in gpio-mpc8xxx
      
       - convert another two drivers to using immutable irq chips
      
       - MAINTAINERS update
      
      * tag 'gpio-fixes-for-v6.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: mt7621: Make the irqchip immutable
        gpio: ixp4xx: Make irqchip immutable
        MAINTAINERS: Update HiSilicon GPIO Driver maintainer
        gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx
      a335366b
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 6879c2d3
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "Nothing special, just driver fixes:
      
         - Fix IRQ wakeup and pins for UFS and SDC2 issues on the Qualcomm
           SC8180x
      
         - Fix the Rockchip driver to support interrupt on both rising and
           falling edges.
      
         - Name the Allwinner A100 R_PIO properly
      
         - Fix several issues with the Ocelot interrupts"
      
      * tag 'pinctrl-v6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: ocelot: Fix interrupt controller
        pinctrl: sunxi: Fix name for A100 R_PIO
        pinctrl: rockchip: Enhance support for IRQ_TYPE_EDGE_BOTH
        pinctrl: qcom: sc8180x: Fix wrong pin numbers
        pinctrl: qcom: sc8180x: Fix gpio_wakeirq_map
      6879c2d3
    • Linus Torvalds's avatar
      Merge tag 'block-6.0-2022-09-16' of git://git.kernel.dk/linux-block · 68e777e4
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Two fixes for -rc6:
      
         - Fix a mixup of sectors and bytes in the secure erase ioctl
           (Mikulas)
      
         - Fix for a bad return value for a non-blocking bio/blk queue enter
           call (me)"
      
      * tag 'block-6.0-2022-09-16' of git://git.kernel.dk/linux-block:
        blk-lib: fix blkdev_issue_secure_erase
        block: blk_queue_enter() / __bio_queue_enter() must return -EAGAIN for nowait
      68e777e4
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.0-2022-09-16' of git://git.kernel.dk/linux-block · 0158137d
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two small patches:
      
         - Fix using an unsigned type for the return value, introduced in this
           release (Pavel)
      
         - Stable fix for a missing check for a fixed file on put (me)"
      
      * tag 'io_uring-6.0-2022-09-16' of git://git.kernel.dk/linux-block:
        io_uring/msg_ring: check file type before putting
        io_uring/rw: fix error'ed retry return values
      0158137d
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-09-16' of git://anongit.freedesktop.org/drm/drm · 5763d7f2
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This is the regular drm fixes pull.
      
        The i915 and misc fixes are fairly regular, but the amdgpu contains
        fixes for new hw blocks, the dcn314 specific path hookups and also has
        a bunch of fixes for clang stack size warnings which are a bit churny
        but fairly straightforward. This means it looks a little larger than
        usual.
      
        amdgpu:
         - BACO fixes for some RDNA2 boards
         - PCI AER fixes uncovered by a core PCI change
         - Properly hook up dirtyfb helper
         - RAS fixes for GC 11.x
         - TMR fix
         - DCN 3.2.x fixes
         - DCN 3.1.4 fixes
         - LLVM DML stack size fixes
      
        i915:
         - Revert a display patch around max DP source rate now that the
           proper WaEdpLinkRateDataReload is in place
         - Fix perf limit reasons bit position
         - Fix unclaimmed mmio registers on suspend flow with GuC
         - A vma_move_to_active fix for a regression with video decoding
         - DP DSP fix
      
        gma500:
         - Locking and IRQ fixes
      
        meson:
         - OSD1 display fixes
      
        panel-edp:
         - Fix Innolux timings
      
        rockchip:
         - DP/HDMI fixes"
      
      * tag 'drm-fixes-2022-09-16' of git://anongit.freedesktop.org/drm/drm: (42 commits)
        drm/amdgpu: make sure to init common IP before gmc
        drm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega
        drm/amdgpu: move nbio ih_doorbell_range() into ih code for vega
        drm/rockchip: Fix return type of cdn_dp_connector_mode_valid
        drm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline for stack usage
        drm/amd/display: Reduce number of arguments of dml31's CalculateFlipSchedule()
        drm/amd/display: Reduce number of arguments of dml31's CalculateWatermarksAndDRAMSpeedChangeSupport()
        drm/amd/display: Reduce number of arguments of dml32_CalculatePrefetchSchedule()
        drm/amd/display: Reduce number of arguments of dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport()
        drm/amd/display: Refactor SubVP calculation to remove FPU
        drm/amd/display: Limit user regamma to a valid value
        drm/amd/display: add workaround for subvp cursor corruption for DCN32/321
        drm/amd/display: SW cursor fallback for SubVP
        drm/amd/display: Round cursor width up for MALL allocation
        drm/amd/display: Correct dram channel width for dcn314
        drm/amd/display: Relax swizzle checks for video non-RGB formats on DCN314
        drm/amd/display: Hook up DCN314 specific dml implementation
        drm/amd/display: Enable dlg and vba compilation for dcn314
        drm/amd/display: Fix compilation errors on DCN314
        drm/amd/display: Fix divide by zero in DML
        ...
      5763d7f2
    • Linus Torvalds's avatar
      Merge tag '6.0-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 714820c6
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Four smb3 fixes for stable:
      
         - important fix to revalidate mapping when doing direct writes
      
         - missing spinlock
      
         - two fixes to socket handling
      
         - trivial change to update internal version number for cifs.ko"
      
      * tag '6.0-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update internal module number
        cifs: add missing spinlock around tcon refcount
        cifs: always initialize struct msghdr smb_msg completely
        cifs: don't send down the destination address to sendmsg for a SOCK_STREAM
        cifs: revalidate mapping when doing direct writes
      714820c6
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2022-09-15' of... · 25100377
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2022-09-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Revert a display patch around max DP source rate now
        that the proper WaEdpLinkRateDataReload is in place. (Ville)
      - Fix perf limit reasons bit position. (Ashutosh)
      - Fix unclaimmed mmio registers on suspend flow with GuC. (Umesh)
      - A vma_move_to_active fix for a regression with video decoding. (Nirmoy)
      - DP DSP fix. (Ankit)
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/YyMtmGMXRLsURoM5@intel.com
      25100377
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2022-09-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 87d9862b
      Dave Airlie authored
      Short summary of fixes pull:
      
       * gma500: Locking and IRQ fixes
       * meson: OSD1 display fixes
       * panel-edp: Fix Innolux timings
       * rockchip: DP/HDMI fixes
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/YyMUpP1w21CPXq+I@linux-uq9g
      87d9862b
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.0-2022-09-14' of... · e2111ae2
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-6.0-2022-09-14' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-6.0-2022-09-14:
      
      amdgpu:
      - BACO fixes for some RDNA2 boards
      - PCI AER fixes uncovered by a core PCI change
      - Properly hook up dirtyfb helper
      - RAS fixes for GC 11.x
      - TMR fix
      - DCN 3.2.x fixes
      - DCN 3.1.4 fixes
      - LLVM DML stack size fixes
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220914184030.6145-1-alexander.deucher@amd.com
      e2111ae2
  5. 15 Sep, 2022 4 commits
  6. 14 Sep, 2022 11 commits
  7. 13 Sep, 2022 6 commits