Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qemu-usermode] Update to 4.0.1. JB#45765
- Loading branch information
Showing
27 changed files
with
2,103 additions
and
1,069 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "upstream"] | ||
path = upstream | ||
url = https://git.sailfishos.org/mirror/qemu.git |
64 changes: 64 additions & 0 deletions
64
rpm/0001-Revert-linux-user-Use-safe_syscall-for-open-and-open.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
From 25ff0573a73123d71e10ec4849ac9177ea53ac59 Mon Sep 17 00:00:00 2001 | ||
From: Frajo Haider <f_haider@gmx.at> | ||
Date: Wed, 22 Jan 2020 10:47:20 +0200 | ||
Subject: [PATCH 1/9] Revert "linux-user: Use safe_syscall for open and openat | ||
system calls" | ||
|
||
This reverts commit c10a07387b77b94d8f7233f3b5bb559211d4e49a. | ||
--- | ||
linux-user/syscall.c | 18 ++++++++++++++---- | ||
1 file changed, 14 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/linux-user/syscall.c b/linux-user/syscall.c | ||
index 96cd4bf86d..17b13f0ca3 100644 | ||
--- a/linux-user/syscall.c | ||
+++ b/linux-user/syscall.c | ||
@@ -362,6 +362,18 @@ static int sys_getcwd1(char *buf, size_t size) | ||
return strlen(buf)+1; | ||
} | ||
|
||
+static int sys_openat(int dirfd, const char *pathname, int flags, mode_t mode) | ||
+{ | ||
+ /* | ||
+ * open(2) has extra parameter 'mode' when called with | ||
+ * flag O_CREAT. | ||
+ */ | ||
+ if ((flags & O_CREAT) != 0) { | ||
+ return (openat(dirfd, pathname, flags, mode)); | ||
+ } | ||
+ return (openat(dirfd, pathname, flags)); | ||
+} | ||
+ | ||
#ifdef TARGET_NR_utimensat | ||
#if defined(__NR_utimensat) | ||
#define __NR_sys_utimensat __NR_utimensat | ||
@@ -718,8 +730,6 @@ static type safe_##name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ | ||
|
||
safe_syscall3(ssize_t, read, int, fd, void *, buff, size_t, count) | ||
safe_syscall3(ssize_t, write, int, fd, const void *, buff, size_t, count) | ||
-safe_syscall4(int, openat, int, dirfd, const char *, pathname, \ | ||
- int, flags, mode_t, mode) | ||
safe_syscall4(pid_t, wait4, pid_t, pid, int *, status, int, options, \ | ||
struct rusage *, rusage) | ||
safe_syscall5(int, waitid, idtype_t, idtype, id_t, id, siginfo_t *, infop, \ | ||
@@ -6816,7 +6826,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, | ||
|
||
if (is_proc_myself(pathname, "exe")) { | ||
int execfd = qemu_getauxval(AT_EXECFD); | ||
- return execfd ? execfd : safe_openat(dirfd, exec_path, flags, mode); | ||
+ return execfd ? execfd : sys_openat(dirfd, exec_path, flags, mode); | ||
} | ||
|
||
for (fake_open = fakes; fake_open->filename; fake_open++) { | ||
@@ -6852,7 +6862,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, | ||
return fd; | ||
} | ||
|
||
- return safe_openat(dirfd, path(pathname), flags, mode); | ||
+ return sys_openat(dirfd, path(pathname), flags, mode); | ||
} | ||
|
||
#define TIMER_MAGIC 0x0caf0000 | ||
-- | ||
2.20.1 | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.