Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934129AbcKWI6S (ORCPT ); Wed, 23 Nov 2016 03:58:18 -0500 Received: from mail-wj0-f170.google.com ([209.85.210.170]:35354 "EHLO mail-wj0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933961AbcKWI6G (ORCPT ); Wed, 23 Nov 2016 03:58:06 -0500 Date: Wed, 23 Nov 2016 09:57:27 +0100 From: Ingo Molnar To: Andy Lutomirski Cc: Linus Torvalds , Brian Gerst , Andy Lutomirski , Matthew Whitehead , "H. Peter Anvin" , George Spelvin , "linux-kernel@vger.kernel.org" , X86 ML Subject: Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot? Message-ID: <20161123085640.GA7601@gmail.com> References: <20161121071342.GA16999@gmail.com> <20161122083043.GA16081@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 727 Lines: 21 * Andy Lutomirski wrote: > The SDM says: > > If the source operand is an immediate of size less than the operand size, a > sign-extended value is pushed on the stack. If the source operand is a segment > register (16 bits) and the operand size is 64-bits, a zero- extended value is > pushed on the stack; if the operand size is 32-bits, either a zero-extended > value is pushed on the stack or the segment selector is written on the stack > using a 16-bit move. For the last case, all recent Core and Atom processors > perform a 16-bit move, leaving the upper portion of the stack location > unmodified. > > This makes me think that even new processors are quirky. Oh well ... Thanks, Ingo