Commit Graph

569 Commits

Author SHA1 Message Date
Nguyen Anh Quynh
84c6f0d82f cleanup 2020-06-08 18:32:31 +08:00
Nguyen Anh Quynh
df8237175f some more cleanup 2020-06-08 11:18:52 +08:00
Nguyen Anh Quynh
68f2bdc641 more cleanup for Makefile 2020-06-08 10:06:34 +08:00
Nguyen Anh Quynh
09d42b408a remove more dead files 2020-06-08 10:00:06 +08:00
Nguyen Anh Quynh
411648eb0c cleanup x86 code 2020-06-08 08:30:36 +08:00
Chen Huitao
c09adf5b7b
remove apci, default-congfigs (#1288)
* remove apic files. update make and cmake.

* remove default-configs dir.

* fix a mem-leak bug. remove owner arg in memory.
2020-06-08 08:21:44 +08:00
Nguyen Anh Quynh
a8f724010b cleanup disable code (from the commit removing qom qobject) 2020-06-07 23:51:44 +08:00
chenhuitao
6fc4fc41ec update cmake. remove warnings. 2020-06-07 04:57:03 +08:00
chenhuitao
a51715734a update PPC objs. only build libdecnumber while PPC is enabled. 2020-06-07 04:25:07 +08:00
chenhuitao
4ba2b30d18 Merge remote-tracking branch 'upstream/next' into next 2020-06-07 03:54:22 +08:00
chenhuitao
37e325643b remove qobject, qapi, qom... 2020-06-07 03:53:10 +08:00
Dominik Maier
7bd93c0d74 fix error handling of mmap() calls (#1283) 2020-06-06 12:52:36 +08:00
Nguyen Anh Quynh
b33c0afa63 save cpu->jmp_env in saving context, so uc_emu_start() can be reentrant. also improved Python binding on handling context 2020-06-06 12:52:00 +08:00
Nguyen Anh Quynh
b69126612d delete qemu/target-ppc/pointer_fix.py 2020-05-28 09:45:29 +08:00
Stuart Dootson
9bfa40184c
Make MSVC happy with the new PowerPC code (#1271)
* Fix 64-bit enums for MSVC

As Windows has 32 bit ints (x86 or x64), enums in the Microsoft C compiler are only 32 bits. The PPC machine description uses 64 bit enum values, which won't work for MSVC. Replace them with #defines

* Add `ffs` implementation for Microsoft C/C++

* Remove GCC function attributes for non-GCC compilers

* Add macro to provide MSVC definition of strncasecmp

* Workaround MSVC pre-processor deficiencies

The MSVC preprocessor doesn't appear to like having a #if/#endif within a macro invocation. To placate it, surround two instances of the macro invocation (with appropriately different arguments!) with #if/#else/#endif
2020-05-28 01:26:03 +08:00
Nguyen Anh Quynh
f77bdb3c7e ppc: remove unused files 2020-05-27 15:53:51 +08:00
Nguyen Anh Quynh
8cbbf3df42 powerpc: chmod -x source files 2020-05-27 15:32:14 +08:00
Nguyen Anh Quynh
ad1d9156f3 chmod -x for PPC files 2020-05-27 15:17:39 +08:00
Nguyen Anh Quynh
17e7c80eba cleanup & fix qemu/header_gen.py 2020-05-27 14:43:12 +08:00
Nguyen Anh Quynh
5b25f3f53e Merge branch 'master' of https://github.com/simigo79/unicorn-ppc into next 2020-05-27 14:02:32 +08:00
Simon Gorchakov
7e66419c03 Fixed more warnings. 2020-05-26 22:00:29 +03:00
Catena cyber
71a4ab4a6f
Removes some bugs found by oss-fuzz (#1266)
Leak on breakpoints
Undefined shift in ARM
2020-05-26 20:52:40 +08:00
Simon Gorchakov
0e8b6a8bba Fixed warnings. 2020-05-25 23:28:25 +03:00
BrunoPujos
6cad700b69
fix recursive UC_HOOK_MEM callbacks for cross pages access (#1113)
Co-authored-by: bruno <bruno>
Co-authored-by: Nguyen Anh Quynh <aquynh@gmail.com>
2020-05-25 16:22:28 +08:00
Catena cyber
690ada5f6a
Oss-fuzz ideal integration (#1265)
* Adds oss-fuzz badge

* Generic fix for watchpoints leak
2020-05-23 09:59:30 +08:00
Chen Huitao
17cfef0e56
fix some oss-fuzz (#1259)
* fix oss-fuzz 22107.

* fix oss-fuzz 22112.

* clean up build target.

* fix oss-fuzz 22226.

* fix oss-fuzz 22227.

* fix oss-fuzz 11640.

* fix oss-fuzz 20772.

* remove warning.

* fix oss-fuzz 10459.
2020-05-22 21:58:39 +08:00
Simon Gorchakov
e55b25c744 Removed warning about missing interrupt controller. 2020-05-21 22:10:25 +03:00
Catena cyber
216c348c35
Oss-fuzz ideal integration (#1262)
* Fix watchpoint leak in ARM

* Builds fuzz targets with sanitizer support

* Builds fuzz targets with directory driver

* Adds script to dowlonad public corpus

* Adds CIfuzz

To checks Pull Requests with fuzzing

* Use static library for fuzz targets

* Less verbose logs for fuzz driver directory
2020-05-21 16:15:12 +08:00
Chen Huitao
2c66acf4ee
fix #1246 (#1254)
* fix finding python path which only has python3.

* fix #1246, arm host issue.

* skip assembler tests on non-x86 host.

* update macro of dummy value.

* fix MSVC macro.

* update dummy array value macro.

* restore to original qemu code.
2020-05-18 19:57:44 +08:00
Chen Huitao
08240d5453
fix some oss-fuzz (#1258)
* fix oss-fuzz 22107.

* fix oss-fuzz 22112.

* clean up build target.

* fix oss-fuzz 22226.

* fix oss-fuzz 22227.

* fix oss-fuzz 11640.

* fix oss-fuzz 20772.
2020-05-16 10:38:16 +08:00
Simon Gorchakov
fd44c670cb Indented with spaces, not tabs 2020-05-15 09:52:31 +03:00
Simon Gorchakov
5c55aa2d56 Fix UC_HOOK_CODE 2020-05-14 23:46:16 +03:00
Simon Gorchakov
425efda77e Remove debug message causing python check failure 2020-05-11 23:55:26 +03:00
Simon Gorchakov
65188be06f Fix some warnings 2020-05-11 23:13:47 +03:00
Simon Gorchakov
ea26926b60 Fix ffs() in MinGW 2020-05-11 23:10:19 +03:00
Simon Gorchakov
7e413d2fcf Fix conflict with aarch64 2020-05-11 23:09:08 +03:00
Chen Huitao
18a187b8f8
fix some oss-fuzz (#1255)
* fix oss-fuzz 22107.

* fix oss-fuzz 22112.

* clean up build target.
2020-05-12 01:27:47 +08:00
Simon Gorchakov
279483ec29 Fix ffs() argument type problem. 2020-05-10 22:32:51 +03:00
Simon Gorchakov
76a3ebdc03 Fix no return value error. 2020-05-10 22:31:20 +03:00
Nguyen Anh Quynh
f988a41369 x86: support read/write to ST registers 2020-05-11 00:24:58 +08:00
el poto rico
149121539b
[arm64] Add some cool registers (#1253)
I've added the following registers to the API:

 * PSTATE
 * Exception link registers (ELR_ELx)
 * Stack pointers registers (SP_ELx)
 * MMU (TTBRn_EL1)
 * Exception syndrom registers (ESR_ELx)
 * Faulting virtual address registers (FAR_ELx)
 * PAR (PAR_EL1)
 * MAIR (MAIR_EL1)
 * Vector base address registers (VBAR_ELx)
2020-05-10 21:50:00 +08:00
Simon Gorchakov
a6c9b41c68 Initial update for PPC 2020-05-08 21:54:29 +03:00
BAYET
881e08da01
Fix UAF when deleting hook while in hook callback #1127 (#1130)
* Handle the cpu context save in a more pythonic way, so the context can be serialized and reuse in an other process using the same emulator architecture and modes

* Fix type error ; mistakes a size_t uint64_t ; breaks in 32bit...

* Fix the UAF situation when deleting a hook while being in a hook callback. Added an attribute 'to_delete' to hooks, and a list hooks_to_del to delay the free of the hooks

* Minor fixes ; forgot return type of clear_deleted_hooks ; do not declare variable in for predicate
2020-05-07 14:24:48 +08:00
Chen Huitao
f435efd4a7
fix some oss-fuzz (#1249)
* fix oss-fuzz 21012.

* fix oss-fuzz 21741.

* fix oss-fuzz 21743.
2020-05-05 11:11:59 +08:00
Dominik Maier
625399774c
X64 base regs (#1166)
* x86: setup FS & GS base

* Fixed base register writes for x64, removed then for x16/x32 (the don't exist there?)

* FS reg comes before GS so the base regs do so, too

* added shebang to const_generator.py

* Added base regs to and added 'all' support to const_generator

Co-authored-by: naq <aquynh@gmail.com>
2020-05-05 08:34:51 +08:00
Charles Ferguson
b7e64f3c99
Fix block hooks being called twice after an early exit from execution. (#1194)
Ensure the TCG exit flag is cleared at the end of cpu_exec. This ensures
that subsequent calls are not polluted by the prior call to request an
early exit. The symptoms of the problem being addressed here are that
after a cpu_exit call triggered within a hook there may still be a
pending tcg_exit_req flag set. This then causes a block to start its
execution and then be aborted (from which point it'll continue because
there's no other condition to service). The start of the execution
causes the block hook to be called, no actual code to be run, and then
the block started again with another block hook call.

This change is discussed in ticket 1193:
    https://github.com/unicorn-engine/unicorn/issues/1193
2020-05-05 08:32:12 +08:00
Nguyen Anh Quynh
0cd66bab8a fix qemu/scripts/qapi-build.sh 2020-04-30 14:00:48 +08:00
Nguyen Anh Quynh
00bbe2ce7d we do not need Python to build anymore 2020-04-30 13:58:33 +08:00
Nguyen Anh Quynh
27167a8ccb delete unused qemu/scripts/qapi-event.py 2020-04-30 11:13:28 +08:00
Nguyen Anh Quynh
0d93f055b4 cleanup qemu/configure 2020-04-28 16:46:41 +08:00