Skip to content

Commit

Permalink
[reasoner] Add max for secret w/o base adjusting
Browse files Browse the repository at this point in the history
  • Loading branch information
SanWieb committed Feb 20, 2024
1 parent fcb2ec9 commit c0e98ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions reasoner/reasoner.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
(0xffff800000000000, 0xffffffff9fffffff)
]

MAX_SECRET_WO_ADJUSTING_BASE = ((1 << 30) * 256) # 256 GB

CACHE_SHIFT = 6
PAGE_SHIFT = 12
ADDRESS_BIT_LEN = 64
Expand Down Expand Up @@ -170,6 +172,11 @@ def is_max_secret_too_high(t : pd.Series, only_independent: bool = False):
else:
valid_secret_max = (2 ** t['transmitted_secret_size']) - 1

# The secret will not fit in RAM without base adjusting if it
# exceeds MAX_SECRET_WO_ADJUSTING_BASE
if valid_secret_max > MAX_SECRET_WO_ADJUSTING_BASE:
return True

for r in MAPPED_REGIONS:

if base_min <= base_max:
Expand Down

0 comments on commit c0e98ef

Please sign in to comment.