1. 16 Sep, 2022 4 commits
    • Mark Rutland's avatar
      arm64: rework FPAC exception handling · a1fafa3b
      Mark Rutland authored
      If an FPAC exception is taken from EL1, the entry code will call
      do_ptrauth_fault(), where due to:
      
      	BUG_ON(!user_mode(regs))
      
      ... the kernel will report a problem within do_ptrauth_fault() rather
      than reporting the original context the FPAC exception was taken from.
      The pt_regs and ESR value reported will be from within
      do_ptrauth_fault() and the code dump will be for the BRK in BUG_ON(),
      which isn't sufficient to debug the cause of the original exception.
      
      This patch makes the reporting better by having separate EL0 and EL1
      FPAC exception handlers, with the latter calling die() directly to
      report the original context the FPAC exception was taken from.
      
      Note that we only need to prevent kprobes of the EL1 FPAC handler, since
      the EL0 FPAC handler cannot be called recursively.
      
      For consistency with do_el0_svc*(), I've named the split functions
      do_el{0,1}_fpac() rather than do_el{0,1}_ptrauth_fault(). I've also
      clarified the comment to not imply there are casues other than FPAC
      exceptions.
      
      Prior to this patch FPAC exceptions are reported as:
      
      | kernel BUG at arch/arm64/kernel/traps.c:517!
      | Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
      | Modules linked in:
      | CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.19.0-rc3-00130-g9c8a180a1cdf-dirty #12
      | Hardware name: FVP Base RevC (DT)
      | pstate: 00400009 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      | pc : do_ptrauth_fault+0x3c/0x40
      | lr : el1_fpac+0x34/0x54
      | sp : ffff80000a3bbc80
      | x29: ffff80000a3bbc80 x28: ffff0008001d8000 x27: 0000000000000000
      | x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
      | x23: 0000000020400009 x22: ffff800008f70fa4 x21: ffff80000a3bbe00
      | x20: 0000000072000000 x19: ffff80000a3bbcb0 x18: fffffbfffda37000
      | x17: 3120676e696d7573 x16: 7361202c6e6f6974 x15: 0000000081a90000
      | x14: 0040000000000041 x13: 0040000000000001 x12: ffff000001a90000
      | x11: fffffbfffda37480 x10: 0068000000000703 x9 : 0001000080000000
      | x8 : 0000000000090000 x7 : 0068000000000f03 x6 : 0060000000000783
      | x5 : ffff80000a3bbcb0 x4 : ffff0008001d8000 x3 : 0000000072000000
      | x2 : 0000000000000000 x1 : 0000000020400009 x0 : ffff80000a3bbcb0
      | Call trace:
      |  do_ptrauth_fault+0x3c/0x40
      |  el1h_64_sync_handler+0xc4/0xd0
      |  el1h_64_sync+0x64/0x68
      |  test_pac+0x8/0x10
      |  smp_init+0x7c/0x8c
      |  kernel_init_freeable+0x128/0x28c
      |  kernel_init+0x28/0x13c
      |  ret_from_fork+0x10/0x20
      | Code: 97fffe5e a8c17bfd d50323bf d65f03c0 (d4210000)
      
      With this patch applied FPAC exceptions are reported as:
      
      | Internal error: Oops - FPAC: 0000000072000000 [#1] PREEMPT SMP
      | Modules linked in:
      | CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.19.0-rc3-00132-g78846e1c4757-dirty #11
      | Hardware name: FVP Base RevC (DT)
      | pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      | pc : test_pac+0x8/0x10
      | lr : 0x0
      | sp : ffff80000a3bbe00
      | x29: ffff80000a3bbe00 x28: 0000000000000000 x27: 0000000000000000
      | x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
      | x23: ffff80000a2c8000 x22: 0000000000000000 x21: 0000000000000000
      | x20: ffff8000099fa5b0 x19: ffff80000a007000 x18: fffffbfffda37000
      | x17: 3120676e696d7573 x16: 7361202c6e6f6974 x15: 0000000081a90000
      | x14: 0040000000000041 x13: 0040000000000001 x12: ffff000001a90000
      | x11: fffffbfffda37480 x10: 0068000000000703 x9 : 0001000080000000
      | x8 : 0000000000090000 x7 : 0068000000000f03 x6 : 0060000000000783
      | x5 : ffff80000a2c6000 x4 : ffff0008001d8000 x3 : ffff800009f88378
      | x2 : 0000000000000000 x1 : 0000000080210000 x0 : ffff000001a90000
      | Call trace:
      |  test_pac+0x8/0x10
      |  smp_init+0x7c/0x8c
      |  kernel_init_freeable+0x128/0x28c
      |  kernel_init+0x28/0x13c
      |  ret_from_fork+0x10/0x20
      | Code: d50323bf d65f03c0 d503233f aa1f03fe (d50323bf)
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reviewed-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Alexandru Elisei <alexandru.elisei@arm.com>
      Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20220913101732.3925290-5-mark.rutland@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      a1fafa3b
    • Mark Rutland's avatar
      arm64: consistently pass ESR_ELx to die() · 0f2cb928
      Mark Rutland authored
      Currently, bug_handler() and kasan_handler() call die() with '0' as the
      'err' value, whereas die_kernel_fault() passes the ESR_ELx value.
      
      For consistency, this patch ensures we always pass the ESR_ELx value to
      die(). As this is only called for exceptions taken from kernel mode,
      there should be no user-visible change as a result of this patch.
      
      For UNDEFINED exceptions, I've had to modify do_undefinstr() and its
      callers to pass the ESR_ELx value. In all cases the ESR_ELx value had
      already been read and was available.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Alexandru Elisei <alexandru.elisei@arm.com>
      Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Reviewed-by: default avatarMark Brown <broonie@kernel.org>
      Link: https://lore.kernel.org/r/20220913101732.3925290-4-mark.rutland@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      0f2cb928
    • Mark Rutland's avatar
      arm64: die(): pass 'err' as long · 18906ff9
      Mark Rutland authored
      Recently, we reworked a lot of code to consistentlt pass ESR_ELx as a
      64-bit quantity. However, we missed that this can be passed into die()
      and __die() as the 'err' parameter where it is truncated to a 32-bit
      int.
      
      As notify_die() already takes 'err' as a long, this patch changes die()
      and __die() to also take 'err' as a long, ensuring that the full value
      of ESR_ELx is retained.
      
      At the same time, die() is updated to consistently log 'err' as a
      zero-padded 64-bit quantity.
      
      Subsequent patches will pass the ESR_ELx value to die() for a number of
      exceptions.
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reviewed-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Alexandru Elisei <alexandru.elisei@arm.com>
      Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Link: https://lore.kernel.org/r/20220913101732.3925290-3-mark.rutland@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      18906ff9
    • Mark Rutland's avatar
      arm64: report EL1 UNDEFs better · b502c87d
      Mark Rutland authored
      If an UNDEFINED exception is taken from EL1, and do_undefinstr() doesn't
      find any suitable undef_hook, it will call:
      
      	BUG_ON(!user_mode(regs))
      
      ... and the kernel will report a failure witin do_undefinstr() rather
      than reporting the original context that the UNDEFINED exception was
      taken from. The pt_regs and ESR value reported within the BUG() handler
      will be from within do_undefinstr() and the code dump will be for the
      BRK in BUG_ON(), which isn't sufficient to debug the cause of the
      original exception.
      
      This patch makes the reporting better by having do_undefinstr() call
      die() directly in this case to report the original context from which
      the UNDEFINED exception was taken.
      
      Prior to this patch, an undefined instruction is reported as:
      
      | kernel BUG at arch/arm64/kernel/traps.c:497!
      | Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
      | Modules linked in:
      | CPU: 0 PID: 0 Comm: swapper Not tainted 5.19.0-rc3-00127-geff044f1b04e-dirty #3
      | Hardware name: linux,dummy-virt (DT)
      | pstate: 000000c5 (nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      | pc : do_undefinstr+0x28c/0x2ac
      | lr : do_undefinstr+0x298/0x2ac
      | sp : ffff800009f63bc0
      | x29: ffff800009f63bc0 x28: ffff800009f73c00 x27: ffff800009644a70
      | x26: ffff8000096778a8 x25: 0000000000000040 x24: 0000000000000000
      | x23: 00000000800000c5 x22: ffff800009894060 x21: ffff800009f63d90
      | x20: 0000000000000000 x19: ffff800009f63c40 x18: 0000000000000006
      | x17: 0000000000403000 x16: 00000000bfbfd000 x15: ffff800009f63830
      | x14: ffffffffffffffff x13: 0000000000000000 x12: 0000000000000019
      | x11: 0101010101010101 x10: 0000000000161b98 x9 : 0000000000000000
      | x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
      | x5 : ffff800009f761d0 x4 : 0000000000000000 x3 : ffff80000a2b80f8
      | x2 : 0000000000000000 x1 : ffff800009f73c00 x0 : 00000000800000c5
      | Call trace:
      |  do_undefinstr+0x28c/0x2ac
      |  el1_undef+0x2c/0x4c
      |  el1h_64_sync_handler+0x84/0xd0
      |  el1h_64_sync+0x64/0x68
      |  setup_arch+0x550/0x598
      |  start_kernel+0x88/0x6ac
      |  __primary_switched+0xb8/0xc0
      | Code: 17ffff95 a9425bf5 17ffffb8 a9025bf5 (d4210000)
      
      With this patch applied, an undefined instruction is reported as:
      
      | Internal error: Oops - Undefined instruction: 0 [#1] PREEMPT SMP
      | Modules linked in:
      | CPU: 0 PID: 0 Comm: swapper Not tainted 5.19.0-rc3-00128-gf27cfcc80e52-dirty #5
      | Hardware name: linux,dummy-virt (DT)
      | pstate: 800000c5 (Nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      | pc : setup_arch+0x550/0x598
      | lr : setup_arch+0x50c/0x598
      | sp : ffff800009f63d90
      | x29: ffff800009f63d90 x28: 0000000081000200 x27: ffff800009644a70
      | x26: ffff8000096778c8 x25: 0000000000000040 x24: 0000000000000000
      | x23: 0000000000000100 x22: ffff800009f69a58 x21: ffff80000a2b80b8
      | x20: 0000000000000000 x19: 0000000000000000 x18: 0000000000000006
      | x17: 0000000000403000 x16: 00000000bfbfd000 x15: ffff800009f63830
      | x14: ffffffffffffffff x13: 0000000000000000 x12: 0000000000000019
      | x11: 0101010101010101 x10: 0000000000161b98 x9 : 0000000000000000
      | x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
      | x5 : 0000000000000008 x4 : 0000000000000010 x3 : 0000000000000000
      | x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
      | Call trace:
      |  setup_arch+0x550/0x598
      |  start_kernel+0x88/0x6ac
      |  __primary_switched+0xb8/0xc0
      | Code: b4000080 90ffed80 912ac000 97db745f (00000000)
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Reviewed-by: default avatarMark Brown <broonie@kernel.org>
      Cc: Alexandru Elisei <alexandru.elisei@arm.com>
      Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Link: https://lore.kernel.org/r/20220913101732.3925290-2-mark.rutland@arm.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      b502c87d
  2. 28 Aug, 2022 25 commits
  3. 27 Aug, 2022 11 commits
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 10d4879f
      Linus Torvalds authored
      Pull thermal control fixes from Rafael Wysocki:
       "Fix two issues introduced recently and one driver problem leading to a
        NULL pointer dereference in some cases.
      
        Specifics:
      
         - Add missing EXPORT_SYMBOL_GPL in the thermal core and add back the
           required 'trips' property to the thermal zone DT bindings (Daniel
           Lezcano)
      
         - Prevent the int340x_thermal driver from crashing when a package
           with a buffer of 0 length is returned by an ACPI control method
           evaluated by it (Lee, Chun-Yi)"
      
      * tag 'thermal-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal/int340x_thermal: handle data_vault when the value is ZERO_SIZE_PTR
        dt-bindings: thermal: Fix missing required property
        thermal/core: Add missing EXPORT_SYMBOL_GPL
      10d4879f
    • Linus Torvalds's avatar
      Merge tag 'pm-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · b98f602d
      Linus Torvalds authored
      Pull power management fix from Rafael Wysocki:
       "Make __resolve_freq() check the presence of the frequency table
        instead of checking whether or not the ->target_index() callback is
        implemented by the driver, because that need not be the case when
        __resolve_freq() is used (Lukasz Luba)"
      
      * tag 'pm-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: check only freq_table in __resolve_freq()
      b98f602d
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 2b1ddb59
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix issues introduced by recent changes related to the handling
        of ACPI device properties and a coding mistake in the exit path of the
        ACPI processor driver.
      
        Specifics:
      
         - Prevent acpi_thermal_cpufreq_exit() from attempting to remove
           the same frequency QoS request multiple times (Riwen Lu)
      
         - Fix type detection for integer ACPI device properties (Stefan
           Binding)
      
         - Avoid emitting false-positive warnings when processing ACPI
           device properties and drop the useless default case from the
           acpi_copy_property_array_uint() macro (Sakari Ailus)"
      
      * tag 'acpi-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: property: Remove default association from integer maximum values
        ACPI: property: Ignore already existing data node tags
        ACPI: property: Fix type detection of unified integer reading functions
        ACPI: processor: Remove freq Qos request for all CPUs
      2b1ddb59
    • Linus Torvalds's avatar
      Merge tag 's390-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · dee18737
      Linus Torvalds authored
      Pull s390 fixes from Vasily Gorbik:
      
       - Fix double free of guarded storage and runtime instrumentation
         control blocks on fork() failure
      
       - Fix triggering write fault when VMA does not allow VM_WRITE
      
      * tag 's390-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/mm: do not trigger write fault when vma does not allow VM_WRITE
        s390: fix double free of GS and RI CBs on fork() failure
      dee18737
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.0-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 05519f24
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - two minor cleanups
      
       - a fix of the xen/privcmd driver avoiding a possible NULL dereference
         in an error case
      
      * tag 'for-linus-6.0-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/privcmd: fix error exit of privcmd_ioctl_dm_op()
        xen: move from strlcpy with unused retval to strscpy
        xen: x86: remove setting the obsolete config XEN_MAX_DOMAIN_MEMORY
      05519f24
    • Linus Torvalds's avatar
      Merge tag 'audit-pr-20220826' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit · 17b28d42
      Linus Torvalds authored
      Pull audit fix from Paul Moore:
       "Another small audit patch, this time to fix a bug where the return
        codes were not properly set before the audit filters were run,
        potentially resulting in missed audit records"
      
      * tag 'audit-pr-20220826' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
        audit: move audit_return_fixup before the filters
      17b28d42
    • Linus Torvalds's avatar
      Merge tag 'fbdev-for-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev · 89b749d8
      Linus Torvalds authored
      Pull fbdev fixes and updates from Helge Deller:
       "Mostly just small patches, with the exception of the bigger indenting
        cleanups in the sisfb and radeonfb drivers.
      
        Two patches should be mentioned though: A fix-up for fbdev if the
        screen resize fails (by Shigeru Yoshida), and a potential divide by
        zero fix in fb_pm2fb (by Letu Ren).
      
        Summary:
      
        Major fixes:
         - Revert the changes for fbcon console when vc_resize() fails
           [Shigeru Yoshida]
         - Avoid a potential divide by zero error in fb_pm2fb [Letu Ren]
      
        Minor fixes:
         - Add missing pci_disable_device() in chipsfb_pci_init() [Yang
           Yingliang]
         - Fix tests for platform_get_irq() failure in omapfb [Yu Zhe]
         - Destroy mutex on freeing struct fb_info in fbsysfs [Shigeru
           Yoshida]
      
        Cleanups:
         - Move fbdev drivers from strlcpy to strscpy [Wolfram Sang]
         - Indenting fixes, comment fixes, ... [Jiapeng Chong & Jilin Yuan]"
      
      * tag 'fbdev-for-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
        fbdev: fbcon: Properly revert changes when vc_resize() failed
        fbdev: Move fbdev drivers from strlcpy to strscpy
        fbdev: omap: Remove unnecessary print function dev_err()
        fbdev: chipsfb: Add missing pci_disable_device() in chipsfb_pci_init()
        fbdev: fbcon: Destroy mutex on freeing struct fb_info
        fbdev: radeon: Clean up some inconsistent indenting
        fbdev: sisfb: Clean up some inconsistent indenting
        fbdev: fb_pm2fb: Avoid potential divide by zero error
        fbdev: ssd1307fb: Fix repeated words in comments
        fbdev: omapfb: Fix tests for platform_get_irq() failure
      89b749d8
    • Mikulas Patocka's avatar
      provide arch_test_bit_acquire for architectures that define test_bit · d6ffe606
      Mikulas Patocka authored
      Some architectures define their own arch_test_bit and they also need
      arch_test_bit_acquire, otherwise they won't compile.  We also clean up
      the code by using the generic test_bit if that is equivalent to the
      arch-specific version.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Fixes: 8238b457 ("wait_on_bit: add an acquire memory barrier")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d6ffe606
    • Zhengjun Xing's avatar
      perf stat: Capitalize topdown metrics' names · 48648548
      Zhengjun Xing authored
      Capitalize topdown metrics' names to follow the intel SDM.
      
      Before:
      
       # ./perf stat -a  sleep 1
      
       Performance counter stats for 'system wide':
      
              228,094.05 msec cpu-clock                        #  225.026 CPUs utilized
                     842      context-switches                 #    3.691 /sec
                     224      cpu-migrations                   #    0.982 /sec
                      70      page-faults                      #    0.307 /sec
              23,164,105      cycles                           #    0.000 GHz
              29,403,446      instructions                     #    1.27  insn per cycle
               5,268,185      branches                         #   23.097 K/sec
                  33,239      branch-misses                    #    0.63% of all branches
             136,248,990      slots                            #  597.337 K/sec
              32,976,450      topdown-retiring                 #     24.2% retiring
               4,651,918      topdown-bad-spec                 #      3.4% bad speculation
              26,148,695      topdown-fe-bound                 #     19.2% frontend bound
              72,515,776      topdown-be-bound                 #     53.2% backend bound
               6,008,540      topdown-heavy-ops                #      4.4% heavy operations       #     19.8% light operations
               3,934,049      topdown-br-mispredict            #      2.9% branch mispredict      #      0.5% machine clears
              16,655,439      topdown-fetch-lat                #     12.2% fetch latency          #      7.0% fetch bandwidth
              41,635,972      topdown-mem-bound                #     30.5% memory bound           #     22.7% Core bound
      
             1.013634593 seconds time elapsed
      
      After:
      
       # ./perf stat -a  sleep 1
      
       Performance counter stats for 'system wide':
      
              228,081.94 msec cpu-clock                        #  225.003 CPUs utilized
                     824      context-switches                 #    3.613 /sec
                     224      cpu-migrations                   #    0.982 /sec
                      67      page-faults                      #    0.294 /sec
              22,647,423      cycles                           #    0.000 GHz
              28,870,551      instructions                     #    1.27  insn per cycle
               5,167,099      branches                         #   22.655 K/sec
                  32,383      branch-misses                    #    0.63% of all branches
             133,411,074      slots                            #  584.926 K/sec
              32,352,607      topdown-retiring                 #     24.3% Retiring
               4,456,977      topdown-bad-spec                 #      3.3% Bad Speculation
              25,626,487      topdown-fe-bound                 #     19.2% Frontend Bound
              70,955,316      topdown-be-bound                 #     53.2% Backend Bound
               5,834,844      topdown-heavy-ops                #      4.4% Heavy Operations       #     19.9% Light Operations
               3,738,781      topdown-br-mispredict            #      2.8% Branch Mispredict      #      0.5% Machine Clears
              16,286,803      topdown-fetch-lat                #     12.2% Fetch Latency          #      7.0% Fetch Bandwidth
              40,802,069      topdown-mem-bound                #     30.6% Memory Bound           #     22.6% Core Bound
      
             1.013683125 seconds time elapsed
      Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarXing Zhengjun <zhengjun.xing@linux.intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220825015458.3252239-1-zhengjun.xing@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      48648548
    • Kan Liang's avatar
      perf docs: Update the documentation for the save_type filter · 3126204c
      Kan Liang authored
      Update the documentation to reflect the kernel changes.
      Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220816125612.2042397-2-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3126204c
    • Ian Rogers's avatar
      perf sched: Fix memory leaks in __cmd_record detected with -fsanitize=address · d72e5cf3
      Ian Rogers authored
      An array of strings is passed to cmd_record but not freed. As
      cmd_record modifies the array, add another array as a copy that can be
      mutated allowing the original array contents to all be freed.
      
      Detected with -fsanitize=address.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220824145733.409005-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d72e5cf3