Bug 28312 - NetLink process events doesn't work in mageia kernels
Summary: NetLink process events doesn't work in mageia kernels
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal major
Target Milestone: Mageia 8
Assignee: Kernel and Drivers maintainers
QA Contact:
URL:
Whiteboard: MGA7TOO
Keywords: Triaged
Depends on:
Blocks:
 
Reported: 2021-02-07 17:51 CET by Patrick G
Modified: 2021-02-16 16:25 CET (History)
1 user (show)

See Also:
Source RPM: kernel-5.10.13-2.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Patrick G 2021-02-07 17:51:31 CET
Description of problem:
I tried to trace fork(2) and other process related events using forkstat and similar tools. 
But no event arrives over the socket. debug shows that it hangs indefinitely in recv(2).


Version-Release number of selected component (if applicable):
All kernels flavors of Mageia 7 and 8.

How reproducible:
Permanent

Steps to Reproduce:
1. Download a tool like forkstat (procmon or others)  and build it
2. run it 
3. No event is reported.

That's due to the kernel config. 
It turns out that CONFIG_PROC_EVENTS is a prerequisite for these events being generated. but it's unset in all flavors of Mageia kernel (desktop, linus and server). 

CONFIG_PROC_EVENTS depends on CONFIG_CONNECTOR = y.
In mga kernels, CONFIG_CONNECTOR = m (module) so CONFIG_PROC_EVENTS doesn't even appear in Kconfig.
So it even can't be loaded as a module.

Thus the require change to the config looks as follows:
-CONFIG_CONNECTOR=m
+# forkstat requires this
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y

Well, default value for CONFIG_PROC_EVENTS is y if CONFIG_CONNECTOR=y so the second line is maybe unnecessary.

Some references:
https://cateee.net/lkddb/web-lkddb/PROC_EVENTS.html
https://github.com/torvalds/linux/blob/master/drivers/connector/Kconfig
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/tree/drivers/connector/Kconfig
Comment 1 Thomas Backlund 2021-02-07 17:59:14 CET
thanks for the report, it will be fixed in upcoming 5.10.14-1

Assignee: bugsquad => kernel

Comment 2 Aurelien Oudelet 2021-02-07 18:01:16 CET
Hi, thanks for reporting this.
Already assigned to the package group maintainer.

(In reply to Thomas Backlund from comment #1)
> thanks for the report, it will be fixed in upcoming 5.10.14-1

Many thanks!

Keywords: (none) => Triaged
Status: NEW => ASSIGNED
CC: (none) => ouaurelien

Aurelien Oudelet 2021-02-07 18:01:33 CET

Version: 8 => Cauldron
Target Milestone: --- => Mageia 8

Comment 3 Thomas Backlund 2021-02-07 18:18:46 CET
the same fix will be pushed along with next mga7 kernel update

Whiteboard: (none) => MGA7TOO

Comment 4 Thomas Backlund 2021-02-07 20:25:54 CET
For Cauldron/Mga8,  kernel-5.10.14-1.mga8 is built and is mirroring out.

For Mga7,  kernel-5.10.14-1.mga7 is currently building, heading to updates_testing

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

Comment 5 Patrick G 2021-02-16 16:25:18 CET
Tested in Mga7.
Thanks, it works like a charm :)

Note You need to log in before you can comment on or make changes to this bug.