From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by sourceware.org (Postfix) with ESMTPS id 8D3D53858D3C for ; Thu, 16 Sep 2021 20:55:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8D3D53858D3C Received: by mail-io1-xd2b.google.com with SMTP id z6so2818869iof.5 for ; Thu, 16 Sep 2021 13:55:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v0WBkPJpAl8PvsW7+Oybh4Mx2pvdQEH685iyd4JtNVU=; b=yDuhRU8yXhhEZBV9inUcRwNSCz+RNEpq7EaevdA3eRfUELmR2ieobMdyoBjTVuOQlv /ljM5l7B64MuLXLHM/lf/p4a7kOCO8EV8/Gjq4KNAnCxaEepYoCXfvW3GXj0m3gS286e k6LvVx/gvG3enKNMtqL1cMSCqf8/MfI72iTdnZw7N05xwneQnxGDYrHlQMUWpQneX0x4 PLAPM+suzQLixwGlgPtH8hg2bv1xpILxl+XjDA80RNr9YazASIxD53CD9AgKvCyXMJdP /zil4NPnKRhFX3FU1LYCZVwJh2h/ggOCUND49lmArH/rG2gTWFQLVvB4t6OxiAoCSogU zROQ== X-Gm-Message-State: AOAM533uyHMUd+pz9q4nK/MdiwaH4/LsBhoQVpzWhXZkTC+gUe/ijJ4A p1cHRP4jbX6FzyLPznvQy+j4Z4dMhnHYGU3VgTXihA== X-Google-Smtp-Source: ABdhPJxFQD6yT2SehAKjyo6VcoO2WArA9eXIel809O8ySk/Y3Zb7sQ11U7zn+blhNI56mg+n+TDd+xZBViFPsOkcwag= X-Received: by 2002:a05:6602:2c05:: with SMTP id w5mr6038059iov.160.1631825754732; Thu, 16 Sep 2021 13:55:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: enh Date: Thu, 16 Sep 2021 13:55:43 -0700 Message-ID: Subject: Re: [libc-coord] Add new ABI '__memcmpeq()' to libc To: libc-coord@lists.openwall.com Cc: Noah Goldstein , gcc@gcc.gnu.org, GNU C Library X-Spam-Status: No, score=-18.2 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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, 16 Sep 2021 20:55:56 -0000 (Android libc maintainer.) should __memcmpeq be in compiler-rt rather than libc? On Thu, Sep 16, 2021 at 1:35 PM Joseph Myers wrote: > On Thu, 16 Sep 2021, Chris Kennelly wrote: > > > In terms of relying on the feature: If __memcmpeq is ever exposed as an > a > > simple alias for memcmp (since the notes mention that it's a valid > > implementation), does that open up the possibility of depending on the > > bcmp-like behavior that we were trying to escape? > > The proposal is as an ABI only (compilers would generate calls to > __memcmpeq from boolean uses of memcmp, users wouldn't write calls to > __memcmpeq directly, __memcmpeq wouldn't be declared in installed libc > headers). If such dependence arises, that would suggest a compiler bug > wrongly generating such calls for non-boolean memcmp uses. > > -- > Joseph S. Myers > joseph@codesourcery.com >