Skip to content
  1. Apr 25, 2021
  2. Apr 24, 2021
  3. Apr 23, 2021
  4. Apr 22, 2021
  5. Apr 21, 2021
    • Jiansong Chen's avatar
      drm/amdgpu: fix GCR_GENERAL_CNTL offset for dimgrey_cavefish · 24d03452
      Jiansong Chen authored
      
      
      dimgrey_cavefish has similar gc_10_3 ip with sienna_cichlid,
      so follow its registers offset setting.
      
      Signed-off-by: default avatarJiansong Chen <Jiansong.Chen@amd.com>
      Reviewed-by: default avatarTao Zhou <tao.zhou1@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      24d03452
    • Simon Ser's avatar
      amd/display: allow non-linear multi-planar formats · 9ebb6bc0
      Simon Ser authored
      
      
      Accept non-linear buffers which use a multi-planar format, as long
      as they don't use DCC.
      
      Tested on GFX9 with NV12.
      
      Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Harry Wentland <hwentlan@amd.com>
      Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
      Reviewed-by: default avatarBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      9ebb6bc0
    • Qingqing Zhuo's avatar
      drm/amd/display: Update modifier list for gfx10_3 · 6d638b3f
      Qingqing Zhuo authored
      [Why]
      Current list supports modifiers that have DCC_MAX_COMPRESSED_BLOCK
      set to AMD_FMT_MOD_DCC_BLOCK_128B, while AMD_FMT_MOD_DCC_BLOCK_64B
      is used instead by userspace.
      
      [How]
      Replace AMD_FMT_MOD_DCC_BLOCK_128B with AMD_FMT_MOD_DCC_BLOCK_64B
      for modifiers with DCC supported.
      
      Fixes: faa37f54
      
       ("drm/amd/display: Expose modifiers")
      Signed-off-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
      Reviewed-by: default avatarBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
      Tested-by: default avatarBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      6d638b3f
    • Philip Yang's avatar
      drm/amdgpu: reserve fence slot to update page table · d42a5b63
      Philip Yang authored
      
      
      Forgot to reserve a fence slot to use sdma to update page table, cause
      below kernel BUG backtrace to handle vm retry fault while application is
      exiting.
      
      [  133.048143] kernel BUG at /home/yangp/git/compute_staging/kernel/drivers/dma-buf/dma-resv.c:281!
      [  133.048487] Workqueue: events amdgpu_irq_handle_ih1 [amdgpu]
      [  133.048506] RIP: 0010:dma_resv_add_shared_fence+0x204/0x280
      [  133.048672]  amdgpu_vm_sdma_commit+0x134/0x220 [amdgpu]
      [  133.048788]  amdgpu_vm_bo_update_range+0x220/0x250 [amdgpu]
      [  133.048905]  amdgpu_vm_handle_fault+0x202/0x370 [amdgpu]
      [  133.049031]  gmc_v9_0_process_interrupt+0x1ab/0x310 [amdgpu]
      [  133.049165]  ? kgd2kfd_interrupt+0x9a/0x180 [amdgpu]
      [  133.049289]  ? amdgpu_irq_dispatch+0xb6/0x240 [amdgpu]
      [  133.049408]  amdgpu_irq_dispatch+0xb6/0x240 [amdgpu]
      [  133.049534]  amdgpu_ih_process+0x9b/0x1c0 [amdgpu]
      [  133.049657]  amdgpu_irq_handle_ih1+0x21/0x60 [amdgpu]
      [  133.049669]  process_one_work+0x29f/0x640
      [  133.049678]  worker_thread+0x39/0x3f0
      [  133.049685]  ? process_one_work+0x640/0x640
      
      Signed-off-by: default avatarPhilip Yang <Philip.Yang@amd.com>
      Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 5.11.x
      d42a5b63
    • Tony Lindgren's avatar
      gpio: omap: Save and restore sysconfig · ddd8d94c
      Tony Lindgren authored
      As we are using cpu_pm to save and restore context, we must also save and
      restore the GPIO sysconfig register. This is needed because we are not
      calling PM runtime functions at all with cpu_pm.
      
      We need to save the sysconfig on idle as it's value can get reconfigured by
      PM runtime and can be different from the init time value. Device specific
      flags like "ti,no-idle-on-init" can affect the init value.
      
      Fixes: b764a586
      
       ("gpio: omap: Remove custom PM calls and use cpu_pm instead")
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Cc: Adam Ford <aford173@gmail.com>
      Cc: Andreas Kemnade <andreas@kemnade.info>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Acked-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      ddd8d94c
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 1fe5501b
      Linus Torvalds authored
      Pull tracing fix from Steven Rostedt:
       "Fix tp_printk command line and trace events
      
        Masami added a wrapper to be able to unhash trace event pointers as
        they are only read by root anyway, and they can also be extracted by
        the raw trace data buffers. But this wrapper utilized the iterator to
        have a temporary buffer to manipulate the text with.
      
        tp_printk is a kernel command line option that will send the trace
        output of a trace event to the console on boot up (useful when the
        system crashes before finishing the boot). But the code used the same
        wrapper that Masami added, and its iterator did not have a buffer, and
        this caused the system to crash.
      
        Have the wrapper just print the trace event normally if the iterator
        has no temporary buffer"
      
      * tag 'trace-v5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix checking event hash pointer logic when tp_printk is enabled
      1fe5501b
    • Serge E. Hallyn's avatar
      capabilities: require CAP_SETFCAP to map uid 0 · db2e718a
      Serge E. Hallyn authored
      cap_setfcap is required to create file capabilities.
      
      Since commit 8db6c34f ("Introduce v3 namespaced file capabilities"),
      a process running as uid 0 but without cap_setfcap is able to work
      around this as follows: unshare a new user namespace which maps parent
      uid 0 into the child namespace.
      
      While this task will not have new capabilities against the parent
      namespace, there is a loophole due to the way namespaced file
      capabilities are represented as xattrs.  File capabilities valid in
      userns 1 are distinguished from file capabilities valid in userns 2 by
      the kuid which underlies uid 0.  Therefore the restricted root process
      can unshare a new self-mapping namespace, add a namespaced file
      capability onto a file, then use that file capability in the parent
      namespace.
      
      To prevent that, do not allow mapping parent uid 0 if the process which
      opened the uid_map file does not have CAP_SETFCAP, which is the
      capability for setting file capabilities.
      
      As a further wrinkle: a task can unshare its user namespace, then open
      its uid_map file itself, and map (only) its own uid.  In this case we do
      not have the credential from before unshare, which was potentially more
      restricted.  So, when creating a user namespace, we record whether the
      creator had CAP_SETFCAP.  Then we can use that during map_write().
      
      With this patch:
      
      1. Unprivileged user can still unshare -Ur
      
         ubuntu@caps:~$ unshare -Ur
         root@caps:~# logout
      
      2. Root user can still unshare -Ur
      
         ubuntu@caps:~$ sudo bash
         root@caps:/home/ubuntu# unshare -Ur
         root@caps:/home/ubuntu# logout
      
      3. Root user without CAP_SETFCAP cannot unshare -Ur:
      
         root@caps:/home/ubuntu# /sbin/capsh --drop=cap_setfcap --
         root@caps:/home/ubuntu# /sbin/setcap cap_setfcap=p /sbin/setcap
         unable to set CAP_SETFCAP effective capability: Operation not permitted
         root@caps:/home/ubuntu# unshare -Ur
         unshare: write failed /proc/self/uid_map: Operation not permitted
      
      Note: an alternative solution would be to allow uid 0 mappings by
      processes without CAP_SETFCAP, but to prevent such a namespace from
      writing any file capabilities.  This approach can be seen at [1].
      
      Background history: commit 95ebabde ("capabilities: Don't allow
      writing ambiguous v3 file capabilities") tried to fix the issue by
      preventing v3 fscaps to be written to disk when the root uid would map
      to the same uid in nested user namespaces.  This led to regressions for
      various workloads.  For example, see [2].  Ultimately this is a valid
      use-case we have to support meaning we had to revert this change in
      3b0c2d3e ("Revert 95ebabde ("capabilities: Don't allow writing
      ambiguous v3 file capabilities")").
      
      Link: https://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux.git/log/?h=2021-04-15/setfcap-nsfscaps-v4 [1]
      Link: https://github.com/containers/buildah/issues/3071
      
       [2]
      Signed-off-by: default avatarSerge Hallyn <serge@hallyn.com>
      Reviewed-by: default avatarAndrew G. Morgan <morgan@kernel.org>
      Tested-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
      Reviewed-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
      Tested-by: default avatarGiuseppe Scrivano <gscrivan@redhat.com>
      Cc: Eric Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      db2e718a
  6. Apr 20, 2021
  7. Apr 19, 2021
    • Neil Armstrong's avatar
      mmc: meson-gx: replace WARN_ONCE with dev_warn_once about scatterlist size alignment in block mode · 7412dee9
      Neil Armstrong authored
      Since commit e085b51c ("mmc: meson-gx: check for scatterlist size alignment in block mode"),
      support for SDIO SD_IO_RW_EXTENDED transferts are properly filtered but some driver
      like brcmfmac still gives a block sg buffer size not aligned with SDIO block,
      triggerring a WARN_ONCE() with scary stacktrace even if the transfer works fine
      but with possible degraded performances.
      
      Simply replace with dev_warn_once() to inform user this should be fixed to avoid
      degraded performance.
      
      This should be ultimately fixed in brcmfmac, but since it's only a performance issue
      the warning should be removed.
      
      Fixes: e085b51c
      
       ("mmc: meson-gx: check for scatterlist size alignment in block mode")
      Reported-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Link: https://lore.kernel.org/r/20210416094347.2015896-1-narmstrong@baylibre.com
      
      
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      7412dee9
    • Linus Torvalds's avatar
      Linux 5.12-rc8 · bf05bf16
      Linus Torvalds authored
      bf05bf16
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 5ffe04cc
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Another smaller set of fixes for three of the Arm platforms:
      
        TI OMAP:
      
           Fix swapped mmc device order also for omap3 that got changed with
           the recent PROBE_PREFER_ASYNCHRONOUS changes. While eventually the
           aliases should be board specific, all the mmc device instances are
           all there in the SoC, and we do probe them by default so that PM
           runtime can idle the devices if left enabled from the bootloader.
      
        Qualcomm Snapdragon:
      
           This bypasses the recently introduced interconnect handling in
           the GENI (serial engine) driver when running off ACPI, as this
           causes the GENI probe to fail and the Lenovo Yoga C630 to boot
           without keyboard and touchpad.
      
        Allwinner:
      
           One 32kHz clock fix for the beelink gs1, a CD polarity fix for the
           SoPine, some MAINTAINERS maintainance, and a clk / reset switch to
           our headers"
      
      * tag 'arm-fixes-5.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        arm64: dts: allwinner: h6: beelink-gs1: Remove ext. 32 kHz osc reference
        MAINTAINERS: Match on allwinner keyword
        MAINTAINERS: Add our new mailing-list
        arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems
        arm64: dts: allwinner: h6: Switch to macros for RSB clock/reset indices
        ARM: OMAP2+: Fix uninitialized sr_inst
        ARM: dts: Fix swapped mmc order for omap3
        ARM: OMAP2+: Fix warning for omap_init_time_of()
        soc: qcom: geni: shield geni_icc_get() for ACPI boot
      5ffe04cc
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · f5ce0466
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
      
       - Halve maximum number of CPUs if DEBUG_KMAP_LOCAL is enabled
      
       - Fix conversion for_each_membock() to for_each_mem_range()
      
       - Fix footbridge PCI mapping
      
       - Avoid uprobes hooking on thumb instructions
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 9071/1: uprobes: Don't hook on thumb instructions
        ARM: footbridge: fix PCI interrupt mapping
        ARM: 9069/1: NOMMU: Fix conversion for_each_membock() to for_each_mem_range()
        ARM: 9063/1: mm: reduce maximum number of CPUs if DEBUG_KMAP_LOCAL is enabled
      f5ce0466