Merge ~bladernr/plainbox-provider-resource:1757143-module_resource_change into plainbox-provider-resource:master

Proposed by Jeff Lane 
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 9b79e227bc5abc54ffe8156d2d5740400c14ee78
Merged at revision: 3656735f91ef3877543186634a8a21cf70c59cae
Proposed branch: ~bladernr/plainbox-provider-resource:1757143-module_resource_change
Merge into: plainbox-provider-resource:master
Diff against target: 12 lines (+1/-0)
1 file modified
jobs/resource.pxu (+1/-0)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+341752@code.launchpad.net

Description of the change

This changes the module resource to be run as root.

On 4.13 and before, the /proc/modules file returned a memory offset of 0x00000000000 when the file was read by non-root users.

As of 4.15, however, this has changed and reading /proc/modules as a non-root user returns a null reference for each memory offset. This new behaviour causes the module_resource script to traceback (see linked bug).

I have tested this on both 4.15 (bionic) and 4.13 (xenial) and the behaviour is the same in both cases, and the script can be safely run as root in both cases.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

+1 thanks Jeff

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/resource.pxu b/jobs/resource.pxu
2index 790f2e8..dbcfd1f 100644
3--- a/jobs/resource.pxu
4+++ b/jobs/resource.pxu
5@@ -102,6 +102,7 @@ _summary: Collect information about system memory (/proc/meminfo)
6 id: module
7 estimated_duration: 0.13
8 plugin: resource
9+user: root
10 command: module_resource
11 _description: Generates resources info on running kernel modules
12 _summary: Collect information about kernel modules

Subscribers

People subscribed via source and target branches