From 173e6c25b2937d6e6941973aa7b116e1d6405513 Mon Sep 17 00:00:00 2001 From: Léo Gourdin Date: Tue, 2 Nov 2021 10:10:34 +0100 Subject: Porting the BTL non-trap loads approach to RTL --- backend/ProfilingExploitproof.v | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'backend/ProfilingExploitproof.v') diff --git a/backend/ProfilingExploitproof.v b/backend/ProfilingExploitproof.v index 78de09af..292acc2a 100644 --- a/backend/ProfilingExploitproof.v +++ b/backend/ProfilingExploitproof.v @@ -126,23 +126,24 @@ Proof. rewrite <- H0. apply eval_operation_preserved. exact symbols_preserved. constructor; auto. (* load *) -- econstructor; split. - assert (eval_addressing tge sp addr rs ## args = Some a). - rewrite <- H0. apply eval_addressing_preserved. exact symbols_preserved. - eapply exec_Iload; eauto. - constructor; auto. -- (* load notrap1 *) - econstructor; split. - assert (eval_addressing tge sp addr rs ## args = None). - rewrite <- H0. apply eval_addressing_preserved. exact symbols_preserved. - eapply exec_Iload_notrap1; eauto. - constructor; auto. -- (* load notrap2 *) - econstructor; split. - assert (eval_addressing tge sp addr rs ## args = Some a). - rewrite <- H0. apply eval_addressing_preserved. exact symbols_preserved. - eapply exec_Iload_notrap2; eauto. - constructor; auto. +- inv H0. + + econstructor; split. + * eapply exec_Iload; eauto. eapply has_loaded_normal; eauto. + rewrite <- EVAL. apply eval_addressing_preserved. exact symbols_preserved. + * econstructor; eauto. + + destruct (eval_addressing) eqn:EVAL in LOAD. + * specialize (LOAD v). econstructor; split. + -- eapply exec_Iload; eauto. eapply has_loaded_default; eauto. + rewrite eval_addressing_preserved with (ge1:=ge). + intros a EVAL'; rewrite EVAL in EVAL'; inv EVAL'. apply LOAD; auto. + exact symbols_preserved. + -- econstructor; eauto. + * econstructor; split. + -- eapply exec_Iload; eauto. eapply has_loaded_default; eauto. + rewrite eval_addressing_preserved with (ge1:=ge). + intros a EVAL'; rewrite EVAL in EVAL'; inv EVAL'. + exact symbols_preserved. + -- econstructor; eauto. - (* store *) econstructor; split. assert (eval_addressing tge sp addr rs ## args = Some a). -- cgit