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 X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 704DBC433E4 for ; Tue, 14 Jul 2020 08:38:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E25D21D6C for ; Tue, 14 Jul 2020 08:38:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="f/B99nQ0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="2DjAS5tg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E25D21D6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EGca+ZOh4lMiAMamiEnS/WSB/G3FmkCcWol2E333jX8=; b=f/B99nQ0HNAlrDWSvPAJ7Hg/o H8KSnjfeChslSaK8/ZiJk7HHeie4GWajTkbeNjI2aEwW1J1uNMo6KBit+1Bz+sH97sipL2G/xPhCt cpfOpGBuT6TD4EcTnbO6wZNB3wMf7vFFFP3nlVY/+BLvo40oUoXTxUNQhP3bxUDfL1+fT9kyBIljq od/Ap1RSJKmpleg7dlKP/Z5ThuYBxYJ1hLQADGmNw9PUdyOtZGzIS19eQNtqpS6j0rj/iIQC5oTco EpJJN1yXDs1ISRhYSAvdT+21/cGUOYtZEjn7j7yQEtmgG5hlTyzzmpFFtF1QjYtq9btBjgdyTgEnh xz10GC3eA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvGRI-00064n-D7; Tue, 14 Jul 2020 08:37:24 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvGRF-000640-KR for linux-arm-kernel@lists.infradead.org; Tue, 14 Jul 2020 08:37:22 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9D61721835; Tue, 14 Jul 2020 08:37:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594715840; bh=sLsBHSZ4aocpjCsj6C5mM/qWcmp+IZ+iy3ml2lFuntM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2DjAS5tgWevHzeuVCGsNREXLLFNJ0RV0cTtO4jdnVvJvYX0Xw+KU+eXymaiSB9W3Y mjeHQWmIz02zwPsoIYllvxUD3PRe8e7aRvFBylF1M45cCcK0ez4UTNlv3StOLyEw8A VjMCl5t1RoJKajxuRWH0yT/rxT7YlCpkdep5Y17Q= Date: Tue, 14 Jul 2020 09:37:15 +0100 From: Will Deacon To: guoren@kernel.org Subject: Re: [PATCH] arm64: Make TSK_STACK_CANARY more accurate defined Message-ID: <20200714083715.GE4516@willie-the-truck> References: <1594613013-13059-1-git-send-email-guoren@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1594613013-13059-1-git-send-email-guoren@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200714_043721_751936_514B57E4 X-CRM114-Status: GOOD ( 15.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guo Ren , catalin.marinas@arm.com, linux-csky@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 Mon, Jul 13, 2020 at 04:03:33AM +0000, guoren@kernel.org wrote: > From: Guo Ren > > TSK_STACK_CANARY only used in arm64/Makefile with > CONFIG_STACKPROTECTOR_PER_TASK wrap. So use the same policy in > asm-offset.c. > > Signed-off-by: Guo Ren > Co-developed-by: Kees Cook > Cc: Catalin Marinas > Cc: Will Deacon > --- > arch/arm64/kernel/asm-offsets.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c > index 0577e21..37d5d3d 100644 > --- a/arch/arm64/kernel/asm-offsets.c > +++ b/arch/arm64/kernel/asm-offsets.c > @@ -39,7 +39,7 @@ int main(void) > DEFINE(TSK_TI_SCS_SP, offsetof(struct task_struct, thread_info.scs_sp)); > #endif > DEFINE(TSK_STACK, offsetof(struct task_struct, stack)); > -#ifdef CONFIG_STACKPROTECTOR > +#ifdef CONFIG_STACKPROTECTOR_PER_TASK > DEFINE(TSK_STACK_CANARY, offsetof(struct task_struct, stack_canary)); > #endif I don't think this really makese much sense. The 'stack_canary' field in 'struct task_struct' is defined as: #ifdef CONFIG_STACKPROTECTOR /* Canary value for the -fstack-protector GCC feature: */ unsigned long stack_canary; #endif so I think it makes sense to follow that in asm-offsets.c Does the current code actually cause a problem? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel