From patchwork Tue Jul 25 15:16:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1812692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=RiOZblpz; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R9LH813Ndz1ydq for ; Wed, 26 Jul 2023 01:17:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 93B88385696B for ; Tue, 25 Jul 2023 15:17:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93B88385696B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1690298225; bh=yngwNS77EKeKTep1T7/9w+61t/SuLqXtFpSPosa7fhs=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=RiOZblpz/2i27V0BZumrSxDw5B259plqnS7F4t4+FhBFwDbFH1K8gMGkxVtGsBCAJ OwJJRcmazZ7ZHD9aK1e13j4pc8K7BV0pmKaEdr+19suUaIpFXIN0XrbQ7RDarmxZvB FTSMRlAxZjtZOMvg4F7NuDhhl1BNdZlrRSmzucIY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by sourceware.org (Postfix) with ESMTPS id 836F83857803 for ; Tue, 25 Jul 2023 15:16:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 836F83857803 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-1bb7d1f7aeaso1371901fac.1 for ; Tue, 25 Jul 2023 08:16:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690298207; x=1690903007; 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=yngwNS77EKeKTep1T7/9w+61t/SuLqXtFpSPosa7fhs=; b=QeE9ySQh6mW4RJxKYe3Nw4W1fWpq4Am4ruj2P01QEjwWKKIx7L/9Fz9EXNL/bOepd0 s7n36/+5lF1DpVp9xXV+nTPfUu2nwFMxeAnRMGUxNwTJ5SzT0SJankfGy7EjxW3Z52AQ YJQABhCPpMKQmsLZhskYZ1QkFjFe/SCx9DelhN2aSbhOY1x8sDBdjqGqSiz7tlNZ4/1C 0coeXN1XLWGr3nuCA5yqtFSmPuiZk3BOM5/YYcBh3AGmKE+UfckDRo32Pcu5aFmbyVt0 YCSAG5yFgNPUpRVxkJQDfDai/JHKI7pGtaAIbeoVJ/MrCkMuQ72yxp3iAvygjyctxczI 1flg== X-Gm-Message-State: ABy/qLa9uGp5g8+e54HZ0LwkuY750ZJu0VaIVSLUpwXzi+02EuWqFqyk a8pluQVDM9x3mxoote5CKjWiyaFLZNNOdVSaoZ7TAA== X-Google-Smtp-Source: APBJJlEkU3N6B1ceNg+dMWVFdzdnP8sGRuSlTnR1e0foOL73Bbs2N15kmml73ZzTBcrhk6FijkFe3w== X-Received: by 2002:a05:6871:5221:b0:1b0:f38:90f6 with SMTP id ht33-20020a056871522100b001b00f3890f6mr15500648oac.7.1690298206939; Tue, 25 Jul 2023 08:16:46 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:d4d2:3277:e224:7a6f:4feb]) by smtp.gmail.com with ESMTPSA id ea3-20020a056870070300b001bb9d01fe3dsm525439oab.5.2023.07.25.08.16.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 08:16:46 -0700 (PDT) To: libc-alpha@sourceware.org, Frederic Berat Subject: [PATCH 0/4] Fix i386 build with --enable-fortify-source Date: Tue, 25 Jul 2023 12:16:37 -0300 Message-Id: <20230725151641.923083-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, T_SCC_BODY_TEXT_LINE 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 Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Building i686-linux-gnu with --enable-fortify=1,2,3 on gcc from 6 to 13 triggers some issues: - gcc 6 issues an warning building string/tester.c where strncat fortify builtin might overflow the destination buffer. - gcc 12 and 13 with --enable-fortify=3 uncovered an issue with static linking, where multiple internal chk symbols for memcpy, memmove, and mempcpy are being provided. A clean build/check for gcc 6 requires my previous set [1]. With both applied I see to build/check regression for all supported --enable-fortify with all supported gcc on i686-linux-gnu. [1] https://patchwork.sourceware.org/project/glibc/list/?series=22751. Adhemerval Zanella (4): i386: Fix build with --enable-fortify=3 i386: Remove memset_chk-nonshared.S linux: Fix i686 with gcc6 string: Fix tester build with fortify enable with gcc 6 string/tester.c | 9 ++++++++ sysdeps/i386/i686/memset.S | 2 +- sysdeps/i386/i686/multiarch/Makefile | 5 ----- .../i686/multiarch/memcpy_chk-nonshared.S | 21 ------------------- .../i686/multiarch/memmove_chk-nonshared.S | 21 ------------------- .../i686/multiarch/mempcpy_chk-nonshared.S | 21 ------------------- sysdeps/i386/i686/multiarch/memset-ia32.S | 9 ++++---- .../i686/multiarch/memset_chk-nonshared.S | 21 ------------------- .../unix/sysv/linux/convert_scm_timestamps.c | 9 ++++++++ 9 files changed, 24 insertions(+), 94 deletions(-) delete mode 100644 sysdeps/i386/i686/multiarch/memcpy_chk-nonshared.S delete mode 100644 sysdeps/i386/i686/multiarch/memmove_chk-nonshared.S delete mode 100644 sysdeps/i386/i686/multiarch/mempcpy_chk-nonshared.S delete mode 100644 sysdeps/i386/i686/multiarch/memset_chk-nonshared.S