Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6028500ybc; Wed, 27 Nov 2019 13:40:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwK1LM/BScn9viyf0k7vZmqjjK00cDWSdBqwnP2wUL3hX0EOWR9fLoEayuH5Jia0Z0uhf5y X-Received: by 2002:a50:9b43:: with SMTP id a3mr34442433edj.73.1574890847727; Wed, 27 Nov 2019 13:40:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890847; cv=none; d=google.com; s=arc-20160816; b=ElDi9A1Tc8K6fr7VtkquJIMHnO6ZbBYuNwkkbd0bVKyuxv8jV4CpBC4PJ896NXdUEW oz3Tx/UdChWguAwiagakHCoDi0L33QBIe26AxhCcaTkQrfBj3iBUbqD0kKdx/WtH4NY6 6HvckUXhw9UUDwns+30zmU0vMuT5axuXcOu0saQswTAt7uF/i00z9RLgw8W5L3dFM3U2 ld6vDvpt6ckqLDLFwWUqmZae6OG1dNJwOPlpBzDBkW8MJtJPCwLEP3vq+wReAK80GI8G e96K8b1FLaHtzEbK2H7sIZUG+O6S2Z5XUDKgBjide73eBNb0A0YWIeEPTrowiwtFmyp+ 9IAw== 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=VzsoTId6jSHlQ+ik0kwuRLE8/0RZ6d+J4HCOTf5L+uU=; b=McAnREZzZGO6iFYd9OZ1bL5mUqv69NnwNINsgKHH6IVO93LxdvFjzsTV8h5jUP7Bh5 zqNnbKY5UqCwxgCr/qS8ZKb+XGfqjGVfABTeoQVDHdlyCT9pQzk5Iq/u+2YtFw1yG/vw 8Z+Z+EnjyXE4RoydUUMhUrs1E8Z602ZlTfRgppLsMoaFcbE8BN3J0Beil8qVQv/mzBfx Swq0iZH1rFgFtMluf9UCHI00igdc/wSlZ3oIkDHk/lKzMGhwSmO+doEkWnVodBegF/SM t1RW7J7mm58aleBoXms8ifkUwiWhBcyp+eWS0TNGPYi7ndduM8gIfdmvrkOS/k6cv1aC GJ0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xT6qeFo2; 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 gy21si3373459ejb.38.2019.11.27.13.40.24; Wed, 27 Nov 2019 13:40:47 -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=xT6qeFo2; 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 S1729332AbfK0Upy (ORCPT + 99 others); Wed, 27 Nov 2019 15:45:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:57170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729792AbfK0Upv (ORCPT ); Wed, 27 Nov 2019 15:45:51 -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 01FD4217D9; Wed, 27 Nov 2019 20:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887551; bh=J2jEDIB84FkSWu1oMfmtTGw5MNeF5Bk9bqktBzNWDWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xT6qeFo2rBoU+bxvxpsCJTWbmffIDhJrt01YfiyX1tfMntx0fc0am6CQqswLnC1aX l4zeqWTFot1p09LBL+LK9Yb77I6Ctvw1Y8h4X1vC3qYx2XTVH1dx2eq9CtziJhGjDL IvNKIEzwF7x5DFTv/TjLVVlPf06PPR5vZQ4TqJAg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hari Vyas , Will Deacon , Catalin Marinas , Lee Jones Subject: [PATCH 4.9 114/151] arm64: fix for bad_mode() handler to always result in panic Date: Wed, 27 Nov 2019 21:31:37 +0100 Message-Id: <20191127203043.904101337@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203000.773542911@linuxfoundation.org> References: <20191127203000.773542911@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: Hari Vyas commit e4ba15debcfd27f60d43da940a58108783bff2a6 upstream. The bad_mode() handler is called if we encounter an uunknown exception, with the expectation that the subsequent call to panic() will halt the system. Unfortunately, if the exception calling bad_mode() is taken from EL0, then the call to die() can end up killing the current user task and calling schedule() instead of falling through to panic(). Remove the die() call altogether, since we really want to bring down the machine in this "impossible" case. Signed-off-by: Hari Vyas Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/traps.c | 1 - 1 file changed, 1 deletion(-) --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -611,7 +611,6 @@ asmlinkage void bad_mode(struct pt_regs handler[reason], smp_processor_id(), esr, esr_get_class_string(esr)); - die("Oops - bad mode", regs, 0); local_irq_disable(); panic("bad mode"); }