[PATCH v10 0/3] Support for LuaJIT scripting

2017-08-02 Thread Victor Krapivensky
Changelog: * Moved C cdata functions and constants to a separate strace.C namespace to reduce confusion (which functions return Lua booleans and which boxed ones?) and get rid of weird names like "path_match_arr". * New strace.C.{pers_names,pers_wordsize,pers_klongsize} constants. * Fixed case whe

[PATCH v10 1/3] Initial support for LuaJIT scripting

2017-08-02 Thread Victor Krapivensky
* .gitignore: Add luajit_lib.h. * Makefile.am: Build with LuaJIT if configured so. (strace_SOURCES): Add defs_shared.h, ffi.h. (luajit_lib.h): Auto-generate from luajit_lib.lua. * configure.ac: Add new --with-luajit configure option. * defs.h (TCB_AD_HOC_INJECT): new TCB flag. (QUAL_HOOK_ENTRY, QUA

[PATCH v10 2/3] Introduce upoken function and expose it to LuaJIT scripts

2017-08-02 Thread Victor Krapivensky
This patch implies that we have process_vm_writev if and only if we have process_vm_readv, and that they are either both supported or both unsupported. * defs.h: Add declaration for upoken. * luajit.h (func_upoke): New wrapper function. (init_luajit): Expose it as strace.C.upoke. * luajit_lib.lua

[PATCH v10 3/3] tests: check LuaJIT scripting support

2017-08-02 Thread Victor Krapivensky
* tests/.gitignore: Add lua. * tests/Makefile.am (check_PROGRAMS): Likewise. (LUAJIT_TESTS): New variable. (TESTS): Add LUAJIT_TESTS. (EXTRA_DIST): Add lua.sh, lua-basics.test, lua-qual.test, lua-tampering.test. * tests/lua-basics.test: New file. * tests/lua-qual.test: Likewise. * tests/lua-tamperi

Victor Krapivensky's GSoC status report - #9 of 13

2017-08-02 Thread Victor Krapivensky
Hello, strace community! Project: advanced syscall tampering and filtering with Lua/LuaJIT. Accomplishments: this week, I've changed a number of things in the Lua API, exposed personality names/word sizes/kernel long sizes to Lua scripts, and fixed the tests. I keep in mind all the issues pointe

Re: [PATCH v6 9/9] Add stacktrace filter action

2017-08-02 Thread Masatake YAMATO
Works fine. Really nice! This is what I have wanted. Why don't you update strace.1 ? $ ./strace -e 'stacktrace(syscall lseek)' u-ctags strace.c ... write(3, "ed_log\tstrace.c\t/^static FILE *s"..., 4096) = 4096 write(3, "me:void\nfputs_unlocked\tstrace.c\t"..., 4096) = 4096 mu