For reference, sosreport in Noble (note the informational messages):

$ lsb_release -cs
No LSB modules are available.
noble

$ uname -r
6.8.0-49-generic

$ lsmod | grep msr
$ 

$ sudo cpupower info
System does not support Intel's performance bias setting
analyzing CPU 0:

$ lsmod | grep msr
msr                    12288  0

$ sudo modprobe -r msr

$ lsmod | grep msr
$ 

$ sudo sos report --batch --only-plugins processor
<...>
 Setting up plugins ...
[plugin:processor] skipped command 'cpupower frequency-info': required kmods 
missing: msr.
[plugin:processor] skipped command 'cpupower info': required kmods missing: msr.
[plugin:processor] skipped command 'cpupower idle-info': required kmods 
missing: msr.
[plugin:processor] skipped command 'turbostat --debug sleep 10': required kmods 
missing: msr.
 Running plugins. Please wait ...
<...>

$ lsmod | grep msr
$

$ sudo sos report --batch --only-plugins processor --allow-system-changes
<...>
 Setting up plugins ...
 Running plugins. Please wait ...
<...>

$ lsmod | grep msr
msr                    12288  0


** Description changed:

- .
+ [Impact]
+ 
+  * The 'processor' plugin in sosreport automatically
+    loads the 'msr' kernel module in Jammy and Focal,
+    when running the 'cpupower' command.
+    
+  * Ideally, running sosreport should not modify the
+    system state, but rather only collect information,
+    unless it is allowed with `--allow-system-changes`.
+    
+  * This change (already present in Noble and later)
+    checks whether the 'msr' module is loaded to run
+    the 'cpupower' command; and if it is not, simply
+    emit an informational message about it.
+ 
+ [ Test Plan ]
+ 
+  * Check whether sosreport's processor plugin loads
+    the 'msr' module. It should not, with this fix.
+    
+    $ sudo modprobe -r msr
+    $ sudo sos report --batch --only-plugins processor
+    $ lsmod | grep msr # expected: nothing
+    $
+    
+  * Check whether sosreport's processor plugin loads
+    the 'msr' module with the '--allow-system-changes'
+    option. It _should_, with this fix.
+ 
+    $ sudo modprobe -r msr
+    $ sudo sos report --batch --only-plugins processor \
+      --allow-system-changes
+    $ lsmod | grep msr # expected: match
+    msr <...>
+ 
+ [ Regression Potential ]
+ 
+  * This change affects some commands in the processor plugin.
+    Such commands might be impacted (e.g., not executed) or
+    the entire processor plugin might be impacted (errors).
+    Both cases are quick to identify in -proposed testing.
+ 
+ [ Other Info ]
+ 
+  * Users might have started to rely on this behavior.
+ 
+    However, this is non-standard behavior in sosreport,
+    which already implements the policy 'no system changes'
+    unless required with '--allow-system-changes', thus it
+    can be considered a bug.
+ 
+    Also, this policy usually provides more benefit than harm
+    (and is the expected behavior), specially in systems
+    that might be in a compromised state and run sosreport
+    for debugging purposes; and modifying the system state
+    might cause harm and further compromise/degradation.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2089713

Title:
  The processor plugin loads the msr module by default on jammy and
  focal

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sosreport/+bug/2089713/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to