Patch "tools/power turbostat: Fix warning upon failed /dev/cpu_dma_latency read" has been added to the 6.8-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

    tools/power turbostat: Fix warning upon failed /dev/cpu_dma_latency read

to the 6.8-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:
     tools-power-turbostat-fix-warning-upon-failed-dev-cp.patch
and it can be found in the queue-6.8 subdirectory.

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



commit f49e1d6c9722cf351d7c2844e1f53f22a39eee0d
Author: Len Brown <len.brown@xxxxxxxxx>
Date:   Fri Jan 19 12:25:42 2024 -0600

    tools/power turbostat: Fix warning upon failed /dev/cpu_dma_latency read
    
    [ Upstream commit b6fe938317eed58e8c687bd5965a956e15fb5828 ]
    
    Previously a failed read of /dev/cpu_dma_latency erroneously complained
    turbostat: capget(CAP_SYS_ADMIN) failed, try "# setcap cap_sys_admin=ep ./turbostat
    
    This went unnoticed because this file is typically visible to root,
    and turbostat was typically run as root.
    
    Going forward, when a non-root user can run turbostat...
    Complain about failed read access to this file only if --debug is used.
    
    Signed-off-by: Len Brown <len.brown@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index a4a40a6e1b957..3438ad938d7e4 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -5545,7 +5545,8 @@ void print_dev_latency(void)
 
 	fd = open(path, O_RDONLY);
 	if (fd < 0) {
-		warnx("capget(CAP_SYS_ADMIN) failed, try \"# setcap cap_sys_admin=ep %s\"", progname);
+		if (debug)
+			warnx("Read %s failed", path);
 		return;
 	}
 




[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