From 299ee674e6c124a35f1cf258df4f0f3c6e1db1f3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 27 Nov 2024 17:23:09 +0100 Subject: executor: query globs in the test program context We query globs for 2 reasons: 1. Expand glob types in syscall descriptions. 2. Dynamic file probing for automatic descriptions generation. In both of these contexts are are interested in files that will be present during test program execution (rather than normal unsandboxed execution). For example, some files may not be accessible to test programs after pivot root. On the other hand, we create and link some additional files for the test program that don't normally exist. Add a new request type for querying of globs that are executed in the test program context. --- pkg/flatrpc/flatrpc.fbs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'pkg/flatrpc/flatrpc.fbs') diff --git a/pkg/flatrpc/flatrpc.fbs b/pkg/flatrpc/flatrpc.fbs index 0bd32b743..6d2307d6a 100644 --- a/pkg/flatrpc/flatrpc.fbs +++ b/pkg/flatrpc/flatrpc.fbs @@ -57,14 +57,12 @@ table ConnectReplyRaw { features :Feature; // Fuzzer reads these files inside of the VM and returns contents in InfoRequest.files. files :[string]; - globs :[string]; } table InfoRequestRaw { error :string; features :[FeatureInfoRaw]; files :[FileInfoRaw]; - globs :[GlobInfoRaw]; } table InfoReplyRaw { @@ -112,10 +110,16 @@ table ExecutorMessageRaw { msg :ExecutorMessagesRaw; } +enum RequestType : uint64 { + // Normal test program request (data contains serialized prog.Prog). + Program, + // Binary test program (data contains compiled executable binary). + Binary, + // Request for file glob expansion (data contains the glob pattern). + Glob, +} + enum RequestFlag : uint64 (bit_flags) { - // If set, prog_data contains compiled executable binary - // that needs to be written to disk and executed. - IsBinary, // If set, collect program output and return in output field. ReturnOutput, // If set, don't fail on program failures, instead return the error in error field. @@ -163,9 +167,10 @@ struct ExecOptsRaw { // Request to execute a test program. table ExecRequestRaw { id :int64; + type :RequestType; // Bitmask of procs to avoid when executing this request, if possible. avoid :uint64; - prog_data :[uint8]; + data :[uint8]; exec_opts :ExecOptsRaw; flags :RequestFlag; // Return all signal for these calls. -- cgit mrf-deployment