Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1235582 > unrolled thread

[PATCH v5 12/23] arm64:ilp32: COMPAT_USE_64BIT_TIME is true for ILP32 tasks

Started byYury Norov <ynorov@caviumnetworks.com>
First post2015-09-30 00:20 +0200
Last post2015-09-30 00:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 12/23] arm64:ilp32: COMPAT_USE_64BIT_TIME is true for ILP32 tasks Yury Norov <ynorov@caviumnetworks.com> - 2015-09-30 00:20 +0200

#1235582 — [PATCH v5 12/23] arm64:ilp32: COMPAT_USE_64BIT_TIME is true for ILP32 tasks

FromYury Norov <ynorov@caviumnetworks.com>
Date2015-09-30 00:20 +0200
Subject[PATCH v5 12/23] arm64:ilp32: COMPAT_USE_64BIT_TIME is true for ILP32 tasks
Message-ID<qebpD-2HP-9@gated-at.bofh.it>
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

Since __kernel_long_t (time_t) is long long, we need to tell the rest of
kernel that we use 64bit time_t for compat when the task is not an
AARCH32 task.  The reason why we check AARCH32 rather than ILP32 here is
because if we don't have AARCH32 compiled in (which is going to be the
common case due to AARCH32 requiring 4k pages).

Stricly speaking, a 'long long' time_t is not standards-compliant
(refer to https://sourceware.org/bugzilla/show_bug.cgi?id=16437 for
details), but there is precedent (i.e. x32) for such an implementation both
in the kernel and in glibc.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>

diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
index f53c4e6..4b717df 100644
--- a/arch/arm64/include/asm/compat.h
+++ b/arch/arm64/include/asm/compat.h
@@ -76,6 +76,9 @@ struct compat_timeval {
 	s32		tv_usec;
 };
 
+/* ILP32 uses 64bit time_t and not the above compat structures */
+#define COMPAT_USE_64BIT_TIME !is_a32_compat_task()
+
 struct compat_stat {
 #ifdef __AARCH64EB__
 	short		st_dev;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web