Skip to content

Commit c0e98ef

Browse files
committed
[reasoner] Add max for secret w/o base adjusting
1 parent fcb2ec9 commit c0e98ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

reasoner/reasoner.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
(0xffff800000000000, 0xffffffff9fffffff)
2828
]
2929

30+
MAX_SECRET_WO_ADJUSTING_BASE = ((1 << 30) * 256) # 256 GB
31+
3032
CACHE_SHIFT = 6
3133
PAGE_SHIFT = 12
3234
ADDRESS_BIT_LEN = 64
@@ -170,6 +172,11 @@ def is_max_secret_too_high(t : pd.Series, only_independent: bool = False):
170172
else:
171173
valid_secret_max = (2 ** t['transmitted_secret_size']) - 1
172174

175+
# The secret will not fit in RAM without base adjusting if it
176+
# exceeds MAX_SECRET_WO_ADJUSTING_BASE
177+
if valid_secret_max > MAX_SECRET_WO_ADJUSTING_BASE:
178+
return True
179+
173180
for r in MAPPED_REGIONS:
174181

175182
if base_min <= base_max:

0 commit comments

Comments
 (0)