hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/arch/x86/um/vdso/um_vdso.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2011 Richard Weinberger <richrd@nod.at>
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 as
6
- * published by the Free Software Foundation.
74 *
85 * This vDSO turns all calls into a syscall so that UML can trap them.
96 */
....@@ -16,31 +13,35 @@
1613 #include <linux/getcpu.h>
1714 #include <asm/unistd.h>
1815
19
-int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
16
+int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts)
2017 {
2118 long ret;
2219
23
- asm("syscall" : "=a" (ret) :
24
- "0" (__NR_clock_gettime), "D" (clock), "S" (ts) : "memory");
20
+ asm("syscall"
21
+ : "=a" (ret)
22
+ : "0" (__NR_clock_gettime), "D" (clock), "S" (ts)
23
+ : "rcx", "r11", "memory");
2524
2625 return ret;
2726 }
28
-int clock_gettime(clockid_t, struct timespec *)
27
+int clock_gettime(clockid_t, struct __kernel_old_timespec *)
2928 __attribute__((weak, alias("__vdso_clock_gettime")));
3029
31
-int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
30
+int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
3231 {
3332 long ret;
3433
35
- asm("syscall" : "=a" (ret) :
36
- "0" (__NR_gettimeofday), "D" (tv), "S" (tz) : "memory");
34
+ asm("syscall"
35
+ : "=a" (ret)
36
+ : "0" (__NR_gettimeofday), "D" (tv), "S" (tz)
37
+ : "rcx", "r11", "memory");
3738
3839 return ret;
3940 }
40
-int gettimeofday(struct timeval *, struct timezone *)
41
+int gettimeofday(struct __kernel_old_timeval *, struct timezone *)
4142 __attribute__((weak, alias("__vdso_gettimeofday")));
4243
43
-time_t __vdso_time(time_t *t)
44
+__kernel_old_time_t __vdso_time(__kernel_old_time_t *t)
4445 {
4546 long secs;
4647
....@@ -50,7 +51,7 @@
5051
5152 return secs;
5253 }
53
-int time(time_t *t) __attribute__((weak, alias("__vdso_time")));
54
+__kernel_old_time_t time(__kernel_old_time_t *t) __attribute__((weak, alias("__vdso_time")));
5455
5556 long
5657 __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)