qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH for 6.2 34/49] bsd-user: Fix initializtion of task state


From: Richard Henderson
Subject: Re: [PATCH for 6.2 34/49] bsd-user: Fix initializtion of task state
Date: Tue, 10 Aug 2021 05:02:53 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/7/21 11:42 AM, Warner Losh wrote:
@@ -459,21 +435,11 @@ int main(int argc, char **argv)
          qemu_log("entry       0x" TARGET_ABI_FMT_lx "\n", info->entry);
      }
- target_set_brk(info->brk);
-    syscall_init();
-    signal_init();
-
-    /*
-     * Now that we've loaded the binary, GUEST_BASE is fixed.  Delay
-     * generating the prologue until now so that the prologue can take
-     * the real value of GUEST_BASE into account.
-     */
-    tcg_prologue_init(tcg_ctx);
-
      /* build Task State */
-    memset(ts, 0, sizeof(TaskState));
+    ts = g_new0(TaskState, 1);
      init_task_state(ts);
      ts->info = info;
+    ts->bprm = &bprm;
      cpu->opaque = ts;
target_set_brk(info->brk);

It looks like some of this damage occurs in patch 22
("bsd-user: Move per-cpu code into target_arch_cpu.h")
and could reasonably be squashed back.

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

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