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 5A1CCC7619A for ; Sun, 26 Mar 2023 19:42:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbjCZTmm (ORCPT ); Sun, 26 Mar 2023 15:42:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjCZTmk (ORCPT ); Sun, 26 Mar 2023 15:42:40 -0400 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B3CD04696 for ; Sun, 26 Mar 2023 12:42:39 -0700 (PDT) Received: (from willy@localhost) by mail.home.local (8.17.1/8.17.1/Submit) id 32QJgTBI011688; Sun, 26 Mar 2023 21:42:29 +0200 Date: Sun, 26 Mar 2023 21:42:29 +0200 From: Willy Tarreau To: Alexey Dobriyan Cc: Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , "Paul E. McKenney" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/8] tools/nolibc: tests: add test for -fstack-protector Message-ID: References: <89a960c7-0c9b-43ab-9fc8-a68405f7ed6a@p183> <8e156377-e7d9-48ec-a7ee-292aba002201@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 26, 2023 at 10:38:39PM +0300, Alexey Dobriyan wrote: > > I'm not seeing any issue with your approach instead, let's > > keep it as-is for now (also it does what the stack protector is supposed > > to catch anyway). > > There are no guarantess about stack layout and dead writes. > The test doesn't corrupt stack reliably, just 99.99% reliably. Sure but it's for a regtest which can easily be adjusted and its posrtability and ease of maintenance outweights its reliability, especially when in practice what the code does is what we want to test for. And if an extra zero needs to be added to the loop, it can be at a lower cost than maintaining arch-specific asm code. Willy