Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp5665080ima; Tue, 5 Feb 2019 16:14:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ/TNtODzwrJ8Q4yhPtZO+3QIKOSvAU3wVM0+PWWWM1Kk/sFt5JaLnYn90/9u1aokeSHhnq X-Received: by 2002:a17:902:bc3:: with SMTP id 61mr7868783plr.15.1549412075653; Tue, 05 Feb 2019 16:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549412075; cv=none; d=google.com; s=arc-20160816; b=Bjx0zUsWd3iGCQsVs68v9R5sS+0qy8J0MtqkSCT2+egv1VEO/0b0PexzTj+17YBEht b7hCpwLGSqlk3pi1cI0RcrKxsAWdaCX/rnrJQRcARBBZPo27lJBMM0u83oLeXM1VgFzJ H2PvORTT9A7PGROKzR+i0a3SWczx65pZGUNR4DvS/paBffjZ/q9NXPyBWsMewMQsqTiS hs43NRrPPNHl8cJ8e1dMpfXvlU9+bHMEAU89G4cVaLBPR4YgsZVHSjawWeH3xpgtZFwj gH8AYGNjviolRUiPm+ZucxZIwbeT1jcddMi48FB8QjUFudej6acdej4FZB+COMh+tOCu Fnhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GYtWgsYIrbQ+wXLZQ6GRDMo0YzwFjr2Z8S6W7O2LBTk=; b=kBawcPfPh3pi6bUKZPnZ9UjKBfCQMxSedXB4eIxLvxzldjt2nSBRI/FVafNBIXYgvc oHDXoHQKoXwjV0M7+CO07VRrD4eYW14kPGaPeXIySO41kC8RwflDT6YLodrxV2dsJTQX g2BOfuwBkDse/KLeikHIMCoW78ZM7q5/pccgAln4Il+iBcjzbHYBRZ2T5cKR5/x64tm9 MXxqvAN4xvKnpdE+KSlwujhxSkGf52/72XnHx+utG2KwVNjNiGZAuzFxm+732aJcZPr7 yKEHnvooUhp5UBTS13tIU8c5NkwC7CXMW1p+uREK8EP7CsBI6vifWc74EjS/MED4yxU4 SEnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arista.com header.s=googlenew header.b=oXpybZ65; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=arista.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u131si4503777pgc.287.2019.02.05.16.14.20; Tue, 05 Feb 2019 16:14:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@arista.com header.s=googlenew header.b=oXpybZ65; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=arista.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729363AbfBFALo (ORCPT + 99 others); Tue, 5 Feb 2019 19:11:44 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:35248 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729178AbfBFALl (ORCPT ); Tue, 5 Feb 2019 19:11:41 -0500 Received: by mail-ed1-f65.google.com with SMTP id b17so322530eds.2 for ; Tue, 05 Feb 2019 16:11:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GYtWgsYIrbQ+wXLZQ6GRDMo0YzwFjr2Z8S6W7O2LBTk=; b=oXpybZ65zOtlwlrNVV8Yjeex71UpqY5Rgkc3a9e2a1zA5iFgEUgjOTCqINQfhqZU/j OK3h98L2SbrO86GYKrZ4tMgkj09Vix1yirSNGGDEhEn4ReOnQWO5oHYlnT4S1q/wDq3A lgbbCaZ66TaRnh2j9uLXvENEIvi9S98TDglvK4WR9eenUiCp/ybuqNqlfIF4/rrUB3/M vE61TPBmaRhPuscVhgcVse30bb53qDoV8Fs/J/VgngYFGKgl+6E053T9zMZ85AfKGxWR jc71d+6fhgOjb55VZOIkp+FfXBrt9lCVwSokgJNdfWrMADt/TZEJmxrBPULJ2JO6AG2l 9Z5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GYtWgsYIrbQ+wXLZQ6GRDMo0YzwFjr2Z8S6W7O2LBTk=; b=kpn3HCNsamZrvCYHSFTkvngf9kkUtNKmznSIp67mpUAj1FGCVGrj6c+PuvJRKkx0O7 g/tE7N2Mo+nTA/p3La/oUOO9dA3OvTfgRQ5mHLqtsuO1BCsD11eq+J0d1hbvBie7+8N2 8yyKX7SDEVkr2kp43au5bD0Wt5kcfsXStdO8JFZGMxSSGp4Tji/EKIvI2e6BWUQgHG5z XrlGgmKSrLapzdOGvpuvj+RL9Bt5QfmlgHYti+GYNZtZ219e5zXMv2BjDsvza5ZzMHyG T1DCXbB6kg23/muHfRc342DSSRL5eiG3zGnMdZt4MKlyF23UZrlvIzTfnqZcIzBC3/Bf hB5A== X-Gm-Message-State: AHQUAuakRGXbLS3n+p9L92m9vcB0m1EAdQXynB76g2fgt8iXwvXkbXf6 /mirbJ656U2m3WJCRqnBbPpvSS6bJF0= X-Received: by 2002:a17:906:d29b:: with SMTP id ay27mr5260960ejb.119.1549411899093; Tue, 05 Feb 2019 16:11:39 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id p30sm5489594eda.68.2019.02.05.16.11.37 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 05 Feb 2019 16:11:38 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Cc: Dmitry Safonov , Adrian Reber , Andrei Vagin , Andrei Vagin , Andy Lutomirski , Andy Tucker , Arnd Bergmann , Christian Brauner , Cyrill Gorcunov , Dmitry Safonov <0x7f454c46@gmail.com>, "Eric W. Biederman" , "H. Peter Anvin" , Ingo Molnar , Jeff Dike , Oleg Nesterov , Pavel Emelyanov , Shuah Khan , Thomas Gleixner , containers@lists.linux-foundation.org, criu@openvz.org, linux-api@vger.kernel.org, x86@kernel.org Subject: [PATCH 22/32] timens: Add align for timens_offsets Date: Wed, 6 Feb 2019 00:10:56 +0000 Message-Id: <20190206001107.16488-23-dima@arista.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190206001107.16488-1-dima@arista.com> References: <20190206001107.16488-1-dima@arista.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Align offsets so that time namespace will work for ia32 applications on x86_64 host. Signed-off-by: Dmitry Safonov --- include/linux/timens_offsets.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/linux/timens_offsets.h b/include/linux/timens_offsets.h index 777530c46852..f2a03d4f7a91 100644 --- a/include/linux/timens_offsets.h +++ b/include/linux/timens_offsets.h @@ -2,9 +2,17 @@ #ifndef _LINUX_TIME_OFFSETS_H #define _LINUX_TIME_OFFSETS_H +/* + * Time offsets need align as they're placed on VVAR page, + * which is used by x86_64 and ia32 VDSO code. + * On ia32 offset::tv_sec (u64) has align(4), so re-align offsets + * to the same positions as 64-bit offsets. + * On 64-bit big-endian systems VDSO should convert to timespec64 + * to timespec because of a padding occurring 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.20.1