Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3689304imu; Fri, 30 Nov 2018 04:36:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/VhXMnXf8OjqWByp2axv5Y9MZo+pdk6l2hj5gVf2vA4o2luVi77DdTd7wixSPv7htV6jDi1 X-Received: by 2002:a17:902:209:: with SMTP id 9mr5626853plc.288.1543581366536; Fri, 30 Nov 2018 04:36:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543581366; cv=none; d=google.com; s=arc-20160816; b=cckN1sIBuE53ndMxN5pkbfdxKrhqRhza/AKpD+posKI6Rkg1+L600RnqOmzGFNqmH7 D1nkj2SKAX0AkGzYsX3LKRv20sVbUEQ0I+Dg2yfse+WLHAvTqK74YZQ/2HzmtBu1h7RL WpWl8r7LTF/NY6X4Z6aWfsNsVcZARWSIcHakPQuIR9Yxl7t1OznoY7xIiOcnf45Mw6/8 rFpCUTyOEwM6OucK50A5YYGHwNQesu3fLKCItK1OVYvxnyqlZiVZAmAMCNb8+GztlDHG XHeBFxm0mPwYPdKqk2Pcw73HxhF6XUojJ/3wZOUh4PGP3g2lLC/FdpLblWAwzPU8Ubyt kluw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=m5H6RmkPtd1BZtwKemKL5S9TMVW+3iloG7vK+mZiMrc=; b=uCh5zjtCs3EyzC+auGipKa5tMhBRRf0wFnSvbOWNYnETl7L63h6WdYLSO5xz5hCej4 D4F7E8tpoWxeLMo2Yl5JlBHmYS3kIAT3m+m9yITt5nOghMQPMy7TRQXfl/YoTEfew6/7 1nqDmc8p1LSVGVv0Ffx7/2k7pYrJfFdiw+zzEJh+Z/XlA3FSNHD3fEkBCjn5sz+gn29L 5Zm7cawTKpu7h9zrzfbbbtqUm1yEAZbYE17wDqmbJW4OjFNR6B3mdP1ic7ByrIXROhTD 1sah8WK5LjAzCJdwqMIBxz/aZjlaenqgR8CsCKTGPeE8k0MLBfDKyG8beciKWnXn/Kmd J5gQ== ARC-Authentication-Results: i=1; mx.google.com; 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 a11si5846972pla.20.2018.11.30.04.35.49; Fri, 30 Nov 2018 04:36:06 -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; 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 S1726748AbeK3XoL (ORCPT + 99 others); Fri, 30 Nov 2018 18:44:11 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:37347 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726512AbeK3XoL (ORCPT ); Fri, 30 Nov 2018 18:44:11 -0500 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gSi0Z-0003LN-MB; Fri, 30 Nov 2018 13:34:59 +0100 Date: Fri, 30 Nov 2018 13:34:59 +0100 (CET) From: Thomas Gleixner To: Vitaly Kuznetsov cc: kvm@vger.kernel.org, Paolo Bonzini , =?ISO-8859-2?Q?Radim_Kr=E8m=E1=F8?= , linux-kernel@vger.kernel.org, Roman Kagan , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , x86@kernel.org, "Michael Kelley (EOSG)" , Nadav Amit Subject: Re: [PATCH] x86/hyper-v: define structures from TLFS as packed In-Reply-To: <20181130121511.12331-1-vkuznets@redhat.com> Message-ID: References: <20181130121511.12331-1-vkuznets@redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Nov 2018, Vitaly Kuznetsov wrote: > Subject: x86/hyper-v: define structures from TLFS as packed Please start the first word after the prefix colon with an uppercase letter. Also structures from TLFS doesn't make sense to me. Something like this: Subject: x86/hyper-v: Mark TLFS structures packed > Without 'packed' compiler is free to add optimization paddings and re-order > structure fields for randomization/optimization. And structures from s/And/As/ ? > hyperv-tlfs.h are used for hypervisor-guest communication, we need to > ultimately forbid such practices. That whole paragraph reads a bit strange. Something like: The TLFS structures are used for hypervisor-guest communication and must exactly meet the specification. Compilers can add alignment padding to structures or reorder struct members for randomization and optimization, which would break the hypervisor ABI. Mark the structures as packed to prevent this. Hmm? > Suggested-by: Nadav Amit > Signed-off-by: Vitaly Kuznetsov Other than that: Acked-by: Thomas Gleixner