> Not that the old code did either, so it's not like it's a new bug, but I > thought I'd point it out anyway. As if we care (but you can probably > trigger this by having an app that does > > munmap(NULL, TASK_SIZE); > > which will cause a SIGSEGV on return (because the stack doesn't exist) and > then the core-dump should be empty.
Ok, damn you. I admit I thought of exactly this case and then glossed it over because I didn't want to complicate the patch and discuss the arcane justification. And I was doing a good job of repressing the memory of it completely before you dredged it up. > Not that I tested anythign that evil anyway, nor do I think we really care > if it means that the gate_vma doesn't get shown in the core-dump either. I didn't test it either. And I do sort of think the vDSO should be (the only thing) in that case's core dump on anal principle. Now that you've brought it up, I feel all dirty for ever having sent in code that doesn't cover the case. (Not that we really care, since CONFIG_COMPAT_VDSO won't actually be turned on in practice.) Starting the loops with "vma = current->mm->mmap ?: gate_vma" should do it. But I guess Andrew would prefer it: static struct vm_area_struct *first_vma(struct task_struct *tsk, struct vm_area_struct *gate_vma) { struct vm_area_struct *ret = tsk->mm->mmap; if (ret) return ret; return gate_vma; } and: for (vma = first_vma(current); vma; vma = next_vma(vma, gate_vma)) { Thanks, Roland - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/