From: Catalin Marinas <catalin.marinas@arm.com>
To: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: linux-arch@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
Will Deacon <will.deacon@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/4] arm64: compat: Alloc separate pages for vectors and sigpage
Date: Tue, 2 Apr 2019 11:06:57 +0100 [thread overview]
Message-ID: <20190402100657.tkvdkqtx2xjjixma@mbp> (raw)
In-Reply-To: <6c43e9f9-3500-b828-3cf9-1917b9de256a@arm.com>
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-04-02 10:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 11:20 [PATCH 0/4] arm64: compat: Add kuser helpers config option Vincenzo Frascino
2019-04-01 11:20 ` [PATCH 1/4] arm64: compat: Alloc separate pages for vectors and sigpage Vincenzo Frascino
2019-04-01 14:27 ` Catalin Marinas
2019-04-02 10:01 ` Vincenzo Frascino
2019-04-02 10:06 ` Catalin Marinas [this message]
2019-04-02 10:08 ` Vincenzo Frascino
2019-04-01 11:20 ` [PATCH 2/4] arm64: compat: Split kuser32 Vincenzo Frascino
2019-04-01 14:30 ` Catalin Marinas
2019-04-02 9:47 ` Vincenzo Frascino
2019-04-01 11:20 ` [PATCH 3/4] arm64: compat: Refactor aarch32_alloc_vdso_pages() Vincenzo Frascino
2019-04-01 14:43 ` Catalin Marinas
2019-04-02 10:06 ` Vincenzo Frascino
2019-04-01 11:20 ` [PATCH 4/4] arm64: compat: Add KUSER_HELPERS config option Vincenzo Frascino
2019-04-01 14:48 ` Catalin Marinas
2019-04-02 10:12 ` Vincenzo Frascino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190402100657.tkvdkqtx2xjjixma@mbp \
--to=catalin.marinas@arm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=vincenzo.frascino@arm.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox