1. 19 Jan, 2023 5 commits
  2. 18 Jan, 2023 8 commits
  3. 17 Jan, 2023 15 commits
  4. 16 Jan, 2023 5 commits
  5. 15 Jan, 2023 5 commits
    • Damien Le Moal's avatar
      zonefs: Detect append writes at invalid locations · a608da3b
      Damien Le Moal authored
      Using REQ_OP_ZONE_APPEND operations for synchronous writes to sequential
      files succeeds regardless of the zone write pointer position, as long as
      the target zone is not full. This means that if an external (buggy)
      application writes to the zone of a sequential file underneath the file
      system, subsequent file write() operation will succeed but the file size
      will not be correct and the file will contain invalid data written by
      another application.
      
      Modify zonefs_file_dio_append() to check the written sector of an append
      write (returned in bio->bi_iter.bi_sector) and return -EIO if there is a
      mismatch with the file zone wp offset field. This change triggers a call
      to zonefs_io_error() and a zone check. Modify zonefs_io_error_cb() to
      not expose the unexpected data after the current inode size when the
      errors=remount-ro mode is used. Other error modes are correctly handled
      already.
      
      Fixes: 02ef12a6 ("zonefs: use REQ_OP_ZONE_APPEND for sync DIO")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
      a608da3b
    • Linus Torvalds's avatar
      Linux 6.2-rc4 · 5dc4c995
      Linus Torvalds authored
      5dc4c995
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.2_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f0f70ddb
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Make sure the poking PGD is pinned for Xen PV as it requires it this
         way
      
       - Fixes for two resctrl races when moving a task or creating a new
         monitoring group
      
       - Fix SEV-SNP guests running under HyperV where MTRRs are disabled to
         not return a UC- type mapping type on memremap() and thus cause a
         serious slowdown
      
       - Fix insn mnemonics in bioscall.S now that binutils is starting to fix
         confusing insn suffixes
      
      * tag 'x86_urgent_for_v6.2_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: fix poking_init() for Xen PV guests
        x86/resctrl: Fix event counts regression in reused RMIDs
        x86/resctrl: Fix task CLOSID/RMID update race
        x86/pat: Fix pat_x_mtrr_type() for MTRR disabled case
        x86/boot: Avoid using Intel mnemonics in AT&T syntax asm
      f0f70ddb
    • Linus Torvalds's avatar
      Merge tag 'edac_urgent_for_v6.2_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · 8aa97612
      Linus Torvalds authored
      Pull EDAC fixes from Borislav Petkov:
      
       - Fix the EDAC device's confusion in the polling setting units
      
       - Fix a memory leak in highbank's probing function
      
      * tag 'edac_urgent_for_v6.2_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/highbank: Fix memory leak in highbank_mc_probe()
        EDAC/device: Fix period calculation in edac_device_reset_delay_period()
      8aa97612
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · b1d63f0c
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix a build failure with some versions of ld that have an odd version
         string
      
       - Fix incorrect use of mutex in the IMC PMU driver
      
      Thanks to Kajol Jain, Michael Petlan, Ojaswin Mujoo, Peter Zijlstra, and
      Yang Yingliang.
      
      * tag 'powerpc-6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64s/hash: Make stress_hpt_timer_fn() static
        powerpc/imc-pmu: Fix use of mutex in IRQs disabled section
        powerpc/boot: Fix incorrect version calculation issue in ld_version
      b1d63f0c
  6. 14 Jan, 2023 2 commits
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 7c698440
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
      
       - Core: Fix an iommu-group refcount leak
      
       - Fix overflow issue in IOVA alloc path
      
       - ARM-SMMU fixes from Will:
          - Fix VFIO regression on NXP SoCs by reporting IOMMU_CAP_CACHE_COHERENCY
          - Fix SMMU shutdown paths to avoid device unregistration race
      
       - Error handling fix for Mediatek IOMMU driver
      
      * tag 'iommu-fixes-v6.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe()
        iommu/iova: Fix alloc iova overflows issue
        iommu: Fix refcount leak in iommu_device_claim_dma_owner
        iommu/arm-smmu-v3: Don't unregister on shutdown
        iommu/arm-smmu: Don't unregister on shutdown
        iommu/arm-smmu: Report IOMMU_CAP_CACHE_COHERENCY even betterer
      7c698440
    • Linus Torvalds's avatar
      Merge tag 'fixes-2023-01-14' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock · 4f43ade4
      Linus Torvalds authored
      Pull memblock fix from Mike Rapoport:
       "memblock: always release pages to the buddy allocator in
        memblock_free_late()
      
        If CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, memblock_free_pages()
        only releases pages to the buddy allocator if they are not in the
        deferred range. This is correct for free pages (as defined by
        for_each_free_mem_pfn_range_in_zone()) because free pages in the
        deferred range will be initialized and released as part of the
        deferred init process.
      
        memblock_free_pages() is called by memblock_free_late(), which is used
        to free reserved ranges after memblock_free_all() has run. All pages
        in reserved ranges have been initialized at that point, and
        accordingly, those pages are not touched by the deferred init process.
      
        This means that currently, if the pages that memblock_free_late()
        intends to release are in the deferred range, they will never be
        released to the buddy allocator. They will forever be reserved.
      
        In addition, memblock_free_pages() calls kmsan_memblock_free_pages(),
        which is also correct for free pages but is not correct for reserved
        pages. KMSAN metadata for reserved pages is initialized by
        kmsan_init_shadow(), which runs shortly before memblock_free_all().
      
        For both of these reasons, memblock_free_pages() should only be called
        for free pages, and memblock_free_late() should call
        __free_pages_core() directly instead.
      
        One case where this issue can occur in the wild is EFI boot on x86_64.
        The x86 EFI code reserves all EFI boot services memory ranges via
        memblock_reserve() and frees them later via memblock_free_late()
        (efi_reserve_boot_services() and efi_free_boot_services(),
        respectively).
      
        If any of those ranges happens to fall within the deferred init range,
        the pages will not be released and that memory will be unavailable.
      
        For example, on an Amazon EC2 t3.micro VM (1 GB) booting via EFI:
      
          v6.2-rc2:
          Node 0, zone      DMA
                spanned  4095
                present  3999
                managed  3840
          Node 0, zone    DMA32
                spanned  246652
                present  245868
                managed  178867
      
          v6.2-rc2 + patch:
          Node 0, zone      DMA
                spanned  4095
                present  3999
                managed  3840
          Node 0, zone    DMA32
                spanned  246652
                present  245868
                managed  222816   # +43,949 pages"
      
      * tag 'fixes-2023-01-14' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
        mm: Always release pages to the buddy allocator in memblock_free_late().
      4f43ade4