Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2722953imm; Wed, 3 Oct 2018 08:13:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV624sPLssRwu67mUKSWxnMnjn+Gbv5knPPbI9jkxGGfvRcds6QBTK/GupOPwWj9bEIlYlCR0 X-Received: by 2002:a63:5509:: with SMTP id j9-v6mr1779151pgb.208.1538579622128; Wed, 03 Oct 2018 08:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538579622; cv=none; d=google.com; s=arc-20160816; b=ALndg3LQrx9L7mphaAU9N7Q1PnZD4d3kjYsLBAJateBVcPl1FemsmMljSaODUGn+es eSYmpJUCCvU0jLQ7sZXk4yrkYma6sb2SnchnyWlfScQxZpP76Pf9asJxdWgNeu4ADhKY EoPy75/i9DOiVrLEUbF11LWw+/LkYMJtGRe69PjAV1+42hGc2FWBJ51DBuz29IHRHFfz H58LqGU+Tw06DuOEVZRJof+UhS9Th0bDjpQnZE7PoUrCRgA4dmtHSgnolW1wNVi0h+SX SvM/9qpcTEC3mZdfrjgp6IvV7JWpas7w6aNg2PzfH1c/oFEizNXWfpREfZQ4zaToph3x ELmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=u56sJzjCGnG3VOLj1ch8bBY+Teu0tYbTzk/8pzC4q+c=; b=xQ6fiM3DMufOBEzbDVvJYYtJKdEMk+QurU5sr6w2YRJylT1P2JQbqaM5ezEzWrpqjP eIz09Op6ZMOJJ/g7OIR2oIiKeXZAV+a/4SP2cr1EJQCHvnwDBSHfgT/Qd6rbXYO12SZp 1xWgS25f6l+xND6i3m7viwBWYGS1X97rz4vN2OL+7cJSCecBNWl+yG04dOJY6hcmlHHr uzY0fmy9cp8F8rvomMteWtRpeYv9mrkeImQkXPvDjikSRD+ZxxCHATqcRiNBqRi03vap 7HEdXojqNnDOM/RQeJvcYKgxsqiMs25u8Kjl97S55GMEc7DpyEspkMqAPRwbMOqFP8gR zzBg== 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 s31-v6si1777752pgl.228.2018.10.03.08.13.27; Wed, 03 Oct 2018 08:13:42 -0700 (PDT) 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 S1727151AbeJCWBe (ORCPT + 99 others); Wed, 3 Oct 2018 18:01:34 -0400 Received: from foss.arm.com ([217.140.101.70]:52768 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726797AbeJCWBe (ORCPT ); Wed, 3 Oct 2018 18:01:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 07D237A9; Wed, 3 Oct 2018 08:12:46 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.emea.arm.com [10.4.12.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1E4C23F5A0; Wed, 3 Oct 2018 08:12:43 -0700 (PDT) Date: Wed, 3 Oct 2018 16:12:41 +0100 From: Catalin Marinas To: Julien Thierry Cc: linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com, daniel.thompson@linaro.org, marc.zyngier@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, christoffer.dall@arm.com, james.morse@arm.com, joel@joelfernandes.org Subject: Re: [PATCH v5 05/27] arm64: Use daifflag_restore after bp_hardening Message-ID: <20181003151240.GE12998@arrakis.emea.arm.com> References: <1535471497-38854-1-git-send-email-julien.thierry@arm.com> <1535471497-38854-6-git-send-email-julien.thierry@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1535471497-38854-6-git-send-email-julien.thierry@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 28, 2018 at 04:51:15PM +0100, Julien Thierry wrote: > For EL0 entries requiring bp_hardening, daif status is kept at > DAIF_PROCCTX_NOIRQ until after hardening has been done. Then interrupts > are enabled through local_irq_enable(). > > Before using local_irq_* functions, daifflags should be properly restored > to a state where IRQs are enabled. > > Enable IRQs by restoring DAIF_PROCCTX state after bp hardening. > > Signed-off-by: Julien Thierry > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: James Morse Queued for 4.20. Thanks. -- Catalin