GSoC status report - #3 of 10

Srikavin Ramkumar srikavinramkumar at gmail.com
Tue Jun 22 06:22:42 UTC 2021


Hi,

Accomplishments:

Last week I continued working on the code generation. Right now, basic system
call descriptions with basic (non-pointer, non-struct) argument types are
supported. I'm currently improving support for generating decoders for pointer 
and structure types.

As a simple example, the syzlang description for the close syscall

    close(fd fd)

is automatically transformed into the following decoder:

    // Debug Location: defs/example.syzlang:6:1 Node Type: AST_SYSCALL
    SYS_FUNC(close)
    {
        /* arg: fd (fd) */
        printfd(tcp, tcp->u_arg[0]);
        return RVAL_DECODED;
    }

I also improved the error messages that are displayed on syntactic and semantic
errors. They look like the following now:

    error 0: defs/example.syzlang: line 1 column 21
            open(file ptr[string], flags xor_flags[open_flags], mode or_flags[open_mode]) fd
                                ^ type 'ptr' expects 2 type options; got 1
    error 1: defs/example.syzlang: line 2 column 6
            read((fd fd, buf ptr[out, stringnoz[ref[count]]], count size_t)
                 ^ syntax error, unexpected (, expecting ) or IDENTIFIER

Priorities:
 - Continue working on the code generation
   - Improve support for pointer types
   - Add support for return flags (RVAL_FD, RVAL_TID, etc.)
   - Add support for variant syscall types where argument types depend on the
     first argument (like prctl and ioctl))
   - Add support for flags (xor_flags and or_flags) which can reference existing 
     xlat definitions
   - Add way to define decoders for specified types in syzlang files
   - Automatically generate struct decoding for simple structs
   - Emit warnings for possible incorrect behavior
 - Incorporate code generation with the build process
 - Finalize CLI arguments, and add usage documentation

-- Srikavin


More information about the Strace-devel mailing list