From 30488f4a29e9092e0d0dd304ec113dcc92e171f4 Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Wed, 17 Apr 2019 10:54:51 +0800 Subject: add a trackBranch option --- configs/common/CpuConfig.py | 5 +++++ configs/common/Options.py | 2 ++ 2 files changed, 7 insertions(+) (limited to 'configs') diff --git a/configs/common/CpuConfig.py b/configs/common/CpuConfig.py index 21dabdfa9..ec1f3692a 100644 --- a/configs/common/CpuConfig.py +++ b/configs/common/CpuConfig.py @@ -128,6 +128,11 @@ def config_scheme(cpu_cls, cpu_list, options): else: cpu.useIFT = False + if options.trackBranch: + cpu.trackBranch = True + else: + cpu.trackBranch = False + if len(options.scheme)!=0: cpu.simulateScheme = options.scheme else: diff --git a/configs/common/Options.py b/configs/common/Options.py index 89a8eda04..6bdfe5250 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -319,6 +319,8 @@ def addCommonOptions(parser): help="choose baseline or defense designs to evaluate") parser.add_option("--useIFT", default=None, action="store", type="int", help="Use information flow tracking.") + parser.add_option("--trackBranch", default=None, action="store", type="int", + help="Track tainted branches in information flow tracking.") parser.add_option("--needsTSO", default=None, action="store", type="int", help="Select TSO or RC. Set unzero to use TSO.") parser.add_option("--allowSpecBuffHit", default=None, action="store", -- cgit v1.2.3