Skip to content

Commit

Permalink
update qemu to 8.0.4
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Sep 8, 2023
1 parent 5da9dbf commit a1603cd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ variable "QEMU_REPO" {
default = "https://github.com/qemu/qemu"
}
variable "QEMU_VERSION" {
default = "v8.0.2"
default = "v8.0.4"
}
variable "QEMU_PATCHES" {
default = "cpu-max-arm"
Expand Down
2 changes: 1 addition & 1 deletion patches/aports.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
8.0.50,e8d41290a7678e4453f4cdbe1d946c0cc6e9f443
8.0.50,f06ada93c82f66e28e4da270ce011a87a6d0323e
7.2.50,ed7a3122a32f53094f51e55abe68d416910e01ad
7.1.50,be225f32f1ff33114fe0d272bf5a9308e9e39e94
7.0.50,5adbe4930461bef37687ee064aa82533a1bdf3c9
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From a47f9305722fad63cbe233e565afc3a9ff0cb50d Mon Sep 17 00:00:00 2001
From 43aea3054fcbae1bfbfbb90edf1e3b56f439066f Mon Sep 17 00:00:00 2001
From: CrazyMax <crazy-max@users.noreply.github.com>
Date: Wed, 3 May 2023 20:37:29 +0200
Date: Fri, 8 Sep 2023 10:47:29 +0200
Subject: [PATCH] linux-user: have execve call qemu via /proc/self/exe to not
rely on binfmt_misc

Expand All @@ -19,24 +19,14 @@ as argv[0] to execve.
Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
---
linux-user/syscall.c | 46 +++++++++++++++++++++++++++++---------------
1 file changed, 31 insertions(+), 15 deletions(-)
linux-user/syscall.c | 44 +++++++++++++++++++++++++++++++-------------
1 file changed, 31 insertions(+), 13 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 69f740ff98..d571f1c4e0 100644
index 9ee124c583..6ed502eb6c 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -659,8 +659,7 @@ safe_syscall4(pid_t, wait4, pid_t, pid, int *, status, int, options, \
#endif
safe_syscall5(int, waitid, idtype_t, idtype, id_t, id, siginfo_t *, infop, \
int, options, struct rusage *, rusage)
-safe_syscall5(int, execveat, int, dirfd, const char *, filename,
- char **, argv, char **, envp, int, flags)
+safe_syscall3(int, execve, const char *, filename, char **, argv, char **, envp)
#if defined(TARGET_NR_select) || defined(TARGET_NR__newselect) || \
defined(TARGET_NR_pselect6) || defined(TARGET_NR_pselect6_time64)
safe_syscall6(int, pselect6, int, nfds, fd_set *, readfds, fd_set *, writefds, \
@@ -8422,10 +8421,37 @@ static int do_execveat(CPUArchState *cpu_env, int dirfd,
@@ -8442,10 +8442,37 @@ static int do_execv(CPUArchState *cpu_env, int dirfd,
envc++;
}

Expand Down Expand Up @@ -76,7 +66,7 @@ index 69f740ff98..d571f1c4e0 100644
if (get_user_ual(addr, gp)) {
goto execve_efault;
}
@@ -8464,17 +8490,7 @@ static int do_execveat(CPUArchState *cpu_env, int dirfd,
@@ -8484,18 +8511,9 @@ static int do_execv(CPUArchState *cpu_env, int dirfd,
* before the execve completes and makes it the other
* program's problem.
*/
Expand All @@ -85,16 +75,18 @@ index 69f740ff98..d571f1c4e0 100644
- goto execve_efault;
- }
-
- const char *exe = p;
- if (is_proc_myself(p, "exe")) {
- ret = get_errno(safe_execveat(dirfd, exec_path, argp, envp, flags));
- } else {
- ret = get_errno(safe_execveat(dirfd, p, argp, envp, flags));
- exe = exec_path;
- }
-
+ ret = get_errno(safe_execve("/proc/self/exe", argp, envp));
unlock_user(p, pathname, 0);
ret = is_execveat
- ? safe_execveat(dirfd, exe, argp, envp, flags)
- : safe_execve(exe, argp, envp);
+ ? safe_execveat(dirfd, "/proc/self/exe", argp, envp, flags)
+ : safe_execve("/proc/self/exe", argp, envp);
ret = get_errno(ret);

goto execve_end;
unlock_user(p, pathname, 0);
--
2.34.0

0 comments on commit a1603cd

Please sign in to comment.