Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5997902ybc; Wed, 27 Nov 2019 13:08:27 -0800 (PST) X-Google-Smtp-Source: APXvYqwr3vpNts+6kwOwrcOb9h/Hc5XQxAUGsN68oQGrHS3OqKBjhr4S1OgyxJY31MtRqd41kt1C X-Received: by 2002:a17:906:2359:: with SMTP id m25mr2155441eja.22.1574888907273; Wed, 27 Nov 2019 13:08:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888907; cv=none; d=google.com; s=arc-20160816; b=bx9u8TABrf0Bw2y3diKoH9b71esXOx0gJQok+zUjLQTpJDZg3hGZ3+rvo0nPVhHIS4 He+tQ2psbJrp+D6FogBPitSVURu5qc5k+td3csyRa4zQ735a9czoyj3pjPtFL3XJ/jaw 3E5RncmbC7V+A2rMvpEJCHzaaV9fI8kWvFKysJZvE1Shl4H4jJ3rtYDAyo33b3ABKeQ1 afpk+PXm9zcsNR6k5Gb1AhOZcm1kr9r6hftTuFtEf/hl/pAfy+WorBBSONfWa9CMDnnS 4lCK2sKrylHUEYd/Ndc5Rv+1b6EZKHG9k9SlR1ZSnCQQXgGqJJnwRIitrF6RjTqneIsV hRpg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6wY1ttCoDxYehtTxwamEoqA8tJytH1WmD21sV9bo5VA=; b=GLJAXS2rcNNp3iLL6Rh2gtwq0ZXOSJygXi/1gKLShGzxWBkWkkTjWinXxV8l4gX315 YA65J+Vspa7l0MjQEhpNEYlbHOITelBoFNXkv0B0U5EegBQ+1dnErdgeuhIAmQMvQoem yhVTHM15DXNO2BzY9ti9hVxaVMpJ1YGPW8V5AfZihUlstEVq3W4O1PgHTcvLC+thSl5O ref8cuCHcZNqzXgT24M6PN4fJ2E2sOQ6vER3Dm6PpuQuPAMRymPFoRUlQ5+UY+6RBoKl A8ANjhFW5hIsUkwZpzh8Npj1Hl8r+0qDp7bmdeG7tYZlfPkJqI0ZwtvzZSN5LetV+rGS nrwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=y73nsRcd; 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 z4si10440810eju.105.2019.11.27.13.08.03; Wed, 27 Nov 2019 13:08:27 -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; dkim=pass header.i=@kernel.org header.s=default header.b=y73nsRcd; 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 S1732468AbfK0VGj (ORCPT + 99 others); Wed, 27 Nov 2019 16:06:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:60780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732441AbfK0VGe (ORCPT ); Wed, 27 Nov 2019 16:06:34 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0A79121843; Wed, 27 Nov 2019 21:06:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888794; bh=zBhu2+KdYMb3Yub8SsyOlnjWpHgy8s+5nopaN6TD0kU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y73nsRcdho1bkvi4Hx6fHZhnDHTyDVYSa9HhLqZKlRpaRBIE9BiXwO9UaY3+TB/N5 d15NYYYL6jRm8+RpGo4YE1WhrH5bqDKM9kbZo5T/z/tXFgrN5ctjhEERUyF8dKSWHl xQbx8mKWP7Dc4K2ilsIj4TeytaLmnvtm21UxdiJ8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Lutomirski , "Peter Zijlstra (Intel)" , stable@kernel.org Subject: [PATCH 4.19 271/306] x86/doublefault/32: Fix stack canaries in the double fault handler Date: Wed, 27 Nov 2019 21:32:01 +0100 Message-Id: <20191127203134.623566738@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Lutomirski commit 3580d0b29cab08483f84a16ce6a1151a1013695f upstream. The double fault TSS was missing GS setup, which is needed for stack canaries to work. Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/doublefault.c | 3 +++ 1 file changed, 3 insertions(+) --- a/arch/x86/kernel/doublefault.c +++ b/arch/x86/kernel/doublefault.c @@ -65,6 +65,9 @@ struct x86_hw_tss doublefault_tss __cach .ss = __KERNEL_DS, .ds = __USER_DS, .fs = __KERNEL_PERCPU, +#ifndef CONFIG_X86_32_LAZY_GS + .gs = __KERNEL_STACK_CANARY, +#endif .__cr3 = __pa_nodebug(swapper_pg_dir), };