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=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13051 invoked from network); 24 Nov 2022 18:58:03 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 24 Nov 2022 18:58:03 -0000 Received: (qmail 20391 invoked by uid 550); 24 Nov 2022 18:57:59 -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 20177 invoked from network); 24 Nov 2022 18:57:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bKEI+j/TKokUqOBDWCpSo8NBDCrNpev9Irl1XQVhrGs=; b=i65YA4Chc5f5QpS1C3rbYSbc7FS9YoGTS9BI7MoKIEQvl7x3KOd3lHFUF6pB2S/FvX GQm56rMM+8UhpDYmzYjt0p7THYv8weasZ42USnTq7NdAD2V8UA/Rp2dM6zHtLkH9DH41 y0wNjnDNZtDP92hOn8TdR983EcF4Bib+8CNAWA7daPNwuOYtFsrT5zMHfAR567KjTNXa FYgL4c1bokAD8WjHVXYg6THVC8xOtKnjQFHa20mRoYPH/naj6HEjRu7JVK9F3L42zUNB nd3pJmkxNNxpEvhJpaIPAZJ8iATABsES7n0bntvQFGSxUaLPjHxErr4dNuH0FAgRUH8a Q2og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bKEI+j/TKokUqOBDWCpSo8NBDCrNpev9Irl1XQVhrGs=; b=JWzJNbYpd1IpnKAxIpQM7e90jmAzhmcP59acPbNxgjXmOmZHUv63jmJ+vmNbigWao7 mZlwk0YkGpwb6pbNaaGLsZf6JS5AXTP4ViDdaLFQqxHis/1zwqGlfMLENVHxim2AwvBD 47dWMD2S2o3bcrOnRR1gu+8uH5QpiGCoVs2tO962o0iRk60xxB6AGP+pz9xln1z4kLZB C0X8ns5iW9nnzRsM4Jkelx7k1sbLPbOxMP1WYDltsxj88QvTEWFx8HfRx+lXnLRdLNY8 tONzZCG4ne3sy7V2ytgIlkE00rjes1EB05Qqx+O/1LXNkc0eSh3pxnVgWMoFZNqfjm/T bE7A== X-Gm-Message-State: ANoB5pkLNKe2rkgTv+i6WAVJv3BecwdmQvzfolD9mH7Vu25Qgo9qseEA V4+Wct0/3yRAgTXwTk+/VyPHnn0dKe3M2sjYdVU= X-Google-Smtp-Source: AA0mqf5XtAbEnLA5E9xXCDuk6mupKwL8oBT7JPYmJEuoyme/6nctiPhkAtPTwo9bkWrRGaBrjGtHXA2cFyLM74UVPf8= X-Received: by 2002:a05:6402:1ca8:b0:469:980c:5a2e with SMTP id cz8-20020a0564021ca800b00469980c5a2emr19476793edb.197.1669316234451; Thu, 24 Nov 2022 10:57:14 -0800 (PST) MIME-Version: 1.0 References: <20221110001318.10696-1-andrew@digital-domain.net> <853fa349-8e78-8ce8-f76f-79b4b9353913@gmail.com> <50485f46-99d0-69ee-0882-7e403334080c@gmail.com> In-Reply-To: <50485f46-99d0-69ee-0882-7e403334080c@gmail.com> From: Stefan Puiu Date: Thu, 24 Nov 2022 20:57:02 +0200 Message-ID: To: Alejandro Colomar Cc: Guillem Jover , Andrew Clayton , linux-man@vger.kernel.org, Michael Kerrisk , Alejandro Colomar , Brian Inglis , Rich Felker , musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Subject: [musl] Re: [PATCH] memmem.3: Added list of known systems where this is available Hi, On Wed, Nov 23, 2022 at 3:16 PM Alejandro Colomar wrote: > > Hi all! > [... snipped ...] > > > > Not sure if it's the job of Linux man-pages to document when other > > OSes started supporting certain APIs. That info has to be maintained, > > updated etc. People can always read the man pages of other systems, > > right? Maybe it's worth only pointing out when an interface is > > Linux-only, or the Linux implementation diverges significantly. > > The good thing is that in most cases, it's either something in POSIX (for which > I gon't care at all if Apple Libc or another-weirdo-libc decide to not support > it), or it's a Linux-only function. > > So, there are few functions or syscalls that are generally available but are not > in POSIX, and it might be interesting to document that they're effectively as > portable as anything POSIX. Maybe even POSIX editors read this and decide to > add it. > > In those cases, we still need to decide what we care about or not. Aah OK, so memmem is non-standard, there is no standard to point to. Do other OSes provide this kind of info? I don't see anything about portability in the OpenBSD man page (https://man.openbsd.org/memmem), only "memmem() is a GNU extension". The FreeBSD man page (https://www.freebsd.org/cgi/man.cgi?query=memmem&manpath=FreeBSD+13.1-RELEASE+and+Ports) does mention Linux, but only to mention that memmem was broken in old versions of Linux libc (nothing about current Linux); it also has the 'GNU extension' mention. Interestingly, I don't see the mention of the function being a GNU extension in the Linux version. Have you checked, are there many such functions? Do you plan to add this info for all of them? > > Musl libc is definitely a first-class citizen these days in Linux distributions. > I would start documenting them in the project at large if someone from musl > provides patches (I discussed this some time ago, but can't remember with who). > Rich, if you would like to discuss about this, we can have some chat. > > > > > For musl and other libcs, I think the man pages already document some > > instances where their behavior diverges from glibc. > > As said, for musl, I'd document them officially, if there's anyone interested > enough to send patches. > > For other libcs, we have to decide if they're important enough, and probably > decide on a case-by-case basis. > > Michael tried to have some decent coverage of non-GNU/Linux systems, both in the > man-pages and in his TLPI book. It's a useful thing. So much that sometimes > you don't even need to read other systems' pages at all to know how portable is > a GNU/Linux function. I know. But not sure how much Linux docs should cover about other OSes, which are also constantly changing (and have their own fine docs). As always, just my 2c, Stefan. > > So, I'd like to get opinions on interest about documenting details about: > > - newlib (I never heard about it before; is it a widespread thing? do you think > it's useful?) > - Apple Libc (I still don't like it, but I must admit that it's relevant, and > being open source, it's more palatable) > - bionic (does anyone know if that's useful at all for anyone at all?) > > Support for those wouldn't go as far as musl or glibc. For now it would only be > for memmem(3). > > > Cheers, > > Alex > > -- >