1. 23 May, 2022 7 commits
    • Stafford Horne's avatar
      openrisc: Update litex defconfig to support glibc userland · fe47623a
      Stafford Horne authored
      I have been using a litex SoC for glibc verification.  Update the
      default litex config to support required userspace API's needed for the
      full glibc testsuite to pass.
      
      This includes enabling the litex mmc driver and filesystems used
      in a typical litex environment.
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      fe47623a
    • Stafford Horne's avatar
      openrisc: Pretty print show_registers memory dumps · 7d2ae3de
      Stafford Horne authored
      Currently show registers, print memory dumps character by character and
      there is no address information, so its a bit difficult to use.  For
      example before a stack dump looks as follows.
      
          [   13.650000] Stack:
          [   13.650000] Call trace
          [   13.690000] [<(ptrval)>] ? put_timespec64+0x44/0x60
          [   13.690000] [<(ptrval)>] ? _data_page_fault_handler+0x104/0x10c
          [   13.700000]
          [   13.700000] Code:
          [   13.700000] 13
          [   13.700000] ff
          [   13.700000] ff
          [   13.700000] f9
          [   13.710000] 84
          [   13.710000] 82
          [   13.710000] ff
          [   13.710000] bc
          [   13.710000] 07
          [   13.710000] fd
          [   13.720000] 4e
          [   13.720000] 67
          [   13.720000] 84
          [   13.720000] 62
          [   13.720000] ff
          ...
      
      This change updates this to print the address and data a word at time.
      
          [    0.830000] Stack:
          [    0.830000] Call trace:
          [    0.830000] [<(ptrval)>] load_elf_binary+0x744/0xf5c
          [    0.830000] [<(ptrval)>] ? __kernel_read+0x144/0x184
          [    0.830000] [<(ptrval)>] bprm_execve+0x27c/0x3e4
          [    0.830000] [<(ptrval)>] kernel_execve+0x16c/0x1a0
          [    0.830000] [<(ptrval)>] run_init_process+0xa0/0xec
          [    0.830000] [<(ptrval)>] ? kernel_init+0x0/0x14c
          [    0.830000] [<(ptrval)>] kernel_init+0x7c/0x14c
          [    0.830000] [<(ptrval)>] ? calculate_sigpending+0x30/0x40
          [    0.830000] [<(ptrval)>] ret_from_fork+0x1c/0x84
          [    0.830000]
          [    0.830000]  c1033dbc:       c1033dec
          [    0.830000]  c1033dc0:       c015258c
          [    0.830000]  c1033dc4:       c129da00
          [    0.830000]  c1033dc8:       00000002
          [    0.830000]  c1033dcc:       00000000
          [    0.830000]  c1033dd0:       c129da00
          [    0.830000]  c1033dd4:       00000000
          [    0.830000]  c1033dd8:       00000000
          [    0.830000] (c1033ddc:)      00001e04
          [    0.830000]  c1033de0:       001501fc
          [    0.830000]  c1033de4:       c1033e68
          [    0.830000]  c1033de8:       c0152e60
          [    0.830000]  c1033dec:       c129da5c
          [    0.830000]  c1033df0:       c0674a20
          [    0.830000]  c1033df4:       c1033e50
          [    0.830000]  c1033df8:       c00e3d6c
          [    0.830000]  c1033dfc:       c129da5c
          [    0.830000]  c1033e00:       00000003
          [    0.830000]  c1033e04:       00150000
          [    0.830000]  c1033e08:       00002034
          [    0.830000]  c1033e0c:       001501fc
          [    0.830000]  c1033e10:       00000000
          [    0.830000]  c1033e14:       00150000
          [    0.830000]  c1033e18:       0014ebbc
          [    0.830000]  c1033e1c:       00002000
          [    0.830000]  c1033e20:       00000003
          [    0.830000]  c1033e24:       c12a07e0
          [    0.830000]  c1033e28:       00000000
          [    0.830000]  c1033e2c:       00000000
          [    0.830000]  c1033e30:       00000000
          [    0.830000]  c1033e34:       40040000
          [    0.830000]  c1033e38:       00000000
          [    0.830000]
          [    0.830000] Code:
          [    0.830000]  c00047a4:       9c21fff8
          [    0.830000]  c00047a8:       d4012000
          [    0.830000]  c00047ac:       d4011804
          [    0.830000]  c00047b0:       e4040000
          [    0.830000]  c00047b4:       10000005
          [    0.830000]  c00047b8:       9c84ffff
          [    0.830000] (c00047bc:)      d8030000
          [    0.830000]  c00047c0:       03fffffc
          [    0.830000]  c00047c4:       9c630001
          [    0.830000]  c00047c8:       9d640001
          [    0.830000]  c00047cc:       84810000
          [    0.830000]  c00047d0:       84610004
      
      Now we are also printing a bit of the stack as well as the code.  The
      stack is output to help with debugging.  There may be concern about
      exposing sensitive information on the stack, but we are already dumping
      all register content which would have similar sensitive information.  So
      I am going ahead as this proves useful in investigation.
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      7d2ae3de
    • Stafford Horne's avatar
      openrisc: Add syscall details to emergency syscall debugging · a0a94bc9
      Stafford Horne authored
      When bringing linux on the or1k Marocchino we ran into issues starting
      init.  This patch adds the syscall number and return address to
      assist tracing syscalls even before strace is able to be used.
      
      By default this is all disabled but a developer could adjust the ifdef
      to enable debugging.
      
      Cc: Andrey Bacherov <bandvig@mail.ru>
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      a0a94bc9
    • Stafford Horne's avatar
      openrisc: Add support for liteuart emergency printing · 29bbb2a9
      Stafford Horne authored
      This patch adds support for sending emergency print output, such as
      unhandled exception details, to a liteuart serial device.  This is the
      default device available on litex platforms.
      
      If a developer want to use this they should update UART_BASE_ADD
      to the address of liteuart.
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      29bbb2a9
    • Stafford Horne's avatar
      openrisc: Cleanup emergency print handling · e449759c
      Stafford Horne authored
      The emergency print support only works for 8250 compatible serial ports.
      Now that OpenRISC platforms may be configured with different serial port
      hardware we don't want emergency print to try to print to non-existent
      hardware which will cause lockups.
      
      This patch contains several fixes to get emergency print working again:
      
       - Update symbol loading to not assume the location of symbols
       - Split the putc print operation out to its own function to allow
         for different future implementations.
       - Update _emergency_print_nr and _emergency_print to use the putc
         function.
       - Guard serial 8250 specific sequences by CONFIG_SERIAL_8250
       - Update string line feed from lf,cr to cr,lf.
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      e449759c
    • Stafford Horne's avatar
      openrisc: Add gcc machine instruction flag configuration · 87e387ac
      Stafford Horne authored
      OpenRISC GCC supports flags to enable the backend to output instructions
      if they are supported by a target processor.  This patch adds
      configuration flags to enable configuring these flags to tune the kernel
      for a particular CPU configuration.
      
      In the future we could also enable all of these flags by default and
      provide instruction emulation in the kernel to make these choices easier
      for users but this is what we provide for now.
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      87e387ac
    • Jason A. Donenfeld's avatar
      openrisc: define nop command for simulator reboot · 635267b7
      Jason A. Donenfeld authored
      The simulator defines `l.nop 1` for shutdown, but doesn't have anything
      for reboot. Use 13 for this, which is currently unused, dubbed
      `NOP_REBOOT`.
      
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Link: https://lore.kernel.org/all/YmnaDUpVI5ihgvg6@zx2c4.com/Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
      635267b7
  2. 11 May, 2022 2 commits
  3. 24 Apr, 2022 8 commits
  4. 23 Apr, 2022 13 commits
    • Linus Torvalds's avatar
      Merge tag 'arc-5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · f3935926
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta:
      
       - Assorted fixes
      
      * tag 'arc-5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: remove redundant READ_ONCE() in cmpxchg loop
        ARC: atomic: cleanup atomic-llsc definitions
        arc: drop definitions of pgd_index() and pgd_offset{, _k}() entirely
        ARC: dts: align SPI NOR node name with dtschema
        ARC: Remove a redundant memset()
        ARC: fix typos in comments
        ARC: entry: fix syscall_trace_exit argument
      f3935926
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 6fc2586d
      Linus Torvalds authored
      Pull SCSI fix from James Bottomley:
       "One fix for an information leak caused by copying a buffer to
        userspace without checking for error first in the sr driver"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: sr: Do not leak information in ioctl
      6fc2586d
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.18-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · b51bd23c
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "A simple cleanup patch and a refcount fix for Xen on Arm"
      
      * tag 'for-linus-5.18-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        arm/xen: Fix some refcount leaks
        xen: Convert kmap() to kmap_local_page()
      b51bd23c
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-04-23' of git://anongit.freedesktop.org/drm/drm · 13bc32ba
      Linus Torvalds authored
      Pull more drm fixes from Dave Airlie:
       "Maarten was away, so Maxine stepped up and sent me the drm-fixes
        merge, so no point leaving it for another week.
      
        The big change is an OF revert around bridge/panels, it may have some
        driver fallout, but hopefully this revert gets them shook out in the
        next week easier.
      
        Otherwise it's a bunch of locking/refcounts across drivers, a radeon
        dma_resv logic fix and some raspberry pi panel fixes.
      
        panel:
         - revert of patch that broke panel/bridge issues
      
        dma-buf:
         - remove unused header file.
      
        amdgpu:
         - partial revert of locking change
      
        radeon:
         - fix dma_resv logic inversion
      
        panel:
         - pi touchscreen panel init fixes
      
        vc4:
         - build fix
         - runtime pm refcount fix
      
        vmwgfx:
         - refcounting fix"
      
      * tag 'drm-fixes-2022-04-23' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu: partial revert "remove ctx->lock" v2
        Revert "drm: of: Lookup if child node has panel or bridge"
        Revert "drm: of: Properly try all possible cases for bridge/panel detection"
        drm/vc4: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage
        drm/vmwgfx: Fix gem refcounting and memory evictions
        drm/vc4: Fix build error when CONFIG_DRM_VC4=y && CONFIG_RASPBERRYPI_FIRMWARE=m
        drm/panel/raspberrypi-touchscreen: Initialise the bridge in prepare
        drm/panel/raspberrypi-touchscreen: Avoid NULL deref if not initialised
        dma-buf-map: remove renamed header file
        drm/radeon: fix logic inversion in radeon_sync_resv
      13bc32ba
    • Linus Torvalds's avatar
      Merge tag 'input-for-v5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 0fe86b27
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
      
       - a new set of keycodes to be used by marine navigation systems
      
       - minor fixes to omap4-keypad and cypress-sf drivers
      
      * tag 'input-for-v5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: add Marine Navigation Keycodes
        Input: omap4-keypad - fix pm_runtime_get_sync() error checking
        Input: cypress-sf - register a callback to disable the regulators
      0fe86b27
    • Linus Torvalds's avatar
      Merge tag 'block-5.18-2022-04-22' of git://git.kernel.dk/linux-block · 8467f9e3
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Just two small regression fixes for bcache"
      
      * tag 'block-5.18-2022-04-22' of git://git.kernel.dk/linux-block:
        bcache: fix wrong bdev parameter when calling bio_alloc_clone() in do_bio_hook()
        bcache: put bch_bio_map() back to correct location in journal_write_unlocked()
      8467f9e3
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.18-2022-04-22' of git://git.kernel.dk/linux-block · 1f5e98e7
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Just two small fixes - one fixing a potential leak for the iovec for
        larger requests added in this cycle, and one fixing a theoretical leak
        with CQE_SKIP and IOPOLL"
      
      * tag 'io_uring-5.18-2022-04-22' of git://git.kernel.dk/linux-block:
        io_uring: fix leaks on IOPOLL and CQE_SKIP
        io_uring: free iovec if file assignment fails
      1f5e98e7
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.18-2022-04-22' of... · 45ab9400
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.18-2022-04-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix header include for LLVM >= 14 when building with libclang.
      
       - Allow access to 'data_src' for auxtrace in 'perf script' with ARM SPE
         perf.data files, fixing processing data with such attributes.
      
       - Fix error message for test case 71 ("Convert perf time to TSC") on
         s390, where it is not supported.
      
      * tag 'perf-tools-fixes-for-v5.18-2022-04-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf test: Fix error message for test case 71 on s390, where it is not supported
        perf report: Set PERF_SAMPLE_DATA_SRC bit for Arm SPE event
        perf script: Always allow field 'data_src' for auxtrace
        perf clang: Fix header include for LLVM >= 14
      45ab9400
    • Randy Dunlap's avatar
      sparc: cacheflush_32.h needs struct page · 9423edfc
      Randy Dunlap authored
      Add a struct page forward declaration to cacheflush_32.h.
      Fixes this build warning:
      
          CC      drivers/crypto/xilinx/zynqmp-sha.o
        In file included from arch/sparc/include/asm/cacheflush.h:11,
                         from include/linux/cacheflush.h:5,
                         from drivers/crypto/xilinx/zynqmp-sha.c:6:
        arch/sparc/include/asm/cacheflush_32.h:38:37: warning: 'struct page' declared inside parameter list will not be visible outside of this definition or declaration
           38 | void sparc_flush_page_to_ram(struct page *page);
      
      Exposed by commit 0e03b8fd ("crypto: xilinx - Turn SHA into a
      tristate and allow COMPILE_TEST") but not Fixes: that commit because the
      underlying problem is older.
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: sparclinux@vger.kernel.org
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9423edfc
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2022-04-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · c18a2a28
      Dave Airlie authored
      Two fixes for the raspberrypi panel initialisation, one fix for a logic
      inversion in radeon, a build and pm refcounting fix for vc4, two reverts
      for drm_of_get_bridge that caused a number of regression and a locking
      regression for amdgpu.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220422084403.2xrhf3jusdej5yo4@houat
      c18a2a28
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · c00c5e1d
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Fix some syzbot-detected bugs, as well as other bugs found by I/O
        injection testing.
      
        Change ext4's fallocate to consistently drop set[ug]id bits when an
        fallocate operation might possibly change the user-visible contents of
        a file.
      
        Also, improve handling of potentially invalid values in the the
        s_overhead_cluster superblock field to avoid ext4 returning a negative
        number of free blocks"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        jbd2: fix a potential race while discarding reserved buffers after an abort
        ext4: update the cached overhead value in the superblock
        ext4: force overhead calculation if the s_overhead_cluster makes no sense
        ext4: fix overhead calculation to account for the reserved gdt blocks
        ext4, doc: fix incorrect h_reserved size
        ext4: limit length to bitmap_maxbytes - blocksize in punch_hole
        ext4: fix use-after-free in ext4_search_dir
        ext4: fix bug_on in start_this_handle during umount filesystem
        ext4: fix symlink file size not match to file content
        ext4: fix fallocate to use file_modified to update permissions consistently
      c00c5e1d
    • Linus Torvalds's avatar
      Merge tag 'ata-5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata · 2e5991fa
      Linus Torvalds authored
      Pull ATA fix from Damien Le Moal:
       "A single fix to avoid a NULL pointer dereference in the pata_marvell
        driver with adapters not supporting DMA, from Zheyu"
      
      * tag 'ata-5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
        ata: pata_marvell: Check the 'bmdma_addr' beforing reading
      2e5991fa
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · bb4ce2c6
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "The main and larger change here is a workaround for AMD's lack of
        cache coherency for encrypted-memory guests.
      
        I have another patch pending, but it's waiting for review from the
        architecture maintainers.
      
        RISC-V:
      
         - Remove 's' & 'u' as valid ISA extension
      
         - Do not allow disabling the base extensions 'i'/'m'/'a'/'c'
      
        x86:
      
         - Fix NMI watchdog in guests on AMD
      
         - Fix for SEV cache incoherency issues
      
         - Don't re-acquire SRCU lock in complete_emulated_io()
      
         - Avoid NULL pointer deref if VM creation fails
      
         - Fix race conditions between APICv disabling and vCPU creation
      
         - Bugfixes for disabling of APICv
      
         - Preserve BSP MSR_KVM_POLL_CONTROL across suspend/resume
      
        selftests:
      
         - Do not use bitfields larger than 32-bits, they differ between GCC
           and clang"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        kvm: selftests: introduce and use more page size-related constants
        kvm: selftests: do not use bitfields larger than 32-bits for PTEs
        KVM: SEV: add cache flush to solve SEV cache incoherency issues
        KVM: SVM: Flush when freeing encrypted pages even on SME_COHERENT CPUs
        KVM: SVM: Simplify and harden helper to flush SEV guest page(s)
        KVM: selftests: Silence compiler warning in the kvm_page_table_test
        KVM: x86/pmu: Update AMD PMC sample period to fix guest NMI-watchdog
        x86/kvm: Preserve BSP MSR_KVM_POLL_CONTROL across suspend/resume
        KVM: SPDX style and spelling fixes
        KVM: x86: Skip KVM_GUESTDBG_BLOCKIRQ APICv update if APICv is disabled
        KVM: x86: Pend KVM_REQ_APICV_UPDATE during vCPU creation to fix a race
        KVM: nVMX: Defer APICv updates while L2 is active until L1 is active
        KVM: x86: Tag APICv DISABLE inhibit, not ABSENT, if APICv is disabled
        KVM: Initialize debugfs_dentry when a VM is created to avoid NULL deref
        KVM: Add helpers to wrap vcpu->srcu_idx and yell if it's abused
        KVM: RISC-V: Use kvm_vcpu.srcu_idx, drop RISC-V's unnecessary copy
        KVM: x86: Don't re-acquire SRCU lock in complete_emulated_io()
        RISC-V: KVM: Restrict the extensions that can be disabled
        RISC-V: KVM: Remove 's' & 'u' as valid ISA extension
      bb4ce2c6
  5. 22 Apr, 2022 10 commits