valour01 / examiner Goto Github PK
View Code? Open in Web Editor NEWA framework that can automatically locate inconsistent instructions between real devices and emulators for ARM
License: BSD 3-Clause "New" or "Revised" License
A framework that can automatically locate inconsistent instructions between real devices and emulators for ARM
License: BSD 3-Clause "New" or "Revised" License
The tool does not analyze whole conditions specified in the ASL code. For instance, the method isUnpredictable()
of InstEncoding
(in instrs2asl.py
):
>>> all_encodings['aarch32_ADD_i_T3_A'].isUnpredictable('11110001000000100000110000100100')
if (d == 15 && !setflags) || n == 15 then UNPREDICTABLE
d == 15 Converted to: d == 15
n == 15 Converted to: n == 15
d == 15 Converted to: d == 15
// Armv8-A removes UNPREDICTABLE for R13
whether 11110001000000100000110000100100 meets d == 15 Converted to: d == 15 for aarch32/ADD_i/T3_A
related variable d
init variable d = BitVec('d',32)
related variable Rd
True
In the above example the tool does not consider the value of the setflags
variable at all.
When launching the generate_insts_from_asl()
function of instrs2asl.py
, the tool crashes on MRS and MSR instructions:
Traceback (most recent call last):
File "<stdin>", line 8, in <module>
File "/XXX/mra_tools/bin/instrs2asl.py", line 981, in generate_insts
for condition in self.conditions:
File "/XXX/mra_tools/bin/instrs2asl.py", line 1137, in solve
File "<string>", line 1
SYSm == SYSm<0>
SyntaxError: invalid syntax
The method isUnpredictable()
of InstEncoding
(in instrs2asl.py
) incorrectly recognizes instruction streams as unpredictable. For example:
>>> all_encodings['aarch32_ADD_i_T3_A'].isUnpredictable('11110001000000100000110000100100')
if (d == 15 && !setflags) || n == 15 then UNPREDICTABLE
d == 15 Converted to: d == 15
n == 15 Converted to: n == 15
d == 15 Converted to: d == 15
// Armv8-A removes UNPREDICTABLE for R13
whether 11110001000000100000110000100100 meets d == 15 Converted to: d == 15 for aarch32/ADD_i/T3_A
related variable d
init variable d = BitVec('d',32)
related variable Rd
True # <-- False expected
According to the ARM documentation, the stream 11110001000000100000110000100100
is a valid and predictable ADD (immediate) T3 instruction.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.