Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2898127ybl; Sun, 2 Feb 2020 09:17:20 -0800 (PST) X-Google-Smtp-Source: APXvYqwgkeP4c8ga+wTH2LPqgawz0FCempeBwnPXIj7U+dCN23LSrA3eOufEzSLVFPk4krTNjRfJ X-Received: by 2002:a9d:2902:: with SMTP id d2mr5455907otb.305.1580663840564; Sun, 02 Feb 2020 09:17:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580663840; cv=none; d=google.com; s=arc-20160816; b=0OJAT/EFP9ugdv7OfTsA3snQimuMpiFMoel9/l0EYQtlOQNalhrCf2VnhrNrGZa3vI zCDpEGc9aNz5l15bOQCj1FAmfKrn1zsHso+MvN2mDuaZ6sTtV7YJyICUoW0bWy3YtPpa C0DqJmBrN0znfITk7HerucWa/izMK51e8QHD2TujuJqSeL2zLXMMoJt7YVl7ZgtWepLZ pBk3pjsxR5aVRWaJxWQphzronGNHHyy30AxGJHP7CrIbZvTu52GY5TP7eQ8EZpCyhWav 5mj14cddmdIqq8pok2M1LTqqsJmgULraQxrMuSAiKPQCpvED2QlBLEdVc5fBxOGWR6sI AnCg== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7z/YtSaq7WUzyq8uTh8INOXWGUnC01Sb7rXV3fObso0=; b=byKbJ2OlvNQKzL0FPoRMKYrH0ZZVO0mKlWBe0BfedRLDWJa2RTqq04pCd2xrg+JY3X JE1trykhOUHAaDueXg5ynajI+YRHQmPiar5+SocqRQVHmrglDOUbBJVN0vTwyA8Npwuz 9+63CFa6fHAfkYNG4VSSOqkAABGh/0AVjrTtzRNiBCiNlRT/8qfwylYoOmnDyIJ7y1Ow c6A4pHkNOCiwm1+/9+FoO6TipU1E4ALaWVi+4JqTBaMhxYJwBLFHr6VcZrV+tRWbJ7ey snIC8qP7dYnZ+V7equfPhSggseC1PaYmIzDELBaXjnOzO1rAmf9s63+HE6lmw9QAFHOE 290Q== 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 d83si6850678oib.166.2020.02.02.09.16.39; Sun, 02 Feb 2020 09:17:20 -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 S1727181AbgBBROR (ORCPT + 99 others); Sun, 2 Feb 2020 12:14:17 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:37594 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726992AbgBBRN7 (ORCPT ); Sun, 2 Feb 2020 12:13:59 -0500 Received: by mail-qk1-f194.google.com with SMTP id 21so11945102qky.4; Sun, 02 Feb 2020 09:13:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7z/YtSaq7WUzyq8uTh8INOXWGUnC01Sb7rXV3fObso0=; b=pp7H0XoQYSNYA4GFMEUYibj5HNzpPxzQMK+MCbV61x++knGyJ6trn61dhBcIVI7nlK DbpDJ0p/7Rw0dE0JFrgJSVpbIdFPt31lFno5QJTL+eESlAkP8Sx1dgcSTxzSrrcFasfq koUR/LGd73FsWm3HXR5tXYLZgQ3nZPSIZvgq1C7dWs11z4xMl5E3WTr92zQgeHNNWtUI xWNjJGiB9xAgMO3pHK/wRLAlxuv4XgL7JbKzdx20ZNwG3qgzuA7E31qD2KqZ293HsPM8 zR8ZLj12u3ciyN5LbFJ3UmrdTitKfIvUIUxtIqA+RDMcY+6vU9yL+WqAXAuVlTzz1x+4 ekiA== X-Gm-Message-State: APjAAAXKu+adxd8KA85BjpfTUZamU6WJpBhLYAf3bIlAUlmvzAYd51yp H1kQ5/F0O/KGlg5UnMUOTrQ= X-Received: by 2002:a05:620a:1108:: with SMTP id o8mr19312466qkk.118.1580663638235; Sun, 02 Feb 2020 09:13:58 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id 3sm8150081qte.59.2020.02.02.09.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Feb 2020 09:13:57 -0800 (PST) From: Arvind Sankar To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Ard Biesheuvel Cc: linux-efi@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/7] x86/boot: Clear direction and interrupt flags in startup_64 Date: Sun, 2 Feb 2020 12:13:50 -0500 Message-Id: <20200202171353.3736319-5-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200202171353.3736319-1-nivedita@alum.mit.edu> References: <20200130200440.1796058-1-nivedita@alum.mit.edu> <20200202171353.3736319-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org startup_32 already clears these flags on entry, do it in startup_64 as well for consistency. The direction flag in particular is not specified to be cleared in the boot protocol documentation, and we currently call into C code (paging_prepare) without explicitly clearing it. Signed-off-by: Arvind Sankar --- arch/x86/boot/compressed/head_64.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 27eb2a6786db..69cc6c68741e 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S @@ -264,6 +264,9 @@ SYM_CODE_START(startup_64) * and command line. */ + cld + cli + /* Setup data segments. */ xorl %eax, %eax movl %eax, %ds -- 2.24.1