Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: tsbogend@alpha.franken.de (Thomas Bogendoerfer)
To: "Sadashiiv, Halesh" <halesh.sadashiv@ap.sony.com>
Cc: linux-mips@linux-mips.org
Subject: Re: execve errno setting on MIPS
Date: Fri, 19 Sep 2008 09:48:51 +0200	[thread overview]
Message-ID: <20080919074851.GA26907@alpha.franken.de> (raw)
In-Reply-To: <7B7EF7F090B9804A830ACC82F2CDE95D56DA35@insardxms01.ap.sony.com>

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 ]

  parent reply	other threads:[~2008-09-19  7:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19  3:27 execve errno setting on MIPS Sadashiiv, Halesh
2008-09-19  3:27 ` Sadashiiv, Halesh
2008-09-19  7:48 ` Thomas Bogendoerfer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-09-19  3:30 Sadashiiv, Halesh
2008-09-19  3:30 ` Sadashiiv, Halesh
2008-09-18 11:39 Sadashiiv, Halesh
2008-09-18 11:39 ` Sadashiiv, Halesh
2008-09-18 21:16 ` Ralf Baechle
2008-09-18 21:25 ` Thomas Bogendoerfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080919074851.GA26907@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=halesh.sadashiv@ap.sony.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox