* [PATCH 2/4] cobalt/kernel: adapt adjtime syscall with upstream kernel
@ 2020-09-17 16:55 Fino Meng
0 siblings, 0 replies; 4+ messages in thread
From: Fino Meng @ 2020-09-17 16:55 UTC (permalink / raw)
To: xenomai
compat_timex related definitions moved from compat code into normal timekeeping code.
see 4d5f007e in upstream Linux kernel.
Signed-off-by: Fino Meng <fino.meng@linux.intel.com>
Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
---
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(-)
diff --git a/include/cobalt/kernel/compat.h b/include/cobalt/kernel/compat.h
index 05754cba8..c9cb84f72 100644
--- a/include/cobalt/kernel/compat.h
+++ b/include/cobalt/kernel/compat.h
@@ -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,
diff --git a/kernel/cobalt/posix/compat.c b/kernel/cobalt/posix/compat.c
index 17968bff1..a31ec0457 100644
--- a/kernel/cobalt/posix/compat.c
+++ b/kernel/cobalt/posix/compat.c
@@ -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)) ||
diff --git a/kernel/cobalt/posix/syscall32.c b/kernel/cobalt/posix/syscall32.c
index faa7ef53a..c2fd6a1e0 100644
--- a/kernel/cobalt/posix/syscall32.c
+++ b/kernel/cobalt/posix/syscall32.c
@@ -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;
diff --git a/kernel/cobalt/posix/syscall32.h b/kernel/cobalt/posix/syscall32.h
index 34904f96b..eb3e4bd30 100644
--- a/kernel/cobalt/posix/syscall32.h
+++ b/kernel/cobalt/posix/syscall32.h
@@ -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,
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/4] cobalt/kernel: adapt adjtime syscall with upstream kernel
2020-09-18 5:56 [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream Fino Meng
@ 2020-09-18 5:56 ` Fino Meng
0 siblings, 0 replies; 4+ messages in thread
From: Fino Meng @ 2020-09-18 5:56 UTC (permalink / raw)
To: xenomai
compat_timex related definitions moved from compat code into normal timekeeping code.
see 4d5f007e in upstream Linux kernel.
Signed-off-by: Fino Meng <fino.meng@linux.intel.com>
Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
---
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(-)
diff --git a/include/cobalt/kernel/compat.h b/include/cobalt/kernel/compat.h
index 05754cba8..c9cb84f72 100644
--- a/include/cobalt/kernel/compat.h
+++ b/include/cobalt/kernel/compat.h
@@ -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,
diff --git a/kernel/cobalt/posix/compat.c b/kernel/cobalt/posix/compat.c
index 17968bff1..a31ec0457 100644
--- a/kernel/cobalt/posix/compat.c
+++ b/kernel/cobalt/posix/compat.c
@@ -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)) ||
diff --git a/kernel/cobalt/posix/syscall32.c b/kernel/cobalt/posix/syscall32.c
index faa7ef53a..c2fd6a1e0 100644
--- a/kernel/cobalt/posix/syscall32.c
+++ b/kernel/cobalt/posix/syscall32.c
@@ -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;
diff --git a/kernel/cobalt/posix/syscall32.h b/kernel/cobalt/posix/syscall32.h
index 34904f96b..eb3e4bd30 100644
--- a/kernel/cobalt/posix/syscall32.h
+++ b/kernel/cobalt/posix/syscall32.h
@@ -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,
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/4] cobalt/kernel: adapt adjtime syscall with upstream kernel
@ 2020-09-18 6:32 Fino Meng
2020-09-19 12:05 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Fino Meng @ 2020-09-18 6:32 UTC (permalink / raw)
To: xenomai, jan.kiszka, fino.meng
compat_timex related definitions moved from compat code into normal timekeeping code.
see 4d5f007e in upstream Linux kernel.
Signed-off-by: Fino Meng <fino.meng@linux.intel.com>
Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
---
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(-)
diff --git a/include/cobalt/kernel/compat.h b/include/cobalt/kernel/compat.h
index 05754cba8..c9cb84f72 100644
--- a/include/cobalt/kernel/compat.h
+++ b/include/cobalt/kernel/compat.h
@@ -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,
diff --git a/kernel/cobalt/posix/compat.c b/kernel/cobalt/posix/compat.c
index 17968bff1..a31ec0457 100644
--- a/kernel/cobalt/posix/compat.c
+++ b/kernel/cobalt/posix/compat.c
@@ -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)) ||
diff --git a/kernel/cobalt/posix/syscall32.c b/kernel/cobalt/posix/syscall32.c
index faa7ef53a..c2fd6a1e0 100644
--- a/kernel/cobalt/posix/syscall32.c
+++ b/kernel/cobalt/posix/syscall32.c
@@ -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;
diff --git a/kernel/cobalt/posix/syscall32.h b/kernel/cobalt/posix/syscall32.h
index 34904f96b..eb3e4bd30 100644
--- a/kernel/cobalt/posix/syscall32.h
+++ b/kernel/cobalt/posix/syscall32.h
@@ -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,
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4] cobalt/kernel: adapt adjtime syscall with upstream kernel
2020-09-18 6:32 Fino Meng
@ 2020-09-19 12:05 ` Jan Kiszka
0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2020-09-19 12:05 UTC (permalink / raw)
To: Fino Meng, xenomai, fino.meng
On 18.09.20 08:32, Fino Meng wrote:
> compat_timex related definitions moved from compat code into normal timekeeping code.
> see 4d5f007e in upstream Linux kernel.
>
> Signed-off-by: Fino Meng <fino.meng@linux.intel.com>
> Signed-off-by: Mingliang Hu <mingliang.hu@intel.com>
> ---
> 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(-)
>
> diff --git a/include/cobalt/kernel/compat.h b/include/cobalt/kernel/compat.h
> index 05754cba8..c9cb84f72 100644
> --- a/include/cobalt/kernel/compat.h
> +++ b/include/cobalt/kernel/compat.h
> @@ -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,
> diff --git a/kernel/cobalt/posix/compat.c b/kernel/cobalt/posix/compat.c
> index 17968bff1..a31ec0457 100644
> --- a/kernel/cobalt/posix/compat.c
> +++ b/kernel/cobalt/posix/compat.c
> @@ -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)) ||
> diff --git a/kernel/cobalt/posix/syscall32.c b/kernel/cobalt/posix/syscall32.c
> index faa7ef53a..c2fd6a1e0 100644
> --- a/kernel/cobalt/posix/syscall32.c
> +++ b/kernel/cobalt/posix/syscall32.c
> @@ -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;
> diff --git a/kernel/cobalt/posix/syscall32.h b/kernel/cobalt/posix/syscall32.h
> index 34904f96b..eb3e4bd30 100644
> --- a/kernel/cobalt/posix/syscall32.h
> +++ b/kernel/cobalt/posix/syscall32.h
> @@ -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,
>
That also breaks older kernels.
If you use our CI settings, you can easily catch such issues.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-19 12:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-17 16:55 [PATCH 2/4] cobalt/kernel: adapt adjtime syscall with upstream kernel Fino Meng
-- strict thread matches above, loose matches on Subject: below --
2020-09-18 5:56 [PATCH 1/4] cobalt/x86: adapt fpu code with Linux kernel upstream Fino Meng
2020-09-18 5:56 ` [PATCH 2/4] cobalt/kernel: adapt adjtime syscall with upstream kernel Fino Meng
2020-09-18 6:32 Fino Meng
2020-09-19 12:05 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.