-
Notifications
You must be signed in to change notification settings - Fork 16
Add support for local verification #239
base: dev
Are you sure you want to change the base?
Conversation
…nd safeguards against using the cached results for extraction
@@ -79,7 +79,7 @@ FSTAR_HINTS ?= --use_hints --use_hint_hashes --record_hints | |||
# verify... see https://github.com/FStarLang/FStar/issues/1652 | |||
FSTAR_NO_FLAGS = $(FSTAR_HOME)/bin/fstar.exe $(FSTAR_HINTS) \ | |||
--odir $(OUTPUT_DIR) --cache_checked_modules $(FSTAR_INCLUDES) --cmi \ | |||
--already_cached 'Prims FStar LowStar C Spec.Loops TestLib WasmSupport Hacl EverCrypt Vale LowParse Lib Spec -FStar.Old.Endianness -FStar.Test -C.Compat' \ | |||
--already_cached 'Prims FStar LowStar C Spec.Loops TestLib WasmSupport LowParse -FStar.Old.Endianness -FStar.Test -C.Compat' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't you have "did not expect module XXX to be checked" errors with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are only warnings e.g. Did not expected EverCrypt.HKDF to be already checked, but found it in an unexpected location ...
(sic). I believe it will behave as before except for these warnings.
@@ -16,7 +16,10 @@ INCLUDE_PATHS = \ | |||
$(QD_HOME)/src/lowparse \ | |||
$(MITLS_HOME)/src/parsers/generated \ | |||
$(MITLS_HOME)/src/tls \ | |||
$(MITLS_HOME)/src/tls/obj |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you remember or understand why obj needs to be on the include path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is only needed to benefit from the cache in interactive mode. I think we can add it only in -in
targets, but I'm not absolutely sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can. I removed it.
…lied by --cache-dir option
This adds support for verification of modules in
mitls-fstar
without having to first buildhacl-star
.The trick is to verify dependencies in
hacl-star
, if needed, withoutproviders/evercrypt/fst
in scope. The results are cached locally and used for verification, but can't be used for extraction becausemitls-fstar
relies on--cmi
to e.g. inlineEverCrypt.StaticConfig
andEverCrypt.TargetConfig
definitions, and for soundness of extraction ofStackInline
functions such asEverCrypt.Hash.alloca
.This PR will
$(HACL_HOME)/obj/
haven't been generated, informing the user to runmake -C $(HACL_HOME) vale-fst
first.$(HACL_HOME)/obj/EverCrypt.fsti.checked
doesn't exist, which suggests thathacl-star
hasn't been built. The warning tells thathacl-star
dependencies will be verified as needed and that cached results can't be used for extraction.hacl-star
dependencies, informing the user to delete them and buildhacl-star
first.Thanks @nik and @msprotz for suggesting this could be useful and discussing solutions.