]> git.proxmox.com Git - qemu.git/commit
linux-user: fail execve() if env/args too big
authorUlrich Hecht <uli@suse.de>
Tue, 31 Jan 2012 11:43:16 +0000 (12:43 +0100)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 10 Feb 2012 10:44:51 +0000 (10:44 +0000)
commita6f79cc9a5efc34c5b751b2e866a4977259f3f63
treeb1cc99e3aba35827a7af271120986719aac89eff
parent57c83dacfe179bf061b8fa79d9553ebabe4d2ff4
linux-user: fail execve() if env/args too big

If the host's page size is equal to or smaller than the target's, native
execve() will fail appropriately with E2BIG if called with too big an
environment for the target to handle. It may falsely succeed, however, if
the host's page size is bigger, and feed the executed target process an
environment that is too big for it to handle, at which point QEMU barfs and
exits, confusing procmail's autoconf script and causing the build to fail.

This patch makes sure that execve() will return E2BIG if the environment is
too large for the target.

Signed-off-by: Ulrich Hecht <uli@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
linux-user/syscall.c