From: Arun Sharma <arun.sharma@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] ia32 emulation fixes for 2.5.45
Date: Wed, 13 Nov 2002 19:50:28 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805411@msgid-missing> (raw)
I found that Linux 2.5.45 had some problems passing arguments to ia32
programs running on ia64 in emulation mode.
The attached patch fixes the problems.
-Arun
==File g:/t/ia32-static.patch===============
--- linux-2.5.45/arch/ia64/ia32/binfmt_elf32.c- Tue Nov 12 19:36:57 2002
+++ linux-2.5.45/arch/ia64/ia32/binfmt_elf32.c Tue Nov 12 19:45:17 2002
@@ -162,9 +162,11 @@
{
unsigned long stack_base;
struct vm_area_struct *mpnt;
+ struct mm_struct *mm = current->mm;
int i;
stack_base = IA32_STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE;
+ mm->arg_start = bprm->p + stack_base;
bprm->p += stack_base;
if (bprm->loader)
@@ -175,6 +177,11 @@
if (!mpnt)
return -ENOMEM;
+ if (!vm_enough_memory((IA32_STACK_TOP - (PAGE_MASK & (unsigned long) bprm->p))>>PAGE_SHIFT)) {
+ kmem_cache_free(vm_area_cachep, mpnt);
+ return -ENOMEM;
+ }
+
down_write(¤t->mm->mmap_sem);
{
mpnt->vm_mm = current->mm;
==============================
reply other threads:[~2002-11-13 19:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=marc-linux-ia64-105590709805411@msgid-missing \
--to=arun.sharma@intel.com \
--cc=linux-ia64@vger.kernel.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