Re: [PATCH 1/4] arm64: compat: Alloc separate pages for vectors and sigpage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Catalin



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux