From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753694AbbEHQX6 (ORCPT ); Fri, 8 May 2015 12:23:58 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:36324 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752734AbbEHQX5 (ORCPT ); Fri, 8 May 2015 12:23:57 -0400 From: Rasmus Villemoes To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: tell the world boot_params is 16-byte aligned Organization: D03 References: <1431092553-12914-1-git-send-email-linux@rasmusvillemoes.dk> <20150508142453.GC4137@pd.tnic> X-Hashcash: 1:20:150508:linux-kernel@vger.kernel.org::YWiyA6K3PI/Q6Yh1:00000000000000000000000000000000006y1 X-Hashcash: 1:20:150508:mingo@redhat.com::rLypkPR+lulKprNn:01Mpg X-Hashcash: 1:20:150508:bp@alien8.de::vxKV3trLKuXPNFg5:0000022/Z X-Hashcash: 1:20:150508:tglx@linutronix.de::6ZtKUOxLXFVSarra:00000000000000000000000000000000000000000002K8M X-Hashcash: 1:20:150508:x86@kernel.org::JV449iNXY2VqoC8B:0002dlV X-Hashcash: 1:20:150508:hpa@zytor.com::YCgWdeih99Kw1O1o:00004Ck4 Date: Fri, 08 May 2015 18:23:52 +0200 In-Reply-To: <20150508142453.GC4137@pd.tnic> (Borislav Petkov's message of "Fri, 8 May 2015 16:24:53 +0200") Message-ID: <87mw1fkpgn.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 08 2015, Borislav Petkov wrote: > On Fri, May 08, 2015 at 03:42:33PM +0200, Rasmus Villemoes wrote: >> It doesn't matter much, but this disassembly makes me cry a little bit: >> >> ffffffff81f21223 : >> ffffffff81f21223: 55 push %rbp >> ffffffff81f21224: 48 c7 c0 40 c2 02 82 mov $0xffffffff8202c240,%rax >> ffffffff81f2122b: 48 89 fe mov %rdi,%rsi >> ffffffff81f2122e: a8 01 test $0x1,%al >> >> The reason is that boot_params is defined with >> __attribute__((aligned(16))) in boot/main.c, but other translation >> units only see the packed attribute on the definition of struct >> boot_params, so assume the worst. Making the de facto alignment public > > Wouldn't it be better if we put both attributes together, i.e.: Sure, putting it on the type works as well. Either way is fine with me. Rasmus