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

From: Pete Zaitcev (zaitcev@redhat.com)
Date: Tue Mar 18 2003 - 09:51:08 EST


> From: "BOEBLINGEN LINUX390" <LINUX390@de.ibm.com>
> Date: Tue, 18 Mar 2003 09:57:47 +0100

> I am not too happy with the arch_get_unmapped_area myself. I not
> happpy with the TIF_ABI_PENDING bit either, there has to be a
> way to do this in a simply and straighforward way.
> I'll keep thinking about it.

Actually, I agree, but the only way out that I see is to
add yet another macro, which replaces the second SET_PERSONALITY
on 2.5 and adds a hook for 2.4 in that place.

Current 2.5 code looks bizzare:

    for (headers) {
        if (is header) {
            interpreter = x;
            SET_PERSONALITY(elf_ex, ibcs2_interpreter);
            break;
        }
    }
    if (interpreter) {
    } else {
        SET_PERSONALITY(elf_ex, ibcs2_interpreter);
    }
    flush_old_exec();
    some_more_core
    SET_PERSONALITY(elf_ex, ibcs2_interpreter); // Cries for extermination!
    current->mm->free_area_cache = TASK_UNMAPPED_BASE;

Spaghetti wihout goto's!! There's no way to get to the third
SET_PERSONALITY without being there once, so what does that mean?

-- Pete
-
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:23 EST