Skip to content
Permalink
Minchan-Kim/zs…
Switch branches/tags

Commits on Nov 10, 2021

  1. zsmalloc: replace get_cpu_var with local_lock

    The usage of get_cpu_var() in zs_map_object() is problematic because
    it disables preemption and makes it impossible to acquire any sleeping
    lock on PREEMPT_RT such as a spinlock_t.
    Replace the get_cpu_var() usage with a local_lock_t which is embedded
    struct mapping_area. It ensures that the access the struct is
    synchronized against all users on the same CPU.
    
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    [minchan: remove the bit_spin_lock part and change the title]
    Signed-off-by: Minchan Kim <minchan@kernel.org>
    Sebastian Andrzej Siewior authored and intel-lab-lkp committed Nov 10, 2021
  2. zsmalloc: replace per zpage lock with pool->migrate_lock

    The zsmalloc has used a bit for spin_lock in zpage handle to keep
    zpage object alive during several operations. However, it causes
    the problem for PREEMPT_RT as well as introducing too complicated.
    
    This patch replaces the bit spin_lock with pool->migrate_lock
    rwlock. It could make the code simple as well as zsmalloc work
    under PREEMPT_RT.
    
    The drawback is the pool->migrate_lock is bigger granuarity than
    per zpage lock so the contention would be higher than old when
    both IO-related operations(i.e., zsmalloc, zsfree, zs_[map|unmap])
    and compaction(page/zpage migration) are going in parallel(*,
    the migrate_lock is rwlock and IO related functions are all read
    side lock so there is no contention). However, the write-side
    is fast enough(dominant overhead is just page copy) so it wouldn't
    affect much. If the lock granurity becomes more problem later,
    we could introduce table locks based on handle as a hash value.
    
    Signed-off-by: Minchan Kim <minchan@kernel.org>
    minchank authored and intel-lab-lkp committed Nov 10, 2021
  3. zsmalloc: remove zspage isolation for migration

    zspage isolation for migration introduced additional exceptions
    to be dealt with since the zspage was isolated from class list.
    The reason why I isolated zspage from class list was to prevent
    race between obj_malloc and page migration via allocating zpage
    from the zspage further. However, it couldn't prevent object
    freeing from zspage so it needed corner case handling.
    
    This patch removes the whole mess. Now, we are fine since
    class->lock and zspage->lock can prevent the race.
    
    Signed-off-by: Minchan Kim <minchan@kernel.org>
    minchank authored and intel-lab-lkp committed Nov 10, 2021
  4. zsmalloc: move huge compressed obj from page to zspage

    the flag aims for zspage, not per page. Let's move it to zspage.
    
    Signed-off-by: Minchan Kim <minchan@kernel.org>
    minchank authored and intel-lab-lkp committed Nov 10, 2021
  5. zsmalloc: introduce obj_allocated

    The usage pattern for obj_to_head is to check whether the zpage
    is allocated or not. Thus, introduce obj_allocated.
    
    Signed-off-by: Minchan Kim <minchan@kernel.org>
    minchank authored and intel-lab-lkp committed Nov 10, 2021
  6. zsmalloc: decouple class actions from zspage works

    This patch moves class stat update out of obj_malloc since
    it's not related to zspage operation.
    This is a preparation to introduce new lock scheme in next
    patch.
    
    Signed-off-by: Minchan Kim <minchan@kernel.org>
    minchank authored and intel-lab-lkp committed Nov 10, 2021
  7. zsmalloc: rename zs_stat_type to class_stat_type

    The stat aims for class stat, not zspage so rename it.
    
    Signed-off-by: Minchan Kim <minchan@google.com>
    Minchan Kim authored and intel-lab-lkp committed Nov 10, 2021
  8. zsmalloc: introduce some helper functions

    get_zspage_mapping returns fullness as well as class_idx. However,
    the fullness is usually not used since it could be stale in some
    contexts. It causes misleading as well as unnecessary instructions
    so this patch introduces zspage_class.
    
    obj_to_location also produces page and index but we don't need
    always the index, either so this patch introduces obj_to_page.
    
    Signed-off-by: Minchan Kim <minchan@kernel.org>
    minchank authored and intel-lab-lkp committed Nov 10, 2021

