Re: [s390x] Patch for execve with a mode switch

From: BOEBLINGEN LINUX390 (LINUX390@de.ibm.com)
Date: Mon Mar 17 2003 - 10:20:37 EST


Hi Pete,
> If I boot an s390x kernel over a 31 bit userland, /sbin/init segfaults
> in the dynamic linker. This happens because mm->free_area_cache
> is set with TASK_UNMAPPED_BASE macro, which needs the TIF_31BIT
> set right. Setting TIF_31BIT in ELF_PLAT_INIT is 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.

> 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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:20 EST