[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b681fc9c-ae83-ae51-2025-afe84678b14c@oracle.com>
Date: Tue, 1 May 2018 08:40:20 -0400
From: Boris Ostrovsky <boris.ostrovsky@...cle.com>
To: David Laight <David.Laight@...LAB.COM>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>
Cc: "jgross@...e.com" <jgross@...e.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH 1/4] xen/PVH: Replace GDT_ENTRY with explicit constant
On 05/01/2018 07:31 AM, David Laight wrote:
> From: Boris Ostrovsky
>> Sent: 30 April 2018 17:24
>> To: linux-kernel@...r.kernel.org; xen-devel@...ts.xenproject.org
>> Cc: jgross@...e.com; Boris Ostrovsky; stable@...r.kernel.org
>> Subject: [PATCH 1/4] xen/PVH: Replace GDT_ENTRY with explicit constant
>>
>> Latest binutils release (2.29.1) will no longer allow proper computation
>> of GDT entries on 32-bits, with warning:
>>
>> arch/x86/xen/xen-pvh.S: Assembler messages:
>> arch/x86/xen/xen-pvh.S:150: Warning: shift count out of range (32 is not between 0 and 31)
>> arch/x86/xen/xen-pvh.S:150: Warning: shift count out of range (40 is not between 0 and 31)
>> arch/x86/xen/xen-pvh.S:150: Warning: shift count out of range (32 is not between 0 and 31)
>> arch/x86/xen/xen-pvh.S:152: Warning: shift count out of range (32 is not between 0 and 31)
>> arch/x86/xen/xen-pvh.S:152: Warning: shift count out of range (40 is not between 0 and 31)
>> arch/x86/xen/xen-pvh.S:152: Warning: shift count out of range (32 is not between 0 and 31)
>>
>> Use explicit value of the entry instead of using GDT_ENTRY() macro.
> ...
>> #ifdef CONFIG_X86_64
>> - .quad GDT_ENTRY(0xa09a, 0, 0xfffff) /* __KERNEL_CS */
>> + .quad 0x00af9a000000ffff /* __BOOT_CS */
>> #else
>> - .quad GDT_ENTRY(0xc09a, 0, 0xfffff) /* __KERNEL_CS */
>> + .quad 0x00cf9a000000ffff /* __BOOT_CS */
>> #endif
>> - .quad GDT_ENTRY(0xc092, 0, 0xfffff) /* __KERNEL_DS */
>> + .quad 0x00cf92000000ffff /* __BOOT_DS */
>> gdt_end:
>
> It has to be possible to fix the GDT_ENTRY() macro.
> Even if you end up with one that generates two 32bit values.
Is it worth it though? We seem to be using GDT_ENTRY_INIT() everywhere
and the only other reference that I see is in pm.c and it also probably
ought to use GDT_ENTRY_INIT().
>
> You've also changed the name in the comments.
Yes, I should mention this in the commit message.
-boris
Powered by blists - more mailing lists