Commits on Oct 31, 2021

  1. Linux 5.15

    torvalds committed Oct 31, 2021
  2. Merge tag 'perf-tools-fixes-for-v5.15-2021-10-31' of git://git.kernel…

    ….org/pub/scm/linux/kernel/git/acme/linux
    
    Pull perf tools fixes from Arnaldo Carvalho de Melo:
    
     - Fix compilation of callchain related code on powerpc with gcc11+
    
     - Fix PERF_SAMPLE_WEIGHT_STRUCT support in 'perf script'
    
     - Check session->header.env.arch before using it, fixing a segmentation
       fault
    
     - Suppress 'rm dlfilter' build messages
    
    * tag 'perf-tools-fixes-for-v5.15-2021-10-31' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
      perf script: Fix PERF_SAMPLE_WEIGHT_STRUCT support
      perf callchain: Fix compilation on powerpc with gcc11+
      perf script: Check session->header.env.arch before using it
      perf build: Suppress 'rm dlfilter' build message
    torvalds committed Oct 31, 2021
  3. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

    Pull kvm fixes from Paolo Bonzini:
    
     - Fixes for s390 interrupt delivery
    
     - Fixes for Xen emulator bugs showing up as debug kernel WARNs
    
     - Fix another issue with SEV/ES string I/O VMGEXITs
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
      KVM: x86: Take srcu lock in post_kvm_run_save()
      KVM: SEV-ES: fix another issue with string I/O VMGEXITs
      KVM: x86/xen: Fix kvm_xen_has_interrupt() sleeping in kvm_vcpu_block()
      KVM: x86: switch pvclock_gtod_sync_lock to a raw spinlock
      KVM: s390: preserve deliverable_mask in __airqs_kick_single_vcpu
      KVM: s390: clear kicked_mask before sleeping again
    torvalds committed Oct 31, 2021
  4. perf script: Fix PERF_SAMPLE_WEIGHT_STRUCT support

    -F weight in perf script is broken.
    
      # ./perf mem record
      # ./perf script -F weight
      Samples for 'dummy:HG' event do not have WEIGHT attribute set. Cannot
    print 'weight' field.
    
    The sample type, PERF_SAMPLE_WEIGHT_STRUCT, is an alternative of the
    PERF_SAMPLE_WEIGHT sample type. They share the same space, weight. The
    lower 32 bits are exactly the same for both sample type. The higher 32
    bits may be different for different architecture. For a new kernel on
    x86, the PERF_SAMPLE_WEIGHT_STRUCT is used. For an old kernel or other
    ARCHs, the PERF_SAMPLE_WEIGHT is used.
    
    With -F weight, current perf script will only check the input string
    "weight" with the PERF_SAMPLE_WEIGHT sample type. Because the commit
    ea8d0ed ("perf tools: Support PERF_SAMPLE_WEIGHT_STRUCT") didn't
    update the PERF_SAMPLE_WEIGHT_STRUCT sample type for perf script. For a
    new kernel on x86, the check fails.
    
    Use PERF_SAMPLE_WEIGHT_TYPE, which supports both sample types, to
    replace PERF_SAMPLE_WEIGHT
    
    Fixes: ea8d0ed ("perf tools: Support PERF_SAMPLE_WEIGHT_STRUCT")
    Reported-by: Joe Mario <jmario@redhat.com>
    Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
    Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
    Tested-by: Jiri Olsa <jolsa@redhat.com>
    Tested-by: Joe Mario <jmario@redhat.com>
    Acked-by: Jiri Olsa <jolsa@redhat.com>
    Acked-by: Joe Mario <jmario@redhat.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Link: https://lore.kernel.org/r/1632929894-102778-1-git-send-email-kan.liang@linux.intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Kan Liang authored and Arnaldo Carvalho de Melo committed Oct 31, 2021
  5. perf callchain: Fix compilation on powerpc with gcc11+

    Got following build fail on powerpc:
    
        CC      arch/powerpc/util/skip-callchain-idx.o
      In function ‘check_return_reg’,
          inlined from ‘check_return_addr’ at arch/powerpc/util/skip-callchain-idx.c:213:7,
          inlined from ‘arch_skip_callchain_idx’ at arch/powerpc/util/skip-callchain-idx.c:265:7:
      arch/powerpc/util/skip-callchain-idx.c:54:18: error: ‘dwarf_frame_register’ accessing 96 bytes \
      in a region of size 64 [-Werror=stringop-overflow=]
         54 |         result = dwarf_frame_register(frame, ra_regno, ops_mem, &ops, &nops);
            |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      arch/powerpc/util/skip-callchain-idx.c: In function ‘arch_skip_callchain_idx’:
      arch/powerpc/util/skip-callchain-idx.c:54:18: note: referencing argument 3 of type ‘Dwarf_Op *’
      In file included from /usr/include/elfutils/libdwfl.h:32,
                       from arch/powerpc/util/skip-callchain-idx.c:10:
      /usr/include/elfutils/libdw.h:1069:12: note: in a call to function ‘dwarf_frame_register’
       1069 | extern int dwarf_frame_register (Dwarf_Frame *frame, int regno,
            |            ^~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
    
    The dwarf_frame_register args changed with [1],
    Updating ops_mem accordingly.
    
    [1] https://sourceware.org/git/?p=elfutils.git;a=commit;h=5621fe5443da23112170235dd5cac161e5c75e65
    
    Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
    Signed-off-by: Jiri Olsa <jolsa@redhat.com>
    Acked-by: Mark Wieelard <mjw@redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Michael Petlan <mpetlan@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
    Link: https://lore.kernel.org/r/20210928195253.1267023-1-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Jiri Olsa authored and Arnaldo Carvalho de Melo committed Oct 31, 2021
  6. perf script: Check session->header.env.arch before using it

    When perf.data is not written cleanly, we would like to process existing
    data as much as possible (please see f_header.data.size == 0 condition
    in perf_session__read_header). However, perf.data with partial data may
    crash perf. Specifically, we see crash in 'perf script' for NULL
    session->header.env.arch.
    
    Fix this by checking session->header.env.arch before using it to determine
    native_arch. Also split the if condition so it is easier to read.
    
    Committer notes:
    
    If it is a pipe, we already assume is a native arch, so no need to check
    session->header.env.arch.
    
    Signed-off-by: Song Liu <songliubraving@fb.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: kernel-team@fb.com
    Cc: stable@vger.kernel.org
    Link: http://lore.kernel.org/lkml/20211004053238.514936-1-songliubraving@fb.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    liu-song-6 authored and Arnaldo Carvalho de Melo committed Oct 31, 2021
  7. perf build: Suppress 'rm dlfilter' build message

    The following build message:
    
    	rm dlfilters/dlfilter-test-api-v0.o
    
    is unwanted.
    
    The object file is being treated as an intermediate file and being
    automatically removed. Mark the object file as .SECONDARY to prevent
    removal and hence the message.
    
    Requested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Link: http://lore.kernel.org/lkml/20210930062849.110416-1-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ahunter6 authored and Arnaldo Carvalho de Melo committed Oct 31, 2021

Commits on Oct 30, 2021

  1. Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/jejb/scsi
    
    Pull SCSI fixes from James Bottomley:
     "Three small fixes, all in drivers, and one sizeable update to the UFS
      driver to remove the HPB 2.0 feature that has been objected to by Jens
      and Christoph.
    
      Although the UFS patch is large and last minute, it's essentially the
      least intrusive way of resolving the objections in time for the 5.15
      release"
    
    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
      scsi: ufs: ufshpb: Remove HPB2.0 flows
      scsi: mpt3sas: Fix reference tag handling for WRITE_INSERT
      scsi: ufs: ufs-exynos: Correct timeout value setting registers
      scsi: ibmvfc: Fix up duplicate response detection
    torvalds committed Oct 30, 2021
  2. Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/clk/linux
    
    Pull clk fix from Stephen Boyd:
     "One fix for the composite clk that broke when we changed this clk type
      to use the determine_rate instead of round_rate clk op by default.
      This caused lots of problems on Rockchip SoCs because they heavily use
      the composite clk code to model the clk tree"
    
    * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
      clk: composite: Also consider .determine_rate for rate + mux composites
    torvalds committed Oct 30, 2021
  3. Merge tag 'riscv-for-linus-5.15-rc8' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/riscv/linux
    
    Pull RISC-V fixes from Palmer Dabbelt:
     "These are pretty late, but they do fix concrete issues.
    
       - ensure the trap vector's address is aligned.
    
       - avoid re-populating the KASAN shadow memory.
    
       - allow kasan to build without warnings, which have recently become
         errors"
    
    * tag 'riscv-for-linus-5.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
      riscv: Fix asan-stack clang build
      riscv: Do not re-populate shadow memory with kasan_populate_early_shadow
      riscv: fix misalgned trap vector base address
    torvalds committed Oct 30, 2021
  4. scsi: ufs: ufshpb: Remove HPB2.0 flows

    The Host Performance Buffer feature allows UFS read commands to carry the
    physical media addresses along with the LBAs, thus allowing less internal
    L2P-table switches in the device.  HPB1.0 allowed a single LBA, while
    HPB2.0 increases this capacity up to 255 blocks.
    
    Carrying more than a single record, the read operation is no longer purely
    of type "read" but a "hybrid" command: Writing the physical address to the
    device in one operation and reading back the required payload in another.
    
    The JEDEC HPB spec defines two commands for this operation:
    HPB-WRITE-BUFFER (0x2) to write the physical addresses to device, and
    HPB-READ to read the payload.
    
    With the current HPB design the UFS driver has no alternative but to divide
    the READ request into 2 separate commands: HPB-WRITE-BUFFER and HPB-READ.
    This causes a great deal of aggravation to the block layer guys who
    demanded that we completely revert the entire HPB driver regardless of the
    huge amount of corporate effort already invested in it.
    
    As a compromise, remove only the pieces that implement the 2.0
    specification. This is done as a matter of urgency for the final 5.15
    release.
    
    Link: https://lore.kernel.org/r/20211030062301.248-1-avri.altman@wdc.com
    Tested-by: Avri Altman <avri.altman@wdc.com>
    Tested-by: Bean Huo <beanhuo@micron.com>
    Reviewed-by: Bart Van Assche <bvanassche@acm.org>
    Reviewed-by: Bean Huo <beanhuo@micron.com>
    Co-developed-by: James Bottomley <James.Bottomley@HansenPartnership.com>
    Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
    Signed-off-by: Avri Altman <avri.altman@wdc.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    avri-altman authored and martinkpetersen committed Oct 30, 2021
  5. Merge tag 'powerpc-5.15-6' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/powerpc/linux
    
    Pull powerpc fixes from Michael Ellerman:
     "Three commits fixing some issues introduced with the recent IOMMU
      changes we merged.
    
      Thanks to Alexey Kardashevskiy"
    
    * tag 'powerpc-5.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
      powerpc/pseries/iommu: Create huge DMA window if no MMIO32 is present
      powerpc/pseries/iommu: Check if the default window in use before removing it
      powerpc/pseries/iommu: Use correct vfree for it_map
    torvalds committed Oct 30, 2021
  6. Merge tag 'gpio-fixes-for-v5.15' of git://git.kernel.org/pub/scm/linu…

    …x/kernel/git/brgl/linux
    
    Pull gpio fixes from Bartosz Golaszewski:
    
     - fix the return value check when parsing the ngpios property in
       gpio-xgs-iproc
    
     - check the return value of bgpio_init() in gpio-mlxbf2
    
    * tag 'gpio-fixes-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
      gpio: mlxbf2.c: Add check for bgpio_init failure
      gpio: xgs-iproc: fix parsing of ngpios property
    torvalds committed Oct 30, 2021

Commits on Oct 29, 2021

  1. Merge tag 'block-5.15-2021-10-29' of git://git.kernel.dk/linux-block

    Pull block fixes from Jens Axboe:
    
     - NVMe pull request:
          - fix nvmet-tcp header digest verification (Amit Engel)
          - fix a memory leak in nvmet-tcp when releasing a queue (Maurizio
            Lombardi)
          - fix nvme-tcp H2CData PDU send accounting again (Sagi Grimberg)
          - fix digest pointer calculation in nvme-tcp and nvmet-tcp (Varun
            Prakash)
          - fix possible nvme-tcp req->offset corruption (Varun Prakash)
    
     - Queue drain ordering fix (Ming)
    
     - Partition check regression for zoned devices (Shin'ichiro)
    
     - Zone queue restart fix (Naohiro)
    
    * tag 'block-5.15-2021-10-29' of git://git.kernel.dk/linux-block:
      block: Fix partition check for host-aware zoned block devices
      nvmet-tcp: fix header digest verification
      nvmet-tcp: fix data digest pointer calculation
      nvme-tcp: fix data digest pointer calculation
      nvme-tcp: fix possible req->offset corruption
      block: schedule queue restart after BLK_STS_ZONE_RESOURCE
      block: drain queue after disk is removed from sysfs
      nvme-tcp: fix H2CData PDU send accounting (again)
      nvmet-tcp: fix a memory leak when releasing a queue
    torvalds committed Oct 29, 2021
  2. scsi: mpt3sas: Fix reference tag handling for WRITE_INSERT

    Testing revealed a problem with how the reference tag was handled for
    a WRITE_INSERT operation. The SCSI_PROT_REF_CHECK flag is not set when
    the controller is asked to generate the protection information
    (i.e. not DIX). And as a result the initial reference tag would not be
    set in the WRITE_INSERT case.
    
    Separate handling of the REF_CHECK and REF_INCREMENT flags to align
    with both the DIX spec and the MPI implementation.
    
    Link: https://lore.kernel.org/r/20211028034202.24225-1-martin.petersen@oracle.com
    Fixes: b3e2c72 ("scsi: mpt3sas: Use the proper SCSI midlayer interfaces for PI")
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    martinkpetersen committed Oct 29, 2021
  3. Merge tag 'mmc-v5.15-rc5' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/ulfh/mmc
    
    Pull MMC fixes from Ulf Hansson:
    
     - tmio: Re-enable card irqs after a reset
    
     - mtk-sd: Fixup probing of cqhci for crypto
    
     - cqhci: Fix support for suspend/resume
    
     - vub300: Fix control-message timeouts
    
     - dw_mmc-exynos: Fix support for tuning
    
     - winbond: Silences build errors on M68K
    
     - sdhci-esdhc-imx: Fix support for tuning
    
     - sdhci-pci: Read card detect from ACPI for Intel Merrifield
    
     - sdhci: Fix eMMC support for Thundercomm TurboX CM2290
    
    * tag 'mmc-v5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
      mmc: tmio: reenable card irqs after the reset callback
      mmc: mediatek: Move cqhci init behind ungate clock
      mmc: cqhci: clear HALT state after CQE enable
      mmc: vub300: fix control-message timeouts
      mmc: dw_mmc: exynos: fix the finding clock sample value
      mmc: winbond: don't build on M68K
      mmc: sdhci-esdhc-imx: clear the buffer_read_ready to reset standard tuning circuit
      mmc: sdhci-pci: Read card detect from ACPI for Intel Merrifield
      mmc: sdhci: Map more voltage level to SDHCI_POWER_330
    torvalds committed Oct 29, 2021
  4. Merge tag 'for-5.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/kdave/linux
    
    Pull btrfs fixes from David Sterba:
     "Last minute fixes for crash on 32bit architectures when compression is
      in use. It's a regression introduced in 5.15-rc and I'd really like
      not let this into the final release, fixes via stable trees would add
      unnecessary delay.
    
      The problem is on 32bit architectures with highmem enabled, the pages
      for compression may need to be kmapped, while the patches removed that
      as we don't use GFP_HIGHMEM allocations anymore. The pages that don't
      come from local allocation still may be from highmem. Despite being on
      32bit there's enough such ARM machines in use so it's not a marginal
      issue.
    
      I did full reverts of the patches one by one instead of a huge one.
      There's one exception for the "lzo" revert as there was an
      intermediate patch touching the same code to make it compatible with
      subpage. I can't revert that one too, so the revert in lzo.c is
      manual. Qu Wenruo has worked on that with me and verified the changes"
    
    * tag 'for-5.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
      Revert "btrfs: compression: drop kmap/kunmap from lzo"
      Revert "btrfs: compression: drop kmap/kunmap from zlib"
      Revert "btrfs: compression: drop kmap/kunmap from zstd"
      Revert "btrfs: compression: drop kmap/kunmap from generic helpers"
    torvalds committed Oct 29, 2021
  5. Merge tag 'trace-v5.15-rc6-3' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/rostedt/linux-trace
    
    Pull tracing comment fixes from Steven Rostedt:
    
     - Some bots have informed me that some of the ftrace functions
       kernel-doc has formatting issues.
    
     - Also, fix my snake instinct.
    
    * tag 'trace-v5.15-rc6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
      tracing: Fix misspelling of "missing"
      ftrace: Fix kernel-doc formatting issues
    torvalds committed Oct 29, 2021
  6. Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git…

    …/herbert/crypto-2.6
    
    Pull crypto fix from Herbert Xu:
     "Fix a build-time warning in x86/sm4"
    
    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
      crypto: x86/sm4 - Fix invalid section entry size
    torvalds committed Oct 29, 2021
  7. Merge branch 'akpm' (patches from Andrew)

    Merge misc fixes from Andrew Morton:
     "11 patches.
    
      Subsystems affected by this patch series: mm (memcg, memory-failure,
      oom-kill, secretmem, vmalloc, hugetlb, damon, and tools), and ocfs2"
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
      tools/testing/selftests/vm/split_huge_page_test.c: fix application of sizeof to pointer
      mm/damon/core-test: fix wrong expectations for 'damon_split_regions_of()'
      mm: khugepaged: skip huge page collapse for special files
      mm, thp: bail out early in collapse_file for writeback page
      mm/vmalloc: fix numa spreading for large hash tables
      mm/secretmem: avoid letting secretmem_users drop to zero
      ocfs2: fix race between searching chunks and release journal_head from buffer_head
      mm/oom_kill.c: prevent a race between process_mrelease and exit_mmap
      mm: filemap: check if THP has hwpoisoned subpage for PMD page fault
      mm: hwpoison: remove the unnecessary THP check
      memcg: page_alloc: skip bulk allocator for __GFP_ACCOUNT
    torvalds committed Oct 29, 2021
  8. riscv: Fix asan-stack clang build

    Nathan reported that because KASAN_SHADOW_OFFSET was not defined in
    Kconfig, it prevents asan-stack from getting disabled with clang even
    when CONFIG_KASAN_STACK is disabled: fix this by defining the
    corresponding config.
    
    Reported-by: Nathan Chancellor <nathan@kernel.org>
    Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
    Fixes: 8ad8b72 ("riscv: Add KASAN support")
    Cc: stable@vger.kernel.org
    Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
    AlexGhiti authored and palmer-dabbelt committed Oct 29, 2021
  9. riscv: Do not re-populate shadow memory with kasan_populate_early_shadow

    When calling this function, all the shadow memory is already populated
    with kasan_early_shadow_pte which has PAGE_KERNEL protection.
    kasan_populate_early_shadow write-protects the mapping of the range
    of addresses passed in argument in zero_pte_populate, which actually
    write-protects all the shadow memory mapping since kasan_early_shadow_pte
    is used for all the shadow memory at this point. And then when using
    memblock API to populate the shadow memory, the first write access to the
    kernel stack triggers a trap. This becomes visible with the next commit
    that contains a fix for asan-stack.
    
    We already manually populate all the shadow memory in kasan_early_init
    and we write-protect kasan_early_shadow_pte at the end of kasan_init
    which makes the calls to kasan_populate_early_shadow superfluous so
    we can remove them.
    
    Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
    Fixes: e178d67 ("riscv/kasan: add KASAN_VMALLOC support")
    Fixes: 8ad8b72 ("riscv: Add KASAN support")
    Cc: stable@vger.kernel.org
    Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
    AlexGhiti authored and palmer-dabbelt committed Oct 29, 2021
  10. tracing: Fix misspelling of "missing"

    My snake instinct was on and I wrote "misssing" instead of "missing".
    
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    rostedt committed Oct 29, 2021
  11. ftrace: Fix kernel-doc formatting issues

    Some functions had kernel-doc that used a comma instead of a hash to
    separate the function name from the one line description.
    
    Also, the "ftrace_is_dead()" had an incomplete description.
    
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    rostedt committed Oct 29, 2021
  12. Revert "btrfs: compression: drop kmap/kunmap from lzo"

    This reverts commit 8c945d3.
    
    The kmaps in compression code are still needed and cause crashes on
    32bit machines (ARM, x86). Reproducible eg. by running fstest btrfs/004
    with enabled LZO or ZSTD compression.
    
    The revert does not apply cleanly due to changes in a6e66e6
    ("btrfs: rework lzo_decompress_bio() to make it subpage compatible")
    that reworked the page iteration so the revert is done to be equivalent
    to the original code.
    
    Link: https://lore.kernel.org/all/CAJCQCtT+OuemovPO7GZk8Y8=qtOObr0XTDp8jh4OHD6y84AFxw@mail.gmail.com/
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214839
    Tested-by: Qu Wenruo <wqu@suse.com>
    Signed-off-by: Qu Wenruo <wqu@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    kdave committed Oct 29, 2021
  13. Revert "btrfs: compression: drop kmap/kunmap from zlib"

    This reverts commit 696ab56.
    
    The kmaps in compression code are still needed and cause crashes on
    32bit machines (ARM, x86). Reproducible eg. by running fstest btrfs/004
    with enabled LZO or ZSTD compression.
    
    Link: https://lore.kernel.org/all/CAJCQCtT+OuemovPO7GZk8Y8=qtOObr0XTDp8jh4OHD6y84AFxw@mail.gmail.com/
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214839
    Signed-off-by: David Sterba <dsterba@suse.com>
    kdave committed Oct 29, 2021
  14. Revert "btrfs: compression: drop kmap/kunmap from zstd"

    This reverts commit bbaf971.
    
    The kmaps in compression code are still needed and cause crashes on
    32bit machines (ARM, x86). Reproducible eg. by running fstest btrfs/004
    with enabled LZO or ZSTD compression.
    
    Example stacktrace with ZSTD on a 32bit ARM machine:
    
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      pgd = c4159ed3
      [00000000] *pgd=00000000
      Internal error: Oops: 5 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 0 PID: 210 Comm: kworker/u2:3 Not tainted 5.14.0-rc79+ torvalds#12
      Hardware name: Allwinner sun4i/sun5i Families
      Workqueue: btrfs-delalloc btrfs_work_helper
      PC is at mmiocpy+0x48/0x330
      LR is at ZSTD_compressStream_generic+0x15c/0x28c
    
      (mmiocpy) from [<c0629648>] (ZSTD_compressStream_generic+0x15c/0x28c)
      (ZSTD_compressStream_generic) from [<c06297dc>] (ZSTD_compressStream+0x64/0xa0)
      (ZSTD_compressStream) from [<c049444c>] (zstd_compress_pages+0x170/0x488)
      (zstd_compress_pages) from [<c0496798>] (btrfs_compress_pages+0x124/0x12c)
      (btrfs_compress_pages) from [<c043c068>] (compress_file_range+0x3c0/0x834)
      (compress_file_range) from [<c043c4ec>] (async_cow_start+0x10/0x28)
      (async_cow_start) from [<c0475c3c>] (btrfs_work_helper+0x100/0x230)
      (btrfs_work_helper) from [<c014ef68>] (process_one_work+0x1b4/0x418)
      (process_one_work) from [<c014f210>] (worker_thread+0x44/0x524)
      (worker_thread) from [<c0156aa4>] (kthread+0x180/0x1b0)
      (kthread) from [<c0100150>]
    
    Link: https://lore.kernel.org/all/CAJCQCtT+OuemovPO7GZk8Y8=qtOObr0XTDp8jh4OHD6y84AFxw@mail.gmail.com/
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214839
    Signed-off-by: David Sterba <dsterba@suse.com>
    kdave committed Oct 29, 2021
Older