From patchwork Thu Sep 21 20:48:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 1837829 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=owlfolio.org header.i=@owlfolio.org header.a=rsa-sha256 header.s=fm1 header.b=h+Xz/8iS; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=ApqRuRpN; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rs6vH5trYz1ynX for ; Fri, 22 Sep 2023 06:48:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 057C3385841E for ; Thu, 21 Sep 2023 20:48:55 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by sourceware.org (Postfix) with ESMTPS id BB22A3858D39 for ; Thu, 21 Sep 2023 20:48:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB22A3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=owlfolio.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=owlfolio.org Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 2D1053200913 for ; Thu, 21 Sep 2023 16:48:41 -0400 (EDT) Received: from imap45 ([10.202.2.95]) by compute1.internal (MEProxy); Thu, 21 Sep 2023 16:48:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owlfolio.org; h= cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1695329320; x=1695415720; bh=KpC9igykwx7WSibqzxdj0FyBq UhIfoFa7EqzmWoDqP8=; b=h+Xz/8iS+abUDt7arj5rbeXvSWI8FpKqLw6Da0sYP vRshm0KSre17VbQdJJrznGdNVZSsGN6luz0PkfgLmoTLHCRajFBu0JaFmUnQk1dA tf7cw6g6sULQbKAZizfAjxPjQMEhohclioIcprvPDLrUmx+vwa38Rs1XqL+1gQAb HeRlZcs7+ZyZhVe5bB0/zIYLSfdXjbi2QYNInMC9OpuI3rotIGdxuSy29VRGtpki ytn2sbLzE7Ua5Veov9s97uvyvUur57Mt2ewt9WGRELYgZguIch4EtYn/5MBKFoyj cEdmLm7rYD6759Tjlw4Lu4TMPdXhMa2YiYKGQgTyFIYcA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1695329320; x=1695415720; bh=KpC9igykwx7WSibqzxdj0FyBqUhIfoFa7Eq zmWoDqP8=; b=ApqRuRpNuROaYMGm0Vpw3EfaN8A3+LtmXvYkdxycUrNQG2Rg9e2 f2+TdSXAU/Hd9Y3htmKc9gwCzddVJ7wLaKj2Q2ELnlxEJqtD43EFskUgWcyCXtSD 1ZYgWsiZ0bbg5pzcMGvrCKvmgBIL++uxQKUtNBdHlnqExZpPPklXwUhq1H/IVl3y q0KWuQFLb+9p5GUuKy2OZxK5+qB8ybKtd/kvEtREl29/njdB7r1gFQ/B9EIaF81D 3DMOUJnoo4ZGYrPm6sSQMhb2lX0brv74836ePW4emcKeT90l0Th57Dn8WM1NV7L8 pRkKnhMJNomJTcXLXdGaL4xRwrGL5TGrrQw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekiedgudehvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfffhffvufgtsehttdertderredtnecuhfhrohhmpedfkggrtghk ucghvghinhgsvghrghdfuceoiigrtghksehofihlfhholhhiohdrohhrgheqnecuggftrf grthhtvghrnhepffejhefhledvhfduhfeiffekvdeludduueehvdeiuefhffevgedvheel ffeugfeknecuffhomhgrihhnpehsohhurhgtvgifrghrvgdrohhrghdpuhhtfhdqkedrrg hspdhmrghkvgdrihhnnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepiigrtghksehofihlfhholhhiohdrohhrgh X-ME-Proxy: Feedback-ID: i876146a2:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 62088272007D; Thu, 21 Sep 2023 16:48:40 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-761-gece9e40c48-fm-20230913.001-gece9e40c MIME-Version: 1.0 Message-Id: <80f93982-dac6-4d4e-b9eb-9a5d09710a9c@app.fastmail.com> Date: Thu, 21 Sep 2023 16:48:19 -0400 From: "Zack Weinberg" To: "GNU libc development" Subject: [PATCH 0/4] Remove libcrypt X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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.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 In https://sourceware.org/pipermail/libc-alpha/2023-September/151664.html Adhemerval suggested that now would be a good time to complete the removal of libcrypt. This patch series does just that. If you would rather not apply it by hand, you can get it from the zack/remove-libcrypt branch (with somewhat different commit messages -- I'll fix that before merging). Patch #1 was compile-tested on x86_64-linux with both --enable-crypt and the default --disable-crypt; furthermore, in the --enable-crypt configuration, I ran "make xcheck subdirs='crypt locale'" with no failures. Patch #2 was only compile tested. For patch #3, which only touches the manual, I did 'make info html' and inspected the output. (I don't have TeX on this computer so I couldn't run 'make pdf'.) Finally, after patch #4 I ran the complete testsuite ('make check' only) and found no new failures. 26 tests are failing on my machine due to probable environment issues, but they were all failing on trunk before I started making changes, and none of them appear to have anything to do with this patchset. stdio-common/Versions says that __snprintf is exported as GLIBC_PRIVATE because libcrypt uses it. I doubt that was the only ancillary library using that symbol, but I don't know how to find other uses, so I left the export in place; it can always be removed later. There are a few files of test data that mention the crypt directory and/or its contents, e.g. benchtests/strcoll-inputs/filelist#en_US.UTF-8. As best I can tell, the intent of these is just to have a big pile of strings and it doesn't matter whether the named files exist, so I haven't altered them. I seem to have a slightly different version of autoconf than the one that was last used to regenerate the top-level configure script. If that's a problem, let me know. I deleted the paragraph at the beginning of crypt.texi about legal restrictions on cryptographic software, because after this patchset the only cryptographic code in glibc itself will be the MD5 implementation used by localedef (see first patch in this series), which is not exposed to users of the library, and the DES implementation in sunrpc/, which is also slated for removal (right?) If this paragraph should be preserved, please let me know. Zack Weinberg (4): Import Solar Designer's public domain MD5 for use by localedef. Remove --enable-crypt and --enable-nss-crypt configure options. Remove documentation of passphrase-hashing functions. Remove all of the remaining libcrypt code. CONTRIBUTED-BY | 15 - INSTALL | 13 - Makeconfig | 5 - NEWS | 16 +- SHARED-FILES | 2 - config.make.in | 4 - configure | 247 ++--- configure.ac | 64 -- conform/Makefile | 5 - crypt/Makefile | 69 -- crypt/README.ufc-crypt | 135 --- crypt/Versions | 5 - crypt/badsalttest.c | 54 - crypt/cert.c | 135 --- crypt/cert.input | 171 ---- crypt/crypt-entry.c | 183 ---- crypt/crypt-private.h | 76 -- crypt/crypt.c | 115 --- crypt/crypt.h | 70 -- crypt/crypt_util.c | 946 ------------------ crypt/md5-block.c | 166 --- crypt/md5-crypt.c | 331 ------ crypt/md5.c | 257 ----- crypt/md5.h | 146 --- crypt/md5c-test.c | 18 - crypt/sha256-block.c | 98 -- crypt/sha256-crypt.c | 423 -------- crypt/sha256.c | 193 ---- crypt/sha256.h | 69 -- crypt/sha256c-test.c | 61 -- crypt/sha256test.c | 102 -- crypt/sha512-block.c | 105 -- crypt/sha512-crypt.c | 445 -------- crypt/sha512.c | 221 ---- crypt/sha512.h | 72 -- crypt/sha512c-test.c | 63 -- crypt/sha512test.c | 113 --- crypt/speeds.c | 153 --- crypt/ufc-crypt.h | 28 - crypt/ufc.c | 54 - elf/Makefile | 38 - elf/tst-linkall-static.c | 6 - include/crypt.h | 3 - locale/Makefile | 18 +- locale/locarchive.h | 4 +- locale/md5.c | 281 ++++++ locale/md5.h | 45 + locale/programs/locarchive.c | 10 +- locale/programs/locfile.c | 6 +- .../md5test-giant.c => locale/tst-md5-giant.c | 43 +- crypt/md5test.c => locale/tst-md5.c | 22 +- manual/contrib.texi | 2 +- manual/crypt.texi | 234 +---- manual/examples/genpass.c | 59 -- manual/examples/testpass.c | 67 -- manual/install.texi | 13 - manual/users.texi | 4 +- posix/unistd.h | 10 - scripts/build-many-glibcs.py | 9 +- scripts/documented.sh | 2 +- shlib-versions | 3 - stdio-common/Versions | 2 +- sysdeps/generic/fips-private.h | 36 - sysdeps/generic/libcrypt.abilist | 0 sysdeps/mach/Makefile | 4 +- sysdeps/mach/hurd/i386/libcrypt.abilist | 7 - sysdeps/mach/hurd/x86_64/libcrypt.abilist | 2 - .../sparc/sparc32/sparcv9/multiarch/Makefile | 8 - .../sparc32/sparcv9/multiarch/md5-block.c | 1 - .../sparc32/sparcv9/multiarch/md5-crop.S | 1 - .../sparc32/sparcv9/multiarch/sha256-block.c | 1 - .../sparc32/sparcv9/multiarch/sha256-crop.S | 1 - .../sparc32/sparcv9/multiarch/sha512-block.c | 1 - .../sparc32/sparcv9/multiarch/sha512-crop.S | 1 - sysdeps/sparc/sparc64/multiarch/Makefile | 8 - sysdeps/sparc/sparc64/multiarch/md5-block.c | 29 - sysdeps/sparc/sparc64/multiarch/md5-crop.S | 109 -- .../sparc/sparc64/multiarch/sha256-block.c | 32 - sysdeps/sparc/sparc64/multiarch/sha256-crop.S | 100 -- .../sparc/sparc64/multiarch/sha512-block.c | 32 - sysdeps/sparc/sparc64/multiarch/sha512-crop.S | 130 --- .../unix/sysv/linux/aarch64/libcrypt.abilist | 7 - .../unix/sysv/linux/alpha/libcrypt.abilist | 7 - sysdeps/unix/sysv/linux/alpha/shlib-versions | 1 - sysdeps/unix/sysv/linux/arc/libcrypt.abilist | 2 - sysdeps/unix/sysv/linux/arm/Makefile | 4 - .../unix/sysv/linux/arm/be/libcrypt.abilist | 7 - .../unix/sysv/linux/arm/le/libcrypt.abilist | 7 - sysdeps/unix/sysv/linux/csky/libcrypt.abilist | 2 - sysdeps/unix/sysv/linux/fips-private.h | 74 -- sysdeps/unix/sysv/linux/hppa/libcrypt.abilist | 7 - sysdeps/unix/sysv/linux/i386/libcrypt.abilist | 7 - sysdeps/unix/sysv/linux/ia64/libcrypt.abilist | 7 - .../linux/loongarch/lp64/libcrypt.abilist | 2 - .../sysv/linux/m68k/coldfire/libcrypt.abilist | 7 - .../sysv/linux/m68k/m680x0/libcrypt.abilist | 7 - .../sysv/linux/microblaze/be/libcrypt.abilist | 7 - .../sysv/linux/microblaze/le/libcrypt.abilist | 7 - .../sysv/linux/mips/mips32/libcrypt.abilist | 7 - .../sysv/linux/mips/mips64/libcrypt.abilist | 7 - .../unix/sysv/linux/nios2/libcrypt.abilist | 7 - sysdeps/unix/sysv/linux/or1k/libcrypt.abilist | 2 - .../linux/powerpc/powerpc32/libcrypt.abilist | 7 - .../powerpc/powerpc64/be/libcrypt.abilist | 7 - .../powerpc/powerpc64/le/libcrypt.abilist | 7 - .../sysv/linux/riscv/rv32/libcrypt.abilist | 2 - .../sysv/linux/riscv/rv64/libcrypt.abilist | 7 - .../sysv/linux/s390/s390-32/libcrypt.abilist | 7 - .../sysv/linux/s390/s390-64/libcrypt.abilist | 7 - .../unix/sysv/linux/sh/be/libcrypt.abilist | 7 - .../unix/sysv/linux/sh/le/libcrypt.abilist | 7 - .../sysv/linux/sparc/sparc32/libcrypt.abilist | 7 - .../sysv/linux/sparc/sparc64/libcrypt.abilist | 7 - .../sysv/linux/x86_64/64/libcrypt.abilist | 7 - .../sysv/linux/x86_64/x32/libcrypt.abilist | 7 - 115 files changed, 492 insertions(+), 6611 deletions(-) delete mode 100644 crypt/Makefile delete mode 100644 crypt/README.ufc-crypt delete mode 100644 crypt/Versions delete mode 100644 crypt/badsalttest.c delete mode 100644 crypt/cert.c delete mode 100644 crypt/cert.input delete mode 100644 crypt/crypt-entry.c delete mode 100644 crypt/crypt-private.h delete mode 100644 crypt/crypt.c delete mode 100644 crypt/crypt.h delete mode 100644 crypt/crypt_util.c delete mode 100644 crypt/md5-block.c delete mode 100644 crypt/md5-crypt.c delete mode 100644 crypt/md5.c delete mode 100644 crypt/md5.h delete mode 100644 crypt/md5c-test.c delete mode 100644 crypt/sha256-block.c delete mode 100644 crypt/sha256-crypt.c delete mode 100644 crypt/sha256.c delete mode 100644 crypt/sha256.h delete mode 100644 crypt/sha256c-test.c delete mode 100644 crypt/sha256test.c delete mode 100644 crypt/sha512-block.c delete mode 100644 crypt/sha512-crypt.c delete mode 100644 crypt/sha512.c delete mode 100644 crypt/sha512.h delete mode 100644 crypt/sha512c-test.c delete mode 100644 crypt/sha512test.c delete mode 100644 crypt/speeds.c delete mode 100644 crypt/ufc-crypt.h delete mode 100644 crypt/ufc.c delete mode 100644 include/crypt.h create mode 100644 locale/md5.c create mode 100644 locale/md5.h rename crypt/md5test-giant.c => locale/tst-md5-giant.c (77%) rename crypt/md5test.c => locale/tst-md5.c (78%) delete mode 100644 manual/examples/genpass.c delete mode 100644 manual/examples/testpass.c delete mode 100644 sysdeps/generic/fips-private.h delete mode 100644 sysdeps/generic/libcrypt.abilist delete mode 100644 sysdeps/mach/hurd/i386/libcrypt.abilist delete mode 100644 sysdeps/mach/hurd/x86_64/libcrypt.abilist delete mode 100644 sysdeps/sparc/sparc32/sparcv9/multiarch/md5-block.c delete mode 100644 sysdeps/sparc/sparc32/sparcv9/multiarch/md5-crop.S delete mode 100644 sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-block.c delete mode 100644 sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-crop.S delete mode 100644 sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-block.c delete mode 100644 sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-crop.S delete mode 100644 sysdeps/sparc/sparc64/multiarch/md5-block.c delete mode 100644 sysdeps/sparc/sparc64/multiarch/md5-crop.S delete mode 100644 sysdeps/sparc/sparc64/multiarch/sha256-block.c delete mode 100644 sysdeps/sparc/sparc64/multiarch/sha256-crop.S delete mode 100644 sysdeps/sparc/sparc64/multiarch/sha512-block.c delete mode 100644 sysdeps/sparc/sparc64/multiarch/sha512-crop.S delete mode 100644 sysdeps/unix/sysv/linux/aarch64/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/alpha/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/arc/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/arm/be/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/arm/le/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/csky/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/fips-private.h delete mode 100644 sysdeps/unix/sysv/linux/hppa/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/i386/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/ia64/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/m68k/coldfire/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/m68k/m680x0/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/microblaze/be/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/microblaze/le/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/mips/mips32/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/nios2/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/or1k/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc32/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/riscv/rv32/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/riscv/rv64/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/sh/be/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/sh/le/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/x86_64/64/libcrypt.abilist delete mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/libcrypt.abilist