From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1689 invoked from network); 17 Jul 2023 15:32:50 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 17 Jul 2023 15:32:50 -0000 Received: (qmail 23853 invoked by uid 550); 17 Jul 2023 15:32:47 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 23812 invoked from network); 17 Jul 2023 15:32:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1689607955; x=1690212755; i=nullplan@gmx.net; bh=75D9JXu3/xbEIUgxaO6EXZUMIEGkQNtLblr25dwFSSM=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=seZyKKJ/KWwOlb5d9UjeGDvCwtfIB64ZaNBrrbdWv99SjrXhM+3oyH0BwGsBsok16BUfWHE WIgooINq/+jBVQ0GhER98zNL2Kds4pnAJN21unNSO0U7hvj+9GOuuxWMdGKfk0JPKqoKlLle4 p0roW2BsupkHKtSxW8U2spCLPDHqTgVurwk1gkmZXG8+iAVokR8/PKSX7gtOZ4XUH/mPdEywF V0TVHFh7poWGwhz3+9YoOXSPrtkwdY4CUrz0du89h8h26/B5GbqcLVeNLGg15QKmXzNnDw6tL nHKxB95pBMCuP8J01P4fknStDPTl3dCKKo2pWsL6FIWC4h6ql4VA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Date: Mon, 17 Jul 2023 17:32:34 +0200 From: Markus Wichmann To: musl@lists.openwall.com Message-ID: References: <20230717011758.55d20eae6e60835c5c7fe954@killthe.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230717011758.55d20eae6e60835c5c7fe954@killthe.net> X-Provags-ID: V03:K1:M7+RJqnBh52eZm+jICjc0BoTF5Xg+fAFt6HmUpEYjyMJhhwtytA YiVER1j0Y4067OhOejcbmI48pt7kE+6UPxCdhzL1hiPsuAWc30NhL/52iBaQqFGEYgWDtta 47yKCtME1bnJmw0m4EkhHlm9MrUnnZqHlNrBF7WHv0ddm7S3qmURZGQRkEelv7fT54UJV9U YIr4dZPB1D4HuiTB+ausA== UI-OutboundReport: notjunk:1;M01:P0:K2naIyzPZrk=;3REJfTUYszoORFecxFgdgRYOchk JxBwJcWS5cPu3gP6XqwV832zu3tAraYNmq6pAP3E1CmzFQjWFslOUxYkFHYo8VP9fGcGbaA/i BIl3A3+rwCsn87+LiXgrwE8b/p1/zjEoWIeMNLaIO+u0Lg6VxWqH0YnvZ26j/jO6X5HfdCh/V D9XBCwb8/ix7yARaIIpYQQts3AVWURJFWT23tEBU+jtlPIWvygmRWBta4wTyStNJfxShVNFAw hdLPaha3Gjnn9RY9sNGq+yZ48MTsK+aWN+Nhqm24WxNshHNo3jnpFyuQHYXFgiRCx1XuERxyC C94trq/LegnVa8NXth5edVziUaqKzpKptf/6bZ2pmZp1Tl+TwKt7mqjbSeCdxcPn8+hyqA9LQ nIn0JzpoRBS66md29eIc+8Rm7uFGuUPaeFNJAc9ltYXPG+PLF+Mp0qHouL4sXJJRry3YSBZ0r /BtJPpN/byRCyPB14kxDLEE6alhZjcg0G09oh+A5ZchewDWVP69fEdP9ILBP3fgX6zWPcHb3z nROSMl8XmyYs8l6emjWLSPpBsT71n2f7eLKF5qdjV+Sn242kz8J/dtN0F0gHd714ikstLe2rX SbUnlDVytNJzPVNiJwtIjtWnn0+xyjosw/Sg6Y+YSuRV3wy5uA9BtxYBhXdAmI1/qzxTdFFi5 5CpZ0JG/SSlZ+wyd/3+V4+WBZU06AArbd+pKMQScAfrZgtwFvkpAwifv2NwM4QVb1T0gz+9Em FijQ6QEt+NaZyJ0UjAeoBhEsQ0KtvzJchGZmwdBOUNY7J1fnblPYsiGm7r1A4cw2DaPDdbdZd EXGvsMfQCHSsl3dy+BTVhktqT9W1VRySzYEQtc8cC5vfWSZzrFI6phC+CliCk+WdF4rGwnd/u +jB6fxHZZltSV/tBvPMOMj4lEuyA7yPrK72iyqueNSevx7iw71dDDC5XEmJehrVRX1Bov/Szb lnIyjBO4Qubp8J16QLI2F8u2uzw= Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] musl -- FFS get your shit together, please I realize this is a flame, and I may be feeding the fire. I hope the OP reads this when he has cooled off a bit. Am Mon, Jul 17, 2023 at 01:17:58AM -0500 schrieb Dave Blanchard: > 2) Did it occur to anyone involved in this project to maybe actually > organize and COMMENT the system header files, instead of just randomly > throwing a random assortment of shit into an .H file and calling it > good? The amount of duplicated, undocumented, assorted crap is pretty > ridiculous for a project that's supposed to be a FROM SCRATCH libc > implementation! How about getting it right from the beginning, with a > clean and organized implementation, instead of starting off with a > random pile of shit? Even glibc is better organized, for fuck's sake! > Most documentation is in the commit comments. As for the organization being bad, I would dispute that. Everything that ends up in libc is in src/*/*.c or src/*/$ARCH/*.[csS], with the latter always included, and overriding any of the former with the same name that may be present. Dynlinker is in ldso/ and CRT is in crt/. Meanwhile in glibc, you have the sysdeps directory, and if there is any organization to it, I haven't found it. > 3) Why in the hell does musl duplicate/change(!) internal structures > from Linux kernel headers instead of just #include'ing the damn Linux > headers (and relevant structures) and be done with it? > So musl is independent of the kernel version installed. This has many advantages, such as being able to build musl without even having a kernel installed at all. The kernel APIs (syscall/ioctl numbers and structures) must all be stable anyway, or else violate the kernel's ABI stability goals. Some kernel interfaces also conflict with userspace interface. E.g. struct msghdr is supposed to contain members of type "socklen_t" as per POSIX, but Linux defines them to contain the length fields as "unsigned long", which is a different type on 64-bit systems. So musl must define padding fields to smoothe things over. Generally, Linux header files are not compatible with userspace programs. musl's approach is the one favored by most applications and libraries that actually do anything with the kernel, such as libfuse and libnl. > 4) Would it kill you to add in various simple #defines and such in the > headers which greatly improve compatibility with GNU code, without > actually requiring any support in the libc library code?? > Would probably not kill anyone, but being compatible with glibc is simply not a musl goal. musl aims to be a POSIX implementation. Some concessions to the real world have been made, beyond that, there's gcompat. For everything else, there's patches. > Between the above, plus the 6-7 "musl addon" support packages required > to be installed alongside to make my Linux system build with musl, at > this point I have essentially FORKED musl! > As is your right as per the license. Where's the problem? Ciao, Markus