From patchwork Fri May 6 14:25:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9033701 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0AC9EBF29F for ; Fri, 6 May 2016 14:27:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4330820218 for ; Fri, 6 May 2016 14:27:37 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62978200F0 for ; Fri, 6 May 2016 14:27:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayghI-0003sK-Vj; Fri, 06 May 2016 14:25:40 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayghH-0003sD-Ql for xen-devel@lists.xenproject.org; Fri, 06 May 2016 14:25:39 +0000 Received: from [85.158.139.211] by server-1.bemta-5.messagelabs.com id 22/38-32266-369AC275; Fri, 06 May 2016 14:25:39 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPIsWRWlGSWpSXmKPExsXitHSDvW7SSp1 wg67Huhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8ai/h2MBS9ZK/b9OM3cwPibpYuRg0NCwF/i wTH9LkZODjYBHYmLc3eygYRFBFQkbu81AAkzC4RJfGvqYAWxhQUsJS6vbWMDsVmASlb8O8QMY vMKuEh0X1jJAmJLCOhKPDz3mxVkDKeAq8TuHi4QUwio5O7EeIhqQYmTM5+wQEzXlGjd/psdwp aXaN46G2yikICiRP+8B2wQN3JL/O22n8DIPwtJ9ywk3bOQdC9gZF7FqF6cWlSWWqRrrJdUlJm eUZKbmJmja2hgqpebWlycmJ6ak5hUrJecn7uJERh4DECwg3HvP6dDjJIcTEqivN8LdMKF+JLy UyozEosz4otKc1KLDzHKcHAoSfA+Xw6UEyxKTU+tSMvMAcYATFqCg0dJhPcHSJq3uCAxtzgzH SJ1ilGXY8GP22uZhFjy8vNSpcR5N4EUCYAUZZTmwY2AxeMlRlkpYV5GoKOEeApSi3IzS1DlXz GKczAqCfMyrwCawpOZVwK36RXQEUxAR7yfqwlyREkiQkqqgbHwMZOh6ombl48f+LHG9cSGQOk ZtgI/WIIexxb2HnvwL29z49GW8HlLRK88lFVadt+Y3fRxROLGyJK7ftIPbxlvyDKfsP51fY5B iJrZ9eKpSy5Z6C7fJHHvjwlf/ux9jL+a1HhMS4X7fsX93vCp6xbLyYsCJZtTmCZy5f2d313En d4QYFtkw6bEUpyRaKjFXFScCABk4/nbwgIAAA== X-Env-Sender: prvs=927f2c6f3=roger.pau@citrix.com X-Msg-Ref: server-12.tower-206.messagelabs.com!1462544737!1907338!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 36639 invoked from network); 6 May 2016 14:25:38 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-12.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 6 May 2016 14:25:38 -0000 X-IronPort-AV: E=Sophos;i="5.24,587,1454976000"; d="scan'208";a="358812654" From: Roger Pau Monne To: Date: Fri, 6 May 2016 16:25:22 +0200 Message-ID: <1462544723-48415-3-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.7.4 (Apple Git-66) In-Reply-To: <1462544723-48415-1-git-send-email-roger.pau@citrix.com> References: <1462544723-48415-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Andrew Cooper , Roger Pau Monne Subject: [Xen-devel] [PATCH 2/3] xtf: avoid shifting a negative value X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Because it's undefined behaviour. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper --- include/arch/x86/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/arch/x86/processor.h b/include/arch/x86/processor.h index c9f253f..841953c 100644 --- a/include/arch/x86/processor.h +++ b/include/arch/x86/processor.h @@ -134,7 +134,7 @@ /* Segment-based Error Code - supplemental constants. */ #define X86_EC_TABLE_MASK (3 << 1) #define X86_EC_SEL_SHIFT 3 -#define X86_EC_SEL_MASK (-1 << X86_EC_SEL_SHIFT) +#define X86_EC_SEL_MASK (-1U << X86_EC_SEL_SHIFT) #define X86_EC_GDT 0 #define X86_EC_LDT X86_EC_TI