summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-11-14 09:48:34 -0800
committerBrian Norris <briannorris@chromium.org>2019-11-14 21:32:55 +0000
commit49428f49143ba0357693f4ace9b169ce63cfa42c (patch)
tree63ad7c007a13a4206ac5add9f881793488754cb7 /Makefile
parent54fc81cf692dbcb4496fa9664103564a9c386c05 (diff)
downloadvboot-49428f49143ba0357693f4ace9b169ce63cfa42c.tar.gz
crossystem: Add a fake workbuffer for the fake context
crossystem functions just make up a fake vb2_context for calling into things like vb2_nv_init(), but that function actually accesses vb2_shared_data as well. This used to work because vb2_get_sd() would return NULL in that case and vb2_nv_init() actually checks for that, but with the persistent context model this is no longer possible and making up directly allocated contexts is always illegal. This patch adds a small fake workbuffer to the fake context so we can have real backing storage for shared data. (This might not be the final way we want to fix it but should work as a quick band-aid over the crashes.) Also remove the now pointless (sd == NULL) checks from vb2_nv_init(). BRANCH=None BUG=chromium:1024732 TEST=make runtests Change-Id: I91247013f092bbfc41cf1974b82cf70a29fa4734 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1917486 Tested-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Brian Norris <briannorris@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3519b7e7..e857875f 100644
--- a/Makefile
+++ b/Makefile
@@ -481,6 +481,7 @@ HOSTLIB_SRCS = \
cgpt/cgpt_prioritize.c \
cgpt/cgpt_show.c \
firmware/2lib/2common.c \
+ firmware/2lib/2context.c \
firmware/2lib/2crc8.c \
firmware/2lib/2hmac.c \
firmware/2lib/2nvstorage.c \