Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2545174pxb; Tue, 9 Mar 2021 05:25:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwO5BVZRYwWtihdSA+/5nDOGEwtzKB8OWFKzKjOvphqMY7EZBZYVGhJMeylEFg1MDvr7TgX X-Received: by 2002:a17:906:801:: with SMTP id e1mr19612364ejd.465.1615296325803; Tue, 09 Mar 2021 05:25:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615296325; cv=none; d=google.com; s=arc-20160816; b=FD9wN3JBq/jyd0TMA9ZM90NVe3qBu4RdDNgTi6L0FSsDAfwY5Pd674kTzf2tytUCTE OCfARvWhhzknIrquwxcaOsY5XX3IIa1t0zxjbc6mEOswjZxLvwIItg6FILvx5Mjkbdq/ 2+Z0BUn87iKU+f81nMKadBA6mhzKac6QE9aVlJAduUmWND+nfB2aiu62CR4DEc3x6noX eiBMsYtqhWzyWYY9Vvac27GT0qZRz9vgkH5NCqLNE9AmcKVbVHpT2Y1tOEDAOsRvb6c9 7/eJ7Ca5AQduB4mryti/lz1jBIarHaWjfA7CLslINGuo43lNwJJKMVpiGT8sYYTFL8V9 Mr3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=CbxFHgVB2SQpcb7VqdqRvEaqw6KWWQMVs3wq83fC9II=; b=HiafHXxK2hdJ6VmMdLiXLzYiREzofYB6fYdB/2ZryfHm/Vpw+5ZrL7kv5oa316HixD LL3CgERJeeJybDVxTzXq4X48hcq3KQZuNEYpnrKawlKrNSz7JX2ZeNRw4udR6x7qU1oy X6h2XELzm5TzonnkrogE3yiAqd+EQbZVboi9EM7uf40u7g8kHerW5QVTREelrbplAPBe SXg2fGRznvl1vlhy6jhzXd38uf5e5LUKsBsTJQRwh16ja3w3HIrqQwV4dcXdMeZRtHCo ax4WFBhoV2A6yh0/CDPMM15DJmujQ379y92YSz/VXTEhhHbOD/QSiFj+Nwkh/TgTwoRl Mu7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=H7BjHJmk; 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 l19si9277704edq.269.2021.03.09.05.25.02; Tue, 09 Mar 2021 05:25:25 -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=@nifty.com header.s=dec2015msa header.b=H7BjHJmk; 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 S230508AbhCINYG (ORCPT + 99 others); Tue, 9 Mar 2021 08:24:06 -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-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