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 B10E1C433FE for ; Wed, 9 Nov 2022 17:45:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231215AbiKIRpH (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-csky@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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DCF41C433FE for ; Wed, 9 Nov 2022 17:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Bd4vcmFTzmQSqxrWnlwM8jvUXYVQGQ8CJxKu/GRxXhE=; b=EzDOTGACJnhXFa nE43TMdCwZZaoUykhVE/1Wko5Id1A9u4WvndJamlWY+aHbPPcdzOD2sLpIIgopQCAWBMX+wBZOC3V 6if0rQxuSm40TsSNa6IRDTVFaIALFpT2ZvjYffYnUqL7UzIsrD5WHipDOoDSPmiuD06QrjBY0Jpv7 H6B8ik3E12eKGM91/vmfDHUCHGTLZWlwLayD1FzfhgTx13Z+ReR5fVKqz5GKZLIa6QjGCvxJrQHEf /nq/zM8wMgUbMWe0ySowR3LtByQdR/lwEvC8PVPYEEpQkjOnEkyD+/YKC2NWUNAkelCIF3KRHpaX2 tPTzvecht94Sm1OprVUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osp8b-00Firj-7e; Wed, 09 Nov 2022 17:45:21 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1osp8N-00FigK-F9; Wed, 09 Nov 2022 17:45:09 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id DFD19B81F54; 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-Disposition: inline In-Reply-To: <20221023203208.118919-3-Jason@zx2c4.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221109_094507_675361_C5116FB9 X-CRM114-Status: GOOD ( 13.06 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D336BC433FE for ; Wed, 9 Nov 2022 17:45:47 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4N6snk15z6z3f4C for ; Thu, 10 Nov 2022 04:45:46 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:4601:e00::1; helo=ams.source.kernel.org; envelope-from=cmarinas@kernel.org; receiver=) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4N6sn244jhz3cB8 for ; Thu, 10 Nov 2022 04:45:10 +1100 (AEDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id DFD19B81F54; 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" 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> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , linux-sh@vger.kernel.org, Dave Hansen , linux-mips@vger.kernel.org, Max Filippov , Guo Ren , linux-csky@vger.kernel.org, "H . Peter Anvin" , linux-riscv@lists.infradead.org, Will Deacon , Boris Ostrovsky , Yoshinori Sato , x86@kernel.org, Russell King , Ingo Molnar , linux-xtensa@linux-xtensa.org, Albert Ou , Nicholas Piggin , Borislav Petkov , Paul Walmsley , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Juergen Gross , Chris Zankel , Thomas Bogendoerfer , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Palmer Dabbelt , linuxppc-dev@l ists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0110EC433FE for ; Wed, 9 Nov 2022 17:46:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YP9de4UVj27nMuwI5qKa210KGanV5dmqpytoSAX+950=; b=qmfl2ZuD5W5yDJ mLd397K03Ba2N/Ue8SE3M66JNiUl88C8j2i/n5nxiGWym5fxqekSB/Pxl8RklUTUG2PPU2no224v+ U/3GQunJTHe36gVxWmw05WsbyJKxircClAzUglhXoNNpXdyw5tV+HvJq9/vQP8adHRtjHnGJpNXjo jnsIF992zSGUnJDIARNGaeZbbWKNJCaHDMGmACZlmM78NyNZ36Ei9d//yPIZuZdbOlFdKELvb8Lvh l1cI8iVf92IPIqIrwvh4S+Aw4gRL6drui2kkLYnci1ANIqAiMOrY85cEgP8RJbq4JI+u8moFdsBLM pT4Mk2Z7N8v5ixIFG2HQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osp8Q-00Fiiu-VY; Wed, 09 Nov 2022 17:45:11 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1osp8N-00FigK-F9; Wed, 09 Nov 2022 17:45:09 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id DFD19B81F54; 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-Disposition: inline In-Reply-To: <20221023203208.118919-3-Jason@zx2c4.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221109_094507_675361_C5116FB9 X-CRM114-Status: GOOD ( 13.06 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel