]> TLD Linux GIT Repositories - packages/qemu.git/blobdiff - qemu-user-execve.patch
- updated to 7.1.0
[packages/qemu.git] / qemu-user-execve.patch
index e567b84438bb664827b49db511b72a216b4d72e0..bbaf83e694d8a2368bb9089a65fde958f068d9ed 100644 (file)
@@ -45,11 +45,10 @@ Reviewed-by: Laurent Vivier <laurent@vivier.eu>
 v3 changes:
        - rebase the patchset against current code
 
-diff --git a/linux-user/main.c b/linux-user/main.c
-index ee12035..5951279 100644
---- a/linux-user/main.c
-+++ b/linux-user/main.c
-@@ -79,6 +79,7 @@ static void usage(int exitcode);
+diff -urNpa qemu-7.1.0.orig/linux-user/main.c qemu-7.1.0/linux-user/main.c
+--- qemu-7.1.0.orig/linux-user/main.c  2022-09-02 16:12:25.825166528 +0200
++++ qemu-7.1.0/linux-user/main.c       2022-09-02 16:12:55.593230519 +0200
+@@ -123,6 +123,7 @@ static void usage(int exitcode);
  
  static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
  const char *qemu_uname_release;
@@ -57,8 +56,8 @@ index ee12035..5951279 100644
  
  /* XXX: on x86 MAP_GROWSDOWN only works if ESP <= address + 32, so
     we allocate a bigger stack. Need a better solution, for example
-@@ -3828,6 +3829,11 @@ static void handle_arg_guest_base(const char *arg)
-     have_guest_base = 1;
+@@ -356,6 +357,11 @@ static void handle_arg_guest_base(const
+     have_guest_base = true;
  }
  
 +static void handle_arg_execve(const char *arg)
@@ -69,7 +68,7 @@ index ee12035..5951279 100644
  static void handle_arg_reserved_va(const char *arg)
  {
      char *p;
-@@ -3913,6 +3919,8 @@ static const struct qemu_argument arg_table[] = {
+@@ -458,6 +464,8 @@ static const struct qemu_argument arg_ta
       "uname",      "set qemu uname release string to 'uname'"},
      {"B",          "QEMU_GUEST_BASE",  true,  handle_arg_guest_base,
       "address",    "set guest_base address to 'address'"},
@@ -78,21 +77,10 @@ index ee12035..5951279 100644
      {"R",          "QEMU_RESERVED_VA", true,  handle_arg_reserved_va,
       "size",       "reserve 'size' bytes for guest virtual address space"},
      {"d",          "QEMU_LOG",         true,  handle_arg_log,
-diff --git a/linux-user/qemu.h b/linux-user/qemu.h
-index bd90cc3..0d9b058 100644
---- a/linux-user/qemu.h
-+++ b/linux-user/qemu.h
-@@ -140,6 +140,7 @@ void init_task_state(TaskState *ts);
- void task_settid(TaskState *);
- void stop_all_tasks(void);
- extern const char *qemu_uname_release;
-+extern const char *qemu_execve_path;
- extern unsigned long mmap_min_addr;
- /* ??? See if we can avoid exposing so much of the loader internals.  */
---- qemu-2.12.0/linux-user/syscall.c~  2018-04-30 21:43:39.000000000 +0300
-+++ qemu-2.12.0/linux-user/syscall.c   2018-04-30 21:46:36.362935706 +0300
-@@ -5854,6 +5854,109 @@ static target_timer_t get_timer_id(abi_long arg)
+diff -urNpa qemu-7.1.0.orig/linux-user/syscall.c qemu-7.1.0/linux-user/syscall.c
+--- qemu-7.1.0.orig/linux-user/syscall.c       2022-09-02 16:12:25.833166545 +0200
++++ qemu-7.1.0/linux-user/syscall.c    2022-09-02 16:12:55.595230523 +0200
+@@ -8330,6 +8330,109 @@ static target_timer_t get_timer_id(abi_l
      return timerid;
  }
  
@@ -199,10 +187,10 @@ index bd90cc3..0d9b058 100644
 +    return get_errno(safe_execve(qemu_execve_path, new_argp, envp));
 +}
 +
- /* do_syscall() should always have a single exit point at the end so
-    that actions, such as logging of syscall results, can be performed.
-    All errnos that do_syscall() returns must be -TARGET_<errcode>. */
-@@ -8257,7 +8257,12 @@
+ static int target_to_host_cpu_mask(unsigned long *host_mask,
+                                    size_t host_size,
+                                    abi_ulong target_addr,
+@@ -8843,7 +8946,12 @@ static abi_long do_syscall1(CPUArchState
               * before the execve completes and makes it the other
               * program's problem.
               */
@@ -216,3 +204,14 @@ index bd90cc3..0d9b058 100644
              unlock_user(p, arg1, 0);
  
              goto execve_end;
+diff -urNpa qemu-7.1.0.orig/linux-user/user-internals.h qemu-7.1.0/linux-user/user-internals.h
+--- qemu-7.1.0.orig/linux-user/user-internals.h        2022-09-02 16:12:25.822166522 +0200
++++ qemu-7.1.0/linux-user/user-internals.h     2022-09-02 16:12:55.595230523 +0200
+@@ -27,6 +27,7 @@ void init_task_state(TaskState *ts);
+ void task_settid(TaskState *);
+ void stop_all_tasks(void);
+ extern const char *qemu_uname_release;
++extern const char *qemu_execve_path;
+ extern unsigned long mmap_min_addr;
+ typedef struct IOCTLEntry IOCTLEntry;