Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3076808rwl; Mon, 27 Mar 2023 08:57:34 -0700 (PDT) X-Google-Smtp-Source: AK7set8OjzjdNmq+1O1+mrBTd3mcvQPCxjpA7OEn5Y4DjUgieI+ntPX3gOfDpx4MA1i+ucLglOyG X-Received: by 2002:a05:6a20:4c17:b0:dd:f73d:17b with SMTP id fm23-20020a056a204c1700b000ddf73d017bmr11247037pzb.12.1679932654721; Mon, 27 Mar 2023 08:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679932654; cv=none; d=google.com; s=arc-20160816; b=YKiPv7Ih+d0VL8P/p1sxghrKZqcJmuAr8/B44liJrfpmhpzZwPUKBjsskyIfK0jy07 56WFgcVcOsSdZJOgRZg21oatO7gJ2fxjEtviKI4ZJBMY5BWLNssuq264uaXxKgq6QG19 cnrQ+DG36NLVL3PmJqpzV//79dJRtF8B7Z2vJ5ejWwk63R6Zn2z+NV8tNvDvTa3jYC3X WsdW6m8d8OEp7AuFW19Y8xCsxU0LekcLsI8t84quTJwb9l+XUvLYN/UCEzWNjO/ux37a 72+1hn7OhAc80yXAvWvn884HHjZwXMwqHMtG+mMAg5JQanB8iV8Mv+vk7GmcHKJOylot 2mRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=pwxGyWjOszJorm4U0OaDrL4EyhH27M50DZSR+5U7Occ=; b=Al92Uc0wT3eOFMezOUI1Jm+SxKm+liQGWzy6rn1L9ccFQvqQZ/TT1W1+Nun5KnpoWf xAFeIUdokukgDFa/hYwq07W0QVYbZZif7IwAVVgCY6i9LcmrDsBhytdTUqffWXCO716X JDxpko3tkydgKA3SwhYb0nuvIAlprBy2a0aUA21n8qlWvFtOVmCYESrzoYKMqsUqVjOJ NwWyOYCxPOXnewobuJdHcjpnrQZIeGkToPx7l7FEmLl9nY/5tzfgymWYmAWzPHHX1zk3 rN75SAY7o+GGwEmxqz5lFleNC0ewVXt9fD1geGUozbqVvwoabgUYLyOlLb03XRj75HRo X+Sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r17-20020a056a00217100b0060102d22785si26046403pff.283.2023.03.27.08.57.19; Mon, 27 Mar 2023 08:57:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231990AbjC0PyW (ORCPT + 99 others); Mon, 27 Mar 2023 11:54:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjC0PyV (ORCPT ); Mon, 27 Mar 2023 11:54:21 -0400 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 61D8126AB for ; Mon, 27 Mar 2023 08:54:20 -0700 (PDT) Received: (from willy@localhost) by mail.home.local (8.17.1/8.17.1/Submit) id 32RFsBE0020818; Mon, 27 Mar 2023 17:54:11 +0200 Date: Mon, 27 Mar 2023 17:54:11 +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: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 27, 2023 at 06:32:51PM +0300, Alexey Dobriyan wrote: > On Sun, Mar 26, 2023 at 09:42:29PM +0200, Willy Tarreau wrote: > > 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. > > For the record, I disagree. Use volatile writes at least. Yeah I agree on the volatile one. Willy