From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 357C83858C53 for ; Thu, 14 Apr 2022 18:11:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 357C83858C53 Received: by mail-oi1-x231.google.com with SMTP id z8so6257517oix.3 for ; Thu, 14 Apr 2022 11:11:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=FkBwu8b5s94/+gKmOK3CLqNp1Uab+D0/4jCl9PKywjE=; b=7WKydn0IC9V+hjlbrR1ZkeKFv/NnwX2rtoH9955W+PGIY2F3dCAonNAtdBw7ZY1yjA liki/5BeciJDVSREMOuuVqUBKgdIic+xLxirK4eUR47RQwL7YVUhAdGkwz8kDAYxSTUo NBjpoowVycg+WJG5ZSfWRLd4gpSn7+dU6ePjU/bS7Um3BrJeeZGtuG7O4rzkTakzY3T5 /6QQpwQYeKdZSoxMxDGIua4xF+7wCYR9Dd1lEXKGS74BfrIX6zN91iQ5mRau0QtR3sV7 94t51qLBvluRMnRIr5ahEhj+Uc1CuUNizZUPE9ceL2rxid4PrAXMb2zl07rba3dqNm2l RBaQ== X-Gm-Message-State: AOAM53353xkYcOfQvblQjiVohvJssu7t0CW/h9M5GP+suxZTN6u33Qko XHIAmumjO44HiF1ODefdIlGVxpFaILmiDg== X-Google-Smtp-Source: ABdhPJxTAqw9DeIREtaUnLz5oYTmZY0jBff+KG0gq6dbXqTmiK8ov9uldaTi884RgQznMatTCfaRcA== X-Received: by 2002:a05:6808:124d:b0:322:3600:d84a with SMTP id o13-20020a056808124d00b003223600d84amr54964oiv.108.1649959883436; Thu, 14 Apr 2022 11:11:23 -0700 (PDT) Received: from ?IPV6:2804:431:c7ca:431f:3dc9:7133:8dac:5273? ([2804:431:c7ca:431f:3dc9:7133:8dac:5273]) by smtp.gmail.com with ESMTPSA id 6-20020a9d0006000000b0060152dd63a6sm283862ota.55.2022.04.14.11.11.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Apr 2022 11:11:22 -0700 (PDT) Message-ID: <46caf2d8-7441-114c-b8d6-529c8663b923@linaro.org> Date: Thu, 14 Apr 2022 15:11:20 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 4/7] x86: Add SSSE3 optimized chacha20 Content-Language: en-US To: Noah Goldstein Cc: GNU C Library References: <20220413202401.408267-1-adhemerval.zanella@linaro.org> <20220413202401.408267-5-adhemerval.zanella@linaro.org> From: Adhemerval Zanella In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2022 18:11:25 -0000 On 14/04/2022 14:17, Noah Goldstein wrote: > On Wed, Apr 13, 2022 at 3:27 PM Adhemerval Zanella via Libc-alpha > wrote: >> >> + clear(X1); >> + clear(X2); >> + clear(X3); >> + clear(X4); >> + clear(X5); >> + clear(X6); >> + clear(X7); >> + clear(X8); >> + clear(X9); >> + clear(X10); >> + clear(X11); >> + clear(X12); >> + clear(X13); >> + clear(X14); >> + clear(X15); > > No need to change now, but out of curiosity (and possible future optimization), > do we need the clears for our purposes? That's a good question which I am not sure. Distro do usually build glibc with security options (such as stack protector and stack check) and keep adding support for newer CPU security hardening (such as ARM PAC/BIT or Intel CET). We also uses some more software oriented hardening, such as explicit_memset on some places. I would expect that distro might use -mharden-sls, but I am not sure if we should enforce it on all assembly implementations.