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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d69bbfdb-64a2-aa14-a422-770af9bc68f3@linux.alibaba.com>
Date:   Tue, 14 Jul 2020 17:32:39 +0800
From:   Guo Ren <guoren@...ux.alibaba.com>
To:     Will Deacon <will@...nel.org>, guoren@...nel.org
Cc:     catalin.marinas@....com, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-csky@...r.kernel.org
Subject: Re: [PATCH] arm64: Make TSK_STACK_CANARY more accurate defined



On 2020/7/14 下午4:37, Will Deacon wrote:
> On Mon, Jul 13, 2020 at 04:03:33AM +0000, guoren@...nel.org wrote:
>> From: Guo Ren <guoren@...ux.alibaba.com>
>>
>> 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 <guoren@...ux.alibaba.com>
>> Co-developed-by: Kees Cook <keescook@...omium.org>
>> Cc: Catalin Marinas <catalin.marinas@....com>
>> Cc: Will Deacon <will@...nel.org>
>> ---
>>   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?
No, I just want to know how arm64 reply, ref:
https://lore.kernel.org/linux-riscv/1594397998-10221-1-git-send-email-guoren@kernel.org/T/#t

Best Regards
  Guo Ren

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