qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user: remove MAX_ARG_PAGES, allow dynamic


From: Stefan Bruens
Subject: Re: [Qemu-devel] [PATCH] linux-user: remove MAX_ARG_PAGES, allow dynamic growth of env/argv space
Date: Sun, 23 Aug 2015 02:31:58 +0200
User-agent: KMail/4.14.9 (Linux/3.16.7-21-desktop; KDE/4.14.9; x86_64; ; )

On Wednesday 19 August 2015 22:57:53 you wrote:
[...]
> 
> I think we have enough repetitions of '32' here to merit a #define.
> 
> But having said all that, I wonder if it would be better to
> precalculate how big a page array we need and just do the
> allocation once, rather than having this complicated code to
> handle a reallocate-and-fix-up-everything. In particular this
> is basically just adding string lengths for filename, argv
> and envp together. load_flt_binary() already wants that information,
> so it might be better to have loader_exec() calculate this
> and fill in new bprm->argv_strlen and bprm->envp_strlen values
> for the callees to use.

I have completely reworked the patch. There is no longer any need for the page 
array, the environment gets directly copied to the target stack (although it 
uses a scratch buffer, to avoid frequent calls to the locking 
memcpy_to_target).

Kind regards,

Stefan

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019



reply via email to

[Prev in Thread] Current Thread [Next in Thread]