-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snap-confine: Only attempt to copy/mount NVIDIA libs when NVIDIA is used #3975
Conversation
This hasn't _yet_ presented an issue in full confinement environments, as the only fully confined environment available is Ubuntu, and the snaps being tested are also built using the Ubuntu libraries. This change will now only make the NVIDIA libraries available if the nvidia kernel module is loaded and present, to ensure that confined snaps running on open source drivers will not run into any linking issues by exposing the host GL library into the runtime. Signed-off-by: Ikey Doherty <ikey@solus-project.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Codecov Report
@@ Coverage Diff @@
## master #3975 +/- ##
==========================================
+ Coverage 75.97% 75.98% +<.01%
==========================================
Files 423 423
Lines 36505 36505
==========================================
+ Hits 27734 27737 +3
+ Misses 6833 6830 -3
Partials 1938 1938
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you. One question inline, basicly I'm wondering if the detection method is stable over time.
@@ -33,6 +33,8 @@ | |||
#include "../libsnap-confine-private/string-utils.h" | |||
#include "../libsnap-confine-private/utils.h" | |||
|
|||
#define SC_NVIDIA_DRIVER_VERSION_FILE "/sys/module/nvidia/version" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How stable is this name? For how long is iit available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are already using it and it is present in all the driver versions out there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya I just moved the existing define in the file to be available where I need it, but the name is stable for loaded kernel module.
This hasn't yet presented an issue in full confinement environments,
as the only fully confined environment available is Ubuntu, and the snaps
being tested are also built using the Ubuntu libraries.
This change will now only make the NVIDIA libraries available if the nvidia
kernel module is loaded and present, to ensure that confined snaps running
on open source drivers will not run into any linking issues by exposing the
host GL library into the runtime.
Signed-off-by: Ikey Doherty ikey@solus-project.com