Skip to content

Commit

Permalink
feat: enforce kernel lockdown for UKI
Browse files Browse the repository at this point in the history
UKI is meant to be for UEFI Secure Boot, so it's expected to enforce
kernel lockdown. We might reconsider in the future to use a kernel patch
instead: SUSE/kernel@b1a0314

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
  • Loading branch information
smira committed Jul 22, 2023
1 parent 4d96d64 commit 5e13caf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/ukify/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func run() error {
return err
}

if err := defaultCmdline.AppendAll(kernelpkg.SecureBootArgs); err != nil {
return err
}

if err := defaultCmdline.AppendAll(metal.KernelArgs().Strings()); err != nil {
return err
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/machinery/kernel/kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ var DefaultArgs = []string{
"ima_hash=sha512",
}

// SecureBootArgs returns the kernel commandline options required for secure boot.
var SecureBootArgs = []string{
"lockdown=confidentiality",
}

// Param represents a kernel system property.
type Param struct {
Key string
Expand Down

0 comments on commit 5e13caf

Please sign in to comment.