From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C7B6C433F5 for ; Mon, 14 Feb 2022 11:41:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 7B1DD40C0A; Mon, 14 Feb 2022 06:41:24 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HtFnDnikY01S; Mon, 14 Feb 2022 06:41:23 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6C81549B0C; Mon, 14 Feb 2022 06:41:23 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C97F440C0A for ; Mon, 14 Feb 2022 06:41:21 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uTLaeJmKbqIp for ; Mon, 14 Feb 2022 06:41:20 -0500 (EST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id A373D4087B for ; Mon, 14 Feb 2022 06:41:20 -0500 (EST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 208E0B80E61; Mon, 14 Feb 2022 11:41:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD4C3C340E9; Mon, 14 Feb 2022 11:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644838877; bh=3BY0+oBaGeuz3GbarqpFktWz85tdWsJYhePtRlV0rWY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nqbpe/MwLiK0hjcHwjC4tZ3oLrBfkYvzpNDqStYjFR0Q7IQfDUy2t4hCB2UiMj10t /dvm2YnhufyVgqGEOLrb21tdRZrkik3idw/fw3wGTl6RYoXvuk04T/WQrmVuhldrBy A82KnXGws7miSkRqw8ReUHeEXIFgzbyVD0n9PLLr9RvI37oz/k2JmBeGlARlA41g8A NC+38QGNalX4LCz6HaASSQlCBL6gwJtLeCz/ICG6MFaPbeUbpAZPbABYrbWFgfD0lO TNquDn9PmmhGQ0tpnhF8d0Bi4sUzc8DMbax8hepXrHpUOw4ZDvo/DQPMMuMm/meM6G tENKayKzRNkFg== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nJZjH-007l6H-Bh; Mon, 14 Feb 2022 11:41:15 +0000 Date: Mon, 14 Feb 2022 11:41:14 +0000 Message-ID: <87mtit4qw5.wl-maz@kernel.org> From: Marc Zyngier To: Kalesh Singh Subject: Re: [PATCH 0/7] KVM: arm64: Hypervisor stack enhancements In-Reply-To: <20220210224220.4076151-1-kaleshsingh@google.com> References: <20220210224220.4076151-1-kaleshsingh@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kaleshsingh@google.com, will@kernel.org, qperret@google.com, tabba@google.com, surenb@google.com, kernel-team@android.com, catalin.marinas@arm.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, ardb@kernel.org, mark.rutland@arm.com, pasha.tatashin@soleen.com, joey.gouly@arm.com, pcc@google.com, qwandor@google.com, ascull@google.com, pbonzini@redhat.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: Pasha Tatashin , will@kernel.org, Peter Collingbourne , kernel-team@android.com, linux-kernel@vger.kernel.org, Joey Gouly , kvmarm@lists.cs.columbia.edu, Andrew Walbran , Catalin Marinas , Paolo Bonzini , surenb@google.com, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Thu, 10 Feb 2022 22:41:41 +0000, Kalesh Singh wrote: > > This series is based on v5.17-rc3 and adds the following stack features to > the KVM nVHE hypervisor: > > == Hyp Stack Guard Pages == > > Based on the technique used by arm64 VMAP_STACK to detect overflow. > i.e. the stack is aligned to twice its size which ensure that the > 'stack shift' bit of any valid SP is 0. The 'stack shift' bit can be > tested in the exception entry to detect overflow without corrupting GPRs. Having quickly parsed the code, this seems to only be effective for pKVM and the EL2-allocated stack. Is there any technical reason not to implement this for the much more common case of 'classic' KVM in nVHE mode? Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 540EAC433EF for ; Mon, 14 Feb 2022 12:29:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LJ3GFoEjL4BiQr1aCOeFCyJzpzAXiM4q3R5N8v4tDB8=; b=Zs04tls+mpiNvz XV8Nm6Ln4Y6H+wmSX7lhruL4sZtksgv4/B8BLz4fZDGoSzHygztgGCFDjFrTkl4+nLK9ZJLNmqoPA 00jem9NkxlOS17lejyyfMLZftKygQcv71OWWGMXZS5sKy+0E5IpGZruyQTw+o18KgQHBIEOmrluKi 5IoId9gHi4BHI8sTK7hUoyoynOyQVbjgXWs8p6pVl0kBApHo3Ech0GimQkKafc5slG/oESopVMQKT rWW5HKWsolqvvVODn9zecfGeWHJYvBeXNoyOgRovFyvkXVdf7DwCnEg/597UuD0ikzPCrR5X1zqRj yBqk+mQ4VGOtCzht7IGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJaSQ-00F88m-9A; Mon, 14 Feb 2022 12:27:55 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJZjN-00EtcF-DZ for linux-arm-kernel@lists.infradead.org; Mon, 14 Feb 2022 11:41:23 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 208E0B80E61; Mon, 14 Feb 2022 11:41:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD4C3C340E9; Mon, 14 Feb 2022 11:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644838877; bh=3BY0+oBaGeuz3GbarqpFktWz85tdWsJYhePtRlV0rWY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nqbpe/MwLiK0hjcHwjC4tZ3oLrBfkYvzpNDqStYjFR0Q7IQfDUy2t4hCB2UiMj10t /dvm2YnhufyVgqGEOLrb21tdRZrkik3idw/fw3wGTl6RYoXvuk04T/WQrmVuhldrBy A82KnXGws7miSkRqw8ReUHeEXIFgzbyVD0n9PLLr9RvI37oz/k2JmBeGlARlA41g8A NC+38QGNalX4LCz6HaASSQlCBL6gwJtLeCz/ICG6MFaPbeUbpAZPbABYrbWFgfD0lO TNquDn9PmmhGQ0tpnhF8d0Bi4sUzc8DMbax8hepXrHpUOw4ZDvo/DQPMMuMm/meM6G tENKayKzRNkFg== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nJZjH-007l6H-Bh; Mon, 14 Feb 2022 11:41:15 +0000 Date: Mon, 14 Feb 2022 11:41:14 +0000 Message-ID: <87mtit4qw5.wl-maz@kernel.org> From: Marc Zyngier To: Kalesh Singh Cc: will@kernel.org, qperret@google.com, tabba@google.com, surenb@google.com, kernel-team@android.com, Catalin Marinas , James Morse , Alexandru Elisei , Suzuki K Poulose , Ard Biesheuvel , Mark Rutland , Pasha Tatashin , Joey Gouly , Peter Collingbourne , Andrew Walbran , Andrew Scull , Paolo Bonzini , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH 0/7] KVM: arm64: Hypervisor stack enhancements In-Reply-To: <20220210224220.4076151-1-kaleshsingh@google.com> References: <20220210224220.4076151-1-kaleshsingh@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kaleshsingh@google.com, will@kernel.org, qperret@google.com, tabba@google.com, surenb@google.com, kernel-team@android.com, catalin.marinas@arm.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, ardb@kernel.org, mark.rutland@arm.com, pasha.tatashin@soleen.com, joey.gouly@arm.com, pcc@google.com, qwandor@google.com, ascull@google.com, pbonzini@redhat.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220214_034121_829566_8E90B901 X-CRM114-Status: GOOD ( 17.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 10 Feb 2022 22:41:41 +0000, Kalesh Singh wrote: > > This series is based on v5.17-rc3 and adds the following stack features to > the KVM nVHE hypervisor: > > == Hyp Stack Guard Pages == > > Based on the technique used by arm64 VMAP_STACK to detect overflow. > i.e. the stack is aligned to twice its size which ensure that the > 'stack shift' bit of any valid SP is 0. The 'stack shift' bit can be > tested in the exception entry to detect overflow without corrupting GPRs. Having quickly parsed the code, this seems to only be effective for pKVM and the EL2-allocated stack. Is there any technical reason not to implement this for the much more common case of 'classic' KVM in nVHE mode? Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F03AC433EF for ; Mon, 14 Feb 2022 11:46:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352793AbiBNLqI (ORCPT ); Mon, 14 Feb 2022 06:46:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352730AbiBNLpI (ORCPT ); Mon, 14 Feb 2022 06:45:08 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB9779FD5 for ; Mon, 14 Feb 2022 03:41:18 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4F54661230 for ; Mon, 14 Feb 2022 11:41:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD4C3C340E9; Mon, 14 Feb 2022 11:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644838877; bh=3BY0+oBaGeuz3GbarqpFktWz85tdWsJYhePtRlV0rWY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nqbpe/MwLiK0hjcHwjC4tZ3oLrBfkYvzpNDqStYjFR0Q7IQfDUy2t4hCB2UiMj10t /dvm2YnhufyVgqGEOLrb21tdRZrkik3idw/fw3wGTl6RYoXvuk04T/WQrmVuhldrBy A82KnXGws7miSkRqw8ReUHeEXIFgzbyVD0n9PLLr9RvI37oz/k2JmBeGlARlA41g8A NC+38QGNalX4LCz6HaASSQlCBL6gwJtLeCz/ICG6MFaPbeUbpAZPbABYrbWFgfD0lO TNquDn9PmmhGQ0tpnhF8d0Bi4sUzc8DMbax8hepXrHpUOw4ZDvo/DQPMMuMm/meM6G tENKayKzRNkFg== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nJZjH-007l6H-Bh; Mon, 14 Feb 2022 11:41:15 +0000 Date: Mon, 14 Feb 2022 11:41:14 +0000 Message-ID: <87mtit4qw5.wl-maz@kernel.org> From: Marc Zyngier To: Kalesh Singh Cc: will@kernel.org, qperret@google.com, tabba@google.com, surenb@google.com, kernel-team@android.com, Catalin Marinas , James Morse , Alexandru Elisei , Suzuki K Poulose , Ard Biesheuvel , Mark Rutland , Pasha Tatashin , Joey Gouly , Peter Collingbourne , Andrew Walbran , Andrew Scull , Paolo Bonzini , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH 0/7] KVM: arm64: Hypervisor stack enhancements In-Reply-To: <20220210224220.4076151-1-kaleshsingh@google.com> References: <20220210224220.4076151-1-kaleshsingh@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kaleshsingh@google.com, will@kernel.org, qperret@google.com, tabba@google.com, surenb@google.com, kernel-team@android.com, catalin.marinas@arm.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, ardb@kernel.org, mark.rutland@arm.com, pasha.tatashin@soleen.com, joey.gouly@arm.com, pcc@google.com, qwandor@google.com, ascull@google.com, pbonzini@redhat.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Feb 2022 22:41:41 +0000, Kalesh Singh wrote: > > This series is based on v5.17-rc3 and adds the following stack features to > the KVM nVHE hypervisor: > > == Hyp Stack Guard Pages == > > Based on the technique used by arm64 VMAP_STACK to detect overflow. > i.e. the stack is aligned to twice its size which ensure that the > 'stack shift' bit of any valid SP is 0. The 'stack shift' bit can be > tested in the exception entry to detect overflow without corrupting GPRs. Having quickly parsed the code, this seems to only be effective for pKVM and the EL2-allocated stack. Is there any technical reason not to implement this for the much more common case of 'classic' KVM in nVHE mode? Thanks, M. -- Without deviation from the norm, progress is not possible.