linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] y2038: provide aliases for compat helpers
@ 2018-08-21 20:33 Arnd Bergmann
  2018-08-22 13:09 ` Christoph Hellwig
  2018-08-22 13:16 ` [tip:timers/urgent] y2038: Provide " tip-bot for Arnd Bergmann
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2018-08-21 20:33 UTC (permalink / raw)
  To: y2038
  Cc: linux-kernel, hch, Thomas Gleixner, Arnd Bergmann, John Stultz,
	Deepa Dinamani

As part of the system call rework for 64-bit time_t, we are restructuring
the way that compat syscalls deal with 32-bit time_t, reusing the
implementation for 32-bit architectures. Christoph Hellwig suggested
a rename of the associated types and interfaces to avoid the confusing
usage of the 'compat' prefix for 32-bit architectures.

To prepare for doing that in linux-4.20, this adds a set of macros
that lets us convert subsystems separately to the new names and
avoid some of the nastier merge conflicts.

Link: https://lore.kernel.org/lkml/20180713133204.3123939-1-arnd@arndb.de/
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
The patch I posted originally was ready but didn't see proper linux-next
testing as I did not get to finalize it before my summer vacation,
so this is the minimal replacement I'd still like to get into 4.19-rc1,
in order to base patches for system calls, sound, networking, media
and file systems on top of.

I have put it into linux-next now after realizing that it would be
a problem to do all my other planned changes for the 4.20 merge
window. Please let me know if you have concerns about the approach,
or provide an Ack if this is ok with you.
---
 include/linux/time32.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/include/linux/time32.h b/include/linux/time32.h
index 0b14f936100a..d1ae43c13e25 100644
--- a/include/linux/time32.h
+++ b/include/linux/time32.h
@@ -207,4 +207,19 @@ static inline s64 timeval_to_ns(const struct timeval *tv)
 extern struct timeval ns_to_timeval(const s64 nsec);
 extern struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec);
 
+/*
+ * New aliases for compat time functions. These will be used to replace
+ * the compat code so it can be shared between 32-bit and 64-bit builds
+ * both of which provide compatibility with old 32-bit tasks.
+ */
+#define old_time32_t		compat_time_t
+#define old_timeval32		compat_timeval
+#define old_timespec32		compat_timespec
+#define old_itimerspec32	compat_itimerspec
+#define ns_to_old_timeval32	ns_to_compat_timeval
+#define get_old_itimerspec32	get_compat_itimerspec64
+#define put_old_itimerspec32	put_compat_itimerspec64
+#define get_old_timespec32	compat_get_timespec64
+#define put_old_timespec32	compat_put_timespec64
+
 #endif
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] y2038: provide aliases for compat helpers
  2018-08-21 20:33 [PATCH] y2038: provide aliases for compat helpers Arnd Bergmann
@ 2018-08-22 13:09 ` Christoph Hellwig
  2018-08-22 13:16 ` [tip:timers/urgent] y2038: Provide " tip-bot for Arnd Bergmann
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2018-08-22 13:09 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: y2038, linux-kernel, hch, Thomas Gleixner, John Stultz,
	Deepa Dinamani

On Tue, Aug 21, 2018 at 10:33:00PM +0200, Arnd Bergmann wrote:
> As part of the system call rework for 64-bit time_t, we are restructuring
> the way that compat syscalls deal with 32-bit time_t, reusing the
> implementation for 32-bit architectures. Christoph Hellwig suggested
> a rename of the associated types and interfaces to avoid the confusing
> usage of the 'compat' prefix for 32-bit architectures.
> 
> To prepare for doing that in linux-4.20, this adds a set of macros
> that lets us convert subsystems separately to the new names and
> avoid some of the nastier merge conflicts.

Looks fine to me:

Acked-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:timers/urgent] y2038: Provide aliases for compat helpers
  2018-08-21 20:33 [PATCH] y2038: provide aliases for compat helpers Arnd Bergmann
  2018-08-22 13:09 ` Christoph Hellwig
@ 2018-08-22 13:16 ` tip-bot for Arnd Bergmann
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Arnd Bergmann @ 2018-08-22 13:16 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: arnd, deepa.kernel, hpa, mingo, hch, linux-kernel, tglx,
	john.stultz

Commit-ID:  fd991a23c8f6ef30692f77409602ccf3614353b2
Gitweb:     https://git.kernel.org/tip/fd991a23c8f6ef30692f77409602ccf3614353b2
Author:     Arnd Bergmann <arnd@arndb.de>
AuthorDate: Tue, 21 Aug 2018 22:33:00 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 22 Aug 2018 15:11:35 +0200

y2038: Provide aliases for compat helpers

As part of the system call rework for 64-bit time_t, we are restructuring
the way that compat syscalls deal with 32-bit time_t, reusing the
implementation for 32-bit architectures. Christoph Hellwig suggested a
rename of the associated types and interfaces to avoid the confusing usage
of the 'compat' prefix for 32-bit architectures.

To prepare for doing that in linux-4.20, add a set of macros that allows to
convert subsystems separately to the new names and avoids some of the
nastier merge conflicts.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: y2038@lists.linaro.org
Cc: John Stultz <john.stultz@linaro.org>
Cc: Deepa Dinamani <deepa.kernel@gmail.com>
Link: https://lkml.kernel.org/r/20180821203329.2089473-1-arnd@arndb.de

---
 include/linux/time32.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/include/linux/time32.h b/include/linux/time32.h
index 0b14f936100a..d1ae43c13e25 100644
--- a/include/linux/time32.h
+++ b/include/linux/time32.h
@@ -207,4 +207,19 @@ static inline s64 timeval_to_ns(const struct timeval *tv)
 extern struct timeval ns_to_timeval(const s64 nsec);
 extern struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec);
 
+/*
+ * New aliases for compat time functions. These will be used to replace
+ * the compat code so it can be shared between 32-bit and 64-bit builds
+ * both of which provide compatibility with old 32-bit tasks.
+ */
+#define old_time32_t		compat_time_t
+#define old_timeval32		compat_timeval
+#define old_timespec32		compat_timespec
+#define old_itimerspec32	compat_itimerspec
+#define ns_to_old_timeval32	ns_to_compat_timeval
+#define get_old_itimerspec32	get_compat_itimerspec64
+#define put_old_itimerspec32	put_compat_itimerspec64
+#define get_old_timespec32	compat_get_timespec64
+#define put_old_timespec32	compat_put_timespec64
+
 #endif

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-22 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-21 20:33 [PATCH] y2038: provide aliases for compat helpers Arnd Bergmann
2018-08-22 13:09 ` Christoph Hellwig
2018-08-22 13:16 ` [tip:timers/urgent] y2038: Provide " tip-bot for Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).