lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mhng-5b3c9fa7-2e28-4788-9013-3a988ac5280d@palmerdabbelt-glaptop>
Date:   Tue, 03 Aug 2021 22:14:26 -0700 (PDT)
From:   Palmer Dabbelt <palmer@...belt.com>
To:     linux@...ck-us.net
CC:     Paul Walmsley <paul.walmsley@...ive.com>, aou@...s.berkeley.edu,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux@...ck-us.net, guoren@...ux.alibaba.com
Subject:     Re: [PATCH] riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled

On Fri, 23 Jul 2021 17:58:13 PDT (-0700), Palmer Dabbelt wrote:
> On Tue, 06 Jul 2021 09:26:21 PDT (-0700), linux@...ck-us.net wrote:
>> riscv uses the value of TSK_STACK_CANARY to set
>> stack-protector-guard-offset. With GCC_PLUGIN_RANDSTRUCT enabled, that
>> value is non-deterministic, and with riscv:allmodconfig often results
>> in build errors such as
>>
>> cc1: error: '8120' is not a valid offset in '-mstack-protector-guard-offset='
>>
>> Enable STACKPROTECTOR_PER_TASK only if GCC_PLUGIN_RANDSTRUCT is disabled
>> to fix the problem.
>>
>> Fixes: fea2fed201ee5 ("riscv: Enable per-task stack canaries")
>> Cc: Guo Ren <guoren@...ux.alibaba.com>
>> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
>> ---
>>  arch/riscv/Kconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> index 469a70bd8da6..3afb84fa2190 100644
>> --- a/arch/riscv/Kconfig
>> +++ b/arch/riscv/Kconfig
>> @@ -486,6 +486,7 @@ config CC_HAVE_STACKPROTECTOR_TLS
>>
>>  config STACKPROTECTOR_PER_TASK
>>  	def_bool y
>> +	depends on !GCC_PLUGIN_RANDSTRUCT
>>  	depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_TLS
>>
>>  config PHYS_RAM_BASE_FIXED
>
> Thanks, this is on fixes.  I do an allmodconfig build and haven't seen
> these failures, is there something special I need to do to get this
> working?  I know nothing about GCC plugins...

Sorry, looks like I screwed something up and I didn't actually merge 
this onto fixes.  Not sure what happened, but this time it should 
actually be on fixes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