Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
PureOS
Packages
qemu
Commits
7cbab5b1
Commit
7cbab5b1
authored
Feb 06, 2019
by
Michael Tokarev
Browse files
use int for sparc64 timeval.tv_usec (#920032)
parent
d890e9de
Changes
2
Hide whitespace changes
Inline
Side-by-side
debian/patches/series
View file @
7cbab5b1
...
...
@@ -3,3 +3,4 @@ do-not-link-everything-with-xen.patch
usb-mtp-use-O_NOFOLLOW-and-O_CLOEXEC-CVE-2018-16872.patch
bt-use-size_t-type-for-length-parameters-instead-of-int-CVE-2018-19665.patch
hw_usb-fix-mistaken-de-initialization-of-CCID-state.patch
sparc64-timeval.tv_usec-is-int.patch
debian/patches/sparc64-timeval.tv_usec-is-int.patch
0 → 100644
View file @
7cbab5b1
From: Ben Hutchings <ben@decadent.org.uk>
Date: Wed, 6 Feb 2019 11:35:06 +0300
Subject: sparc64 timeval.tv_usec is int
On sparc (only) Linux defines timeval::tv_usec with type int, not
long. However qemu-user's definition of struct target_timeval uses
abi_long unconditionally. This results in the syscall translation
layer effectively multiplying tv_usec by 2**32. All sparc syscalls
passing non-zero values for this field fail with -EINVAL.
Laurent Vivier <laurent@vivier.eu>:
According to the kernel definition, I think it should be:
See arch/sparc/include/uapi/asm/posix_types.h
typedef int __kernel_suseconds_t;
..
---
linux-user/syscall_defs.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 99bbce083c..106eafe7fc 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -210,7 +210,11 @@
struct target_linger {
struct target_timeval {
abi_long tv_sec;
+#if defined(TARGET_SPARC64) && !defined(TARGET_ABI32)
+ abi_int tv_usec;
+#else
abi_long tv_usec;
+#endif
};
struct target_timespec {
--
2.11.0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment