Skip to content

Commit d02add2

Browse files
committed
Create revocations.efi to deliver new sbat level requirements
This covers delivering updates to SBAT_LEVEL without the need to create and sign a new shim Signed-off-by: Jan Setje-Eilers <[email protected]>
1 parent e1e8bd5 commit d02add2

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

Makefile

+18-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ $(OBJCOPY) --add-section ".$(patsubst %.csv,%,$(1))=$(1)" $(2)
5555
endef
5656

5757
SBATPATH = $(TOPDIR)/data/sbat.csv
58+
SBATLEVELLATESTPATH = $(TOPDIR)/data/sbat_level_latest.csv
59+
SBATLEVELPREVIOUSPATH = $(TOPDIR)/data/sbat_level_previous.csv
5860
VENDOR_SBATS := $(sort $(foreach x,$(wildcard $(TOPDIR)/data/sbat.*.csv data/sbat.*.csv),$(notdir $(x))))
5961

6062
OBJFLAGS =
@@ -84,7 +86,7 @@ ifeq ($(ARCH),arm)
8486
BUILDFLAGS += -ffreestanding -I$(shell $(CC) -print-file-name=include)
8587
endif
8688

87-
all : certmule.efi
89+
all : certmule.efi revocations.efi
8890

8991
certmule.so : sbat_data.o certmule.o
9092
certmule.so : SOLIBS=
@@ -94,6 +96,15 @@ certmule.efi : OBJFLAGS = --strip-unneeded $(call VENDOR_DB, $<)
9496
certmule.efi : SECTIONS=.text .reloc .db .sbat
9597
certmule.efi : VENDOR_DB_FILE?=db.esl
9698

99+
revocations.so : sbat_data.o revocations.o
100+
revocations.so : SOLIBS=
101+
revocations.so : SOFLAGS=
102+
revocations.efi : OBJFLAGS = --strip-unneeded
103+
revocations.efi : SECTIONS=.text .reloc .sbat .sbatlevellatest .sbatlevelprevious
104+
105+
revocations.o : certmule.o
106+
cp certmule.o revocations.o
107+
97108
%.efi : %.so
98109
ifneq ($(OBJCOPY_GTE224),1)
99110
$(error objcopy >= 2.24 is required)
@@ -109,6 +120,12 @@ sbat_data.o : /dev/null
109120
$(OBJCOPY) --add-section .sbat=$(SBATPATH) \
110121
--set-section-flags .sbat=contents,alloc,load,readonly,data \
111122
$@
123+
$(OBJCOPY) --add-section .sbatlevellatest=$(SBATLEVELLATESTPATH) \
124+
--set-section-flags .sbatlevellatest=contents,alloc,load,readonly,data \
125+
$@
126+
$(OBJCOPY) --add-section .sbatlevelprevious=$(SBATLEVELPREVIOUSPATH) \
127+
--set-section-flags .sbatlevelprevious=contents,alloc,load,readonly,data \
128+
$@
112129
$(foreach vs,$(VENDOR_SBATS),$(call add-vendor-sbat,$(vs),$@))
113130

114131
%.so : %.o

data/sbat_level_latest.csv

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sbat,1,2022111500
2+
shim,2
3+
grub,3

data/sbat_level_previous.csv

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sbat,1,2022052400
2+
grub,2

0 commit comments

Comments
 (0)