Merge lp://staging/~timp87/lightdm-gtk-greeter/opt-mem-lock into lp://staging/lightdm-gtk-greeter

Proposed by Pavel Timofeev
Status: Rejected
Rejected by: Sean Davis
Proposed branch: lp://staging/~timp87/lightdm-gtk-greeter/opt-mem-lock
Merge into: lp://staging/lightdm-gtk-greeter
Diff against target: 41 lines (+5/-1)
3 files modified
data/lightdm-gtk-greeter.conf (+2/-0)
src/greeterconfiguration.h (+1/-0)
src/lightdm-gtk-greeter.c (+2/-1)
To merge this branch: bzr merge lp://staging/~timp87/lightdm-gtk-greeter/opt-mem-lock
Reviewer Review Type Date Requested Status
Sean Davis Pending
Review via email: mp+373117@code.staging.launchpad.net

Commit message

Provide an ability to turn off memory locking in LightDM GTK+ Greeter.

Description of the change

LightDM has had the same option since 2012.
Turning off that option in LightDM hardly makes sense if a greeter locks memory unconditionally.
This may be useful on platform where amount of memory a user may lock is limited and/or there is no swap at all.

More thoughts about mlockall(2) in LightDM GTK+ Greeter (and probably in LightDM):
- Why the code doesn't check if mlockall(2) was successful? If not swapping a password really matters then it definitely should do check returned value and do something with that, like exitting or logging an error at least. I hit this on FreeBSD, for example, mlockall was failed, but the LightDM GTK+ Greeter code run further coredumping eventually.
- Why actually mlockall(2) to lock *all* memory? Isn't it more appropriate to lock only those pages that hold user sensitive information (password, anything else?). Do we need all that code in memory all the time? What for?

To post a comment you must log in.
Revision history for this message
Pavel Timofeev (timp87) wrote :

Oh, 2.0.7 has totally removed mlock.
It's nice to contribute to this project.
Never gonna do this again.

Revision history for this message
Sean Davis (bluesabre) wrote :

Sorry for not seeing your merge request sooner. It's unfortunate, but there's only one active maintainer for this project (myself) and I'm stretched thin.

We introduced mlockall and also removed it following the mainline lightdm greeters. This was motivated by testing on the Raspberry Pi, where it was found to not run at all in a high memory pressure environment.

Marking your MR as rejected to close it out. Thanks for the contribution.

Unmerged revisions

479. By Pavel Timofeev

Provide an ability to turn off memory locking in LightDM GTK+ Greeter.
LightDM has had the same option since 2012. Turning off that option in LightDM hardly makes sennse if a greeter locks memory unconditionally.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: