mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-02 16:52:52 +00:00
noux: increase argv buffer to 16KiB
And most importantly: use the same size everywhere. Note, this commit also configures the stack size of noux-process threads to 64 KiB independently of the CPU architecture. The reason is the increased stack usage because of the additional argument space in Execve_child_env in syscall(SYSCALL_EXECVE), which crafts a child environment on stack for the creation of the new child. Fixes #3145.
This commit is contained in:
parent
afc95e36e1
commit
3ada4f4733
@ -54,7 +54,7 @@ struct Noux::Sysio
|
|||||||
enum { CHUNK_SIZE = 64*1024 };
|
enum { CHUNK_SIZE = 64*1024 };
|
||||||
typedef char Chunk[CHUNK_SIZE];
|
typedef char Chunk[CHUNK_SIZE];
|
||||||
|
|
||||||
enum { ARGS_MAX_LEN = 5*1024 };
|
enum { ARGS_MAX_LEN = 16*1024 };
|
||||||
typedef char Args[ARGS_MAX_LEN];
|
typedef char Args[ARGS_MAX_LEN];
|
||||||
|
|
||||||
enum { ENV_MAX_LEN = 6*1024 };
|
enum { ENV_MAX_LEN = 6*1024 };
|
||||||
|
@ -2278,7 +2278,7 @@ void Plugin::init(Genode::Env &env)
|
|||||||
sigemptyset(&signal_mask);
|
sigemptyset(&signal_mask);
|
||||||
|
|
||||||
/* copy command-line arguments from 'args' ROM dataspace */
|
/* copy command-line arguments from 'args' ROM dataspace */
|
||||||
enum { MAX_ARGS = 256, ARG_BUF_SIZE = 4096UL };
|
enum { MAX_ARGS = 256, ARG_BUF_SIZE = sizeof(Noux::Sysio::Args) };
|
||||||
static char *argv[MAX_ARGS];
|
static char *argv[MAX_ARGS];
|
||||||
static char arg_buf[ARG_BUF_SIZE];
|
static char arg_buf[ARG_BUF_SIZE];
|
||||||
{
|
{
|
||||||
|
@ -146,7 +146,7 @@ class Noux::Child : public Rpc_object<Session>,
|
|||||||
* Entrypoint used to serve the RPC interfaces of the
|
* Entrypoint used to serve the RPC interfaces of the
|
||||||
* locally-provided services
|
* locally-provided services
|
||||||
*/
|
*/
|
||||||
enum { STACK_SIZE = 8*1024*sizeof(long) };
|
enum { STACK_SIZE = 64*1024 };
|
||||||
Rpc_entrypoint _ep { &_env.pd(), STACK_SIZE, "noux_process", false };
|
Rpc_entrypoint _ep { &_env.pd(), STACK_SIZE, "noux_process", false };
|
||||||
|
|
||||||
Pd_session &_ref_pd;
|
Pd_session &_ref_pd;
|
||||||
@ -194,6 +194,8 @@ class Noux::Child : public Rpc_object<Session>,
|
|||||||
/**
|
/**
|
||||||
* Command line arguments
|
* Command line arguments
|
||||||
*/
|
*/
|
||||||
|
enum { ARGS_DS_SIZE = sizeof(Sysio::Args) };
|
||||||
|
|
||||||
Args_dataspace _args;
|
Args_dataspace _args;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -242,8 +244,6 @@ class Noux::Child : public Rpc_object<Session>,
|
|||||||
throw Invalid_fd();
|
throw Invalid_fd();
|
||||||
}
|
}
|
||||||
|
|
||||||
enum { ARGS_DS_SIZE = 4096 };
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Let specified child inherit our file descriptors
|
* Let specified child inherit our file descriptors
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user