Hi everybody! My name is Victor Krapivensky and I am a first-year
student at MIPT.
I want to implement Lua-scriptable advanced syscall tampering for
strace.
I am quite fluent in C, have an interest in system programming and
debugging, and have good understanding of how Lua C API works.
I have
o, how do I get syscall numbers for all the platforms?
On 03/07/2017 01:10 AM, Dmitry V. Levin wrote:
Hi Victor, > > On Sun, Mar 05, 2017 at 06:31:31PM +0300, Victor Krapivensky
wrote: >> Hi everybody! My name is Victor Krapivensky and I am a
first-year >> student at MIPT. >>
tests because of this -- oops!)
>From e8754de2791ddb6c79fd51a49c83582c9d9a01d7 Mon Sep 17 00:00:00 2001
From: Victor Krapivensky
Date: Thu, 9 Mar 2017 20:26:14 +0300
Subject: [PATCH v2] Add support for statx syscall
---
Makefile.am | 1 +
linux/32/syscallent.h | 1
happens
to be negative.
[1]
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/stat.h#n45
>From c6f6914254aad88baa98c89d6a955fa8189822ca Mon Sep 17 00:00:00 2001
From: Victor Krapivensky
Date: Thu, 9 Mar 2017 20:26:14 +0300
Subject: [PATCH v3] Add suppo
Removed a trailing semicolon in a macro definition in tests/xstatx.c
and changed copyright holders of new files to "The strace developers".
Please review this one.
I've also found a possile buffer overflow bug in unwind.c. Attaching a
separate patch.
On 03/10/2017 09:59 PM, Vic
* Makefile.am (strace_SOURCES): Add statx.c and stat.h.
* linux/i386/syscallent.h: Add statx entry.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* pathtrace.c (pathtrace_match): Handle SEN_statx.
* statx.c: New file.
* statx.h: Likewise.
* tests/.gitignore: Add statx.
* xlat/usagewho.in: Add RUSAGE_THREAD.
* tests/getrusage.c: Test decoding of RUSAGE_THREAD.
---
tests/getrusage.c | 21 +++--
xlat/usagewho.in | 1 +
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/tests/getrusage.c b/tests/getrusage.c
index 8b76eff..ba1a7ef 10064
* xlat/usagewho.in: Add values for existing values, add RUSAGE_THREAD.
* tests/getrusage.c: Test decoding of RUSAGE_THREAD.
---
tests/getrusage.c | 31 +--
xlat/usagewho.in | 7 ---
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/tests/getrusage.c
* xlat/usagewho.in: Add values for existing entities, add
RUSAGE_THREAD.
* tests/getrusage.c: Test decoding of RUSAGE_THREAD.
---
tests/getrusage.c | 31 +--
xlat/usagewho.in | 7 ---
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/tests/getrusage.
On Thu, Mar 16, 2017 at 04:27:26AM +0300, Dmitry V. Levin wrote:
> This blank line at the end has caused this "git am" response:
>
> Applying: Implement decoding of statx syscall
> .git/rebase-apply/patch:385: new blank line at EOF.
> +
> fatal: 1 line adds whitespace errors.
> Patch failed at 000
* linux/i386/syscallent.h [383]: Add statx entry.
* linux/x32/syscallent.h [332]: Likewise.
* linux/x86_64/syscallent.h [332]: Likewise.
* pathtrace.c (pathtrace_match): Handle SEN_statx.
* statx.c: New file.
* statx.h: Likewise.
* Makefile.am (strace_SOURCES): Add them.
* tests/.gitignore: Add sta
* linux/i386/syscallent.h [383]: Add statx entry.
* linux/x32/syscallent.h [332]: Likewise.
* linux/x86_64/syscallent.h [332]: Likewise.
* pathtrace.c (pathtrace_match): Handle SEN_statx.
* statx.c: New file.
* statx.h: Likewise.
* Makefile.am (strace_SOURCES): Add them.
* tests/.gitignore: Add sta
On Sat, Mar 18, 2017 at 04:00:50AM +0300, Dmitry V. Levin wrote:
> I suggest placing AT_STATX_SYNC_TYPE before AT_STATX_FORCE_SYNC
> so we could use printflags.
I don't see any sense in that:
AT_STATX_{SYNC_AS_STAT,FORCE_SYNC,DONT_SYNC} are mutually exclusive, and
statx called with flags=AT_STATX_
On Sat, Mar 18, 2017 at 10:44:09AM +0100, Eugene Syromyatnikov wrote:
> I haven't look at v7 of the patch yet, but coverage [1] shows that at least
> this line is not covered by the test.
The version of the patch you run coverage on is very old (it still has
reserved2 field of struct_statx of size
* linux/i386/syscallent.h [383]: Add statx entry.
* linux/x32/syscallent.h [332]: Likewise.
* linux/x86_64/syscallent.h [332]: Likewise.
* pathtrace.c (pathtrace_match): Handle SEN_statx.
* statx.c: New file.
* statx.h: Likewise.
* Makefile.am (strace_SOURCES): Add them.
* tests/.gitignore: Add sta
Oops. Just realized that ~STATX_ALL and ~STATX_NLINK produce
platform-dependent values. Please ignore v8 and review v9 instead.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashd
* linux/i386/syscallent.h [383]: Add statx entry.
* linux/x32/syscallent.h [332]: Likewise.
* linux/x86_64/syscallent.h [332]: Likewise.
* pathtrace.c (pathtrace_match): Handle SEN_statx.
* statx.c: New file.
* statx.h: Likewise.
* Makefile.am (strace_SOURCES): Add them.
* tests/.gitignore: Add sta
The first draft of my proposal can be found here:
https://gist.github.com/shdown/a1f3f2bce1210f55389bacf406030b25
As for now, it is incomplete (does not even contain schedule) and will
surely be updated and enhanced later.
Please provide some feedback.
--
On Thu, Mar 30, 2017 at 05:28:55AM +0200, Eugene Syromyatnikov wrote:
> The one quite interesting aspect, from my point of view, is the way you
> expect to access (and modify) argument data. For example, some syscalls
> (like sendmsg or evdev/dm ioctls or siginfo-related ones) have quite
> non-triv
On Wed, Apr 12, 2017 at 04:28:19PM +0300, Dmitry V. Levin wrote:
> Linux commit v4.11-rc6~5^2^2~1 has added STATX__RESERVED bit.
Should we actually do something about this one?
Also, it is OK that linux/xtensa/syscallent.h does not contain entries
for syscalls 348...350 (pkey_{mprotect,alloc,fre
* linux/32/syscallent.h [291]: Add statx entry.
* linux/64/syscallent.h [291]: Likewise.
* linux/arm/syscallent.h [397]: Likewise.
* linux/m68k/syscallent.h [379]: Likewise.
* linux/mips/syscallent-n32.h [6330]: Likewise.
* linux/mips/syscallent-n64.h [5326]: Likewise.
* linux/mips/syscallent-o32.h
On Fri, May 12, 2017 at 05:12:38PM +0200, Eugene Syromiatnikov wrote:
> They are not in conflict, from my point of view, since your project is
> about the way specific syscall is selected for processing by strace,
> and Victor's project is about how that processing is done. Granted, this
> processi
This is a preparation needed to implement a pull-style API for LuaJIT.
---
strace.c | 336 +--
1 file changed, 198 insertions(+), 138 deletions(-)
diff --git a/strace.c b/strace.c
index aee2097..10fa1bf 100644
--- a/strace.c
+++ b/strace
On Wed, May 31, 2017 at 06:58:07PM +0300, Dmitry V. Levin wrote:
> I'm very much in favour of this change, it makes the control flow easier
> to understand. Technically, this patch looks correct, although I've spend
> a lot of my reviewing time to get to this conclusion. Next time when you
> do r
This is a preparation needed to implement a pull-style API for LuaJIT.
---
strace.c | 351 ++-
1 file changed, 211 insertions(+), 140 deletions(-)
diff --git a/strace.c b/strace.c
index 42650ab..0d3c8e9 100644
--- a/strace.c
+++ b/strace
This change decouples waiting for next event from reacting to it. This
makes the control flow easier to understand, and serves as a preparation
for implementing a pull-style API for LuaJIT.
* strace.c (enum trace_event): New enum.
(trace): Split into...
(next_event, dispatch_event): ...new functio
Victor Krapivensky (2):
syscall.c: split trace_syscall() into 5 functions
strace.c: move termination code to a separate function
defs.h| 21
strace.c | 50 --
syscall.c | 82
This change removes the trace_syscall function. Now, the code that uses
syscall.c trace functions is expected to check whether it is a syscall
entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make an
appropriate sequence of function calls.
* defs.h: Change comment on TCB_INSYSCALL,
This will be needed for the pull-style API.
* strace.c (terminate): New function.
(main): Use it.
---
strace.c | 30 ++
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/strace.c b/strace.c
index 55c6fe76..2657bcf7 100644
--- a/strace.c
+++ b/strace.c
@@
On Mon, Jun 05, 2017 at 02:47:41AM +0300, Dmitry V. Levin wrote:
> Why "static inline"? Is it important whether the function is actually
> inlined or not? If not, no need to insist on inlining.
OK, removed "inline".
> Why syscall_entering_decode was given this name? It does get_scno,
> get_sys
This change removes the trace_syscall function. Now, the code that uses
syscall.c trace functions is expected to check whether it is a syscall
entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make an
appropriate sequence of function calls.
* defs.h: Change comment on TCB_INSYSCALL,
This will be needed for the pull-style API.
* strace.c (terminate): New function.
(main): Use it.
---
strace.c | 28
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/strace.c b/strace.c
index af5fd346..5accb141 100644
--- a/strace.c
+++ b/strace.c
@@ -2
Victor Krapivensky (2):
syscall.c: split trace_syscall() into 5 functions
strace.c: move termination code to a separate function
defs.h| 21
strace.c | 48 +++--
syscall.c | 82
On Mon, Jun 05, 2017 at 02:35:23PM +0300, Dmitry V. Levin wrote:
> Where are you going to call the exiting hook from? Is it going to happen
> before get_regs/get_syscall_result calls or after them?
Oops. Yes, it should be called after we decode syscall result, of
course.
As for naming, I think "
This change removes the trace_syscall function. Now, the code that uses
syscall.c trace functions is expected to check whether it is a syscall
entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make an
appropriate sequence of function calls.
* defs.h: Change comment on TCB_INSYSCALL,
On Mon, Jun 05, 2017 at 06:14:49PM +0300, Dmitry V. Levin wrote:
> Your comments tend to be longer than 80 symbols, please wrap them.
>
> Note that in this edition of the patch TCB_INSYSCALL is cleared in
> syscall_exiting_finish, not in syscall_exiting_trace. Please ensure
> that other related c
This change removes the trace_syscall function. Now, the code that uses
syscall.c trace functions is expected to check whether it is a syscall
entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make an
appropriate sequence of function calls.
* defs.h: Change comment on TCB_INSYSCALL,
Hello, strace community!
Accomplishments: this week I've submitted a number of patches that
enable implementing a pull-style API for LuaJIT. I've had two exams this
week, and this has affected my work on this project.
Next week, I hope to implement initial support for LuaJIT hooking, with
next_sc
This change removes the trace_syscall function. Now, the code that uses
syscall.c trace functions is expected to check whether it is a syscall
entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make an
appropriate sequence of function calls.
* defs.h: Change comment on TCB_INSYSCALL,
The script is expected to call strace.next_sc() in a infinite loop,
e.g.:
while true do strace.next_sc() end
next_sc() returns a LuaJIT wrapper for struct tcb *, so one can access
fields exposed to LuaJIT.
Victor Krapivensky (1):
Initial support for Lua scripting
Makefile.am | 6
* Makefile.am: Build with LuaJIT if configured so.
(strace_SOURCES): Add defs_reuse.h.
* configure.ac: Add new --with-luajit configure option.
* defs.h: Move code that needs to be fed to LuaJIT's FFI to...
* defs_reuse.h: ...new file.
* strace.c: Initial support for Lua scripting.
(init): New -l op
Hello, strace community!
Project: advanced syscall tampering and filtering with Lua/LuaJIT.
Accomplishments: this week, I've implemented initial support for LuaJIT
hooking. It can be found at [1], and is probably not ready to be merged
yet. It can do things like
strace.hook('open', 'entering',
On Thu, Jun 15, 2017 at 05:28:53PM +0200, Eugene Syromiatnikov wrote:
> Do you really consider multiple -l arguments in a command line an error
> incompatible with continuation of strace execution?
Well, yes. We don't support multiple scripts, and specifying multiple -l
arguments is a usage error.
On Thu, Jun 15, 2017 at 05:39:25PM +, Eugene Syromyatnikov wrote:
> On Thu, Jun 15, 2017 at 3:28 PM, Eugene Syromiatnikov wrote:
> > Overall looks good.
>
> Well, except that mpers_defs.h also has STRINGIFY() macro and
> undef'ing it in defs_reuse.h leads to breaking of mpers header
> generat
This change also defines currpers field of struct tcb if LuaJIT is
enabled, even if SUPPORTED_PERSONALITIES == 1.
* Makefile.am: Build with LuaJIT if configured so.
(strace_SOURCES): Add defs_tcb.h, syscall_class.h.
* configure.ac: Add new --with-luajit configure option.
* defs.h (QUAL_HOOK_ENTRY,
On Fri, Jun 16, 2017 at 02:46:22PM +, Eugene Syromyatnikov wrote:
> Well, I don't consider having a commonly used stringification macro a
> namespace pollution.
But that's exactly what's happened -- I chose a name without prefix,
#undef'd it at the end of the header, and relied on that it woul
On Mon, Jun 19, 2017 at 12:36:41AM +0300, Dmitry V. Levin wrote:
> Do we need so many different stringify macros?
> Could we harmonize them somehow?
Well, we can't just place them into defs.h because sysent.h, but not
defs.h, is included by some tests/ files.
We could move all the STRINGIFY/#ifde
Hello, strace community!
Project: advanced syscall tampering and filtering with Lua/LuaJIT.
Accomplishments: this week I've implemented the next prototype of
LuaJIT scripting support and the helper library, and have been thinking
over further details.
My work has been affected by the exams. Next
On Tue, Jun 20, 2017 at 04:25:23AM +0300, Dmitry V. Levin wrote:
> I think you can use "void *priv;" here.
C standard doesn't guarantee sizeof(function pointer) == sizeof(void *).
--
Check out the vibrant tech community o
On Tue, Jun 20, 2017 at 10:40:58AM +0300, Dmitry V. Levin wrote:
> > C standard doesn't guarantee sizeof(function pointer) == sizeof(void *).
>
> The alignment of pointers is usually different from the alignment of chars.
OK, changed it to a void *.
--
On Tue, Jun 20, 2017 at 04:23:11AM +0300, Dmitry V. Levin wrote:
> I don't mind some preprocessor magic as well as a prefix, but FFI_ prefix
> looks quite specific
Could you please elaborate? What do you mean by "specific"?
> while different parts of strace could benefit from
> uniformly named ST
Signal/error (both by number and by name)/return value injection,
altering tracing options and hooking by syscall class are supported now.
The helper library now provides a number of useful functions.
Victor Krapivensky (1):
Initial support for LuaJIT scripting
Makefile.am | 9
* Makefile.am: Build with LuaJIT if configured so.
(strace_SOURCES): Add defs_shared.h, ffi.h, syscall_class.h.
* configure.ac: Add new --with-luajit configure option.
* defs.h (TCB_AD_HOC_INJECT): new TCB flag.
(QUAL_HOOK_ENTRY, QUAL_HOOK_EXIT): new qual flags.
(struct tcb): If built with LuaJIT s
Fixed a memory leak (tcp's ad_hoc_inject_opts not being freed in
droptcb()).
Victor Krapivensky (1):
Initial support for LuaJIT scripting
Makefile.am | 9 ++
configure.ac| 36
defs.h | 52 +++
defs_shared.h | 58
ffi.h
* Makefile.am: Build with LuaJIT if configured so.
(strace_SOURCES): Add defs_shared.h, ffi.h, syscall_class.h.
* configure.ac: Add new --with-luajit configure option.
* defs.h (TCB_AD_HOC_INJECT): new TCB flag.
(QUAL_HOOK_ENTRY, QUAL_HOOK_EXIT): new qual flags.
(struct tcb): If built with LuaJIT s
> The patch renames one stringify macro and introduces two more temporary
> stringify macros. If this doesn't signal that we need a strace-wide
> stringify macro, then I don't know what does.
OK. Should I put it into defs.h, or create a new file for that?
---
* Makefile.am: Build with LuaJIT if configured so.
(strace_SOURCES): Add defs_shared.h, ffi.h.
* configure.ac: Add new --with-luajit configure option.
* defs.h (TCB_AD_HOC_INJECT): new TCB flag.
(QUAL_HOOK_ENTRY, QUAL_HOOK_EXIT): new qual flags.
(struct tcb): If built with LuaJIT support, include c
Hello, strace community!
Project: advanced syscall tampering and filtering with Lua/LuaJIT.
Accomplishments: this week I've implemented signal/error/return value
injection and altering trace options from within Lua scripts, and a
number of useful function in the helper Lua library. I've also wire
On Thu, Jun 29, 2017 at 02:46:11PM +0700, Nikolay Marchuk wrote:
> This change introduces new filtering architecture primitives: filter,
> filter_action and bool_expression. It also changes processing of -e
> strace option. Now, filtering is done after decoding of syscall and
> tcp->qual_flg stores
On Mon, Jul 03, 2017 at 03:03:15PM +0300, Eugene Syromiatnikov wrote:
> On Thu, Jun 29, 2017 at 02:46:14PM +0700, Nikolay Marchuk wrote:
> > * filter_action.c (default_flags, clear_default_flags): Add default flags.
> > (add_action): Use action type as argument. Clear default flags.
> > (filter_sys
* Makefile.am: Build with LuaJIT if configured so.
(strace_SOURCES): Add defs_shared.h, ffi.h.
* configure.ac: Add new --with-luajit configure option.
* defs.h (TCB_AD_HOC_INJECT): new TCB flag.
(QUAL_HOOK_ENTRY, QUAL_HOOK_EXIT): new qual flags.
(struct tcb): If built with LuaJIT support, include c
Now with a section in the man page and theoretical support for
non-LuaJIT Lua interpreters (no support for this in the helper library
yet).
Victor Krapivensky (1):
Initial support for LuaJIT scripting
Makefile.am | 8 ++
configure.ac | 36 +++
defs.h| 53
Hello, strace community!
Project: advanced syscall tampering and filtering with Lua/LuaJIT.
Accomplishments: this week I've written the LUAJIT SCRIPTING section for
the strace man page, cleaned up some things (got rid of struct
strace_luajit_funcs), and written strace.read_obj, strace.read_str, a
On Tue, Jul 04, 2017 at 11:31:49PM +0300, Dmitry V. Levin wrote:
> This longish C string is actually a lua script, and it doesn't look nice
> in this form. Wouldn't it be better if this script was translated into
> a C string automatically by some Makefile rule?
Yes, it would. In fact, this is wha
On Wed, Jul 05, 2017 at 06:17:59PM +0300, Dmitry V. Levin wrote:
> On Wed, Jul 05, 2017 at 05:28:53PM +0300, Victor Krapivensky wrote:
> > On Tue, Jul 04, 2017 at 11:31:49PM +0300, Dmitry V. Levin wrote:
> > > This longish C string is actually a lua script, and it doesn't
luajit_lib.h is now auto-generated from luajit_lib.lua.
I also got rid of all the "private" underscore-prefixed members of the
strace module -- we don't actually need them. See the top comment in
luajit_lib.lua.
Also minor fixes in the helper library and the man page section.
Vic
* 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, QUAL_HOOK_EXIT): new qual flags.
(s
The build of v6 was broken, sorry.
Victor Krapivensky (1):
Initial support for LuaJIT scripting
Makefile.am| 17 +++
configure.ac | 36 +++
defs.h | 53 +++---
defs_shared.h | 65
ffi.h | 19
luajit.h | 328
* 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, QUAL_HOOK_EXIT): new qual flags.
(s
pathtrace_match_set will be exposed to LuaJIT scripts.
* defs.h (npaths_selected): Add a declaration.
(tracing_paths): Change macro body to an equivalent but more obvious one
(pathtrace_match): New macro.
* pathtrace.c (num_selected): Rename to npaths_selected, make
non-static.
(pathmatch, upathma
On Sat, Jul 08, 2017 at 03:25:43PM +0700, Nikolay Marchuk wrote:
> I don't think that it is necessary to rename static functions. These
> functions don't change their behaviour a lot and are used only in
> pathtrace.c. Only pathtrace_match renaming is useful for compatibility.
> I have also implem
On Sat, Jul 08, 2017 at 03:28:56PM +0700, Nikolay Marchuk wrote:
> * defs.h (struct path_set): Add a definition for a path set.
> (global_path_set): Add a declaration.
> (tracing_paths): Change macro body to use global path set variable.
> (pathtrace_select_set, pathtrace_match_set): Change declara
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.upoke.
* luajit_lib.lua (w
* .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
} functions now support a table argument
instead of a single string/number.
Victor Krapivensky (2):
Initial support for LuaJIT scripting
Introduce upoken function and expose it to LuaJIT scripts
.gitignore | 1 +
Makefile.am| 17 +++
configure.ac | 36 ++
defs.h | 56
Hello, strace community!
Project: advanced syscall tampering and filtering with Lua/LuaJIT.
Accomplishments: this week I've introduced path-matching and memory
tampering functionality for LuaJIT scripts. I've also improved some
things in the helper library.
Next week, I will work on testing my c
On Thu, Jul 13, 2017 at 09:24:03PM +0200, Eugene Syromiatnikov wrote:
> On Tue, Jul 11, 2017 at 02:48:48PM +0300, Victor Krapivensky wrote:
> > * .gitignore: Add luajit_lib.h.
> > * Makefile.am: Build with LuaJIT if configured so.
> > (strace_SOURCES): Add defs_shared.h, ffi
On Sat, Jul 15, 2017 at 02:42:42AM +0300, Dmitry V. Levin wrote:
> On Sat, Jul 15, 2017 at 01:56:43AM +0300, Victor Krapivensky wrote:
> > On Thu, Jul 13, 2017 at 09:24:03PM +0200, Eugene Syromiatnikov wrote:
> > > On Tue, Jul 11, 2017 at 02:48:48PM +0300, Victor
Hello, strace community!
Project: advanced syscall tampering and filtering with Lua/LuaJIT.
Accomplishments: this week, I've been thinking over the testing
architecture for Lua scripting, and started writing some tests.
Unfortunately, they are not ready for reviewing as for now. I'll post a
patch
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.upoke.
* luajit_lib.lua (w
Victor Krapivensky (3):
Initial support for LuaJIT scripting
Introduce upoken function and expose it to LuaJIT scripts
tests: check LuaJIT scripting support
.gitignore | 1 +
Makefile.am | 17 +++
configure.ac | 36 +
defs.h
* .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
* 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
Hello, strace community!
Project: advanced syscall tampering and filtering with Lua/LuaJIT.
Accomplishments: this week, I've written tests checking LuaJIT scripting
support. I've also fixed a number of issues pointed out by Eugene
Syromyatnikov (e.g. functions that previously took an optional per
On Wed, Jul 26, 2017 at 12:28:51PM +, Eugene Syromyatnikov wrote:
> On Tue, Jul 25, 2017 at 12:59 PM, Victor Krapivensky
> wrote:
> > Victor Krapivensky (3):
> > Initial support for LuaJIT scripting
> > Introduce upoken function and expose it to LuaJIT scripts
&
ed to make them more consistent with
another Lua functions and the C API. Now, Lua functions only raise
errors when inappropriate arguments are passed.
* Adjusted man page.
* Fixed tests.
* Other minor fixes.
Victor Krapivensky (3):
Initial support for LuaJIT scripting
Introduce upoken function and
* .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
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
* 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
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
Hello, strace community!
Project: advanced syscall tampering and filtering with Lua/LuaJIT.
Accomplishments: this week, I've addressed most of the problems pointed
out by Eugene. I'll send patches once they are fully ready.
I understand my pace has become quite slow. I also apologize for the
lac
On Mon, Jul 31, 2017 at 03:18:21AM +0200, Eugene Syromiatnikov wrote:
> The problem here is that these function implement the same non-trivial
> logic as their C counterpart, thus, any change in the logic should be
> made in two places, which is indeed error-prone.
I'd still disagree. The logic is
* .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.
* basic_filters.c (make_number_set_universal, is_number_set_universal):
New functions.
(syscall_classes): Make global and
* configure.ac: check for process_vm_writev's availability.
* defs.h: Add declaration for upoken.
* luajit.h (func_upoke): New wrapper function.
(init_luajit): Expose it as strace.C.upoke.
* luajit_lib.lua (write_obj): New function.
* strace.1 (LUA SCRIPTING): Describe new functions.
* ucopy.c (pro
* 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
sting; mentioned it in the man page).
* Added support for two standalone FFI library implementations.
* Fixed style issues.
Next week, I'm going to: write up a NEWS entry; add more examples to the
man page; work on merging my code.
1. https://github.com/m-schmoock/lcpp
Victor Krapivensky (3):
Hello, strace community!
Project: advanced syscall tampering and filtering with Lua/LuaJIT.
Accomplishments: this week, I've addressed the problems in my code
pointed out by Eugene.
Next week, I'm going to write up a NEWS entry; add more examples to the
man page; and work on merging my code.
--
On Wed, Aug 23, 2017 at 09:47:22PM +0200, Eugene Syromiatnikov wrote:
> > * strace.c (alloctcb): update the condition of presence of currpers
> > field.
> Btw, looks like there are other places that touch that field, wouldn't
> it better to provide setter/getter for this field which would resolve t
* configure.ac: check for process_vm_writev's availability.
* defs.h: Add declaration for upoken.
* luajit.h (func_upoke): New wrapper function.
(init_luajit): Expose it as strace.C.upoke.
* luajit_lib.lua (write_obj): New function.
* strace.1 (LUA SCRIPTING): Describe new functions.
* ucopy.c (pro
by Eugene.
* Added an information on ffiex library and an example to the man page.
Victor Krapivensky (3):
Initial support for LuaJIT scripting
Introduce upoken function and expose it to LuaJIT scripts
tests: check LuaJIT scripting support
.gitignore | 1 +
Makefile.am
1 - 100 of 115 matches
Mail list logo