Received: by 10.223.185.116 with SMTP id b49csp1795120wrg; Thu, 22 Feb 2018 03:19:21 -0800 (PST) X-Google-Smtp-Source: AH8x224Rxo6rtLCRVA26tIYD5VM3IG7awgSlUPaI3gPuVpYBOl4MkLoGS03HEdEbboTB1OLrfwcP X-Received: by 10.101.92.6 with SMTP id u6mr5379056pgr.440.1519298360981; Thu, 22 Feb 2018 03:19:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519298360; cv=none; d=google.com; s=arc-20160816; b=krI+uxHHW0TOmdLW9+bxPzD6NogGAZPQsx4PvxuUMpfXyXlZ+Zgyxn9+kgmQyEym79 gitw+1n22hSibAc4xgD/CGh9DhYrUgJBNJyCSz37zQqB9w981r5QrLtkL0Dx0dnx7r6D 8vSv6V+Ru+1HOAUzHVB/fJ0KApsB7J6p2TdVyL/IHp8m4s/xOhYgcXSmmDXw0CXTMMW7 4jzcXKzsdW5dYsHay7mATwxXdk/X8NT5K5JrC7HxMLu7X/HMxlvx+2hmkj9vhfD+g63V LhXrPBibzxpHb8QpydIvM0uGtVw0iG4h0gFeMxas44j9yY+dy0lXY+iX4PNxOb4Ev726 EWIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=wAae8AJs73O+jWjWMS1OBeCNCKgWvFnqW6+Jb2/usQM=; b=xFq0HdruHIl06ka1EQxD5J4NVsSg7M3knGEzEaQQzke/gzfVxZ9NQq3nsNe4JhLG6x rAJHTYcMj2ZdJX+L6rogs6mAqOAl4qInu+vaic33q8LNNpjE8wqUPSp0QhKHGtOa6pZK HELLgSkW+MEy4Tuu4MKI4N+PzDL9iSPVSKT7GkaU/6fzO3yxxm1Y/VtocMMwSL9ZLN5J AvFo41gDJdZynaOE71A0c47gXZB4X5beKJDUBUwj0nSNx5+JYCyrkVExphccHL5ZpHDk BWCEX+4NYm1IaetVpObwm75Kl91HYlNDd4BaPQYrvAY5T00e38JWi7DorpOTzz93JEV+ on7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OBE34fbQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si10483931pff.155.2018.02.22.03.19.06; Thu, 22 Feb 2018 03:19:20 -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=fail header.i=@gmail.com header.s=20161025 header.b=OBE34fbQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753653AbeBVLSE (ORCPT + 99 others); Thu, 22 Feb 2018 06:18:04 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:43938 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753501AbeBVLSD (ORCPT ); Thu, 22 Feb 2018 06:18:03 -0500 Received: by mail-qk0-f194.google.com with SMTP id j4so118902qke.10 for ; Thu, 22 Feb 2018 03:18:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=wAae8AJs73O+jWjWMS1OBeCNCKgWvFnqW6+Jb2/usQM=; b=OBE34fbQbnrA9c91tOcacwSLINyD61tlJ2gKb07m8aRzN9ZaIG/dysmI48CkHqn5GS ZGfG319FOqVs9hKtN8P7rTuUWDhtgujVRHXL7vcRxr2hjpIC2ALuESNEsxl9zSzHIHo+ x9mn6/J5UgENgnlQTqm6rhGviCX63c3wji24jppry26P9XmFvONlpRL7UJ8Niqdlnrst cQvX+iepxW/DLbRKAv5B+RYd/L9UTxSZyqib9hlwUnd5plTBe6TduJb/hoz8dHxi4dKF aDDrNidVTu369OYTdp9vGPf7oYhyXxh/g1OCHT3TeUN6VmCYQ+TrEYqhhxYcZety/Bb+ 9WFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=wAae8AJs73O+jWjWMS1OBeCNCKgWvFnqW6+Jb2/usQM=; b=GXg6bjRrdBttGQl3NAvffdqxO5FaNRaHPBt6MniUzyaqB227iL4u3SRXLwgCr0AS98 dydN8qiib+y4ES8j68HT984s7VPmVDaaNfNCHR+pmbYXvmKr2HmF0L/ZgcB19ZDTOFAx ftVBVNLNy9SylnmS4XqAQoBIhtar38te+GjCT5wVyfMMQTbKClQaWlQVhtoie68Bhf/R gTCeuSR7rVGacyezyfu7hevlQmbY2W5RAAqMqNCaUPBRs6Qv4Yci0+iX1YQPon4XOsN/ FGSpr0U6ndPW3iMV83idqhbGu2W42VDHAdHic7+gqNqj4vQEoC/Ufcljmzgw/+gpoPpT 2nxw== X-Gm-Message-State: APf1xPA7f1aF1g8oM4ySJjxfcV4KfhLCsGHbMWD+Z8QH8n38Lm0lIVJq kAshYF260Ql1RrEt3bLGbMzqs1Oip21pmUuwOvo= X-Received: by 10.55.157.76 with SMTP id g73mr10310684qke.107.1519298282693; Thu, 22 Feb 2018 03:18:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.198.17 with HTTP; Thu, 22 Feb 2018 03:18:02 -0800 (PST) In-Reply-To: <20180222111003.GB22572@kroah.com> References: <20180209191112.55zyjf4njum75brd@suse.de> <20180210091543.ynypx4y3koz44g7y@angband.pl> <20180211105909.53bv5q363u7jgrsc@angband.pl> <6FB16384-7597-474E-91A1-1AF09201CEAC@gmail.com> <20180213085429.GB10278@kroah.com> <20180214085425.GA12779@kroah.com> <20180222111003.GB22572@kroah.com> From: Arnd Bergmann Date: Thu, 22 Feb 2018 12:18:02 +0100 X-Google-Sender-Auth: gnjU4FpYP0kYtzfbBzM3LVxL1uo Message-ID: Subject: Re: [PATCH 00/31 v2] PTI support for x86_32 To: Greg KH Cc: Lorenzo Colitti , Linus Torvalds , Mark D Rustad , Adam Borowski , Joerg Roedel , Andy Lutomirski , Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , Linux-MM , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek , Florian Westphal Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 22, 2018 at 12:10 PM, Greg KH wrote: > On Wed, Feb 21, 2018 at 05:59:34PM +0100, Arnd Bergmann wrote: >> On Wed, Feb 21, 2018 at 11:26 AM, Lorenzo Colitti wrote: >> > On Wed, Feb 14, 2018 at 5:54 PM, Greg KH wrote: >> >> > > IPSEC doesn't work with a 64bit kernel and 32bit userspace right now. >> >> > > >> >> > > Back in 2015 someone started to work on that, and properly marked that >> >> > > the kernel could not handle this with commit 74005991b78a ("xfrm: Do not >> >> > > parse 32bits compiled xfrm netlink msg on 64bits host") >> >> > > >> >> > > This is starting to be hit by some Android systems that are moving >> >> > > (yeah, slowly) to 4.4 :( >> >> > >> >> > Does anybody have test-programs/harnesses for this? >> >> >> >> Lorenzo (now on the To: line), is the one that I think is looking into >> >> this, and should have some sort of test for it. Lorenzo? >> > >> > Sorry for the late reply here. The issue is that the xfrm uapi structs >> > don't specify padding at the end, so they're a different size on >> > 32-bit and 64-bit archs. This by itself would be fine, as the kernel >> > could just ignore the (lack of) padding. But some of these structs >> > contain others (e.g., xfrm_userspi_info contains xfrm_usersa_info), >> > and in that case the whole layout after the contained struct is >> > different. >> >> So this is x86 specific then and it already works correctly on all >> other architectures (especially arm64 Android), right? > > Why is this an x86-specific issue? I think people have noticed this > with ARM systems given that the original bug report I saw was for an > ARM Android-based system that had a 64bit kernel and 32bit userspace. The patch Lorenzo linked to is only for x86, it addresses the fact that the padding at the end of xfrm_usersa_info differs between 32-bit x86 and all other architectures because of the x86 specific quirk that u64 variables have 32-bit alignment. xfrm_usersa_info should have the exact same layout on arm32, arm64 and x86_64. Arnd