]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/kexec_file.c
drm/i915: Save the old CDCLK atomic state
[mirror_ubuntu-bionic-kernel.git] / kernel / kexec_file.c
index e5bcd94c1efb13db5daa12d7dd188279ea25c1a1..0f6a40488fbb2cdc8f4a315b29d1dfd50bd45dba 100644 (file)
@@ -255,6 +255,13 @@ SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, initrd_fd,
        if (!capable(CAP_SYS_BOOT) || kexec_load_disabled)
                return -EPERM;
 
+       /* Don't permit images to be loaded into trusted kernels if we're not
+        * going to verify the signature on them
+        */
+       if (!IS_ENABLED(CONFIG_KEXEC_VERIFY_SIG) &&
+           kernel_is_locked_down("kexec of unsigned images"))
+               return -EPERM;
+
        /* Make sure we have a legal set of flags */
        if (flags != (flags & KEXEC_FILE_FLAGS))
                return -EINVAL;