Received: by 10.192.165.148 with SMTP id m20csp4885112imm; Tue, 1 May 2018 05:42:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp2Rjh8394LsJ0YtcyyvMT7XXKgiiovTfFP17xaWk8lFSlk6vwF/1XNCSBYlj3t35QhgKms X-Received: by 2002:a65:4d8f:: with SMTP id p15-v6mr8686699pgq.305.1525178561766; Tue, 01 May 2018 05:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525178561; cv=none; d=google.com; s=arc-20160816; b=ofvr32mRSskJM3r213y5bOBW2L6pJUIcL+f722YD+cGBVu/u95TV0WpEcwbMREM9a1 P7CM3LeweRsivrSbCEmBUWx9LkQiksFHqnCVm3DX05RJ/vrhHceSjfWiP5NLIKIHyooD GEIBKyK51eVFOz4wMVGcdlXjNpVM81T5368KkgX6aFwYGz0uWvoeVnKr+Wm0ujWFwdIY Yx74m8+yhCyUpLQBqAOkKyPkzIloeKyCubt4PUXMnb5IJB6qznP2NWlua1ODsTBxQRpm jlnTG1KgtLSGq1HC0eiYd2A6PkhrQ524xXH+ehhz0L+n1nxp3S63rt5MqUIGdrKlvBN4 I41A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=vG+3UFSJCzNNZ86eIg7HA6J4XMHdvCJijd+wA/jdlAc=; b=ULs/6CJiw6EDn7GNudAenBWmt30dmxaitJQZIkDzsX6L/BPnGeTfcHwvvaQg31nEn1 drDzs/D1+2eUpLlnHjU96Gw8h1zKi6conAz974hUb0j5A9QpP9rhc18LGUdjk1cXQhUG MfSHISpRlU4oz/YkZOVDVxVtn79m7D8MBIHVi3yofC3n3Zd39Z9FwtMPWwsMQ2tYa8o9 KLewdK1vmWAkZ51PF2QthVF+zoiV+QX98Btv7ZVFBZq3B8HTfc5efc0CPEbmmoknddEy RJk4cKURT2obKkHcThRd1HT82FUAuBMVt1ARsNpbUSqc6fLIGyBJc9Qs7+D70YYn4rob ZBIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=StvNPXPV; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10-v6si7714623pgq.249.2018.05.01.05.42.27; Tue, 01 May 2018 05:42:41 -0700 (PDT) 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=@oracle.com header.s=corp-2017-10-26 header.b=StvNPXPV; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755462AbeEAMkh (ORCPT + 99 others); Tue, 1 May 2018 08:40:37 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:44220 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755044AbeEAMkf (ORCPT ); Tue, 1 May 2018 08:40:35 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w41CavMr129418; Tue, 1 May 2018 12:40:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=vG+3UFSJCzNNZ86eIg7HA6J4XMHdvCJijd+wA/jdlAc=; b=StvNPXPV7gZ3MLZKaLArFmKOvnrfmjmg3DUmFPjfkD5ETqcT42rGMhtzziHtjgn4JsSc 6oJ13Z8JCYWqUl44bRbPIpvBRmTwGrsicP4RrIXHm/cRQjcu4JfgVeoYFZR9HsY/0dIi l0RUUt8uw2cAzg9z35UnNqH5hCLt17AvWyTlz7V4TSo92eyGyl5busYOY7PYh+/dlAgV hnoWmmcRiD/bOshDaoEKcKcHMH/nn/JjArPaBKpOZ3u6YMWqkXlwQDAZ/DEhButf/W+Q /aYePPFqyetUyh8ZIFQV4SI8Da3pJ1NKUJ13zFXgJ/tjs/u+mWZyY0fL7J1y4Sc9ofvI PA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2hmhmffhfv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 May 2018 12:40:23 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w41CeM0F010813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 May 2018 12:40:23 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w41CeM5I030783; Tue, 1 May 2018 12:40:22 GMT Received: from [10.0.2.15] (/108.49.193.195) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 01 May 2018 05:40:21 -0700 Subject: Re: [PATCH 1/4] xen/PVH: Replace GDT_ENTRY with explicit constant To: David Laight , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xenproject.org" Cc: "jgross@suse.com" , "stable@vger.kernel.org" References: <20180430162339.17143-1-boris.ostrovsky@oracle.com> <20180430162339.17143-2-boris.ostrovsky@oracle.com> <70673793884c4eba857970359f9f5158@AcuMS.aculab.com> From: Boris Ostrovsky Message-ID: Date: Tue, 1 May 2018 08:40:20 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <70673793884c4eba857970359f9f5158@AcuMS.aculab.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8879 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=859 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805010127 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/01/2018 07:31 AM, David Laight wrote: > From: Boris Ostrovsky >> Sent: 30 April 2018 17:24 >> To: linux-kernel@vger.kernel.org; xen-devel@lists.xenproject.org >> Cc: jgross@suse.com; Boris Ostrovsky; stable@vger.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