Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3049086rwl; Mon, 27 Mar 2023 08:34:37 -0700 (PDT) X-Google-Smtp-Source: AKy350YB+irOaTyg34xRb1G72ya2E5meUARoWgEsp5FRP9u96ImsCfY+BlLj+n0DzI5XzOkC0JoD X-Received: by 2002:a17:906:3419:b0:932:6452:2396 with SMTP id c25-20020a170906341900b0093264522396mr11089534ejb.74.1679931277044; Mon, 27 Mar 2023 08:34:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679931277; cv=none; d=google.com; s=arc-20160816; b=s13AxuNkmrm7adduylCcjGrQ0z8Hflh4AnX9yx0MjRHfzZ2M4TuXGIh2qkMWnX94Bz ALO8uXvfuSZQJB1fPfu+2yckkxGVJVwaMyP/koRJRaF37lUeIJkHifMv+d4qbeB/qPyF ascdjRztaZPp5Yg94Dblf4rbuuAm7xFI3nP2aDzVT2jBsxl+fmpN23oFFLO1wvqQzXYq Ag/qGJvVhabNTiZW3zOqIcOHQqlVfsquEfjWUNOqNI1uEMEq7FaQlLpXrspQrAsR+47P oDOVfWLJB7tfZLgASiuCOTNBmreVVAJMvZvBtGBb7bnp8vwPgeYkCElOMwNopm9ZN7Pa 92qA== 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:dkim-signature; bh=KIvQReY1/Tt9tUASlHa39t+YceqbsMK5EEQ4kAYFJZs=; b=UH+FlmyYig7MFWK5WHEjRIBnHdNHBvdKg7ENUau01a1etkhAWKgY+eIhN6S25kHnUO +XHEIk3b5uXMevsZWMLdPrL/9+79zFAJrZXx5EGTHtDlgkGtAj87jlzDfwXHJ8UdpGbh ybpdy4sEnaPLP5XMpE9mYuW1VvInUYbiSta2ztRqQqV+GYZnBH5RvBLZq0EkIQHy6pu3 a0y5ZwXHHAVgHgKaOriK+2WNlfDJQXle5Y5cYjQ3n4/qKtyCSKzZPrBWHfe8GisoG0Kg HLu8Nbn/rgplsPCRxeDoSCa97VfhKUXaDKyGyE9uYzLXEpsPsypX26BywkveuX4n3R4C 0m5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DI4mWd7k; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pj15-20020a170906d78f00b00939c395018esi15445074ejb.474.2023.03.27.08.34.11; Mon, 27 Mar 2023 08:34:37 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DI4mWd7k; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232849AbjC0Pc7 (ORCPT + 99 others); Mon, 27 Mar 2023 11:32:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232859AbjC0Pc5 (ORCPT ); Mon, 27 Mar 2023 11:32:57 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9936F2 for ; Mon, 27 Mar 2023 08:32:55 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id w9so37929032edc.3 for ; Mon, 27 Mar 2023 08:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679931174; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=KIvQReY1/Tt9tUASlHa39t+YceqbsMK5EEQ4kAYFJZs=; b=DI4mWd7kssc8ivjpPnIbucqvY45WV0DTghFt1CHge5gcZelxoPBi/8pMkvAakL9/mm TkBfjH2khefzFWe7traYvI8KUpiC4p7WNZTzyzUEEoytU15Nh3xyTLvuHdItcXkb93wj uKu5t9cybrPWZuQzEXWxARxVuXREM2d1cMWbqxNwSzihu0yxytmqeltfrbSxQ+4UDDFI y+FJ8ThGjofjMhlnGtdwjs8sA8htQbUhZzh0vij/IYzncr8r7upkgWIJPqe4i5dvecfA r3z6XiBtu2ho7+YE/aMnwEIuu8v+4IPoL/Y/t3ZbbJ0mjA5KryswMprKhwtLh+UNUZ1I jJrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679931174; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KIvQReY1/Tt9tUASlHa39t+YceqbsMK5EEQ4kAYFJZs=; b=pzIdaYef0cRogN9DrY0pVY7CeHQPuaaxigUS2IrOKA2sH6BY2Y7AT8sDESbA1OYvqz 2lt+TgkjlzH1NYmA/Xlx6U4hVEI8ZfBW0F+uiDTIMYsjkPj6wRkUKnPkFmoRCv6uqnYj z3tyzTjOrfYcpqtFGRVYJrybfPQ61s24NnZ1WRqu3wDlBxisZZhkerV0JvPlPyIB1Vpz KqIjLvfLXjCz3rPoM0D8gJO922/sOIXRlLJdcp+oybdVBUdICRmGX2upIAsIO/8494l9 rFlJRjUL3tJNaYH7M2oqS9sAKGy0wY7a3hoYJ7DaJydZk0HYC4IklJZ/59Aug4QS1v1E UiPQ== X-Gm-Message-State: AAQBX9dtSZ0JvZcZPBK9GyyCzzNiz3z+dMjp6pqPmTsgnuKtnfXpwtZl wqFqQ96WE1NkT91SHPVcNQ== X-Received: by 2002:a17:906:facb:b0:93b:752:d2a9 with SMTP id lu11-20020a170906facb00b0093b0752d2a9mr13285456ejb.31.1679931174118; Mon, 27 Mar 2023 08:32:54 -0700 (PDT) Received: from p183 ([46.53.253.24]) by smtp.gmail.com with ESMTPSA id o12-20020a170906358c00b0093b6d1db84asm7773532ejb.120.2023.03.27.08.32.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 08:32:53 -0700 (PDT) Date: Mon, 27 Mar 2023 18:32:51 +0300 From: Alexey Dobriyan To: Willy Tarreau Cc: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , "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=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,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 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.