Skip to contentSkip to conversation

linux-user: Add missing TARGET___O_TMPFILE for hppa and alpha

PATCH Applied Helge Deller 2 participants 4 messages Feb 1, 2021 – Feb 22, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: Add missing TARGET___O_TMPFILE for hppa and alpha

The hppa and alpha targets miss the #define of the TARGET___O_TMPFILE and as such fail to run a trivial symlink command like

ln -s /bin/bash /tmp

which results in an -EINVAL return code.

Adding the define fixes the problem.

---

linux-user/alpha/target_fcntl.h +1 -0
index 2617e73472..0a74807a8b 100644
@@ -23,6 +23,7 @@
 #define TARGET_O_CLOEXEC     010000000
 #define TARGET___O_SYNC      020000000
 #define TARGET_O_PATH        040000000
+#define TARGET___O_TMPFILE  0100000000
 
 #define TARGET_F_GETLK         7
 #define TARGET_F_SETLK         8
linux-user/hppa/target_fcntl.h +1 -0
index bd966a59b8..08e3a4fcb0 100644
@@ -21,6 +21,7 @@
 #define TARGET_O_CLOEXEC     010000000
 #define TARGET___O_SYNC      000100000
 #define TARGET_O_PATH        020000000
+#define TARGET___O_TMPFILE   040000000
 
 #define TARGET_F_RDLCK         1
 #define TARGET_F_WRLCK         2
Reviewed-by on v1 1/1
#1 lore raw

Le 01/02/2021 à 16:59, Helge Deller a écrit :

Quoted 31 lines

The hppa and alpha targets miss the #define of the TARGET___O_TMPFILE and as such fail to run a trivial symlink command like

ln -s /bin/bash /tmp

which results in an -EINVAL return code.

Adding the define fixes the problem.

---

linux-user/alpha/target_fcntl.h +1 -0
index 2617e73472..0a74807a8b 100644
@@ -23,6 +23,7 @@
 #define TARGET_O_CLOEXEC     010000000
 #define TARGET___O_SYNC      020000000
 #define TARGET_O_PATH        040000000
+#define TARGET___O_TMPFILE  0100000000
 
 #define TARGET_F_GETLK         7
 #define TARGET_F_SETLK         8
linux-user/hppa/target_fcntl.h +0 -0
index bd966a59b8..08e3a4fcb0 100644

linux-user/hppa/target_fcntl.h line 27

Quoted 7 lines
linux-user/hppa/target_fcntl.h +1 -0
@@ -21,6 +21,7 @@
 #define TARGET_O_CLOEXEC     010000000
 #define TARGET___O_SYNC      000100000
 #define TARGET_O_PATH        020000000
+#define TARGET___O_TMPFILE   040000000
 
 #define TARGET_F_RDLCK         1
 #define TARGET_F_WRLCK         2
#2 lore raw
In reply to Helge Deller

Le 01/02/2021 à 16:59, Helge Deller a écrit :

Quoted 31 lines

The hppa and alpha targets miss the #define of the TARGET___O_TMPFILE and as such fail to run a trivial symlink command like

ln -s /bin/bash /tmp

which results in an -EINVAL return code.

Adding the define fixes the problem.

---

linux-user/alpha/target_fcntl.h +1 -0
index 2617e73472..0a74807a8b 100644
@@ -23,6 +23,7 @@
 #define TARGET_O_CLOEXEC     010000000
 #define TARGET___O_SYNC      020000000
 #define TARGET_O_PATH        040000000
+#define TARGET___O_TMPFILE  0100000000
 
 #define TARGET_F_GETLK         7
 #define TARGET_F_SETLK         8
linux-user/hppa/target_fcntl.h +0 -0
index bd966a59b8..08e3a4fcb0 100644

linux-user/hppa/target_fcntl.h line 27

Quoted 7 lines
linux-user/hppa/target_fcntl.h +1 -0
@@ -21,6 +21,7 @@
 #define TARGET_O_CLOEXEC     010000000
 #define TARGET___O_SYNC      000100000
 #define TARGET_O_PATH        020000000
+#define TARGET___O_TMPFILE   040000000
 
 #define TARGET_F_RDLCK         1
 #define TARGET_F_WRLCK         2

Applied to my linux-user-for-6.0 branch.

Thanks,
Laurent

#3 lore raw
In reply to Helge Deller

Dear qemu-stable,

can you please consider adding this patch to the qemu-stable branch. Upstream commit 23b311155078bdd5bacc016ff3b3ebb5462b10c0

Thanks,
Helge

Quoted 38 lines · Helge Deller

The hppa and alpha targets miss the #define of the TARGET___O_TMPFILE and as such fail to run a trivial symlink command like

ln -s /bin/bash /tmp

which results in an -EINVAL return code.

Adding the define fixes the problem.

---

linux-user/alpha/target_fcntl.h +1 -0
index 2617e73472..0a74807a8b 100644
@@ -23,6 +23,7 @@
  #define TARGET_O_CLOEXEC     010000000
  #define TARGET___O_SYNC      020000000
  #define TARGET_O_PATH        040000000
+#define TARGET___O_TMPFILE  0100000000
 
  #define TARGET_F_GETLK         7
  #define TARGET_F_SETLK         8
linux-user/hppa/target_fcntl.h +1 -0
index bd966a59b8..08e3a4fcb0 100644
@@ -21,6 +21,7 @@
  #define TARGET_O_CLOEXEC     010000000
  #define TARGET___O_SYNC      000100000
  #define TARGET_O_PATH        020000000
+#define TARGET___O_TMPFILE   040000000
 
  #define TARGET_F_RDLCK         1
  #define TARGET_F_WRLCK         2