Patch "powerpc/perf/hv-24x7: Update domain value check" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    powerpc/perf/hv-24x7: Update domain value check

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     powerpc-perf-hv-24x7-update-domain-value-check.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0c89ef68495a35df188fe010301714b2da6f65c0
Author: Kajol Jain <kjain@xxxxxxxxxxxxx>
Date:   Fri Aug 25 11:26:01 2023 +0530

    powerpc/perf/hv-24x7: Update domain value check
    
    [ Upstream commit 4ff3ba4db5943cac1045e3e4a3c0463ea10f6930 ]
    
    Valid domain value is in range 1 to HV_PERF_DOMAIN_MAX. Current code has
    check for domain value greater than or equal to HV_PERF_DOMAIN_MAX. But
    the check for domain value 0 is missing.
    
    Fix this issue by adding check for domain value 0.
    
    Before:
      # ./perf stat -v -e hv_24x7/CPM_ADJUNCT_INST,domain=0,core=1/ sleep 1
      Using CPUID 00800200
      Control descriptor is not initialized
      Error:
      The sys_perf_event_open() syscall returned with 5 (Input/output error) for
      event (hv_24x7/CPM_ADJUNCT_INST,domain=0,core=1/).
      /bin/dmesg | grep -i perf may provide additional information.
    
      Result from dmesg:
      [   37.819387] hv-24x7: hcall failed: [0 0x60040000 0x100 0] => ret
      0xfffffffffffffffc (-4) detail=0x2000000 failing ix=0
    
    After:
      # ./perf stat -v -e hv_24x7/CPM_ADJUNCT_INST,domain=0,core=1/ sleep 1
      Using CPUID 00800200
      Control descriptor is not initialized
      Warning:
      hv_24x7/CPM_ADJUNCT_INST,domain=0,core=1/ event is not supported by the kernel.
      failed to read counter hv_24x7/CPM_ADJUNCT_INST,domain=0,core=1/
    
    Fixes: ebd4a5a3ebd9 ("powerpc/perf/hv-24x7: Minor improvements")
    Reported-by: Krishan Gopal Sarawast <krishang@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Kajol Jain <kjain@xxxxxxxxxxxxx>
    Tested-by: Disha Goel <disgoel@xxxxxxxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://msgid.link/20230825055601.360083-1-kjain@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index 33c23225fd545..7dda59923ed6a 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -1431,7 +1431,7 @@ static int h_24x7_event_init(struct perf_event *event)
 	}
 
 	domain = event_get_domain(event);
-	if (domain >= HV_PERF_DOMAIN_MAX) {
+	if (domain  == 0 || domain >= HV_PERF_DOMAIN_MAX) {
 		pr_devel("invalid domain %d\n", domain);
 		return -EINVAL;
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux