Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp531357ybc; Tue, 19 Nov 2019 05:22:03 -0800 (PST) X-Google-Smtp-Source: APXvYqzodNa3PKCi4cZPTa4y73Lacv1K/RuWZSarKiZKj/RoSFLcjwbgaO1PwpRJN7oxV/Uj+IsQ X-Received: by 2002:a1c:e157:: with SMTP id y84mr5327349wmg.59.1574169723243; Tue, 19 Nov 2019 05:22:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574169723; cv=none; d=google.com; s=arc-20160816; b=CtmHY0tKdgxHHBL5OjMX7GgYL38k4ly7S/j89/ut3jBiHy1JVbff4Nblt1NFLsNjoa nZIpamhjbjauaSNYEqZtmXcc2HaLgtmNQq80lpJqs1Oy7B6rn+9H72zvQDOoQgbRqsJ2 IjbN6MyZ0mCRT8RrXKCLhck61dPEWiAU7EyCCAV8k+x6zYQedlufaxJcmjoe5FmkTWr9 Ngt1uraBGS7xwHZr/VtXg9/LLwE2qq9zxB/3PUrC+gauoP/5e/6MNH75VEJOQHdDR/1+ YDR32ccDwr75QkCzny6SACCTq6CJLFHjAoNX7TBE74mW0ODGNnoGX1qvIEYVj2qKgEwy wi/A== 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; bh=abXzPcGymcJaAyVVVdIyM5DT1VivU9nFlqxnUYn0R6E=; b=QTire0gnGeBk+NPTMgZKSpxvJbwKCMhG3sbyNBTBOH4gDNGISOVW+nxohp3lqN4IhZ ZJhcieQG/4vTt0Xx3UwzCpcLxyOTofiv4OGHDdbwzwJ02QoYM+l1mQsrQHvWBTl9bX3F qmO7E5YvB+H/gBxZQMDtiqqPcOkJHBadeoENBCb5rYshRYYHa63tX16o4JU7YUWDSRlz 41X4OOzJlmyjCaKkRJcjvEqj12x/jf8Fg6Xu10KbMkP7ykcUv2FpClPNN860IE9kYbcV pjXl0k+evCRYH2IVmlPxGepSQRgyOegyP9PbHXwQqmMbfUgZzAL4e4qBl+VV7FadAD8X 0QfA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si16198174eda.433.2019.11.19.05.21.38; Tue, 19 Nov 2019 05:22:03 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727682AbfKSNRp (ORCPT + 99 others); Tue, 19 Nov 2019 08:17:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:39670 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725904AbfKSNRp (ORCPT ); Tue, 19 Nov 2019 08:17:45 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 732B3B297; Tue, 19 Nov 2019 13:17:43 +0000 (UTC) Subject: Re: [PATCH 1/2] x86/Xen/32: make xen_iret_crit_fixup independent of frame layout To: Jan Beulich , Boris Ostrovsky , Andy Lutomirski Cc: lkml , the arch/x86 maintainers , "xen-devel@lists.xenproject.org" References: <32d8713d-25a7-84ab-b74b-aa3e88abce6b@suse.com> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: Date: Tue, 19 Nov 2019 14:17:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <32d8713d-25a7-84ab-b74b-aa3e88abce6b@suse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11.11.19 15:32, Jan Beulich wrote: > Now that SS:ESP always get saved by SAVE_ALL, this also needs to be > accounted for in xen_iret_crit_fixup. Otherwise the old_ax value gets > interpreted as EFLAGS, and hence VM86 mode appears to be active all > the time, leading to random "vm86_32: no user_vm86: BAD" log messages > alongside processes randomly crashing. > > Since following the previous model (sitting after SAVE_ALL) would > further complicate the code _and_ retain the dependency of > xen_iret_crit_fixup on frame manipulations done by entry_32.S, switch > things around and do the adjustment ahead of SAVE_ALL. > > Fixes: 3c88c692c287 ("x86/stackframe/32: Provide consistent pt_regs") > Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Juergen