From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by sourceware.org (Postfix) with ESMTPS id 3A5983858D28 for ; Thu, 10 Feb 2022 11:29:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3A5983858D28 Received: by mail-oi1-x22a.google.com with SMTP id y23so5475240oia.13 for ; Thu, 10 Feb 2022 03:29:15 -0800 (PST) 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=Dy+jdqyOCEimIRGSoWOmnNSTGhDrZvv0P5onVcsms/w=; b=QmmKcVExZFE7NE3lRuLcS/yZtSOhsoWxXvrjD8shDdy3UTzvAJDUjSBZJnsqybmn7S LQbCKK7pD6gUr0RQ7T0m80bEzMlIRds7gF1Mt2nLyY9phWIcZOiAqeGu7X19FPGJKLSr 3hZzdDXixr6xIOr3MmGsa6TcLX+hIYRmtpFqJsSio+Tizcd56BA8ZfOcWl4SLJJzASH5 sUmRrItZFNGuAaPliqIpzjBI0fsFSSUgYcctNf8nEOxDc2La+wNqlq4XLTU7Gf7Ef9W6 giPjcBEljJYbMJUNTWZ5QY0+c3/MBNC9Z1FPNtlAtp6yFTJrL1GCnzzd18/d7DqJ7w4o j5gw== X-Gm-Message-State: AOAM531vwedS50kVkEnJbd2HxzHzxrvC/mynRKFY+dgkfG5EitNxenBg auBTP8Qx/+sSOhRKrcs+aOO6NA== X-Google-Smtp-Source: ABdhPJz2zdCv+BUh5ragIlHLladvhL5dNwxpYCoHETsZU3Ntshw/R+y3C08ZxGT6UeqiZY1yRQVq5A== X-Received: by 2002:a05:6808:1912:: with SMTP id bf18mr737742oib.199.1644492554509; Thu, 10 Feb 2022 03:29:14 -0800 (PST) Received: from ?IPV6:2804:431:c7ca:733:a925:765e:3799:3d34? ([2804:431:c7ca:733:a925:765e:3799:3d34]) by smtp.gmail.com with ESMTPSA id be19sm8374304oib.31.2022.02.10.03.29.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Feb 2022 03:29:14 -0800 (PST) Message-ID: <40ed26dc-a50d-0b60-498d-7055716a4593@linaro.org> Date: Thu, 10 Feb 2022 08:29:11 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH v2 5/5] Linux: Consolidate auxiliary vector parsing Content-Language: en-US To: Florian Weimer Cc: libc-alpha@sourceware.org References: <151c5398adbbe538a275ea5ac77705b0abd0d748.1643886336.git.fweimer@redhat.com> <2b39ebaf-98ee-d0c2-39f6-6b0a87d0741a@linaro.org> <87v8xp3xng.fsf@oldenburg.str.redhat.com> <86eead09-64ac-b12f-4c24-ae6e4e12c4ff@linaro.org> <87mtizxa8a.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella In-Reply-To: <87mtizxa8a.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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, 10 Feb 2022 11:29:17 -0000 On 10/02/2022 07:54, Florian Weimer wrote: > * Adhemerval Zanella: > >>>>> + auxv_values[AT_PAGESZ] = EXEC_PAGESIZE; >>>>> + auxv_values[AT_FPUCW] = _FPU_DEFAULT; >>>>> + >>>>> + /* NB: Default to a constant CONSTANT_MINSIGSTKSZ. */ >>>>> + _Static_assert (__builtin_constant_p (CONSTANT_MINSIGSTKSZ), >>>>> + "CONSTANT_MINSIGSTKSZ is constant"); >>>> >>>> Shouldn't it warn that CONSTANT_MINSIGSTKSZ is not a constant? >>> >>> Sorry, would please rephrase? Should I change this to >>> ""CONSTANT_MINSIGSTKSZ is not constant"? >> >> Yeah because on a the _Static_assert failure the resulting message seems >> to the opposite of what triggered it. > > The GCC error message doesn't suggest a strong preference either way: > > /tmp/t.c:1:1: error: static assertion failed: "failed" > 1 | _Static_assert (0, "failed"); > | ^~~~~~~~~~~~~~ > > I think in the existing sources, the message is sometimes indicating the > failure, or what is being asserted (as is the case here). Compiler is will just emit the message if condition is met, my point is emitting 'CONSTANT_MINSIGSTKSZ is constant' on an error is the opposite of what triggered it (CONSTANT_MINSIGSTKSZ is really *not* a constant).