Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp164836pxb; Wed, 20 Jan 2021 04:05:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1sAGC7zkh3v10lnb4EbljKR4SwAsZmelngjbWCzF9JTs9nGWlJewmTpgGW/18xU9xQq0d X-Received: by 2002:a17:906:11d3:: with SMTP id o19mr5973724eja.502.1611144257261; Wed, 20 Jan 2021 04:04:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611144257; cv=none; d=google.com; s=arc-20160816; b=lqHyj1+alTx4GJkRQUL3oBDIr51eNYSa7xvLIaLRD0nhraFCxJkqma2mvClDkPTn4m 3jwEDKfUqMdWVybOgb89Xh+k8qtIEOmMPxNKggzLY2XgXXlpEqbRZXabPpjysEqNXL3h LMAjzc9jUM0C+GRVxsP1GMbmbf/uHNqx2JvVWSXnTAwVWr8Zo6rpdn2IPiDxUdl1n+Sm SZ4T72StVaTwQYz7MmJ6CZ1Tv7cwNkNyMVUWLCp6y4dnOW7LYEGC5gR6KQpaHLNsnNMd L4+4Olav3kyE8NlT3elr3iAPh/tzONzF3HVm9W7jNQfKDawoXg4/4ExvhttmQXjtA4ih f46Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=nnHKfwNBKcI9Rkf+btUdu/mmTZ+fQKuF36UDDO2N9ho=; b=glMqsvu4NG0Zbzq5fWfZ7XHAITV/mVsmD1yOVr8tKB7Km3Jhm+v2DNslFjYTdHx8AY OVnJsCg0xY+AiNDKqEngBkVNEOwFEL8UCR5n5CUUGdgy96CI7vF1wrEbx0jswM2sImcr EMuPhk7oG4Ccw0+qH2USWzjRvICyz6cETpFIyGZl4HXtQIXur+rAFoE5LrrElg2Z0Tgy qeIHaWHFcCNNWM+RCBCgnSvnrcocF/BSI8egobH8Fkce3uFPgs12I3H2r/vME0k0qljx JrPsU/0AWyCsjOKNpHaROWmrQpk2FtA2USxJAARgFHQh8xEzZ0DbJAyEqzp1t4YpZmT+ feAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TQbY0Jmu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x21si588054ejw.619.2021.01.20.04.03.39; Wed, 20 Jan 2021 04:04:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TQbY0Jmu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387537AbhATLlj (ORCPT + 99 others); Wed, 20 Jan 2021 06:41:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:56988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727341AbhATLIt (ORCPT ); Wed, 20 Jan 2021 06:08:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EA26322227; Wed, 20 Jan 2021 11:08:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611140889; bh=ZkSlAs02/7hC14cFcb9AOFlcqlA01ivodVMpfU/Ab+Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TQbY0JmuoAIgjUO0VgOVDYOm1V/DXzjZhqHDsO+FG9u4at8zmGA47BdGMfPa4cHjE xyb2M3SF8eNdC9qjjRjYERHGRTbv7yrU14DeROmeB7SYIt32lm8WEKvjylQRR5V3Ib PNnEa4O9iGKW7gIJ3FfqmFBJtVJ0tfr3YEc+5GyJEI4Xrb4TWOjG+QnBgF2HFuKoWr v0oBF2TeENoWxNLHCyV3OHzlswE3PLxvTvWvUHxsVwcD2AndkWt4qWmx42zFD70FVt kvXMJs3xYtQu3txzO3SOp8oEUQi5tuJTM3bV5OIspzr9Pbma7Zhdj+iyzyv5X2b9Ve /37wDXVsSjNxA== Date: Wed, 20 Jan 2021 11:08:03 +0000 From: Will Deacon To: Mark Rutland Cc: Maninder Singh , catalin.marinas@arm.com, broonie@kernel.org, vincenzo.frascino@arm.com, samitolvanen@google.com, ardb@kernel.org, maz@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, v.narang@samsung.com, a.sahrawat@samsung.com Subject: Re: [PATCH 1/1] arm64/entry.S: check for stack overflow in el1 case only Message-ID: <20210120110803.GB19241@willie-the-truck> References: <1607678131-20347-1-git-send-email-maninder1.s@samsung.com> <20210107112903.GB7523@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210107112903.GB7523@C02TD0UTHF1T.local> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 07, 2021 at 11:29:03AM +0000, Mark Rutland wrote: > On Fri, Dec 11, 2020 at 02:45:31PM +0530, Maninder Singh wrote: > > current code checks for sp bit flip in all exceptions, > > but only el1 exceptions requires this. el0 can not enter > > into stack overflow case directly. > > > > it will improve performance for el0 exceptions and interrupts. > > > > Signed-off-by: Maninder Singh > > Signed-off-by: Vaneet Narang > > I did consider doing this at the time Ard and I wrote the overflow > detection, but there was no measureable impact on the workloads that I > tested, and it seemed worthwhile to have this as a sanity check in case > the SP was somehow corrupted (and to avoid any surprizing differences > between the EL0 and EL1 entry paths). > > When you say "it will improve performance for el0 exceptions and > interrupts", do you have a workload where this has a measureable impact, > or was this found by inspection? Unless this is causing a real issue, > I'd prefer to leave it as-is for now. Maninder -- please could you follow up on Mark's question? Will