On 02/04/2019 11:06, Catalin Marinas wrote: > On Tue, Apr 02, 2019 at 11:01:04AM +0100, Vincenzo Frascino wrote: >> On 01/04/2019 15:27, Catalin Marinas wrote: >>> On Mon, Apr 01, 2019 at 12:20:22PM +0100, Vincenzo Frascino wrote: >>>> +static int aarch32_sigreturn_setup(struct mm_struct *mm) >>>> +{ >>>> + unsigned long addr; >>>> void *ret; >>>> >>>> - if (down_write_killable(&mm->mmap_sem)) >>>> - return -EINTR; >>>> - current->mm->context.vdso = (void *)addr; >>>> + addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0); >>>> + if (IS_ERR_VALUE(addr)) { >>>> + ret = ERR_PTR(addr); >>>> + goto out; >>>> + } >>>> >>>> - /* Map vectors page at the high address. */ >>>> ret = _install_special_mapping(mm, addr, PAGE_SIZE, >>>> - VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC, >>>> - &spec); >>>> + VM_READ | VM_EXEC | VM_MAYREAD | >>>> + VM_MAYWRITE | VM_MAYEXEC, >>>> + &aarch32_vdso_spec[1]); >>> >>> Any reason for setting VM_MAYWRITE here? >> >> VM_MAYWRITE is required to allow gdb to Copy-on-Write and set breakpoints. > > Thanks. Please add a comment to the code so I don't ask again ;). > No problem, my bad for not adding it in the first place ;). -- Regards, Vincenzo