From patchwork Sun Nov 12 11:26:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 1862827 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=WJJCLHD1; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SSqyp0GZLz1yR8 for ; Sun, 12 Nov 2023 22:26:57 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B3C83858C5E for ; Sun, 12 Nov 2023 11:26:55 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by sourceware.org (Postfix) with ESMTPS id 71AF73858D1E for ; Sun, 12 Nov 2023 11:26:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 71AF73858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 71AF73858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2604:1380:4641:c500::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699788407; cv=none; b=nNkaTimmBqKk3xQGtLHR7eDglgnU4KDfTJu0KvffMaGXszDJbRwxObXDll52MZutwY0nozwD95WX/uCFtigAPL66YOxgF3KdoIAtIZeDu+kCQOOp5C7qhTIOlBEfdvqCZs+Md8QU5N42QLdkwypD6b7nA4UsIKoBd5IHxL62sYk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699788407; c=relaxed/simple; bh=OIktjU/jqIavhyGURGW/2Oeg+WW4tUPdMPFEbNVkouQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=qDmItJ2+lBm+Dg6TS2Dp74z9fc6WFVXUoVqTnEuM/pyX/bboZ3pkUzHy1BwI+FH9QcHqZ8rj+2ZKdF3J0Bp2wL3TUScgfs48fseq03KeXjHXPe2H3ak/y2iHm877bCgsD3t9qGBpjg7fLbkroqlMpLIBa3KKv3/POC9rMNB2g9M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D0BA460BEF; Sun, 12 Nov 2023 11:26:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDA1AC433C7; Sun, 12 Nov 2023 11:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699788404; bh=OIktjU/jqIavhyGURGW/2Oeg+WW4tUPdMPFEbNVkouQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WJJCLHD1gJzgzjsftKSao4EPyHcWyOwaGQNrQLHR9zdM+EFJp4xdiMG6DSdgxqmq/ +bkgj/l43g2VXtGig0ftIYU9rOl+hCzXgQPWNcKuA/tZ0yMkyjcN46evdSt5iFbN9m h9vemqbuqB+H0oDEUa9OCDIv6XWDGJ7EMinpGShRvhbeb4vJ3acXcsJ0ZW6oanePpx 0BJHauPG0j73cHCDG9aRqImTe/P68u/kMx5nnhG4qxuDO+HrtTPo3WL9EfCiyB6UF7 gruY6B2V/1tLUvrAA1KCj2dMZLEXltiU1Earxih1h81xkAj2/Uyp5gVO+shDodQSi/ IfUB9LYtyYoqA== Date: Sun, 12 Nov 2023 12:26:38 +0100 From: Alejandro Colomar To: linux-man@vger.kernel.org, Guillem Jover Cc: Alejandro Colomar , libc-alpha@sourceware.org, Paul Eggert , Jonny Grant , DJ Delorie , Matthew House , Oskari Pirhonen , Thorsten Kukuk , Adhemerval Zanella Netto , Zack Weinberg , "G. Branden Robinson" , Carlos O'Donell , Xi Ruoyao , Stefan Puiu , Andreas Schwab Subject: [PATCH v2 0/3] Improve string_copying(7) Message-ID: <20231112112629.13827-2-alx@kernel.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.42.0 X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Hi, v3: - Patches 1/3 and 2/3 are identical to v2, except that I CCd libbsd's maintainer (Guillem) in 2/3 so he's aware that we're documenting BUGS for strlcpy(3). Since the strlcpy(3bsd) manual page is part of libbsd, it may be interesting to also add a BUGS section in that page. - Add 3/3, which adds strtcpy(3), a function almost identical to strscpy(9), and very similar to strlcpy(3), which doesn't share its bugs. Cheers, Alex Alejandro Colomar (3): string_copying.7: BUGS: *cat(3) functions aren't always bad string_copying.7: BUGS: Document strl{cpy,cat}(3)'s performance problems strtcpy.3, string_copying.7: Add strtcpy(3) man3/strtcpy.3 | 1 + man7/string_copying.7 | 121 +++++++++++++++++++++++++++++++----------- 2 files changed, 92 insertions(+), 30 deletions(-) create mode 100644 man3/strtcpy.3