Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp36751imu; Thu, 8 Nov 2018 14:19:00 -0800 (PST) X-Google-Smtp-Source: AJdET5cXIYxlUsgNC76VJqcXCVALcFNxeD5F8pV24kJK7ftGXhOOWXEDGVtXxcQ2HAPFgZ6CKB7W X-Received: by 2002:a62:42dc:: with SMTP id h89-v6mr6577752pfd.0.1541715540267; Thu, 08 Nov 2018 14:19:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541715540; cv=none; d=google.com; s=arc-20160816; b=J2K9oEIYah+UOaEDiPllol/1UC0GBfX2XK73TUvay25qAIFt2vxWghJDMtvrJWrnUj NLarP7uUs15wckS6vfdea5rQGuEX+UgLE9ZzVpVgRuMVLa0A2mGr+qfuLMstPMj1d3Uq 9PgOXX9yiUiG+ug5ONnCXuSWz0wuDSvatg+n9ODASvuAGNiLP6+x6g0H1//lL9RZPyGt LX/l0A8SRUpEDprgqqVQ4f01Or9NR4YMxidQPNHA1HOWzJGTMxobNnORuOGVH918PwoP Owd17jfRXPP9m0vmWvBTcNoRdptwRFmni5ulQS0XP98pBTFhzoXtaBt9Z2FVjkFPyboK OCSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YPui7bcJGXbVMZjpaWkPM+7iS/isIkfIFDRG+aAA/sY=; b=w6u2WAJ3kMYLlZSFYbsH8PPe10pXuoZnF+BmOqAK4H98K8ZFxwT7RdZgXmQFiKe+Fp pf4T52nmPaoKgBmavqXWUR161z6saj12/UExY/RHHwPC/AzuBaFjoG6WleuBT8PbaK0q RCU8OggyROd17Zkjcb16xUkrgp+bdGKRlipFrDyInlASBusYHYdIrKcSmXEDLtvbXUur pSeIi+h+zndZSEMaZdAGznrX4fDbrQnir25j1G4XaaxqJgRhPQ+eMe6Uz+LerCCbUmMP /izML8JUdwoi0xh0J2eymrY+C8O0aduqXk/Pt/vj5FByIH11Qsj2Ey2LmDLDddvgF9n7 ikJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L+2e1Hwn; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f10si4828728pgl.528.2018.11.08.14.18.45; Thu, 08 Nov 2018 14:19:00 -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=@gmail.com header.s=20161025 header.b=L+2e1Hwn; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730881AbeKIHzn (ORCPT + 99 others); Fri, 9 Nov 2018 02:55:43 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:33032 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728520AbeKIHzm (ORCPT ); Fri, 9 Nov 2018 02:55:42 -0500 Received: by mail-lf1-f66.google.com with SMTP id i26so15403437lfc.0; Thu, 08 Nov 2018 14:18:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YPui7bcJGXbVMZjpaWkPM+7iS/isIkfIFDRG+aAA/sY=; b=L+2e1HwnelIeCLf8YzR75sIlsMp6aDkUsow1WS24ztc+/xlPqY1pNtdv2GgLst46YE IfPV6PWAJqngNTttkcJGI3qWVsZStyf2B2yKLGo3cgm5cU0ZU4F34KyMAqTWlfz178Lh 0JwUMnYUQGPOYfhjH30/gQ04YlnmpRux38XyI3AK0Oe9ZRGBlNs1nGLezBJ+Z/Bnhroj 5JpRPxGfDqmCksHcBCZRGI/aeP9f3cOEFjpw9dZW8rB/W+9L8ddu9+mBngD9aO3bqa8A siv4cFwuuCt0/I8eTkyKVHp4u9rfoSM0F+jHB3SO1ryWvgja6tm3wkgTfS+QNe+afOwV O3pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YPui7bcJGXbVMZjpaWkPM+7iS/isIkfIFDRG+aAA/sY=; b=SfnhxbKe0RsY70BROKKaTHZ4Z6Jo7yb7DxImjUb4008qRN/72SJpnHffaiBBmbK7sE YcG/YgZcTK0QeIQiVQlEpSbDahvxG52uvjYpRMF59PzbE6f1n/dVn1kEwIV+hldmI+BP cqTaZ6b1Y2IFdjR5BvJhD9RPPVnjbXpushX8sAYZCk1txCgVSg4a0b4OZBSxSgmehZip 93+1aX/1/J2BjkmHNQ9pqRmMUoAXR9vv+DMFAu7EPWLTKtmOII3ZmAbxxyLrzoIUk3sS 10lcmxxApsEldBDKPC8EmYkBwrOoBh04yw8kU/9yhgBGnFXG4ucCVzB+K31XwxQjTS0C StLQ== X-Gm-Message-State: AGRZ1gIa0OH6ODmO8sgFMzxV94e3q46KoHQZi0Zv7EgX1SJICs3Xnw53 0qzxBLNgZOT34jIOp9sRW4o= X-Received: by 2002:a19:702:: with SMTP id 2mr3805648lfh.144.1541715486117; Thu, 08 Nov 2018 14:18:06 -0800 (PST) Received: from uranus.localdomain ([5.18.102.224]) by smtp.gmail.com with ESMTPSA id u21-v6sm876886lju.46.2018.11.08.14.18.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Nov 2018 14:18:05 -0800 (PST) Received: by uranus.localdomain (Postfix, from userid 1000) id A06BF4607EF; Fri, 9 Nov 2018 01:18:04 +0300 (MSK) Date: Fri, 9 Nov 2018 01:18:04 +0300 From: Cyrill Gorcunov To: Andy Lutomirski Cc: Yu-cheng Yu , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , "open list:DOCUMENTATION" , Linux-MM , linux-arch , Linux API , Arnd Bergmann , Balbir Singh , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H. J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , "Shanbhogue, Vedvyas" Subject: Re: [PATCH v5 04/27] x86/fpu/xstate: Add XSAVES system states for shadow stack Message-ID: <20181108221804.GE13195@uranus.lan> References: <20181011151523.27101-1-yu-cheng.yu@intel.com> <20181011151523.27101-5-yu-cheng.yu@intel.com> <4295b8f786c10c469870a6d9725749ce75dcdaa2.camel@intel.com> <20181108213126.GD13195@uranus.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 08, 2018 at 02:01:42PM -0800, Andy Lutomirski wrote: > > > > > > They both seem like bugs, perhaps. As I understand it, __packed > > > removes padding, but it also forces the compiler to expect the fields > > > to be unaligned even if they are actually aligned. > > > > How is that? Andy, mind to point where you get that this > > attribute forces compiler to make such assumption? > > It's from memory. But gcc seems to agree with me I compiled this: > Indeed, thanks!