Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5261047imm; Wed, 12 Sep 2018 03:34:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYhPQL/LcEgorjedCqgaFdXLNtwPzvyBNJuoUxggBhbP66vwGyM4BKeVByZPw3tFL3bjORl X-Received: by 2002:a63:c245:: with SMTP id l5-v6mr1449551pgg.255.1536748470310; Wed, 12 Sep 2018 03:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536748470; cv=none; d=google.com; s=arc-20160816; b=v6snmVq+hxFuDsNAyKGbU1aKt1LYr00QRBBWut2xnTjOrI5FEE9/jLxgh0qOhpHhnI LsPNl2ha3K9a/R5iMvnj9e5F0fRwgtXAuICxv5OqSsW7cGLhesZhPLO5ihaIYSkFPGMI Q0HXiw44NEC52fnvKZEUxbjqY1y4Fpzk8Lt1NxpWLWFiOPrynTGvRSRrRNOHnTJhLPVa lSUdMu175lrGQxnJxdAE7sGmksuBxGKKLp3zwSFNlcuf2MA/UuURrMu/3JmoKyjpwmku b31Tu6AD1yrf9P4H6b1NJSV1mGkBXxGNj+YuhuyHStLx5Cj/t3DVbg7BL2ad9TeAu1JW EM0g== 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=9s/FtTUCySdmFm/c6NyB8oaFVtI57erPrKps96CzFLc=; b=iq639dA6wneSW5RityKg/uWDafQ36BOC9evYS8CO6KAYx2M+03Hvmqgv7trrOqzGam wJ5KyvnntN0MRBqSMdpZ87SNyalgpFVRlbIq9CjYD1Hqb3amvsC3Lh0OIopmloZm98lr 9sHPRLP9hdfB+5cj9SfI89Tj/qDRa2gn4O3f2WxPRnAnFtIUxskfkXfA7P4ZDNCNvL7u zmTJ8EdOoZ2ktIj3UqkG0Rz+lQ8t6EajCvBZVViyHpXCBZZ80JzNf6fytMtzt0IMW7a5 JVgloocCMuwjH6Rx3H+eWOkGYA7xNmZAbKIvrtPJ6D5t05zQ0N7VbMvhasX7S+l28+zD EfnQ== 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 q126-v6si612160pfb.277.2018.09.12.03.34.15; Wed, 12 Sep 2018 03:34:30 -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 S1727853AbeILPgY (ORCPT + 99 others); Wed, 12 Sep 2018 11:36:24 -0400 Received: from foss.arm.com ([217.140.101.70]:57294 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726855AbeILPgX (ORCPT ); Wed, 12 Sep 2018 11:36:23 -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 E65077A9; Wed, 12 Sep 2018 03:32:28 -0700 (PDT) Received: from [10.4.12.81] (melchizedek.emea.arm.com [10.4.12.81]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 14DD03F614; Wed, 12 Sep 2018 03:32:25 -0700 (PDT) Subject: Re: [PATCH v5 05/27] arm64: Use daifflag_restore after bp_hardening To: Julien Thierry Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, daniel.thompson@linaro.org, joel@joelfernandes.org, marc.zyngier@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, catalin.marinas@arm.com, will.deacon@arm.com References: <1535471497-38854-1-git-send-email-julien.thierry@arm.com> <1535471497-38854-6-git-send-email-julien.thierry@arm.com> From: James Morse Message-ID: <641119b9-3466-817d-3d6b-dd710c646b49@arm.com> Date: Wed, 12 Sep 2018 11:32:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1535471497-38854-6-git-send-email-julien.thierry@arm.com> Content-Type: text/plain; charset=utf-8 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 Hi Julien, On 28/08/18 16:51, 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. Is this just for symmetry, or are you going on to add something to the daifflags state that local_irq_* functions won't change? (if so, could you allude to that in the commit message) Either way, Acked-by: James Morse