Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917590 - x11-misc/sddm: mounting /proc with hidepid=2 breaks shutdown of machine from X11/sddm/kde
Summary: x11-misc/sddm: mounting /proc with hidepid=2 breaks shutdown of machine from ...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: LxQt maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-19 11:05 UTC by Herbert Wantesh
Modified: 2023-11-26 00:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Herbert Wantesh 2023-11-19 11:05:52 UTC
when i add the mount option hidepid=0 for /proc, the shutdown of kde/X11 is broken and the xsession hangs instead of shutting the machine down. i don't know if it's elogind or kde/X11 realted

Reproducible: Always

Steps to Reproduce:
1. mount /proc with hidepid=0
2. start kde from sddm
3. select "shutdown" from menu
Actual Results:  
all gui parts get closed, only a black screen is shown and i can still move the mouse cursor

Expected Results:  
the machine shuts down

a logout of the kde session works as expected, therefore it seems to me it's elogind related.

I use openrc, elogind and X11
Comment 1 genBTC 2023-11-19 17:02:48 UTC
From the kernel documentation:
"hidepid=off or hidepid=0 means classic mode - everybody may access all /proc/<pid>/ directories (default)."

hidepid=0 or off, means default behavior, all /proc access is allowed. unchanged.

Please double check and confirm what I think you are saying - that you setting the parameter to 0, which should already be at defaults, somehow causes misbehavior ?
Comment 2 Herbert Wantesh 2023-11-20 10:53:53 UTC
this was a typo - i ment hidepid=2
Comment 3 genBTC 2023-11-20 20:19:12 UTC
hidepid=2 may be unsupported and special consideration always needs to be taken into account.

and I believe its Elogind related. try this suggestion:
https://wiki.gentoo.org/wiki/Elogind/en#Conflict_when_using_hidepid_in_proc

It explains the use of the gid= param to assign groups special /proc permissions.
Add a "gid=polkitd" mount option

Reasoning:
"If hidepid= option is used then some system services like (PolicyKit or D-Bus) are not able to query information about the clients which are connecting to them. This is because all these services run as non-privileged (i.e. euid != 0) and hence don't see needed information in /proc/[pid] directory of the client, unless the client runs under the same uid which is never the case (at least for PolicyKit and D-Bus)."
(sourced from this: https://security.stackexchange.com/a/267658 )

There might also be other daemons running as alternate users that need other groups tweaked too. GL
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-26 00:34:54 UTC
I feel like this is working as expected...