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=-14.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 9C4B4C43381 for ; Tue, 9 Mar 2021 13:24:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B865650ED for ; Tue, 9 Mar 2021 13:24:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231196AbhCINYI (ORCPT ); Tue, 9 Mar 2021 08:24:08 -0500 Received: from conssluserg-06.nifty.com ([210.131.2.91]:26885 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbhCINXe (ORCPT ); Tue, 9 Mar 2021 08:23:34 -0500 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 129DNEQS012165 for ; Tue, 9 Mar 2021 22:23:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 129DNEQS012165 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1615296195; bh=CbxFHgVB2SQpcb7VqdqRvEaqw6KWWQMVs3wq83fC9II=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=H7BjHJmkJdH7UxMG1b9+HPUXTaQjAMU9LdYogVB3/sm3ljM/fmYsCUXO5GEHwxOxb yWuz3kTtoZanY2b8FqMmucj+fFuB1+NYTjVtg/7dknF0zHJ5EUuqVtvctndTc6G8A1 Buj2Mz5x/vthBsx1nhm/t/LLdCDB87gydxwe1NTRaIXFYtKXNIYn6Ikt2dAgDPqSV5 uZQ9HGpBO5Q35UfzHpBlf2jegJGokKodBA8YcWrD1xL+FEB2y65kyM98gJELlTLpay /KrCg8YwPZkRes4mARE3+tZTPMpOTEJEn5Jxztnepozi+wGnmZvdf/3eo44Wmpx+ja 7JfvYtijWIIow== X-Nifty-SrcIP: [209.85.216.49] Received: by mail-pj1-f49.google.com with SMTP id lr10-20020a17090b4b8ab02900dd61b95c5eso2742703pjb.4 for ; Tue, 09 Mar 2021 05:23:15 -0800 (PST) X-Gm-Message-State: AOAM533t9mndTUZj8BThpyLm8md8qZBqfjgNPH0OobPoObdMpf16WymN b60crvVn+kqSM26YRC1AIaV+bQonVBBqcRuQbI8= X-Google-Smtp-Source: ABdhPJzow4w2e+hJT29V+2d6CV+NG/d5KPhJP+FZyJVekp6Fwamd2svGL+/DBpfJCfSWpya7xsKKGbXzHrMWpHE2pGQ= X-Received: by 2002:a17:90a:5510:: with SMTP id b16mr4718167pji.87.1615296194334; Tue, 09 Mar 2021 05:23:14 -0800 (PST) MIME-Version: 1.0 References: <20210309123544.14040-1-msuchanek@suse.de> In-Reply-To: <20210309123544.14040-1-msuchanek@suse.de> From: Masahiro Yamada Date: Tue, 9 Mar 2021 22:22:36 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: make STACKPROTECTOR_PER_TASK configurable. To: Michal Suchanek Cc: linux-arm-kernel , Catalin Marinas , Will Deacon , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 9, 2021 at 9:35 PM Michal Suchanek wrote: > > When using dummy-tools STACKPROTECTOR_PER_TASK is unconditionally > selected. This defeats the purpose of the all-enabled tool. > > Description copied from arm > > Cc: Masahiro Yamada > Signed-off-by: Michal Suchanek Could you explain what problem this patch is trying to solve? > --- > arch/arm64/Kconfig | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index a8ff7cd5f096..f59d391e31a4 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1549,9 +1549,20 @@ config RANDOMIZE_MODULE_REGION_FULL > config CC_HAVE_STACKPROTECTOR_SYSREG > def_bool $(cc-option,-mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=0) > > + > config STACKPROTECTOR_PER_TASK > - def_bool y > + bool "Use a unique stack canary value for each task" > depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_SYSREG > + default y > + help > + Due to the fact that GCC uses an ordinary symbol reference from > + which to load the value of the stack canary, this value can only > + change at reboot time on SMP systems, and all tasks running in the > + kernel's address space are forced to use the same canary value for > + the entire duration that the system is up. > + > + Enable this option to switch to a different method that uses a > + different canary value for each task. > > endmenu > > -- > 2.26.2 > -- Best Regards Masahiro Yamada 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=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 27CB4C433DB for ; Tue, 9 Mar 2021 13:41:25 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 9DB88600CD for ; Tue, 9 Mar 2021 13:41:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DB88600CD 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=s6ORXmfPnFViASTXkSV4GHosuZoveenlzpH84LKK/C8=; b=S7GbUYq51OQvCt6x3wumMcC/1 y4IY2dCsL2aUoVTwQEFA6Wwzlwil/BLxxwO0q58ihZC7VE5Ehn5tB/p2OZx051NcE+yzqwlUAirGW iDC4wbbAAKmd/zNkw5oh7upxZrOfs7Da1Mrr8CPZv1v3FKC+BpmFznrxT/shACdRH9uhzugDJjbJJ Y/uTNiVfBVa5vtm1yKj6M1W0sUnrN2zoBI1k/v3807S3qPDy1gOHWazeeJSyqkQipgJKmocbPZMJ/ vRWkogSx3XnqzG2GJsk8qg3sS23nl2Rkypm2UM9k02rK3WfA5hTPVAPHT6FxX36F+zloSV7usT2QJ GvpsYMcSQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJcZx-004h6F-2D; Tue, 09 Mar 2021 13:39:17 +0000 Received: from conssluserg-01.nifty.com ([210.131.2.80]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJcKr-004bMu-Nh for linux-arm-kernel@lists.infradead.org; Tue, 09 Mar 2021 13:23:49 +0000 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 129DNEtU014932 for ; Tue, 9 Mar 2021 22:23:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 129DNEtU014932 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1615296195; bh=CbxFHgVB2SQpcb7VqdqRvEaqw6KWWQMVs3wq83fC9II=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=H7BjHJmkJdH7UxMG1b9+HPUXTaQjAMU9LdYogVB3/sm3ljM/fmYsCUXO5GEHwxOxb yWuz3kTtoZanY2b8FqMmucj+fFuB1+NYTjVtg/7dknF0zHJ5EUuqVtvctndTc6G8A1 Buj2Mz5x/vthBsx1nhm/t/LLdCDB87gydxwe1NTRaIXFYtKXNIYn6Ikt2dAgDPqSV5 uZQ9HGpBO5Q35UfzHpBlf2jegJGokKodBA8YcWrD1xL+FEB2y65kyM98gJELlTLpay /KrCg8YwPZkRes4mARE3+tZTPMpOTEJEn5Jxztnepozi+wGnmZvdf/3eo44Wmpx+ja 7JfvYtijWIIow== X-Nifty-SrcIP: [209.85.216.44] Received: by mail-pj1-f44.google.com with SMTP id jx13so890611pjb.1 for ; Tue, 09 Mar 2021 05:23:15 -0800 (PST) X-Gm-Message-State: AOAM531WWyDFlVUk571hkpkaxD50m8UknL2S3AYyM1+o5wkgBS+KaHUH G7ZIWJWlLfilYWTY7lrEASeQxbRRSXYoj06vZcs= X-Google-Smtp-Source: ABdhPJzow4w2e+hJT29V+2d6CV+NG/d5KPhJP+FZyJVekp6Fwamd2svGL+/DBpfJCfSWpya7xsKKGbXzHrMWpHE2pGQ= X-Received: by 2002:a17:90a:5510:: with SMTP id b16mr4718167pji.87.1615296194334; Tue, 09 Mar 2021 05:23:14 -0800 (PST) MIME-Version: 1.0 References: <20210309123544.14040-1-msuchanek@suse.de> In-Reply-To: <20210309123544.14040-1-msuchanek@suse.de> From: Masahiro Yamada Date: Tue, 9 Mar 2021 22:22:36 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: make STACKPROTECTOR_PER_TASK configurable. To: Michal Suchanek Cc: linux-arm-kernel , Catalin Marinas , Will Deacon , Linux Kernel Mailing List X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_132342_955148_3D6713CA X-CRM114-Status: GOOD ( 22.13 ) 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 Tue, Mar 9, 2021 at 9:35 PM Michal Suchanek wrote: > > When using dummy-tools STACKPROTECTOR_PER_TASK is unconditionally > selected. This defeats the purpose of the all-enabled tool. > > Description copied from arm > > Cc: Masahiro Yamada > Signed-off-by: Michal Suchanek Could you explain what problem this patch is trying to solve? > --- > arch/arm64/Kconfig | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index a8ff7cd5f096..f59d391e31a4 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1549,9 +1549,20 @@ config RANDOMIZE_MODULE_REGION_FULL > config CC_HAVE_STACKPROTECTOR_SYSREG > def_bool $(cc-option,-mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=0) > > + > config STACKPROTECTOR_PER_TASK > - def_bool y > + bool "Use a unique stack canary value for each task" > depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_SYSREG > + default y > + help > + Due to the fact that GCC uses an ordinary symbol reference from > + which to load the value of the stack canary, this value can only > + change at reboot time on SMP systems, and all tasks running in the > + kernel's address space are forced to use the same canary value for > + the entire duration that the system is up. > + > + Enable this option to switch to a different method that uses a > + different canary value for each task. > > endmenu > > -- > 2.26.2 > -- Best Regards Masahiro Yamada _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel