Skip to content
Permalink
Leo-Yan/coresi…
Switch branches/tags

Commits on Dec 13, 2021

  1. coresight: etm3x: Don't trace PID for non-root PID namespace

    ETMv3 driver enables PID tracing by directly using perf config from
    userspace, this means the tracer will capture PID packets from root
    namespace but the profiling session runs in non-root PID namespace.
    Finally, the recorded packets can mislead perf reporting with the
    mismatched PID values.
    
    This patch changes to only enable PID tracing for root PID namespace.
    Note, the hardware supports VMID tracing from ETMv3.5, but the driver
    never enables VMID trace, this patch doesn't handle VMID trace (bit 30
    in ETMCR register) particularly.
    
    Signed-off-by: Leo Yan <leo.yan@linaro.org>
    Leo-Yan authored and intel-lab-lkp committed Dec 13, 2021
  2. coresight: etm4x: Don't trace PID for non-root PID namespace

    When runs in perf mode, the driver always enables the PID tracing.  This
    can lead confusion when the profiling session runs in non-root PID
    namespace, whereas it records the PIDs from the root PID namespace.
    
    To avoid confusion for PID tracing, when runs in perf mode, this patch
    changes to only enable PID tracing for root PID namespace.
    
    As result, after apply this patch, the perf tool reports PID as '-1' for
    all samples:
    
      # unshare --fork --pid perf record -e cs_etm// -m 64K,64K -a \
    	-o perf_test.data -- uname
      # perf report -i perf_test.data --itrace=Zi1000i --stdio
    
      # Total Lost Samples: 0
      #
      # Samples: 94  of event 'instructions'
      # Event count (approx.): 94000
      #
      # Overhead  Command  Shared Object      Symbol
      # ........  .......  .................  ..............................
      #
          68.09%  :-1      [kernel.kallsyms]  [k] __sched_text_end
           3.19%  :-1      [kernel.kallsyms]  [k] hrtimer_interrupt
           2.13%  :-1      [kernel.kallsyms]  [k] __bitmap_and
           2.13%  :-1      [kernel.kallsyms]  [k] trace_vbprintk
           1.06%  :-1      [kernel.kallsyms]  [k] __fget_files
           1.06%  :-1      [kernel.kallsyms]  [k] __schedule
           1.06%  :-1      [kernel.kallsyms]  [k] __softirqentry_text_start
           1.06%  :-1      [kernel.kallsyms]  [k] __update_load_avg_cfs_rq
           1.06%  :-1      [kernel.kallsyms]  [k] __update_load_avg_se
           1.06%  :-1      [kernel.kallsyms]  [k] arch_counter_get_cntpct
           1.06%  :-1      [kernel.kallsyms]  [k] check_and_switch_context
           1.06%  :-1      [kernel.kallsyms]  [k] format_decode
           1.06%  :-1      [kernel.kallsyms]  [k] handle_percpu_devid_irq
           1.06%  :-1      [kernel.kallsyms]  [k] irq_enter_rcu
           1.06%  :-1      [kernel.kallsyms]  [k] irqtime_account_irq
           1.06%  :-1      [kernel.kallsyms]  [k] ktime_get
           1.06%  :-1      [kernel.kallsyms]  [k] ktime_get_coarse_real_ts64
           1.06%  :-1      [kernel.kallsyms]  [k] memmove
           1.06%  :-1      [kernel.kallsyms]  [k] perf_ioctl
           1.06%  :-1      [kernel.kallsyms]  [k] perf_output_begin
           1.06%  :-1      [kernel.kallsyms]  [k] perf_output_copy
           1.06%  :-1      [kernel.kallsyms]  [k] profile_tick
           1.06%  :-1      [kernel.kallsyms]  [k] sched_clock
           1.06%  :-1      [kernel.kallsyms]  [k] timerqueue_add
           1.06%  :-1      [kernel.kallsyms]  [k] trace_save_cmdline
           1.06%  :-1      [kernel.kallsyms]  [k] update_load_avg
           1.06%  :-1      [kernel.kallsyms]  [k] vbin_printf
    
    Signed-off-by: Leo Yan <leo.yan@linaro.org>
    Leo-Yan authored and intel-lab-lkp committed Dec 13, 2021
  3. coresight: etm4x: Don't use virtual contextID for non-root PID namespace

    As commented in the function ctxid_pid_store(), it can cause the PID
    values mismatching between context ID tracing and PID allocated in a
    non-root namespace.
    
    For this reason, when a process runs in non-root PID namespace, the
    driver doesn't allow PID tracing and returns failure when access
    contextID related sysfs nodes.
    
    VMID works for virtual contextID when the kernel runs in EL2 mode with
    VHE; on the other hand, the driver doesn't prevent users from accessing
    it when programs run in the non-root namespace.  Thus this can lead
    to same issues with contextID described above.
    
    This patch imposes the checking on VMID related sysfs knobs and returns
    failure if current process runs in non-root PID namespace.
    
    Signed-off-by: Leo Yan <leo.yan@linaro.org>
    Leo-Yan authored and intel-lab-lkp committed Dec 13, 2021
  4. coresight: etm4x: Add lock for reading virtual context ID comparator

    Updates to the values and the index are protected via the spinlock.
    Ensure we use the same lock to read the value safely.
    
    Signed-off-by: Leo Yan <leo.yan@linaro.org>
    Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
    Leo-Yan authored and intel-lab-lkp committed Dec 13, 2021

