Skip to content
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

Does not work when the Secure Boot is enabled (failed to get I/O permission) #127

Open
szydell opened this issue Nov 27, 2023 · 3 comments

Comments

@szydell
Copy link

szydell commented Nov 27, 2023

Distribution (run cat /etc/os-release):
NAME="Fedora Linux"
VERSION="39 (KDE Plasma)"
ID=fedora
VERSION_ID=39
VERSION_CODENAME=""
PLATFORM_ID="platform:f39"
PRETTY_NAME="Fedora Linux 39 (KDE Plasma)"

Related Application and/or Package Version (run apt policy $PACKAGE NAME):
Current version from the GitHub packaged for Fedora.

Issue/Bug Description:
[root@ ~]# system76-firmware-daemon
system76-firmware-daemon: failed to get I/O permission: Operation not permitted (os error 1)

The issue is related to Secure Boot and kernel lockdown. I was able to reproduce it and found a workaround. With the disabled secure boot, it works ok again.

As written in the man (https://man7.org/linux/man-pages/man2/iopl.2.html) usage of iopl is deprecated. Maybe there is a way to rewrite this part? :)

    if unsafe { libc::iopl(3) } < 0 {
        return Err(format!(
            "failed to get I/O permission: {}",
            io::Error::last_os_error()
        ));
    }

Steps to reproduce (if you know):
You can just run it on a system with enabled Secure Boot.

Expected behavior:
Run also on systems with enabled Secure Boot.

Other Notes:
Originally reported as an issue for Fedora copr package here: https://pagure.io/system76/system76-firmware/issue/1

@s373r
Copy link

s373r commented Jun 4, 2024

I have the exact same problem

@JLeemaster
Copy link

Same here

@tunix
Copy link

tunix commented Aug 4, 2024

Any chance that this may get fixed soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants