1. 01 Nov, 2021 3 commits
  2. 27 Oct, 2021 3 commits
    • Michael Weiß's avatar
      dm crypt: log aead integrity violations to audit subsystem · 58d0f180
      Michael Weiß authored
      Since dm-crypt target can be stacked on dm-integrity targets to
      provide authenticated encryption, integrity violations are recognized
      here during aead computation. We use the dm-audit submodule to
      signal those events to user space, too.
      
      The construction and destruction of crypt device mappings are also
      logged as audit events.
      Signed-off-by: default avatarMichael Weiß <michael.weiss@aisec.fraunhofer.de>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      58d0f180
    • Michael Weiß's avatar
      dm integrity: log audit events for dm-integrity target · 82bb8599
      Michael Weiß authored
      dm-integrity signals integrity violations by returning I/O errors
      to user space. To identify integrity violations by a controlling
      instance, the kernel audit subsystem can be used to emit audit
      events to user space. We use the new dm-audit submodule allowing
      to emit audit events on relevant I/O errors.
      
      The construction and destruction of integrity device mappings are
      also relevant for auditing a system. Thus, those events are also
      logged as audit events.
      Signed-off-by: default avatarMichael Weiß <michael.weiss@aisec.fraunhofer.de>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      82bb8599
    • Michael Weiß's avatar
      dm: introduce audit event module for device mapper · 2cc1ae48
      Michael Weiß authored
      To be able to send auditing events to user space, we introduce a
      generic dm-audit module. It provides helper functions to emit audit
      events through the kernel audit subsystem. We claim the
      AUDIT_DM_CTRL type=1336 and AUDIT_DM_EVENT type=1337 out of the
      audit event messages range in the corresponding userspace api in
      'include/uapi/linux/audit.h' for those events.
      
      AUDIT_DM_CTRL is used to provide information about creation and
      destruction of device mapper targets which are triggered by user space
      admin control actions.
      AUDIT_DM_EVENT is used to provide information about actual errors
      during operation of the mapped device, showing e.g. integrity
      violations in audit log.
      
      Following commits to device mapper targets actually will make use of
      this to emit those events in relevant cases.
      
      The audit logs look like this if executing the following simple test:
      
       # dd if=/dev/zero of=test.img bs=1M count=1024
       # losetup -f test.img
       # integritysetup -vD format --integrity sha256 -t 32 /dev/loop0
       # integritysetup open -D /dev/loop0 --integrity sha256 integritytest
       # integritysetup status integritytest
       # integritysetup close integritytest
       # integritysetup open -D /dev/loop0 --integrity sha256 integritytest
       # integritysetup status integritytest
       # dd if=/dev/urandom of=/dev/loop0 bs=512 count=1 seek=100000
       # dd if=/dev/mapper/integritytest of=/dev/null
      
      -------------------------
      audit.log from auditd
      
      type=UNKNOWN[1336] msg=audit(1630425039.363:184): module=integrity
      op=ctr ppid=3807 pid=3819 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
      egid=0 sgid=0 fsgid=0 tty=pts2 ses=3 comm="integritysetup"
      exe="/sbin/integritysetup" subj==unconfined dev=254:3
      error_msg='success' res=1
      type=UNKNOWN[1336] msg=audit(1630425039.471:185): module=integrity
      op=dtr ppid=3807 pid=3819 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
      egid=0 sgid=0 fsgid=0 tty=pts2 ses=3 comm="integritysetup"
      exe="/sbin/integritysetup" subj==unconfined dev=254:3
      error_msg='success' res=1
      type=UNKNOWN[1336] msg=audit(1630425039.611:186): module=integrity
      op=ctr ppid=3807 pid=3819 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
      egid=0 sgid=0 fsgid=0 tty=pts2 ses=3 comm="integritysetup"
      exe="/sbin/integritysetup" subj==unconfined dev=254:3
      error_msg='success' res=1
      type=UNKNOWN[1336] msg=audit(1630425054.475:187): module=integrity
      op=dtr ppid=3807 pid=3819 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
      egid=0 sgid=0 fsgid=0 tty=pts2 ses=3 comm="integritysetup"
      exe="/sbin/integritysetup" subj==unconfined dev=254:3
      error_msg='success' res=1
      
      type=UNKNOWN[1336] msg=audit(1630425073.171:191): module=integrity
      op=ctr ppid=3807 pid=3883 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
      egid=0 sgid=0 fsgid=0 tty=pts2 ses=3 comm="integritysetup"
      exe="/sbin/integritysetup" subj==unconfined dev=254:3
      error_msg='success' res=1
      
      type=UNKNOWN[1336] msg=audit(1630425087.239:192): module=integrity
      op=dtr ppid=3807 pid=3902 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
      egid=0 sgid=0 fsgid=0 tty=pts2 ses=3 comm="integritysetup"
      exe="/sbin/integritysetup" subj==unconfined dev=254:3
      error_msg='success' res=1
      
      type=UNKNOWN[1336] msg=audit(1630425093.755:193): module=integrity
      op=ctr ppid=3807 pid=3906 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0
      egid=0 sgid=0 fsgid=0 tty=pts2 ses=3 comm="integritysetup"
      exe="/sbin/integritysetup" subj==unconfined dev=254:3
      error_msg='success' res=1
      
      type=UNKNOWN[1337] msg=audit(1630425112.119:194): module=integrity
      op=integrity-checksum dev=254:3 sector=77480 res=0
      type=UNKNOWN[1337] msg=audit(1630425112.119:195): module=integrity
      op=integrity-checksum dev=254:3 sector=77480 res=0
      type=UNKNOWN[1337] msg=audit(1630425112.119:196): module=integrity
      op=integrity-checksum dev=254:3 sector=77480 res=0
      type=UNKNOWN[1337] msg=audit(1630425112.119:197): module=integrity
      op=integrity-checksum dev=254:3 sector=77480 res=0
      type=UNKNOWN[1337] msg=audit(1630425112.119:198): module=integrity
      op=integrity-checksum dev=254:3 sector=77480 res=0
      type=UNKNOWN[1337] msg=audit(1630425112.119:199): module=integrity
      op=integrity-checksum dev=254:3 sector=77480 res=0
      type=UNKNOWN[1337] msg=audit(1630425112.119:200): module=integrity
      op=integrity-checksum dev=254:3 sector=77480 res=0
      type=UNKNOWN[1337] msg=audit(1630425112.119:201): module=integrity
      op=integrity-checksum dev=254:3 sector=77480 res=0
      type=UNKNOWN[1337] msg=audit(1630425112.119:202): module=integrity
      op=integrity-checksum dev=254:3 sector=77480 res=0
      type=UNKNOWN[1337] msg=audit(1630425112.119:203): module=integrity
      op=integrity-checksum dev=254:3 sector=77480 res=0
      Signed-off-by: default avatarMichael Weiß <michael.weiss@aisec.fraunhofer.de>
      Signed-off-by: Paul Moore <paul@paul-moore.com> # fix audit.h numbering
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      2cc1ae48
  3. 12 Oct, 2021 4 commits
    • Jiazi Li's avatar
      dm: fix mempool NULL pointer race when completing IO · d208b894
      Jiazi Li authored
      dm_io_dec_pending() calls end_io_acct() first and will then dec md
      in-flight pending count. But if a task is swapping DM table at same
      time this can result in a crash due to mempool->elements being NULL:
      
      task1                             task2
      do_resume
       ->do_suspend
        ->dm_wait_for_completion
                                        bio_endio
      				   ->clone_endio
      				    ->dm_io_dec_pending
      				     ->end_io_acct
      				      ->wakeup task1
       ->dm_swap_table
        ->__bind
         ->__bind_mempools
          ->bioset_exit
           ->mempool_exit
                                           ->free_io
      
      [ 67.330330] Unable to handle kernel NULL pointer dereference at
      virtual address 0000000000000000
      ......
      [ 67.330494] pstate: 80400085 (Nzcv daIf +PAN -UAO)
      [ 67.330510] pc : mempool_free+0x70/0xa0
      [ 67.330515] lr : mempool_free+0x4c/0xa0
      [ 67.330520] sp : ffffff8008013b20
      [ 67.330524] x29: ffffff8008013b20 x28: 0000000000000004
      [ 67.330530] x27: ffffffa8c2ff40a0 x26: 00000000ffff1cc8
      [ 67.330535] x25: 0000000000000000 x24: ffffffdada34c800
      [ 67.330541] x23: 0000000000000000 x22: ffffffdada34c800
      [ 67.330547] x21: 00000000ffff1cc8 x20: ffffffd9a1304d80
      [ 67.330552] x19: ffffffdada34c970 x18: 000000b312625d9c
      [ 67.330558] x17: 00000000002dcfbf x16: 00000000000006dd
      [ 67.330563] x15: 000000000093b41e x14: 0000000000000010
      [ 67.330569] x13: 0000000000007f7a x12: 0000000034155555
      [ 67.330574] x11: 0000000000000001 x10: 0000000000000001
      [ 67.330579] x9 : 0000000000000000 x8 : 0000000000000000
      [ 67.330585] x7 : 0000000000000000 x6 : ffffff80148b5c1a
      [ 67.330590] x5 : ffffff8008013ae0 x4 : 0000000000000001
      [ 67.330596] x3 : ffffff80080139c8 x2 : ffffff801083bab8
      [ 67.330601] x1 : 0000000000000000 x0 : ffffffdada34c970
      [ 67.330609] Call trace:
      [ 67.330616] mempool_free+0x70/0xa0
      [ 67.330627] bio_put+0xf8/0x110
      [ 67.330638] dec_pending+0x13c/0x230
      [ 67.330644] clone_endio+0x90/0x180
      [ 67.330649] bio_endio+0x198/0x1b8
      [ 67.330655] dec_pending+0x190/0x230
      [ 67.330660] clone_endio+0x90/0x180
      [ 67.330665] bio_endio+0x198/0x1b8
      [ 67.330673] blk_update_request+0x214/0x428
      [ 67.330683] scsi_end_request+0x2c/0x300
      [ 67.330688] scsi_io_completion+0xa0/0x710
      [ 67.330695] scsi_finish_command+0xd8/0x110
      [ 67.330700] scsi_softirq_done+0x114/0x148
      [ 67.330708] blk_done_softirq+0x74/0xd0
      [ 67.330716] __do_softirq+0x18c/0x374
      [ 67.330724] irq_exit+0xb4/0xb8
      [ 67.330732] __handle_domain_irq+0x84/0xc0
      [ 67.330737] gic_handle_irq+0x148/0x1b0
      [ 67.330744] el1_irq+0xe8/0x190
      [ 67.330753] lpm_cpuidle_enter+0x4f8/0x538
      [ 67.330759] cpuidle_enter_state+0x1fc/0x398
      [ 67.330764] cpuidle_enter+0x18/0x20
      [ 67.330772] do_idle+0x1b4/0x290
      [ 67.330778] cpu_startup_entry+0x20/0x28
      [ 67.330786] secondary_start_kernel+0x160/0x170
      
      Fix this by:
      1) Establishing pointers to 'struct dm_io' members in
      dm_io_dec_pending() so that they may be passed into end_io_acct()
      _after_ free_io() is called.
      2) Moving end_io_acct() after free_io().
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJiazi Li <lijiazi@xiaomi.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      d208b894
    • Ming Lei's avatar
      dm rq: don't queue request to blk-mq during DM suspend · b4459b11
      Ming Lei authored
      DM uses blk-mq's quiesce/unquiesce to stop/start device mapper queue.
      
      But blk-mq's unquiesce may come from outside events, such as elevator
      switch, updating nr_requests or others, and request may come during
      suspend, so simply ask for blk-mq to requeue it.
      
      Fixes one kernel panic issue when running updating nr_requests and
      dm-mpath suspend/resume stress test.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      b4459b11
    • Colin Ian King's avatar
      dm clone: make array 'descs' static · ec132ef2
      Colin Ian King authored
      Don't populate the read-only array descs on the stack but instead it
      static and add extra const. Also makes the object code smaller by 66
      bytes:
      
      Before:
         text    data     bss     dec     hex filename
        42382   11140     512   54034    d312 ./drivers/md/dm-clone-target.o
      
      After:
         text    data     bss     dec     hex filename
        42220   11236     512   53968    d2d0 ./drivers/md/dm-clone-target.o
      
      (gcc version 11.2.0)
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      ec132ef2
    • Akilesh Kailash's avatar
      dm verity: skip redundant verity_handle_err() on I/O errors · 2c0468e0
      Akilesh Kailash authored
      Without FEC, dm-verity won't call verity_handle_err() when I/O fails,
      but with FEC enabled, it currently does even if an I/O error has
      occurred.
      
      If there is an I/O error and FEC correction fails, return the error
      instead of calling verity_handle_err() again.
      Suggested-by: default avatarSami Tolvanen <samitolvanen@google.com>
      Signed-off-by: default avatarAkilesh Kailash <akailash@google.com>
      Reviewed-by: default avatarSami Tolvanen <samitolvanen@google.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      2c0468e0
  4. 11 Oct, 2021 1 commit
  5. 10 Oct, 2021 3 commits
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · efb52a7d
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "A bit of a big batch, partly because I didn't send any last week, and
        also just because the BPF fixes happened to land this week.
      
        Summary:
      
         - Fix a regression hit by the IPR SCSI driver, introduced by the
           recent addition of MSI domains on pseries.
      
         - A big series including 8 BPF fixes, some with potential security
           impact and the rest various code generation issues.
      
         - Fix our program check assembler entry path, which was accidentally
           jumping into a gas macro and generating strange stack frames, which
           could confuse find_bug().
      
         - A couple of fixes, and related changes, to fix corner cases in our
           machine check handling.
      
         - Fix our DMA IOMMU ops, which were not always returning the optimal
           DMA mask, leading to at least one device falling back to 32-bit DMA
           when it shouldn't.
      
         - A fix for KUAP handling on 32-bit Book3S.
      
         - Fix crashes seen when kdumping on some pseries systems.
      
        Thanks to Naveen N. Rao, Nicholas Piggin, Alexey Kardashevskiy, Cédric
        Le Goater, Christophe Leroy, Mahesh Salgaonkar, Abdul Haleem,
        Christoph Hellwig, Johan Almbladh, Stan Johnson"
      
      * tag 'powerpc-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        pseries/eeh: Fix the kdump kernel crash during eeh_pseries_init
        powerpc/32s: Fix kuap_kernel_restore()
        powerpc/pseries/msi: Add an empty irq_write_msi_msg() handler
        powerpc/64s: Fix unrecoverable MCE calling async handler from NMI
        powerpc/64/interrupt: Reconcile soft-mask state in NMI and fix false BUG
        powerpc/64: warn if local irqs are enabled in NMI or hardirq context
        powerpc/traps: do not enable irqs in _exception
        powerpc/64s: fix program check interrupt emergency stack path
        powerpc/bpf ppc32: Fix BPF_SUB when imm == 0x80000000
        powerpc/bpf ppc32: Do not emit zero extend instruction for 64-bit BPF_END
        powerpc/bpf ppc32: Fix JMP32_JSET_K
        powerpc/bpf ppc32: Fix ALU32 BPF_ARSH operation
        powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC
        powerpc/security: Add a helper to query stf_barrier type
        powerpc/bpf: Fix BPF_SUB when imm == 0x80000000
        powerpc/bpf: Fix BPF_MOD when imm == 1
        powerpc/bpf: Validate branch ranges
        powerpc/lib: Add helper to check if offset is within conditional branch range
        powerpc/iommu: Report the correct most efficient DMA mask for PCI devices
      efb52a7d
    • Linus Torvalds's avatar
      Merge tag 'objtool_urgent_for_v5.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 75cd9b01
      Linus Torvalds authored
      Pull objtool fixes from Borislav Petkov:
      
       - Remove an extra section.len member in favour of section.sh_size
      
       - Align .altinstructions section creation with the kernel's by creating
         them with entry size of 0
      
       - Fix objtool to convert a reloc symbol to a section offset and not to
         not warn about not knowing how
      
      * tag 'objtool_urgent_for_v5.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Remove redundant 'len' field from struct section
        objtool: Make .altinstructions section entry size consistent
        objtool: Remove reloc symbol type checks in get_alt_entry()
      75cd9b01
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c22ccc4a
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - A FPU fix to properly handle invalid MXCSR values: 32-bit masks them
         out due to historical reasons and 64-bit kernels reject them
      
       - A fix to clear X86_FEATURE_SMAP when support for is not
         config-enabled
      
       - Three fixes correcting misspelled Kconfig symbols used in code
      
       - Two resctrl object cleanup fixes
      
       - Yet another attempt at fixing the neverending saga of botched x86
         timers, this time because some incredibly smart hardware decides to
         turn off the HPET timer in a low power state - who cares if the OS is
         relying on it...
      
       - Check the full return value range of an SEV VMGEXIT call to determine
         whether it returned an error
      
      * tag 'x86_urgent_for_v5.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/fpu: Restore the masking out of reserved MXCSR bits
        x86/Kconfig: Correct reference to MWINCHIP3D
        x86/platform/olpc: Correct ifdef symbol to intended CONFIG_OLPC_XO15_SCI
        x86/entry: Clear X86_FEATURE_SMAP when CONFIG_X86_SMAP=n
        x86/entry: Correct reference to intended CONFIG_64_BIT
        x86/resctrl: Fix kfree() of the wrong type in domain_add_cpu()
        x86/resctrl: Free the ctrlval arrays when domain_setup_mon_state() fails
        x86/hpet: Use another crystalball to evaluate HPET usability
        x86/sev: Return an error on a returned non-zero SW_EXITINFO1[31:0]
      c22ccc4a
  6. 09 Oct, 2021 5 commits
  7. 08 Oct, 2021 14 commits
    • Linus Torvalds's avatar
      Merge tag 's390-5.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · f84fc4e3
      Linus Torvalds authored
      Pull s390 fixes from Vasily Gorbik:
      
       - Fix potential memory leak on a error path in eBPF
      
       - Fix handling of zpci device on reserve
      
      * tag 's390-5.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/pci: fix zpci_zdev_put() on reserve
        bpf, s390: Fix potential memory leak about jit_data
      f84fc4e3
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20211008' of git://github.com/jcmvbkbc/linux-xtensa · 5d6ab0bb
      Linus Torvalds authored
      Pull xtensa fixes from Max Filippov:
      
       - fix build/boot issues caused by CONFIG_OF vs CONFIC_USE_OF usage
      
       - fix reset handler for xtfpga boards
      
      * tag 'xtensa-20211008' of git://github.com/jcmvbkbc/linux-xtensa:
        xtensa: xtfpga: Try software restart before simulating CPU reset
        xtensa: xtfpga: use CONFIG_USE_OF instead of CONFIG_OF
        xtensa: call irqchip_init only when CONFIG_USE_OF is selected
        xtensa: use CONFIG_USE_OF instead of CONFIG_OF
      5d6ab0bb
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.15b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 3946b46c
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - fix two minor issues in the Xen privcmd driver plus a cleanup patch
         for that driver
      
       - fix multiple issues related to running as PVH guest and some related
         earlyprintk fixes for other Xen guest types
      
       - fix an issue introduced in 5.15 the Xen balloon driver
      
      * tag 'for-linus-5.15b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/balloon: fix cancelled balloon action
        xen/x86: adjust data placement
        x86/PVH: adjust function/data placement
        xen/x86: hook up xen_banner() also for PVH
        xen/x86: generalize preferred console model from PV to PVH Dom0
        xen/x86: make "earlyprintk=xen" work for HVM/PVH DomU
        xen/x86: allow "earlyprintk=xen" to work for PV Dom0
        xen/x86: make "earlyprintk=xen" work better for PVH Dom0
        xen/x86: allow PVH Dom0 without XEN_PV=y
        xen/x86: prevent PVH type from getting clobbered
        xen/privcmd: drop "pages" parameter from xen_remap_pfn()
        xen/privcmd: fix error handling in mmap-resource processing
        xen/privcmd: replace kcalloc() by kvcalloc() when allocating empty pages
      3946b46c
    • Linus Torvalds's avatar
      Merge tag 'asm-generic-fixes-5.15' of... · 0dcf60d0
      Linus Torvalds authored
      Merge tag 'asm-generic-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
      
      Pull asm-generic fixes from Arnd Bergmann:
       "There is one build fix for Arm platforms that ended up impacting most
        architectures because of the way the drivers/firmware Kconfig file is
        wired up:
      
        The CONFIG_QCOM_SCM dependency have caused a number of randconfig
        regressions over time, and some still remain in v5.15-rc4. The fix we
        agreed on in the end is to make this symbol selected by any driver
        using it, and then building it even for non-Arm platforms with
        CONFIG_COMPILE_TEST.
      
        To make this work on all architectures, the drivers/firmware/Kconfig
        file needs to be included for all architectures to make the symbol
        itself visible.
      
        In a separate discussion, we found that a sound driver patch that is
        pending for v5.16 needs the same change to include this Kconfig file,
        so the easiest solution seems to have my Kconfig rework included in
        v5.15.
      
        Finally, the branch also includes a small unrelated build fix for
        NOMMU architectures"
      
      Link: https://lore.kernel.org/all/20210928153508.101208f8@canb.auug.org.au/
      Link: https://lore.kernel.org/all/20210928075216.4193128-1-arnd@kernel.org/
      Link: https://lore.kernel.org/all/20211007151010.333516-1-arnd@kernel.org/
      
      * tag 'asm-generic-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
        asm-generic/io.h: give stub iounmap() on !MMU same prototype as elsewhere
        qcom_scm: hide Kconfig symbol
        firmware: include drivers/firmware/Kconfig unconditionally
      0dcf60d0
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · cdc726fb
      Linus Torvalds authored
      Pull ACPI fix from Rafael Wysocki:
       "Fix a recent ACPI-related regression in the PCI subsystem that
        introduced a NULL pointer dereference possible to trigger from
        user space via sysfs on some systems"
      
      * tag 'acpi-5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PCI: ACPI: Check parent pointer in acpi_pci_find_companion()
      cdc726fb
    • Linus Torvalds's avatar
      Merge tag 'usb-5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 741668ef
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 5.15-rc5 that resolve a number of
        reported issues:
      
         - gadget driver fixes
      
         - xhci build warning fixes
      
         - build configuration fix
      
         - cdc-acm tty handling fixes
      
         - cdc-wdm fix
      
         - typec fixes
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: cdc-acm: fix break reporting
        USB: cdc-acm: fix racy tty buffer accesses
        usb: gadget: f_uac2: fixed EP-IN wMaxPacketSize
        usb: cdc-wdm: Fix check for WWAN
        usb: chipidea: ci_hdrc_imx: Also search for 'phys' phandle
        usb: typec: tcpm: handle SRC_STARTUP state if cc changes
        usb: typec: tcpci: don't handle vSafe0V event if it's not enabled
        usb: typec: tipd: Remove dependency on "connector" child fwnode
        Partially revert "usb: Kconfig: using select for USB_COMMON dependency"
        usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
        usb: xhci: tegra: mark PM functions as __maybe_unused
      741668ef
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 9c7e7050
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "A couple of MMC host fixes:
      
         - meson-gx: Fix read/write access for dram-access-quirk
      
         - sdhci-of-at91: Fix calibration sequence"
      
      * tag 'mmc-v5.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: meson-gx: do not use memcpy_to/fromio for dram-access-quirk
        mmc: sdhci-of-at91: replace while loop with read_poll_timeout
        mmc: sdhci-of-at91: wait for calibration done before proceed
      9c7e7050
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2021-10-08' of git://anongit.freedesktop.org/drm/drm · 0068dc8c
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "I've returned from my tropical island retreat, even managed to bring
        one of my kids on a dive with some turtles. Thanks to Daniel for doing
        last week's work.
      
        Otherwise this is the weekly fixes pull, it's a bit bigger because the
        vc4 reverts in your tree caused some problems with fixes in the
        drm-misc tree so it got left out last week, so this week has the misc
        fixes rebased without the vc4 pieces.
      
        Otherwise it's i915, amdgpu with the usual fixes and a scattering over
        other drivers.
      
        I expect things should calm down a bit more next week.
      
        core:
         - Kconfig fix for fb_simple vs simpledrm.
      
        i915:
         - Fix RKL HDMI audio
         - Fix runtime pm imbalance on i915_gem_shrink() error path
         - Fix Type-C port access before hw/sw state sync
         - Fix VBT backlight struct version/size check
         - Fix VT-d async flip on SKL/BXT with plane stretch workaround
      
        amdgpu:
         - DCN 3.1 DP alt mode fixes
         - S0ix gfxoff fix
         - Fix DRM_AMD_DC_SI dependencies
         - PCIe DPC handling fix
         - DCN 3.1 scaling fix
         - Documentation fix
      
        amdkfd:
         - Fix potential memory leak
         - IOMMUv2 init fixes
      
        vc4 (there were some hdmi fixes but things got reverted, sort it out
             later):
         - compiler fix
      
        nouveau:
         - Cursor fix
         - Fix ttm buffer moves for ampere gpu's by adding minimal
           acceleration support.
         - memory leak fixes
      
        rockchip:
         - crtc/clk fixup
      
        panel:
         - ili9341 Fix DT bindings indent
         - y030xx067a - yellow tint init seq fix
      
        gbefb:
         - Fix gbefb when built with COMPILE_TEST"
      
      * tag 'drm-fixes-2021-10-08' of git://anongit.freedesktop.org/drm/drm: (33 commits)
        drm/amd/display: Fix detection of 4 lane for DPALT
        drm/amd/display: Limit display scaling to up to 4k for DCN 3.1
        drm/amd/display: Skip override for preferred link settings during link training
        drm/nouveau/debugfs: fix file release memory leak
        drm/nouveau/kms/nv50-: fix file release memory leak
        drm/nouveau: avoid a use-after-free when BO init fails
        DRM: delete DRM IRQ legacy midlayer docs
        video: fbdev: gbefb: Only instantiate device when built for IP32
        fbdev: simplefb: fix Kconfig dependencies
        drm/panel: abt-y030xx067a: yellow tint fix
        dt-bindings: panel: ili9341: correct indentation
        drm/nouveau/fifo/ga102: initialise chid on return from channel creation
        drm/rockchip: Update crtc fixup to account for fractional clk change
        drm/nouveau/ga102-: support ttm buffer moves via copy engine
        drm/nouveau/kms/tu102-: delay enabling cursor until after assign_windows
        drm/sun4i: dw-hdmi: Fix HDMI PHY clock setup
        drm/vc4: hdmi: Remove unused struct
        drm/kmb: Enable alpha blended second plane
        drm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume
        drm/amdgpu: init iommu after amdkfd device init
        ...
      0068dc8c
    • Adam Borowski's avatar
      asm-generic/io.h: give stub iounmap() on !MMU same prototype as elsewhere · 2fbc3499
      Adam Borowski authored
      It made -Werror sad.
      Signed-off-by: default avatarAdam Borowski <kilobyte@angband.pl>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      2fbc3499
    • Borislav Petkov's avatar
      x86/fpu: Restore the masking out of reserved MXCSR bits · d298b035
      Borislav Petkov authored
      Ser Olmy reported a boot failure:
      
        init[1] bad frame in sigreturn frame:(ptrval) ip:b7c9fbe6 sp:bf933310 orax:ffffffff \
      	  in libc-2.33.so[b7bed000+156000]
        Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
        CPU: 0 PID: 1 Comm: init Tainted: G        W         5.14.9 #1
        Hardware name: Hewlett-Packard HP PC/HP Board, BIOS  JD.00.06 12/06/2001
        Call Trace:
         dump_stack_lvl
         dump_stack
         panic
         do_exit.cold
         do_group_exit
         get_signal
         arch_do_signal_or_restart
         ? force_sig_info_to_task
         ? force_sig
         exit_to_user_mode_prepare
         syscall_exit_to_user_mode
         do_int80_syscall_32
         entry_INT80_32
      
      on an old 32-bit Intel CPU:
      
        vendor_id       : GenuineIntel
        cpu family      : 6
        model           : 6
        model name      : Celeron (Mendocino)
        stepping        : 5
        microcode       : 0x3
      
      Ser bisected the problem to the commit in Fixes.
      
      tglx suggested reverting the rejection of invalid MXCSR values which
      this commit introduced and replacing it with what the old code did -
      simply masking them out to zero.
      
      Further debugging confirmed his suggestion:
      
        fpu->state.fxsave.mxcsr: 0xb7be13b4, mxcsr_feature_mask: 0xffbf
        WARNING: CPU: 0 PID: 1 at arch/x86/kernel/fpu/signal.c:384 __fpu_restore_sig+0x51f/0x540
      
      so restore the original behavior only for 32-bit kernels where you have
      ancient machines with buggy hardware. For 32-bit programs on 64-bit
      kernels, user space which supplies wrong MXCSR values is considered
      malicious so fail the sigframe restoration there.
      
      Fixes: 6f9866a1 ("x86/fpu/signal: Let xrstor handle the features to init")
      Reported-by: default avatarSer Olmy <ser.olmy@protonmail.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Tested-by: default avatarSer Olmy <ser.olmy@protonmail.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lkml.kernel.org/r/YVtA67jImg3KlBTw@zn.tnic
      d298b035
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.15-2021-10-06' of... · bf79045e
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-5.15-2021-10-06' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.15-2021-10-06:
      
      amdgpu:
      - DCN 3.1 DP alt mode fixes
      - S0ix gfxoff fix
      - Fix DRM_AMD_DC_SI dependencies
      - PCIe DPC handling fix
      - DCN 3.1 scaling fix
      - Documentation fix
      
      amdkfd:
      - Fix potential memory leak
      - IOMMUv2 init fixes
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211006203828.4818-1-alexander.deucher@amd.com
      bf79045e
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2021-10-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · b28a130f
      Dave Airlie authored
      Rebased drm-misc-fixes for v5.15-rc5:
      - Dropped vc4 patches.
      - Compiler fix for vc4.
      - Cursor fix for nouveau.
      - Fix ttm buffer moves for ampere gpu's by adding minimal acceleration support.
      - Small rockchip fixes.
      - Fix DT bindings indent for ili9341.
      - Fix y030xx067a init sequence to not get a yellow tint.
      - Kconfig fix for fb_simple vs simpledrm.
      - Assorted nouvaeu memory leaks.
      - Fix gbefb when built with COMPILE_TEST.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/3272bf72-2c37-31eb-404e-cf7edd485c7d@linux.intel.com
      b28a130f
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2021-10-07' of... · 7d80cc70
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2021-10-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v5.15-rc5:
      - Fix RKL HDMI audio
      - Fix runtime pm imbalance on i915_gem_shrink() error path
      - Fix Type-C port access before hw/sw state sync
      - Fix VBT backlight struct version/size check
      - Fix VT-d async flip on SKL/BXT with plane stretch workaround
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87k0ipywo4.fsf@intel.com
      7d80cc70
    • Palmer Dabbelt's avatar
      checksyscalls: Unconditionally ignore fstat{,at}64 · 3ef6ca4f
      Palmer Dabbelt authored
      These can be replaced by statx().  Since rv32 has a 64-bit time_t we
      just never ended up with them in the first place.  This is now an error
      due to -Werror.
      Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      3ef6ca4f
  8. 07 Oct, 2021 7 commits
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · 1da38549
      Linus Torvalds authored
      Pull nfsd fixes from Chuck Lever:
       "Bug fixes for NFSD error handling paths"
      
      * tag 'nfsd-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        NFSD: Keep existing listeners on portlist error
        SUNRPC: fix sign error causing rpcsec_gss drops
        nfsd: Fix a warning for nfsd_file_close_inode
        nfsd4: Handle the NFSv4 READDIR 'dircount' hint being zero
        nfsd: fix error handling of register_pernet_subsys() in init_nfsd()
      1da38549
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 3e899c72
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "This is a larger than normal update for Arm SoC specific code, most of
        it in device trees, but also drivers and the omap and at91/sama7
        platforms:
      
         - There are four new entries to the MAINTAINERS file: Sven Peter and
           Alyssa Rosenzweig for Apple M1, Romain Perier for Mstar/sigmastar,
           and Vignesh Raghavendra for TI K3
      
         - Build fixes to address randconfig warnings in sharpsl, dove, omap1,
           and qcom platforms as well as the scmi and op-tee subsystems
      
         - Regression fixes for missing CONFIG_FB and other options for
           several defconfigs
      
         - Several bug fixes for the newly added Microchip SAMA7 platform,
           mostly regarding power management
      
         - Missing SMP barriers to protect accesses to SCMI virtio device
      
         - Regression fixes for TI OMAP, including a boot-time hang on am335x.
      
         - Lots of bug fixes for NXP i.MX, mostly addressing incorrect
           settings in devicetree files, and one revert for broken suspend.
      
         - Fixes for ARM Juno/Vexpress devicetree files, addressing a couple
           of schema warnings.
      
         - Regression fixes for qualcomm SoC specific drivers and devicetree
           files, reverting an mdt_loader change and at least pastially
           reverting some of the 5.15 DTS changes, plus some minor bugfixes"
      
      * tag 'armsoc-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (64 commits)
        MAINTAINERS: Add Sven Peter as ARM/APPLE MACHINE maintainer
        MAINTAINERS: Add Alyssa Rosenzweig as M1 reviewer
        firmware: arm_scmi: Add proper barriers to scmi virtio device
        firmware: arm_scmi: Simplify spinlocks in virtio transport
        ARM: dts: omap3430-sdp: Fix NAND device node
        bus: ti-sysc: Use CLKDM_NOAUTO for dra7 dcan1 for errata i893
        ARM: sharpsl_param: work around -Wstringop-overread warning
        ARM: defconfig: gemini: Restore framebuffer
        ARM: dove: mark 'putc' as inline
        ARM: omap1: move omap15xx local bus handling to usb.c
        MAINTAINERS: Add Vignesh to TI K3 platform maintainership
        arm64: dts: imx8m*-venice-gw7902: fix M2_RST# gpio
        ARM: imx6: disable the GIC CPU interface before calling stby-poweroff sequence
        arm64: dts: ls1028a: fix eSDHC2 node
        arm64: dts: imx8mm-kontron-n801x-som: do not allow to switch off buck2
        ARM: dts: at91: sama7g5ek: to not touch slew-rate for SDMMC pins
        ARM: dts: at91: sama7g5ek: use proper slew-rate settings for GMACs
        ARM: at91: pm: preload base address of controllers in tlb
        ARM: at91: pm: group constants and addresses loading
        ARM: dts: at91: sama7g5ek: add suspend voltage for ddr3l rail
        ...
      3e899c72
    • Arnd Bergmann's avatar
      Merge tag 'asahi-soc-fixes-5.15' of https://github.com/AsahiLinux/linux into arm/fixes · 897c2e74
      Arnd Bergmann authored
      Apple SoC fixes for 5.15; just two MAINTAINERS updates.
      
      - MAINTAINERS: Add Sven Peter as ARM/APPLE MACHINE maintainer
      - MAINTAINERS: Add Alyssa Rosenzweig as M1 reviewer
      
      * tag 'asahi-soc-fixes-5.15' of https://github.com/AsahiLinux/linux:
        MAINTAINERS: Add Sven Peter as ARM/APPLE MACHINE maintainer
        MAINTAINERS: Add Alyssa Rosenzweig as M1 reviewer
      
      Link: https://lore.kernel.org/r/a50a9015-0e62-c451-4d0d-668233b35b85@marcan.stSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      897c2e74
    • Arnd Bergmann's avatar
      Merge tag 'scmi-fixes-5.15' of... · 6aaa8434
      Arnd Bergmann authored
      Merge tag 'scmi-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes
      
      SCMI fixes for v5.15
      
      A few fixes addressing:
      - Kconfig dependency between VIRTIO and ARM_SCMI_PROTOCOL
      - Link-time error with __exit annotation for virtio_scmi_exit
      - Unnecessary nested irqsave/irqrestore spinlocks in virtio transport
      - Missing SMP barriers to protect accesses to SCMI virtio device
      
      * tag 'scmi-fixes-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
        firmware: arm_scmi: Add proper barriers to scmi virtio device
        firmware: arm_scmi: Simplify spinlocks in virtio transport
        firmware: arm_scmi: Remove __exit annotation
        firmware: arm_scmi: Fix virtio transport Kconfig dependency
      
      Link: https://lore.kernel.org/r/20211007102822.27886-1-sudeep.holla@arm.comSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      6aaa8434
    • Arnd Bergmann's avatar
      Merge tag 'omap-for-v5.15/fixes-rc4' of... · 3c7f58b3
      Arnd Bergmann authored
      Merge tag 'omap-for-v5.15/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes
      
      Fixes for omaps for v5.15
      
      Few regression fixes for omaps for the v5.15-rc cycle. There is a fix
      for boot time hangs that can happen on some am335x devices that started
      when the pruss devicetree nodes were added. The other fixes are less
      critical:
      
      - Fix compiler warning for sysc_init_soc() that got recently introduced
      
      - Fix external abort for am335x pruss as otherwise some am335x will hang
      
      - Use CLKDM_NOAUTO quirk also for dra7 dcan1
      
      - Fix older NAND device node regression for omap3-sdp
      
      * tag 'omap-for-v5.15/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: omap3430-sdp: Fix NAND device node
        bus: ti-sysc: Use CLKDM_NOAUTO for dra7 dcan1 for errata i893
        soc: ti: omap-prm: Fix external abort for am335x pruss
        bus: ti-sysc: Add break in switch statement in sysc_init_soc()
      
      Link: https://lore.kernel.org/r/pull-1633609552-789682@atomide.comSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      3c7f58b3
    • Linus Torvalds's avatar
      Merge tag 'misc-fixes-20211007' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · 7041503d
      Linus Torvalds authored
      Pull netfslib, cachefiles and afs fixes from David Howells:
      
       - Fix another couple of oopses in cachefiles tracing stemming from the
         possibility of passing in a NULL object pointer
      
       - Fix netfs_clear_unread() to set READ on the iov_iter so that source
         it is passed to doesn't do the wrong thing (some drivers look at the
         flag on iov_iter rather than other available information to determine
         the direction)
      
       - Fix afs_launder_page() to write back at the correct file position on
         the server so as not to corrupt data
      
      * tag 'misc-fixes-20211007' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        afs: Fix afs_launder_page() to set correct start file position
        netfs: Fix READ/WRITE confusion when calling iov_iter_xarray()
        cachefiles: Fix oops with cachefiles_cull() due to NULL object
      7041503d
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.15-2021-10-07' of... · 14df9235
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.15-2021-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix plugin static linking with libopencsd on ARM and ARM64
      
       - Add missing -lstdc++ when linking with libopencsd
      
       - Add missing topdown metrics events to 'perf test attr'
      
       - Plug leak sys_event_tables list after processing JSON vendor events
         entries
      
       - Sync sound/asound.h copy with the kernel sources
      
      * tag 'perf-tools-fixes-for-v5.15-2021-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf tests attr: Add missing topdown metrics events
        tools include UAPI: Sync sound/asound.h copy with the kernel sources
        perf build: Fix plugin static linking with libopencsd on ARM and ARM64
        perf build: Add missing -lstdc++ when linking with libopencsd
        perf jevents: Free the sys_event_tables list after processing entries
      14df9235