1. 04 Mar, 2023 7 commits
    • Linus Torvalds's avatar
      mm: avoid gcc complaint about pointer casting · e77d587a
      Linus Torvalds authored
      The migration code ends up temporarily stashing information of the wrong
      type in unused fields of the newly allocated destination folio.  That
      all works fine, but gcc does complain about the pointer type mis-use:
      
          mm/migrate.c: In function ‘__migrate_folio_extract’:
          mm/migrate.c:1050:20: note: randstruct: casting between randomized structure pointer types (ssa): ‘struct anon_vma’ and ‘struct address_space’
      
           1050 |         *anon_vmap = (void *)dst->mapping;
                |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      
      and gcc is actually right to complain since it really doesn't understand
      that this is a very temporary special case where this is ok.
      
      This could be fixed in different ways by just obfuscating the assignment
      sufficiently that gcc doesn't see what is going on, but the truly
      "proper C" way to do this is by explicitly using a union.
      
      Using unions for type conversions like this is normally hugely ugly and
      syntactically nasty, but this really is one of the few cases where we
      want to make it clear that we're not doing type conversion, we're really
      re-using the value bit-for-bit just using another type.
      
      IOW, this should not become a common pattern, but in this one case using
      that odd union is probably the best way to document to the compiler what
      is conceptually going on here.
      
      [ Side note: there are valid cases where we convert pointers to other
        pointer types, notably the whole "folio vs page" situation, where the
        types actually have fundamental commonalities.
      
        The fact that the gcc note is limited to just randomized structures
        means that we don't see equivalent warnings for those cases, but it
        migth also mean that we miss other cases where we do play these kinds
        of dodgy games, and this kind of explicit conversion might be a good
        idea. ]
      
      I verified that at least for an allmodconfig build on x86-64, this
      generates the exact same code, apart from line numbers and assembler
      comment changes.
      
      Fixes: 64c8902e ("migrate_pages: split unmap_and_move() to _unmap() and _move()")
      Cc: Huang, Ying <ying.huang@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e77d587a
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2023-03-04-13-12' of... · 20fdfd55
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "17 hotfixes.
      
        Eight are for MM and seven are for other parts of the kernel. Seven
        are cc:stable and eight address post-6.3 issues or were judged
        unsuitable for -stable backporting"
      
      * tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mailmap: map Dikshita Agarwal's old address to his current one
        mailmap: map Vikash Garodia's old address to his current one
        fs/cramfs/inode.c: initialize file_ra_state
        fs: hfsplus: fix UAF issue in hfsplus_put_super
        panic: fix the panic_print NMI backtrace setting
        lib: parser: update documentation for match_NUMBER functions
        kasan, x86: don't rename memintrinsics in uninstrumented files
        kasan: test: fix test for new meminstrinsic instrumentation
        kasan: treat meminstrinsic as builtins in uninstrumented files
        kasan: emit different calls for instrumentable memintrinsics
        ocfs2: fix non-auto defrag path not working issue
        ocfs2: fix defrag path triggering jbd2 ASSERT
        mailmap: map Georgi Djakov's old Linaro address to his current one
        mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON
        lib/zlib: DFLTCC deflate does not write all available bits for Z_NO_FLUSH
        mm/damon/paddr: fix missing folio_put()
        mm/mremap: fix dup_anon_vma() in vma_merge() case 4
      20fdfd55
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · c29214bc
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Drop orphaned VAS MAINTAINERS entry
      
       - Fix build errors with clang and KCSAN
      
       - Avoid build errors seen with LD_DEAD_CODE_DATA_ELIMINATION together
         with recordmcount
      
      Thanks to Nathan Chancellor.
      
      * tag 'powerpc-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc: Avoid dead code/data elimination when using recordmcount
        powerpc/vmlinux.lds: Add .text.asan/tsan sections
        powerpc: Drop orphaned VAS MAINTAINERS entry
      c29214bc
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · d172859e
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A collection of various small fixes that have been gathered since the
        last PR.
      
        The majority of changes are for ASoC, and there is a small change in
        ASoC PCM core, but the rest are all for driver- specific fixes /
        quirks / updates"
      
      * tag 'sound-fix-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (32 commits)
        ALSA: ice1712: Delete unreachable code in aureon_add_controls()
        ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls()
        ALSA: hda/realtek: Add quirk for HP EliteDesk 800 G6 Tower PC
        ALSA: hda/realtek: Improve support for Dell Precision 3260
        ASoC: mediatek: mt8195: add missing initialization
        ASoC: mediatek: mt8188: add missing initialization
        ASoC: amd: yc: Add DMI entries to support HP OMEN 16-n0xxx (8A43)
        ASoC: zl38060 add gpiolib dependency
        ASoC: sam9g20ek: Disable capture unless building with microphone input
        ASoC: mt8192: Fix range for sidetone positive gain
        ASoC: mt8192: Report an error if when an invalid sidetone gain is written
        ASoC: mt8192: Fix event generation for controls
        ASoC: mt8192: Remove spammy log messages
        ASoC: mchp-pdmc: fix poc noise at capture startup
        ASoC: dt-bindings: sama7g5-pdmc: add microchip,startup-delay-us binding
        ASoC: soc-pcm: add option to start DMA after DAI
        ASoC: mt8183: Fix event generation for I2S DAI operations
        ASoC: mt8183: Remove spammy logging from I2S DAI driver
        ASoC: mt6358: Remove undefined HPx Mux enumeration values
        ASoC: mt6358: Validate Wake on Voice 2 writes
        ...
      d172859e
    • Linus Torvalds's avatar
      Merge tag 'for-v6.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply · 0988a0ea
      Linus Torvalds authored
      Pull more power supply updates from Sebastian Reichel:
      
       - Fix DT binding for Richtek RT9467
      
       - Fix a NULL pointer check in the power-supply core
      
       - Document meaning of absent "present" property
      
      * tag 'for-v6.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
        dt-bindings: power: supply: Revise Richtek RT9467 compatible name
        ABI: testing: sysfs-class-power: Document absence of "present" property
        power: supply: fix null pointer check order in __power_supply_register
      0988a0ea
    • Linus Torvalds's avatar
      Merge tag '6.3-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · 3162745a
      Linus Torvalds authored
      Pull more cifs updates from Steve French:
      
       - xfstest generic/208 fix (memory leak)
      
       - minor netfs fix (to address smatch warning)
      
       - a DFS fix for stable
      
       - a reconnect race fix
      
       - two multichannel fixes
      
       - RDMA (smbdirect) fix
      
       - two additional writeback fixes from David
      
      * tag '6.3-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Fix memory leak in direct I/O
        cifs: prevent data race in cifs_reconnect_tcon()
        cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID
        iov: Fix netfs_extract_user_to_sg()
        cifs: Fix cifs_write_back_from_locked_folio()
        cifs: reuse cifs_match_ipaddr for comparison of dstaddr too
        cifs: match even the scope id for ipv6 addresses
        cifs: Fix an uninitialised variable
        cifs: Add some missing xas_retry() calls
      3162745a
    • Linus Torvalds's avatar
      umh: simplify the capability pointer logic · e7783615
      Linus Torvalds authored
      The usermodehelper code uses two fake pointers for the two capability
      cases: CAP_BSET for reading and writing 'usermodehelper_bset', and
      CAP_PI to read and write 'usermodehelper_inheritable'.
      
      This seems to be a completely unnecessary indirection, since we could
      instead just use the pointers themselves, and never have to do any "if
      this then that" kind of logic.
      
      So just get rid of the fake pointer values, and use the real pointer
      values instead.
      Reviewed-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Cc: Eric Biederman <ebiederm@xmission.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Iurii Zaikin <yzaikin@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e7783615
  2. 03 Mar, 2023 32 commits
  3. 02 Mar, 2023 1 commit
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2023-03-03-1' of git://anongit.freedesktop.org/drm/drm · 2eb29d59
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "fbdev:
         - fix uninit var in error path
      
        shmem:
         - revert unGPLing an export
      
        i915:
         - Don't use stolen memory or BAR mappings for ring buffers with LLC
         - Add inverted backlight quirk for HP 14-r206nv
         - Fix GSI offset for MCR lookups
         - GVT fixes (memleak, debugfs attributes, kconfig, typos)
      
        amdgpu:
         - SMU 13 fixes
         - Enable TMZ for GC 10.3.6
         - Misc display fixes
         - Buddy allocator fixes
         - GC 11 fixes
         - S0ix fix
         - INFO IOCTL queries for GC 11
         - VCN harvest fixes for SR-IOV
         - UMC 8.10 RAS fixes
         - Don't restrict bpc to 8
         - NBIO 7.5 fix
         - Allow freesync on PCon for more devices
      
        amdkfd:
         - SDMA fix
         - Illegal memory access fix"
      
      * tag 'drm-next-2023-03-03-1' of git://anongit.freedesktop.org/drm/drm: (45 commits)
        drm/amdgpu/vcn: fix compilation issue with legacy gcc
        drm/amd/display: Extend Freesync over PCon support for more devices
        Revert "drm/amd/display: Do not set DRR on pipe commit"
        drm/amd/display: fix shift-out-of-bounds in CalculateVMAndRowBytes
        drm/amd/display: Ext displays with dock can't recognized after resume
        drm/amdgpu: fix ttm_bo calltrace warning in psp_hw_fini
        drm/amdgpu: remove unused variable ring
        drm/amd/display: fix dm irq error message in gpu recover
        drm/amd: Fix initialization for nbio 7.5.1
        drm/amd/display: Don't restrict bpc to 8 bpc
        drm/amdgpu: Make umc_v8_10_convert_error_address static and remove unused variable
        drm/radeon: Fix eDP for single-display iMac11,2
        drm/shmem-helper: Revert accidental non-GPL export
        drm: omapdrm: Do not use helper unininitialized in omap_fbdev_init()
        drm/amd/pm: downgrade log level upon SMU IF version mismatch
        drm/amdgpu: Add ecc info query interface for umc v8_10
        drm/amdgpu: Add convert_error_address function for umc v8_10
        drm/amdgpu: add bad_page_threshold check in ras_eeprom_check_err
        drm/amdgpu: change default behavior of bad_page_threshold parameter
        drm/amdgpu: exclude duplicate pages from UMC RAS UE count
        ...
      2eb29d59