Skip to contentSkip to conversation

cobalt/kernel: adapt adjtime syscall with upstream kernel

PATCH In review Fino Meng 1 participant 1 message Sep 17, 2020

lore
Share & tools
lore

Fino Meng

author
#0 lore raw

PATCH 2/4 cobalt/kernel: adapt adjtime syscall with upstream kernel

compat_timex related definitions moved from compat code into normal timekeeping code. see 4d5f007e in upstream Linux kernel.

---
 include/cobalt/kernel/compat.h  | 4 ++--
 kernel/cobalt/posix/compat.c    | 4 ++--
 kernel/cobalt/posix/syscall32.c | 2 +-
 kernel/cobalt/posix/syscall32.h | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
include/cobalt/kernel/compat.h +2 -2
index 05754cba8..c9cb84f72 100644
@@ -105,9 +105,9 @@ int sys32_put_timeval(struct compat_timeval __user *ctv,
 		      const struct timeval *tv);
 
 int sys32_get_timex(struct timex *tx,
-		    const struct compat_timex __user *ctx);
+		    const struct old_timex32 __user *ctx);
 
-int sys32_put_timex(struct compat_timex __user *ctx,
+int sys32_put_timex(struct old_timex32 __user *ctx,
 		    const struct timex *tx);
 
 ssize_t sys32_get_fdset(fd_set *fds, const compat_fd_set __user *cfds,
kernel/cobalt/posix/compat.c +2 -2
index 17968bff1..a31ec0457 100644
@@ -81,7 +81,7 @@ int sys32_put_timeval(struct compat_timeval __user *ctv,
 EXPORT_SYMBOL_GPL(sys32_put_timeval);
 
 int sys32_get_timex(struct timex *tx,
-		    const struct compat_timex __user *ctx)
+		    const struct old_timex32 __user *ctx)
 {
 	memset(tx, 0, sizeof(*tx));
 
@@ -112,7 +112,7 @@ int sys32_get_timex(struct timex *tx,
 }
 EXPORT_SYMBOL_GPL(sys32_get_timex);
 
-int sys32_put_timex(struct compat_timex __user *ctx,
+int sys32_put_timex(struct old_timex32 __user *ctx,
 		    const struct timex *tx)
 {
 	if (!access_wok(ctx, sizeof(*ctx)) ||
kernel/cobalt/posix/syscall32.c +1 -1
index faa7ef53a..c2fd6a1e0 100644
@@ -172,7 +172,7 @@ COBALT_SYSCALL32emu(clock_settime, current,
 }
 
 COBALT_SYSCALL32emu(clock_adjtime, current,
-		    (clockid_t clock_id, struct compat_timex __user *u_tx))
+		    (clockid_t clock_id, struct old_timex32 __user *u_tx))
 {
 	struct timex tx;
 	int ret;
kernel/cobalt/posix/syscall32.h +1 -1
index 34904f96b..eb3e4bd30 100644
@@ -65,7 +65,7 @@ COBALT_SYSCALL32emu_DECL(clock_settime,
 
 COBALT_SYSCALL32emu_DECL(clock_adjtime,
 			 (clockid_t clock_id,
-			  struct compat_timex __user *u_tx));
+			  struct old_timex32 __user *u_tx));
 
 COBALT_SYSCALL32emu_DECL(clock_nanosleep,
 			 (clockid_t clock_id, int flags,
Signature · 1 line
2.20.1