Skip to content

Commit

Permalink
[qemu-usermode] Simplify safe syscall patches. JB#59837
Browse files Browse the repository at this point in the history
After sailfishos/scratchbox2#21
is merged, we can now let syscalls go through the C syscall
function.
  • Loading branch information
Franz-Josef Haider authored and krnlyng committed Jan 13, 2023
1 parent 25a38ec commit 5d2f411
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 666 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From e85a856e19919c936c4cd851bcc68c3b974f28d1 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Frajo Haider <[email protected]>
Date: Mon, 27 Jan 2020 20:34:21 +0200
Subject: [PATCH 08/15] crypto: check if getrandom is available properly
Subject: [PATCH 1/6] crypto: check if getrandom is available properly

---
crypto/random-platform.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/crypto/random-platform.c b/crypto/random-platform.c
index f92f96987d..b45f25db24 100644
index f92f96987d7d262047c7604b169a7fdf11236107..b45f25db241a52e53dea8725bc62cb2d60bc8463 100644
--- a/crypto/random-platform.c
+++ b/crypto/random-platform.c
@@ -31,7 +31,8 @@ static HCRYPTPROV hCryptProv;
Expand Down Expand Up @@ -59,6 +59,3 @@ index f92f96987d..b45f25db24 100644
} else if (errno != EINTR) {
error_setg_errno(errp, errno, "getrandom");
return -1;
--
2.26.2

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 33dd663c75aeceade62a2e5803a9648815acd019 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Frajo Haider <[email protected]>
Date: Thu, 30 Jan 2020 12:17:16 +0000
Subject: [PATCH 12/15] linux-user: Support f_flags in statfs64 when available.
Subject: [PATCH 2/6] linux-user: Support f_flags in statfs64 when available.

---
linux-user/syscall.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 04ea1724f5..4379d8c11c 100644
index 945fc252791ce79d968dba5f9545be24bd28697d..7ddde87ffd96a31d6812fefa65a915dd82084dad 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9427,6 +9427,11 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
@@ -9428,6 +9428,11 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
__put_user(stfs.f_fsid.__val[1], &target_stfs->f_fsid.val[1]);
__put_user(stfs.f_namelen, &target_stfs->f_namelen);
__put_user(stfs.f_frsize, &target_stfs->f_frsize);
Expand All @@ -23,6 +23,3 @@ index 04ea1724f5..4379d8c11c 100644
memset(target_stfs->f_spare, 0, sizeof(target_stfs->f_spare));
unlock_user_struct(target_stfs, arg3, 1);
}
--
2.26.2

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
From 116a97a22bce7b8a034d2b071b5200cd3f5fedff Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Frajo Haider <[email protected]>
Date: Tue, 8 Dec 2020 10:18:18 +0000
Subject: [PATCH 13/15] linux-user: Force avx1 and avx2 off since they cause
Subject: [PATCH 3/6] linux-user: Force avx1 and avx2 off since they cause
issues in sb2 environment.

---
tcg/i386/tcg-target.inc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c
index ae0228238b..1e47a8f1d0 100644
index ae0228238b456e0e7c41fc7adc5047b9da2ac202..1e47a8f1d0e52a3266d1bf550e19edf49851b470 100644
--- a/tcg/i386/tcg-target.inc.c
+++ b/tcg/i386/tcg-target.inc.c
@@ -3894,8 +3894,8 @@ static void tcg_target_init(TCGContext *s)
Expand All @@ -23,6 +23,3 @@ index ae0228238b..1e47a8f1d0 100644
}
}
}
--
2.26.2

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 0ae25695228fefca462304c91735fc1736156649 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Frajo Haider <[email protected]>
Date: Tue, 8 Dec 2020 00:19:06 +0200
Subject: [PATCH 14/15] linux-user: disable commpage
Subject: [PATCH 4/6] linux-user: disable commpage

---
linux-user/elfload.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index fe9dfe795d..7119cf531a 100644
index fe9dfe795ddd63ab862ac8c6f31ff7a25700c5bb..7119cf531a3002ff509549d5647f49699b06f4de 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -383,8 +383,10 @@ enum {
Expand All @@ -31,6 +31,3 @@ index fe9dfe795d..7119cf531a 100644

#define ELF_HWCAP get_elf_hwcap()
#define ELF_HWCAP2 get_elf_hwcap2()
--
2.26.2

This file was deleted.

Loading

0 comments on commit 5d2f411

Please sign in to comment.