[Top][All Lists]

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

Missing Frame initialization

From: Mansour Ahmadi
Subject: Missing Frame initialization
Date: Thu, 19 Mar 2020 10:31:30 -0400

I originally reported this:

In the case of badframe, user struct is not unlocked here and may lead to deadlock:

In similar case, it in unlocked correctly:

Laurant replied that frame needs to be initialized with NULL in the second case indeed:

In fact, this case is a little bit different and wrong but to fix that
the solution is to set frame to NULL when it is declared:

* Unlock an area of guest memory.  The first LEN bytes must be
   flushed back to guest memory. host_ptr = NULL is explicitly
   allowed and does nothing. */
static inline void unlock_user(void *host_ptr, abi_ulong guest_addr,
                               long len)
like for linux-user/aarch64/signal.c:
long do_rt_sigreturn(CPUARMState *env)
    struct target_rt_sigframe *frame = NULL;
We have several targets with the same problem.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]