linux-mips
[Top] [All Lists]

Re: execve errno setting on MIPS

To: "Sadashiiv, Halesh" <halesh.sadashiv@ap.sony.com>
Subject: Re: execve errno setting on MIPS
From: tsbogend@alpha.franken.de (Thomas Bogendoerfer)
Date: Fri, 19 Sep 2008 09:48:51 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <7B7EF7F090B9804A830ACC82F2CDE95D56DA35@insardxms01.ap.sony.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <7B7EF7F090B9804A830ACC82F2CDE95D56DA35@insardxms01.ap.sony.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.13 (2006-08-11)
On Fri, Sep 19, 2008 at 08:57:17AM +0530, Sadashiiv, Halesh wrote:
> >And it looks like the ARG_MAX limit is bigger than my installed glibc
> >thinks, because it works at least on x86. When I increase the array two
> >2 * ARG_MAX I'll get the wanted E2BIG.
>  
>  Yes, on MIPS we need to increase the ARM_MAX to 2*ARG_MAX to get E2BIG.

I've tested only on x86 and I also needed to use 2 * ARG_MAX. This all
depends on the installed glibc, which provides ARG_MAX and the installed
kernel, which sets the rules independand from glibc. If you look at
fs/exec.c in the kernel source, you see these rules. Current kernels
for example have a limit of 

#define MAX_ARG_STRINGS 0x7FFFFFFF

for the number of strings. Looks like E2BIG is triggered by the space
needed for the strings (I only had a quick look at exec.c).

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]

<Prev in Thread] Current Thread [Next in Thread>