[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 01/26] linux-user: Add infrastructure for a signal trampoline
From: |
Peter Maydell |
Subject: |
Re: [PULL 01/26] linux-user: Add infrastructure for a signal trampoline page |
Date: |
Fri, 5 Nov 2021 16:09:09 +0000 |
On Mon, 4 Oct 2021 at 08:44, Laurent Vivier <laurent@vivier.eu> wrote:
>
> From: Richard Henderson <richard.henderson@linaro.org>
>
> Allocate a page to hold the signal trampoline(s).
> Invoke a guest-specific hook to fill in the contents
> of the page before marking it read-execute again.
Hi; Coverity complains here about a missing error check
(CID 1464101):
>
> + /*
> + * TODO: load a vdso, which would also contain the signal trampolines.
> + * Otherwise, allocate a private page to hold them.
> + */
> + if (TARGET_ARCH_HAS_SIGTRAMP_PAGE) {
> + abi_ulong tramp_page = target_mmap(0, TARGET_PAGE_SIZE,
> + PROT_READ | PROT_WRITE,
> + MAP_PRIVATE | MAP_ANON, -1, 0);
target_mmap() can fail and return -1, but we don't check for that and
instead assume it's always valid.
> + setup_sigtramp(tramp_page);
> + target_mprotect(tramp_page, TARGET_PAGE_SIZE, PROT_READ | PROT_EXEC);
> + }
> +
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PULL 01/26] linux-user: Add infrastructure for a signal trampoline page,
Peter Maydell <=