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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3110CC4332F for ; Wed, 9 Nov 2022 17:45:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230372AbiKIRpH (ORCPT ); Wed, 9 Nov 2022 12:45:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbiKIRpG (ORCPT ); Wed, 9 Nov 2022 12:45:06 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98FFDBA8; Wed, 9 Nov 2022 09:45:05 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1DA4061965; Wed, 9 Nov 2022 17:45:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63DE8C433D6; Wed, 9 Nov 2022 17:44:59 +0000 (UTC) Date: Wed, 9 Nov 2022 17:44:56 +0000 From: Catalin Marinas To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, Albert Ou , Boris Ostrovsky , Borislav Petkov , Chris Zankel , Christophe Leroy , Dave Hansen , Greg Kroah-Hartman , Guo Ren , "H . Peter Anvin" , Ingo Molnar , Juergen Gross , Max Filippov , Michael Ellerman , Nicholas Piggin , Palmer Dabbelt , Paul Walmsley , Rich Felker , Russell King , Thomas Bogendoerfer , Thomas Gleixner , Will Deacon , Yoshinori Sato , linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: Re: [PATCH v1 2/2] stackprotector: actually use get_random_canary() Message-ID: References: <20221023203208.118919-1-Jason@zx2c4.com> <20221023203208.118919-3-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221023203208.118919-3-Jason@zx2c4.com> Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On Sun, Oct 23, 2022 at 10:32:08PM +0200, Jason A. Donenfeld wrote: > The RNG always mixes in the Linux version extremely early in boot. It > also always includes a cycle counter, not only during early boot, but > each and every time it is invoked prior to being fully initialized. > Together, this means that the use of additional xors inside of the > various stackprotector.h files is superfluous and over-complicated. > Instead, we can get exactly the same thing, but better, by just calling > `get_random_canary()`. > > Signed-off-by: Jason A. Donenfeld > --- > arch/arm/include/asm/stackprotector.h | 9 +-------- > arch/arm64/include/asm/stackprotector.h | 9 +-------- For arm64: Acked-by: Catalin Marinas