[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180919205037.9574-15-dima@arista.com>
Date: Wed, 19 Sep 2018 21:50:31 +0100
From: Dmitry Safonov <dima@...sta.com>
To: linux-kernel@...r.kernel.org
Cc: Dmitry Safonov <0x7f454c46@...il.com>,
Dmitry Safonov <dima@...sta.com>,
Adrian Reber <adrian@...as.de>,
Andrei Vagin <avagin@...nvz.org>,
Andy Lutomirski <luto@...nel.org>,
Christian Brauner <christian.brauner@...ntu.com>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Jeff Dike <jdike@...toit.com>, Oleg Nesterov <oleg@...hat.com>,
Pavel Emelyanov <xemul@...tuozzo.com>,
Shuah Khan <shuah@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
containers@...ts.linux-foundation.org, criu@...nvz.org,
linux-api@...r.kernel.org, x86@...nel.org
Subject: [RFC 14/20] timens: Add align for timens_offsets
Align offsets so that Time Namespace will work for ia32 applications on
x86_64 host.
Signed-off-by: Dmitry Safonov <dima@...sta.com>
---
include/linux/timens_offsets.h | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/linux/timens_offsets.h b/include/linux/timens_offsets.h
index 777530c46852..92a8ea5601eb 100644
--- a/include/linux/timens_offsets.h
+++ b/include/linux/timens_offsets.h
@@ -2,9 +2,16 @@
#ifndef _LINUX_TIME_OFFSETS_H
#define _LINUX_TIME_OFFSETS_H
+/*
+ * Time offsets need align as they're placed on vvar page,
+ * which should have tail paddings on ia32 vdso.
+ * Otherwise as u64 has align(4), vvar offsets will differ.
+ * On 64-bit big-endian systems vdso should convert to timespec64
+ * to timespec because of a padding occuring between the fields.
+ */
struct timens_offsets {
- struct timespec64 monotonic_time_offset;
- struct timespec64 monotonic_boottime_offset;
+ struct timespec64 monotonic_time_offset __aligned(8);
+ struct timespec64 monotonic_boottime_offset __aligned(8);
};
#endif
--
2.13.6
Powered by blists - more mailing lists