Skip to content

Commit

Permalink
[CHERI] Relax an overly strict assertion in cheri_tag_set_many
Browse files Browse the repository at this point in the history
This is currently called by DCZVA with all zero tag bits and was causing
assertions while running cheribsdtest in Jenkins. The TLBENTRYCAP_FLAG_TRAP
prevents writing non-zero tag bits, but the assertion was triggering for
any value of tags, so relax it to actually model the required condition.
  • Loading branch information
arichardson committed Jul 31, 2023
1 parent f701c80 commit 7ff6c5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion target/cheri-common/cheri_tagmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,11 @@ void cheri_tag_set_many(CPUArchState *env, uint32_t tags, target_ulong vaddr,
cheri_debug_assert(!(tagmem_flags & TLBENTRYCAP_FLAG_CLEAR) &&
"Unimplemented");

cheri_debug_assert(!(tagmem_flags & TLBENTRYCAP_FLAG_TRAP));
/*
* TLBENTRYCAP_FLAG_TRAP prevents writing non-zero tags, and should have
* trapped in probe_cap_write().
*/
assert(tags == 0 || !(tagmem_flags & TLBENTRYCAP_FLAG_TRAP));

cheri_debug_assert(tagmem);

Expand Down

0 comments on commit 7ff6c5a

Please sign in to comment.