GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - CKAndroidProject/unicorn-kitty: 魔改的unicorn分支,增加了信号回调等机制,给unidbg增强用的

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

2,730 Commits
2,730 Commits

Folders and files

NameName
Last commit message
Last commit date
bindings
bindings
 
 
docs
docs
 
 
glib_compat
glib_compat
 
 
include
include
 
 
msvc
msvc
 
 
qemu
qemu
 
 
samples
samples
 
 
tests
tests
 
 
.clang-format
.clang-format
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
AUTHORS.TXT
AUTHORS.TXT
 
 
Brewfile
Brewfile
 
 
CMakeLists.txt
CMakeLists.txt
 
 
COPYING
COPYING
 
 
COPYING.LGPL2
COPYING.LGPL2
 
 
COPYING_GLIB
COPYING_GLIB
 
 
CREDITS.TXT
CREDITS.TXT
 
 
Cargo.toml
Cargo.toml
 
 
ChangeLog
ChangeLog
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
TODO
TODO
 
 
bundle_static.cmake
bundle_static.cmake
 
 
format.sh
format.sh
 
 
go.mod
go.mod
 
 
list.c
list.c
 
 
mingw-w64.cmake
mingw-w64.cmake
 
 
symbols.sh
symbols.sh
 
 
uc.c
uc.c
 
 

Repository files navigation

Unicorn Engine (unicorn-kitty)

A fork of Unicorn Engine 2 that adds the AArch64 user-mode fidelity the unidbg unicorn2 backend relies on.

This branch tracks zhkl0228/unicorn branch unicorn2 (itself a fork of unicorn-engine/unicorn). It is maintained as the engine behind unidbg's optional unicorn2 backend, and is published separately so that the backend can clone just this engine instead of vendoring the full QEMU/Unicorn source tree. Everything else is unchanged upstream Unicorn; the original project README is preserved in full below.

Table of Contents

  • Background
  • Install
  • Usage
  • Maintainers
  • Contributing
  • License

Background

The base unicorn2 branch leaves several pieces of ARM64 user-mode behaviour to the embedder. When unidbg runs an Android native library, code inside the guest can observe where the emulator diverges from a real ARM64 device. This fork closes those gaps so the guest sees the same architectural and kernel behaviour it would on hardware. Each change is a self-contained commit, tagged in the source with a unidbg: comment that states what it does.

  • EL0 privilege boundary. System instructions (MRS/MSR/SYS/SYSL) reach the embedder's hook over the whole encoding space, including MSR with an immediate. The translation block ends after a hooked system instruction. ERET, HVC and SMC are undefined at EL0, as is LDP with the same destination register twice.
  • Pointer authentication. Key setup through uc_arm64_cp_reg, with FEAT_FPAC faults gated on the selected CPU model.
  • SVE. Usable at every vector length the model reports, rather than the empty vector-length map the base branch leaves behind.
  • Instruction counting and limits. uc_ctl can read the number of guest instructions executed since uc_open, and stop emulation before the block that would pass a given limit. Blocks are translated with the check only while a limit is in use, so there is no cost otherwise.
  • Precise memory faults. Emulation stops at the faulting access with the guest state restored, instead of at the start of the block.
  • Translation cache coherence. Cached translations are dropped when the host writes to executable memory, when a region is unmapped, when a region loses execute permission, and when a code, block or memory hook is added. mprotect applies to cached translations and TLB entries.
  • MinGW heap corruption fix. qemu_vfree releases memory the way qemu_memalign allocated it (port of upstream a5fa5480).

New uc_ctl control values are placed at 0x7f00 and above, away from the upstream enumeration, so that values added upstream do not collide with them.

Install

Clone this branch and build the static library the same way as upstream Unicorn (see the original README's build instructions below):

git clone -b unidbg https://github.com/GitKittys/unicorn-kitty ~/git/unicorn

Usage

This engine is consumed by the unidbg unicorn2 backend, whose build script clones the branch above and links the resulting libunicorn static library. The build steps for each target platform (macOS, Linux, Windows) are described in backend/unicorn2/README.md in the unidbg repository. The C API is the upstream Unicorn 2 API plus the uc_ctl instruction-count controls noted above; see the original documentation below for the base API.

Maintainers

@kittydoze

Contributing

This fork exists to serve the unidbg unicorn2 backend; changes here are driven by that backend's needs. For the engine itself, upstream unicorn-engine/unicorn and zhkl0228/unicorn are the primary projects. Issues and pull requests specific to the unidbg fidelity changes are welcome on this repository.

License

GPL-2.0, the same as upstream Unicorn Engine. State the license owner per the original project; see COPYING for the full text.

The original Unicorn Engine README follows.


Unicorn Engine

pypi downloads Fuzzing Status

Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework, based on QEMU.

Unicorn offers some unparalleled features:

  • Multi-architecture: ARM, ARM64 (ARMv8), M68K, MIPS, PowerPC, RISCV, SPARC, S390X, TriCore and X86 (16, 32, 64-bit)
  • Clean/simple/lightweight/intuitive architecture-neutral API
  • Implemented in pure C language, with bindings for Crystal, Clojure, Visual Basic, Perl, Rust, Ruby, Python, Java, .NET, Go, Delphi/Free Pascal, Haskell, Pharo, and Lua.
  • Native support for Windows & *nix (with Mac OSX, Linux, Android, *BSD & Solaris confirmed)
  • High performance via Just-In-Time compilation
  • Support for fine-grained instrumentation at various levels
  • Thread-safety by design
  • Distributed under free software license GPLv2

Further information is available at http://www.unicorn-engine.org

License

This project is released under the GPL license.

Compilation & Docs

See docs/COMPILE.md file for how to compile and install Unicorn.

More documentation is available in docs/README.md.

Contact

Contact us via mailing list, email or twitter for any questions.

Contribute

If you want to contribute, please pick up something from our Github issues.

We also maintain a list of more challenged problems in milestones for our regular release.

CREDITS.TXT records important contributors of our project.

About

魔改的unicorn分支,增加了信号回调等机制,给unidbg增强用的

Resources

Readme
License

Security policy

Security policy
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.