From patchwork Tue Feb 7 13:12:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 55466 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 103A83858431 for ; Tue, 7 Feb 2023 13:13:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 103A83858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675775603; bh=+QsUcosQzOAUkxxEoUKYNfRh3pkYp0Ykl7ugvTjfcls=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=BuenDZ8AbTVqSs6hc3etUWA8wtQPQYzV9vtRFR2WAq5RdsmKe3oOvEi9fkf3ahJUQ H2Svb+To9XBhPMgcA6oidto0mCnJxi1J0A3tspOo69cn4YKiido9UfrkfBFrAck3fM qXwaMrEfh8S0bxZOEfMh0LqKbYci0K2WlYJs0kO0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by sourceware.org (Postfix) with ESMTPS id C46253858D33 for ; Tue, 7 Feb 2023 13:13:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C46253858D33 Received: by mail-oi1-x230.google.com with SMTP id s17so12543636ois.10 for ; Tue, 07 Feb 2023 05:13:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+QsUcosQzOAUkxxEoUKYNfRh3pkYp0Ykl7ugvTjfcls=; b=GBJLnJaE04NE7tUbMjUa4BLhDVSNzo4MFsret10QgdQhoOgYksuPryTt4msvS4j6Lx Y1R7fbr5gs2qm/gbCX8O8CKDtodmX0WEPJm14pjdX74k7J7AIaVnAj0U68giyTXA0GU0 AxeLbJ6PKLS3Zy5GSme5OTPvBAQvuRW7VIJpdFpZtGtjZYxRZgk0We9VUQjUKVNePsSM +66w71C+CQRG4fG5wLqUI2lBdH690dAR42EdKuNmTKUHi22vGe8v0cBnblDuDAtcXq41 5Usav1OIbF/X+HhBynHAc6ECrBGXzxPY1zbHbYJKmfkB2v4IT5zEpOccGW7J7PVRjvNr gztw== X-Gm-Message-State: AO0yUKUA/GzeT5tRstQpv/31XzxUyH5G5N0PQxFi+TFnBH5vn0Nzxsju DgAYffylvuIStPK/gqQGde3NthA9+rDmJd+6EiQ= X-Google-Smtp-Source: AK7set9kLtz3ALrRUPFUX0p4jhbDwlj7RTWb1I+ycQG8+v/81QFyqVWe7xoehQ6d3+vwtZUDMW7T7Q== X-Received: by 2002:aca:674a:0:b0:378:88cb:94dc with SMTP id b10-20020aca674a000000b0037888cb94dcmr1158088oiy.48.1675775579423; Tue, 07 Feb 2023 05:12:59 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:8ced:3d04:3626:cc0e:457c]) by smtp.gmail.com with ESMTPSA id c15-20020a9d75cf000000b0068bbaf7a1b0sm6414113otl.34.2023.02.07.05.12.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 05:12:58 -0800 (PST) To: libc-alpha@sourceware.org, Richard Henderson , Noah Goldstein Subject: [PATCH 0/3] Minor fixes from generic string routines Date: Tue, 7 Feb 2023 10:12:52 -0300 Message-Id: <20230207131255.3396143-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The improve generic string routines review brought up minor issues with the internal hidden proto and def for strchrnul and memrchr. Although it does not incur in intra-PLT generation, it would be good to fix them for consistency. The strcnmp fix is to guarantee that the generic implementation can be used on static initialization (once the loader is realocated or loader is initialized). Ideally I think it would be better to disable static protection on all string routines, but we can do it one by one. Adhemerval Zanella (3): string: Add libc_hidden_proto for strchrnul string: Add libc_hidden_proto for memrchr string: Disable stack protector in early static initialization include/string.h | 2 ++ string/Makefile | 2 ++ string/memrchr.c | 1 + string/strchrnul.c | 1 + sysdeps/aarch64/memrchr.S | 1 + sysdeps/aarch64/strchrnul.S | 1 + sysdeps/i386/i686/multiarch/memrchr-sse2.S | 1 + sysdeps/i386/i686/multiarch/memrchr.c | 2 ++ sysdeps/i386/strchrnul.S | 1 + sysdeps/m68k/strchrnul.S | 1 + .../powerpc32/power4/multiarch/memrchr-ppc32.c | 10 ++++++++++ .../powerpc32/power4/multiarch/memrchr.c | 12 ++++++------ .../power4/multiarch/strchrnul-ppc32.c | 7 +++++++ .../powerpc32/power4/multiarch/strchrnul.c | 17 +++++++++-------- sysdeps/powerpc/powerpc32/power7/memrchr.S | 1 + sysdeps/powerpc/powerpc64/multiarch/memrchr.c | 18 +++++++++--------- .../powerpc/powerpc64/multiarch/strchrnul.c | 1 + sysdeps/powerpc/powerpc64/power7/memrchr.S | 1 + sysdeps/powerpc/powerpc64/power8/memrchr.S | 1 + sysdeps/s390/memrchr-c.c | 4 ++++ sysdeps/s390/memrchr.c | 8 +++++--- sysdeps/s390/strchrnul-c.c | 4 +++- sysdeps/s390/strchrnul.c | 8 +++++--- sysdeps/x86_64/memrchr.S | 1 + sysdeps/x86_64/multiarch/memrchr.c | 1 + sysdeps/x86_64/multiarch/strchrnul.c | 4 ++++ sysdeps/x86_64/strchrnul.S | 1 + 27 files changed, 82 insertions(+), 30 deletions(-)