Patch for execve with a mode switch
Hi Pete,
Quoted 5 lines
If I boot an s390x kernel over a 31 bit userland,
/sbin/initsegfaults in the dynamic linker. This happens becausemm->free_area_cacheis set withTASK_UNMAPPED_BASEmacro, which needs theTIF_31BITset right. SettingTIF_31BITinELF_PLAT_INITis way too late for this.
mm->free_area_cache can't cause any problems on s390x because it isn't used. The idea behind mm->free_area_cache is to speed up the search in get_unmapped_area/arch_get_unmapped_area. But s390x defines its own version of arch_get_unmapped_area in arch/s390x/kernel/sys_s390.c which doesn't start the search at mm->free_area_cache.
Quoted 4 lines
The patch below basically ports what sparc64 does to s390x, according to the Andrew Morton's comment in
fs/binfmt_elf.c. To tell the truth, I actually use equivalent of this on 2.4, but I think it's important to get stock 2.5 right.
This patch is severly broken. It wouldn't even compile.
To make sure I retested the kernel 2.5.64 with the patches I sent to this list and ipled a 31 bit userland successfully.
blue skies,
Martin.
Quoted 6 lines
From: "BOEBLINGEN LINUX390" <[email protected]>
Date: Mon, 17 Mar 2003 16:20:37 +0100
mm->free_area_cachecan't cause any problems on s390x because it isn't used. [...]
This patch is severly broken. It wouldn't even compile.
I am sorry, yes, please don't apply to 2.5. It is only needed on later 2.4, which use the mm->free_area_cache (our old 2.4.9 works ok, but 2.4.20 doesn't).
I still think you are making a mistake defininig your own arch_get_unmapped_area(), because: 1. sparc64 does it correctly with the common code, so it can be done; 2. architecture specific duplicates of common code may bitrot. But have it your way, I won't resubmit, for the sake of staying aligned with upstream.
-- Pete