Commits on Dec 12, 2021

  1. Linux 5.16-rc5

    torvalds committed Dec 12, 2021
  2. Merge tag 'usb-5.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/usb
    
    Pull USB fixes from Greg KH:
     "Here are some small USB fixes for 5.16-rc5.  They include:
    
       - gadget driver fixes for reported issues
    
       - xhci fixes for reported problems.
    
       - config endpoint parsing fixes for where we got bitfields wrong
    
      Most of these have been in linux-next, the remaining few were not, but
      got lots of local testing in my systems and in some cloud testing
      infrastructures"
    
    * tag 'usb-5.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
      usb: core: config: using bit mask instead of individual bits
      usb: core: config: fix validation of wMaxPacketValue entries
      USB: gadget: zero allocate endpoint 0 buffers
      USB: gadget: detect too-big endpoint 0 requests
      xhci: avoid race between disable slot command and host runtime suspend
      xhci: Remove CONFIG_USB_DEFAULT_PERSIST to prevent xHCI from runtime suspending
      Revert "usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by default"
    torvalds committed Dec 12, 2021
  3. Merge tag 'char-misc-5.16-rc5' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/gregkh/char-misc
    
    Pull char/misc driver fixes from Greg KH:
     "Here are a bunch of small char/misc and other driver subsystem fixes.
    
      Included in here are:
    
       - iio driver fixes for reported problems
    
       - phy driver fixes for a number of reported problems
    
       - mhi resume bugfix for broken hardware
    
       - nvmem driver fix
    
       - rtsx driver fix for irq issues
    
       - fastrpc packet parsing fix
    
      All of these have been in linux-next for a while with no reported
      issues"
    
    * tag 'char-misc-5.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (33 commits)
      bus: mhi: core: Add support for forced PM resume
      iio: trigger: stm32-timer: fix MODULE_ALIAS
      misc: rtsx: Avoid mangling IRQ during runtime PM
      nvmem: eeprom: at25: fix FRAM byte_len
      misc: fastrpc: fix improper packet size calculation
      MAINTAINERS: add maintainer for Qualcomm FastRPC driver
      bus: mhi: pci_generic: Fix device recovery failed issue
      iio: adc: stm32: fix null pointer on defer_probe error
      phy: HiSilicon: Fix copy and paste bug in error handling
      dt-bindings: phy: zynqmp-psgtr: fix USB phy name
      phy: ti: omap-usb2: Fix the kernel-doc style
      phy: qualcomm: ipq806x-usb: Fix kernel-doc style
      iio: at91-sama5d2: Fix incorrect sign extension
      iio: adc: axp20x_adc: fix charging current reporting on AXP22x
      iio: gyro: adxrs290: fix data signedness
      phy: ti: tusb1210: Fix the kernel-doc warn
      phy: qualcomm: usb-hsic: Fix the kernel-doc warn
      phy: qualcomm: qmp: Add missing struct documentation
      phy: mvebu-cp110-utmi: Fix kernel-doc warns
      iio: ad7768-1: Call iio_trigger_notify_done() on error
      ...
    torvalds committed Dec 12, 2021
  4. Merge tag 'timers-urgent-2021-12-12' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/tip/tip
    
    Pull timer fixes from Thomas Gleixner:
     "Two fixes for clock chip drivers:
    
       - A regression fix for the Designware APB timer. A recent change to
         the error checking code transformed the error condition wrongly so
         it turned into a fail if good condition.
    
       - Fix a clang build fail of the ARM architected timer driver"
    
    * tag 'timers-urgent-2021-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      clocksource/drivers/arm_arch_timer: Force inlining of erratum_set_next_event_generic()
      clocksource/drivers/dw_apb_timer_of: Fix probe failure
    torvalds committed Dec 12, 2021
  5. Merge tag 'irq-urgent-2021-12-12' of git://git.kernel.org/pub/scm/lin…

    …ux/kernel/git/tip/tip
    
    Pull irq fixes from Thomas Gleixner:
     "A set of interrupt chip driver fixes:
    
       - Fix the multi vector MSI allocation on Armada 370XP
    
       - Do interrupt acknowledgement correctly in the aspeed-scu driver
    
       - Make the IPR register offset correct in the NVIC driver
    
       - Make redistribution table flushing correct by issueing a SYNC
         command to ensure that the invalidation command has been executed
    
       - Plug a device tree node reference leak in the bcm7210-l2 driver
    
       - Trivial fixes in the MIPS GIC and the Apple AIC drivers"
    
    * tag 'irq-urgent-2021-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      irqchip/irq-bcm7120-l2: Add put_device() after of_find_device_by_node()
      irqchip/irq-gic-v3-its.c: Force synchronisation when issuing INVALL
      irqchip/apple-aic: Mark aic_init_smp() as __init
      irqchip: nvic: Fix offset for Interrupt Priority Offsets
      irqchip/mips-gic: Use bitfield helpers
      irqchip/aspeed-scu: Replace update_bits with write_bits.
      irqchip/armada-370-xp: Fix support for Multi-MSI interrupts
      irqchip/armada-370-xp: Fix return value of armada_370_xp_msi_alloc()
    torvalds committed Dec 12, 2021
  6. Merge tag 'sched-urgent-2021-12-12' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/tip/tip
    
    Pull scheduler fix from Thomas Gleixner:
     "A single fix for the x86 scheduler topology:
    
      Using cluster topology on hybrid CPUs, e.g. Alder Lake, biases the
      scheduler towards the ATOM cluster as that has more total capacity.
      Use selection based on CPU priority instead"
    
    * tag 'sched-urgent-2021-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      sched,x86: Don't use cluster topology for x86 hybrid CPUs
    torvalds committed Dec 12, 2021
  7. Merge tag 'csky-for-linus-5.16-rc5' of git://github.com/c-sky/csky-linux

    Pull csky from Guo Ren:
     "Only one fix for csky: fix fpu config macro"
    
    * tag 'csky-for-linus-5.16-rc5' of git://github.com/c-sky/csky-linux:
      csky: fix typo of fpu config macro
    torvalds committed Dec 12, 2021
  8. usb: core: config: using bit mask instead of individual bits

    Using standard USB_EP_MAXP_MULT_MASK instead of individual bits for
    extracting multiple-transactions bits from wMaxPacketSize value.
    
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
    Link: https://lore.kernel.org/r/20211210085219.16796-2-pavel.hofman@ivitera.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pavhofman authored and gregkh committed Dec 12, 2021
  9. usb: core: config: fix validation of wMaxPacketValue entries

    The checks performed by commit aed9d65 ("USB: validate
    wMaxPacketValue entries in endpoint descriptors") require that initial
    value of the maxp variable contains both maximum packet size bits
    (10..0) and multiple-transactions bits (12..11). However, the existing
    code assings only the maximum packet size bits. This patch assigns all
    bits of wMaxPacketSize to the variable.
    
    Fixes: aed9d65 ("USB: validate wMaxPacketValue entries in endpoint descriptors")
    Cc: stable <stable@vger.kernel.org>
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
    Link: https://lore.kernel.org/r/20211210085219.16796-1-pavel.hofman@ivitera.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pavhofman authored and gregkh committed Dec 12, 2021
  10. USB: gadget: zero allocate endpoint 0 buffers

    Under some conditions, USB gadget devices can show allocated buffer
    contents to a host.  Fix this up by zero-allocating them so that any
    extra data will all just be zeros.
    
    Reported-by: Szymon Heidrich <szymon.heidrich@gmail.com>
    Tested-by: Szymon Heidrich <szymon.heidrich@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    gregkh committed Dec 12, 2021
  11. USB: gadget: detect too-big endpoint 0 requests

    Sometimes USB hosts can ask for buffers that are too large from endpoint
    0, which should not be allowed.  If this happens for OUT requests, stall
    the endpoint, but for IN requests, trim the request size to the endpoint
    buffer size.
    
    Co-developed-by: Szymon Heidrich <szymon.heidrich@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    gregkh committed Dec 12, 2021
  12. Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/jejb/scsi
    
    Pull SCSI fixes from James Bottomley:
     "Four fixes, all in drivers.
    
      Three are small and obvious, the qedi one is a bit larger but also
      pretty obvious"
    
    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
      scsi: qla2xxx: Format log strings only if needed
      scsi: scsi_debug: Fix buffer size of REPORT ZONES command
      scsi: qedi: Fix cmd_cleanup_cmpl counter mismatch issue
      scsi: pm80xx: Do not call scsi_remove_host() in pm8001_alloc()
    torvalds committed Dec 12, 2021
  13. Merge tag 'xfs-5.16-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/x…

    …fs-linux
    
    Pull xfs fix from Darrick Wong:
     "This fixes a race between a readonly remount process and other
      processes that hold a file IOLOCK on files that previously experienced
      copy on write, that could result in severe filesystem corruption if
      the filesystem is then remounted rw.
    
      I think this is fairly rare (since the only reliable reproducer I have
      that fits the second criteria is the experimental xfs_scrub program),
      but the race is clear, so we still need to fix this.
    
      Summary:
    
       - Fix a data corruption vector that can result from the ro remount
         process failing to clear all speculative preallocations from files
         and the rw remount process not noticing the incomplete cleanup"
    
    * tag 'xfs-5.16-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
      xfs: remove all COW fork extents when remounting readonly
    torvalds committed Dec 12, 2021
  14. Merge branch 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/dennis/percpu
    
    Pull percpu fixes from Dennis Zhou:
     "This contains a fix for SMP && !MMU archs for percpu which has been
      tested by arm and sh. It seems in the past they have gotten away with
      it due to mapping of vm functions to km functions, but this fell apart
      a few releases ago and was just reported recently.
    
      The other is just a minor dependency clean up.
    
      I think queued up right now by Andrew is a fix in percpu that papers
      of what seems to be a bug in hotplug for a special situation with
      memoryless nodes. Michal Hocko is digging into it further"
    
    * 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
      percpu_ref: Replace kernel.h with the necessary inclusions
      percpu: km: ensure it is used with NOMMU (either UP or SMP)
    torvalds committed Dec 12, 2021

Commits on Dec 11, 2021

  1. Merge tag 'perf-tools-fixes-for-v5.16-2021-12-11' of git://git.kernel…

    ….org/pub/scm/linux/kernel/git/acme/linux
    
    Pull perf tools fixes from Arnaldo Carvalho de Melo:
    
     - Prevent out-of-bounds access to per sample registers.
    
     - Fix NULL vs IS_ERR_OR_NULL() checking on the python binding.
    
     - Intel PT fixes, half of those are one-liners:
          - Fix some PGE (packet generation enable/control flow packets) usage.
          - Fix sync state when a PSB (synchronization) packet is found.
          - Fix intel_pt_fup_event() assumptions about setting state type.
          - Fix state setting when receiving overflow (OVF) packet.
          - Fix next 'err' value, walking trace.
          - Fix missing 'instruction' events with 'q' option.
          - Fix error timestamp setting on the decoder error path.
    
    * tag 'perf-tools-fixes-for-v5.16-2021-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
      perf python: Fix NULL vs IS_ERR_OR_NULL() checking
      perf intel-pt: Fix error timestamp setting on the decoder error path
      perf intel-pt: Fix missing 'instruction' events with 'q' option
      perf intel-pt: Fix next 'err' value, walking trace
      perf intel-pt: Fix state setting when receiving overflow (OVF) packet
      perf intel-pt: Fix intel_pt_fup_event() assumptions about setting state type
      perf intel-pt: Fix sync state when a PSB (synchronization) packet is found
      perf intel-pt: Fix some PGE (packet generation enable/control flow packets) usage
      perf tools: Prevent out-of-bounds access to registers
    torvalds committed Dec 11, 2021
  2. Merge tag 'block-5.16-2021-12-10' of git://git.kernel.dk/linux-block

    Pull block fixes from Jens Axboe:
     "A few block fixes that should go into this release:
    
       - NVMe pull request:
            - set ana_log_size to 0 after freeing ana_log_buf (Hou Tao)
            - show subsys nqn for duplicate cntlids (Keith Busch)
            - disable namespace access for unsupported metadata (Keith
              Busch)
            - report write pointer for a full zone as zone start + zone len
              (Niklas Cassel)
            - fix use after free when disconnecting a reconnecting ctrl
              (Ruozhu Li)
            - fix a list corruption in nvmet-tcp (Sagi Grimberg)
    
       - Fix for a regression on DIO single bio async IO (Pavel)
    
       - ioprio seteuid fix (Davidlohr)
    
       - mtd fix that subsequently got reverted as it was broken, will get
         re-done and submitted for the next round
    
       - Two MD fixes via Song (Markus, zhangyue)"
    
    * tag 'block-5.16-2021-12-10' of git://git.kernel.dk/linux-block:
      Revert "mtd_blkdevs: don't scan partitions for plain mtdblock"
      block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2)
      md: fix double free of mddev->private in autorun_array()
      md: fix update super 1.0 on rdev size change
      nvmet-tcp: fix possible list corruption for unexpected command failure
      block: fix single bio async DIO error handling
      nvme: fix use after free when disconnecting a reconnecting ctrl
      nvme-multipath: set ana_log_size to 0 after free ana_log_buf
      mtd_blkdevs: don't scan partitions for plain mtdblock
      nvme: report write pointer for a full zone as zone start + zone len
      nvme: disable namespace access for unsupported metadata
      nvme: show subsys nqn for duplicate cntlids
    torvalds committed Dec 11, 2021
  3. Merge tag 'io_uring-5.16-2021-12-10' of git://git.kernel.dk/linux-block

    Pull io_uring fixes from Jens Axboe:
     "A few fixes that are all bound for stable:
    
       - Two syzbot reports for io-wq that turned out to be separate fixes,
         but ultimately very closely related
    
       - io_uring task_work running on cancelations"
    
    * tag 'io_uring-5.16-2021-12-10' of git://git.kernel.dk/linux-block:
      io-wq: check for wq exit after adding new worker task_work
      io_uring: ensure task_work gets run as part of cancelations
      io-wq: remove spurious bit clear on task_work addition
    torvalds committed Dec 11, 2021
  4. Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/wsa/linux
    
    Pull i2c fixes from Wolfram Sang:
     "Two more I2C driver bugfixes"
    
    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
      i2c: mpc: Use atomic read and fix break condition
      i2c: virtio: fix completion handling
    torvalds committed Dec 11, 2021
  5. Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/clk/linux
    
    Pull clk driver fixes from Stephen Boyd:
    
     - Fix qcom mux logic to look at the proper parent table member. Luckily
       this clk type isn't very common.
    
     - Don't kill clks on qcom systems that use Trion PLLs that are enabled
       out of the bootloader. We will simply skip programming the PLL rate
       if it's already done.
    
     - Use the proper clk_ops for the qcom sm6125 ICE clks.
    
     - Use module_platform_driver() in i.MX as it can be a module.
    
     - Fix a UAF in the versatile clk driver on an error path.
    
    * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
      clk: versatile: clk-icst: use after free on error path
      clk: qcom: sm6125-gcc: Swap ops of ice and apps on sdcc1
      clk: imx: use module_platform_driver
      clk: qcom: clk-alpha-pll: Don't reconfigure running Trion
      clk: qcom: regmap-mux: fix parent clock lookup
    torvalds committed Dec 11, 2021
  6. Merge tag 'devicetree-fixes-for-5.16-2' of git://git.kernel.org/pub/s…

    …cm/linux/kernel/git/robh/linux
    
    Pull devicetree fixes from Rob Herring:
    
     - Revert schema checks on %.dtb targets. This was problematic for some
       external build tools.
    
     - A few DT binding example fixes
    
     - Add back dropped 'enet-phy-lane-no-swap' Ethernet PHY property
    
     - Drop erroneous if/then schema in nxp,imx7-mipi-csi2
    
     - Add a quirk to fix some interrupt controllers use of 'interrupt-map'
    
    * tag 'devicetree-fixes-for-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
      Revert "kbuild: Enable DT schema checks for %.dtb targets"
      dt-bindings: bq25980: Fixup the example
      dt-bindings: input: gpio-keys: Fix interrupts in example
      dt-bindings: net: Reintroduce PHY no lane swap binding
      dt-bindings: media: nxp,imx7-mipi-csi2: Drop bad if/then schema
      of/irq: Add a quirk for controllers with their own definition of interrupt-map
      dt-bindings: iio: adc: exynos-adc: Fix node name in example
    torvalds committed Dec 11, 2021
  7. Merge branch 'akpm' (patches from Andrew)

    Merge misc fixes from Andrew Morton:
     "21 patches.
    
      Subsystems affected by this patch series: MAINTAINERS, mailmap, and mm
      (mlock, pagecache, damon, slub, memcg, hugetlb, and pagecache)"
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (21 commits)
      mm: bdi: initialize bdi_min_ratio when bdi is unregistered
      hugetlbfs: fix issue of preallocation of gigantic pages can't work
      mm/memcg: relocate mod_objcg_mlstate(), get_obj_stock() and put_obj_stock()
      mm/slub: fix endianness bug for alloc/free_traces attributes
      selftests/damon: split test cases
      selftests/damon: test debugfs file reads/writes with huge count
      selftests/damon: test wrong DAMOS condition ranges input
      selftests/damon: test DAMON enabling with empty target_ids case
      selftests/damon: skip test if DAMON is running
      mm/damon/vaddr-test: remove unnecessary variables
      mm/damon/vaddr-test: split a test function having >1024 bytes frame size
      mm/damon/vaddr: remove an unnecessary warning message
      mm/damon/core: remove unnecessary error messages
      mm/damon/dbgfs: remove an unnecessary error message
      mm/damon/core: use better timer mechanisms selection threshold
      mm/damon/core: fix fake load reports due to uninterruptible sleeps
      timers: implement usleep_idle_range()
      filemap: remove PageHWPoison check from next_uptodate_page()
      mailmap: update email address for Guo Ren
      MAINTAINERS: update kdump maintainers
      ...
    torvalds committed Dec 11, 2021
  8. Merge tag 'timers-v5.16-rc4' of https://git.linaro.org/people/daniel.…

    …lezcano/linux into timers/urgent
    
    Pull timer fixes from Daniel Lezcano:
    
      - Fix build error with clang and some kernel configuration on the
        arm64 architected timer by inlining the
        erratum_set_next_event_generic() function (Marc Zyngier)
    
      - Fix probe error on the dw_apb_timer_of driver by fixing the
        incorrect condition previously introduced (Alexey Sheplyakov)
    
    Link: https://lore.kernel.org/r/429b796d-9395-4ca8-81f3-30911f80a9a9@linaro.org
    Thomas Gleixner committed Dec 11, 2021
  9. perf python: Fix NULL vs IS_ERR_OR_NULL() checking

    The function trace_event__tp_format_id may return ERR_PTR(-ENOMEM).  Use
    IS_ERR_OR_NULL to check tp_format.
    
    Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Song Liu <song@kernel.org>
    Link: http://lore.kernel.org/lkml/20211211053856.19827-1-linmq006@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Yuuoniy authored and Arnaldo Carvalho de Melo committed Dec 11, 2021
  10. perf intel-pt: Fix error timestamp setting on the decoder error path

    An error timestamp shows the last known timestamp for the queue, but this
    is not updated on the error path. Fix by setting it.
    
    Fixes: f4aa081 ("perf tools: Add Intel PT decoder")
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: stable@vger.kernel.org # v5.15+
    Link: https://lore.kernel.org/r/20211210162303.2288710-8-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ahunter6 authored and Arnaldo Carvalho de Melo committed Dec 11, 2021
  11. perf intel-pt: Fix missing 'instruction' events with 'q' option

    FUP packets contain IP information, which makes them also an 'instruction'
    event in 'hop' mode i.e. the itrace 'q' option.  That wasn't happening, so
    restructure the logic so that FUP events are added along with appropriate
    'instruction' and 'branch' events.
    
    Fixes: 7c1b16b ("perf intel-pt: Add support for decoding FUP/TIP only")
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: stable@vger.kernel.org # v5.15+
    Link: https://lore.kernel.org/r/20211210162303.2288710-7-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ahunter6 authored and Arnaldo Carvalho de Melo committed Dec 11, 2021
  12. perf intel-pt: Fix next 'err' value, walking trace

    Code after label 'next:' in intel_pt_walk_trace() assumes 'err' is zero,
    but it may not be, if arrived at via a 'goto'. Ensure it is zero.
    
    Fixes: 7c1b16b ("perf intel-pt: Add support for decoding FUP/TIP only")
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: stable@vger.kernel.org # v5.15+
    Link: https://lore.kernel.org/r/20211210162303.2288710-6-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ahunter6 authored and Arnaldo Carvalho de Melo committed Dec 11, 2021
  13. perf intel-pt: Fix state setting when receiving overflow (OVF) packet

    An overflow (OVF packet) is treated as an error because it represents a
    loss of trace data, but there is no loss of synchronization, so the packet
    state should be INTEL_PT_STATE_IN_SYNC not INTEL_PT_STATE_ERR_RESYNC.
    
    To support that, some additional variables must be reset, and the FUP
    packet that may follow OVF is treated as an FUP event.
    
    Fixes: f4aa081 ("perf tools: Add Intel PT decoder")
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: stable@vger.kernel.org # v5.15+
    Link: https://lore.kernel.org/r/20211210162303.2288710-5-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ahunter6 authored and Arnaldo Carvalho de Melo committed Dec 11, 2021
  14. perf intel-pt: Fix intel_pt_fup_event() assumptions about setting sta…

    …te type
    
    intel_pt_fup_event() assumes it can overwrite the state type if there has
    been an FUP event, but this is an unnecessary and unexpected constraint on
    callers.
    
    Fix by touching only the state type flags that are affected by an FUP
    event.
    
    Fixes: a472e65 ("perf intel-pt: Add decoder support for ptwrite and power event packets")
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: stable@vger.kernel.org # v5.15+
    Link: https://lore.kernel.org/r/20211210162303.2288710-4-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ahunter6 authored and Arnaldo Carvalho de Melo committed Dec 11, 2021
  15. perf intel-pt: Fix sync state when a PSB (synchronization) packet is …

    …found
    
    When syncing, it may be that branch packet generation is not enabled at
    that point, in which case there will not immediately be a control-flow
    packet, so some packets before a control flow packet turns up, get
    ignored.  However, the decoder is in sync as soon as a PSB is found, so
    the state should be set accordingly.
    
    Fixes: f4aa081 ("perf tools: Add Intel PT decoder")
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: stable@vger.kernel.org # v5.15+
    Link: https://lore.kernel.org/r/20211210162303.2288710-3-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ahunter6 authored and Arnaldo Carvalho de Melo committed Dec 11, 2021
  16. perf intel-pt: Fix some PGE (packet generation enable/control flow pa…

    …ckets) usage
    
    Packet generation enable (PGE) refers to whether control flow (COFI)
    packets are being produced.
    
    PGE may be false even when branch-tracing is enabled, due to being
    out-of-context, or outside a filter address range.  Fix some missing PGE
    usage.
    
    Fixes: 7c1b16b ("perf intel-pt: Add support for decoding FUP/TIP only")
    Fixes: 8395981 ("perf intel-pt: Allow decoding with branch tracing disabled")
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: stable@vger.kernel.org # v5.15+
    Link: https://lore.kernel.org/r/20211210162303.2288710-2-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ahunter6 authored and Arnaldo Carvalho de Melo committed Dec 11, 2021
  17. perf tools: Prevent out-of-bounds access to registers

    The size of the cache of register values is arch-dependant
    (PERF_REGS_MAX). This has the potential of causing an out-of-bounds
    access in the function "perf_reg_value" if the local architecture
    contains less registers than the one the perf.data file was recorded on.
    
    Since the maximum number of registers is bound by the bitmask "u64
    cache_mask", and the size of the cache when running under x86 systems is
    64 already, fix the size to 64 and add a range-check to the function
    "perf_reg_value" to prevent out-of-bounds access.
    
    Reported-by: Alexandre Truong <alexandre.truong@arm.com>
    Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
    Signed-off-by: German Gomez <german.gomez@arm.com>
    Acked-by: Jiri Olsa <jolsa@redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: John Garry <john.garry@huawei.com>
    Cc: Leo Yan <leo.yan@linaro.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Will Deacon <will@kernel.org>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-csky@vger.kernel.org
    Cc: linux-riscv@lists.infradead.org
    Link: https://lore.kernel.org/r/20211201123334.679131-2-german.gomez@arm.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    germangb authored and Arnaldo Carvalho de Melo committed Dec 11, 2021
Older