Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1255763imm; Tue, 3 Jul 2018 08:05:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeVGEQw7E5JDIjBvaEIpkWCjc6oU+6QKxGitwk0FsaokpXkA6Y4qxE41unCMNZngwobgZRp X-Received: by 2002:a62:ac12:: with SMTP id v18-v6mr3157054pfe.126.1530630313751; Tue, 03 Jul 2018 08:05:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530630313; cv=none; d=google.com; s=arc-20160816; b=YuwE+h1TiVfkSYGsJef5/dSnBpOlxp9KpXrgov03hJ06TgPtnTbQSczDQdyEXRbgKN G5TzKj2meLM3vR2YpvCMt1BFSzRB/iYcnkFXTof+Ld8CUFIw9dXjcMyFhkbw7dCAJ0+4 swtzzU9FhgFsL3iK/clY4kJgmmONPcRFpARpXTMWLPbY2XdL4CHYrhS5CAp1YTvsuo9t sbDL2T4OPWCf6VWnhJ3+jYnoMUfbk7fOncfYJUrdbacWA3X6TIODoyZz/Xd1UMNhP2rn Pat9tQz8MZDQjVVDxyd3x5Lj1sVqMfwyBwecspphzgYvv7F970RM89gkVV7ZGzig+T7y gzDw== 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:arc-authentication-results; bh=J46kRKyWsp+C5UJC2KHHEq+WXb0xERBtxBlSMFQ+wDk=; b=GqkQ5QQSpa8A2dLrfPv729M7HGZx+BqGS3GYZC23jHJe8tKfz5g4Ij2Q3zRndKP/t6 LiXU6kivwj+/1FVBYJOvjgBl0gkeibJM06MZARvhGH0bk3jlLWs0LdFB1+lIkrS//dg8 Mcw9W4+gD8I69dY26zHjQZkDAjKyTG1DLIj879mwsyowX4jgQzP+UJvjTzzOFBEOAFhg uLSwcRLR3JYbg0z0/KRK+aEuXWhOnihoJJo8NuROUcxE9K3oVQyvHsdxc7tGnFHnI7lH 2YiW2Gem3npO77Mv6mg6ExBP+V4upYxTmFrMu3Wj/NWjoIJ7GijHGs5wOBN1WfbIE1BQ f86Q== 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 z75-v6si1364059pfk.340.2018.07.03.08.04.58; Tue, 03 Jul 2018 08:05:13 -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 S932834AbeGCPDz (ORCPT + 99 others); Tue, 3 Jul 2018 11:03:55 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50816 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932273AbeGCPDy (ORCPT ); Tue, 3 Jul 2018 11:03:54 -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 D24907A9; Tue, 3 Jul 2018 08:03:53 -0700 (PDT) Received: from armageddon.cambridge.arm.com (armageddon.cambridge.arm.com [10.1.206.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 13DB53F5AD; Tue, 3 Jul 2018 08:03:51 -0700 (PDT) Date: Tue, 3 Jul 2018 16:03:49 +0100 From: Catalin Marinas To: Mark Rutland Cc: Laura Abbott , will.deacon@arm.com, Kees Cook , kernel-hardening@lists.openwall.com, Ard Biesheuvel , linux-kernel@vger.kernel.org, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, alex.popov@linux.com Subject: Re: [PATCH] arm64: Clear the stack Message-ID: <20180703150349.fndcq7h5hl3mtain@armageddon.cambridge.arm.com> References: <20180629190553.7282-1-labbott@redhat.com> <9733d929-3c6a-40e1-6110-8f79975323d3@linux.com> <1b97aa7d-2b6c-a5df-0caa-1cd16e18a816@redhat.com> <20180703121440.v4olvwqb3ykgt5fm@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180703121440.v4olvwqb3ykgt5fm@lakrids.cambridge.arm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 03, 2018 at 01:14:41PM +0100, Mark Rutland wrote: > On Mon, Jul 02, 2018 at 11:48:05AM -0700, Laura Abbott wrote: > > On 07/02/2018 06:02 AM, Alexander Popov wrote: > > > On 29.06.2018 22:05, Laura Abbott wrote: > > > > Implementation of stackleak based heavily on the x86 version > > > > > > > > Signed-off-by: Laura Abbott > > > > --- > > > > Changes since last time: > > > > - Minor name change in entry.S > > > > - Converted to use the generic interfaces so there's minimal additions. > > > > - Added the fast syscall path. > > > > - Addition of on_thread_stack and current_top_of_stack > > > > - Disable stackleak on hyp per suggestion > > > > - Added a define for check_alloca. I'm still not sure about keeping it > > > > since the x86 version got reworked? > > > > > > > > I've mostly kept this as one patch with a minimal commit text. I can > > > > split it up and elaborate more before final merging. > > > > --- > > [...] > > > > > diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S > > > > index ec2ee720e33e..31c9da7d401e 100644 > > > > --- a/arch/arm64/kernel/entry.S > > > > +++ b/arch/arm64/kernel/entry.S > > > > @@ -401,6 +401,11 @@ tsk .req x28 // current thread_info > > > > .text > > > > + .macro stackleak_erase > > > > > > Could you rename the macro to STACKLEAK_ERASE for similarity with x86? > > > > > > > Mark Rutland had previously asked for this to be lowercase. > > I really don't care one way or the other so I'll defer to > > someone else to have the final word. > > Will, Catalin, could you chime in either way? > > I'd previously asked for lower-case for consistency with our other > assembly macros. I'd keep it lowercase as the other arm64 macros in this file. -- Catalin