From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id A594B3858D28 for ; Mon, 30 Oct 2023 10:10:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A594B3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A594B3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698660647; cv=none; b=MjXWeGxu2KEThZZmqmeeWLNNpTcmFMILDJo1w94OdeZVIIx//qT5SvxvavfWCw/1IGuBuHgWyrmPHol9WCnsnrNkaZNhbkufqeXRgYDmrDs1yo0nlHJLzpf0J5zjUjyg6ymB3+nF61ItBFfg6CtgQufGVJi2G0/tuh8xLJ3BPtk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698660647; c=relaxed/simple; bh=IGePzGi3IQOqEahBiLoIO88QzCTr5ZOWkrp5ARLKzIQ=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=VT8L2jOtECXxG/ZYsk0SzVQU9qmj0CjyWI7DFQ6mrLL2+FDlIEfkQozEPvRsbxPCbxIkAol5oOR3lDUQAy18+0xeCOycizJU99fVCXyV//BpSUXs++A05UVkCU3M7LeTIUiBp5JVhslgeYkcibelPKcuTjue+VQrnybcWwDkBKA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1698660642; bh=IGePzGi3IQOqEahBiLoIO88QzCTr5ZOWkrp5ARLKzIQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=bsrhZbPRTMCyVJ1Vbw83OetY8XHyTc6/d60R5/nxsxv0xRYEw2oaDLWbgL7EJVZ2U fZlWFVGuTY9Y+Tzmf8I7H8jkyTT1ilrt563AVFqll+EX4Rl/aG1Xom/yDUNu2ZA//Q Wf8JVfJ+MDSXFwFBlejm/MiKsNhuAjucDNBxRfdc= Received: from [127.0.0.1] (unknown [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id A94BD669B8; Mon, 30 Oct 2023 06:10:41 -0400 (EDT) Message-ID: <8eccb33c97d225c797cebf8d29f5370d7c5a8ae1.camel@xry111.site> Subject: Re: glibc misc/sys/cdefs.h nonull - typo in comment From: Xi Ruoyao To: Andreas Schwab , Jonny Grant Cc: Paul Eggert , Adhemerval Zanella Netto , GNU C Library Date: Mon, 30 Oct 2023 18:10:39 +0800 In-Reply-To: References: <25d0b6fa-7b45-3f8e-946a-ad3256e211a4@jguk.org> <0d99df74-fb83-1647-ca19-17d2229f0ae0@linaro.org> <514c11a4-405b-f7f3-9a67-0b6c10ad7740@jguk.org> <21bc9125ab8ced26aa85f3f787f084c4af460a18.camel@xry111.site> <84e4081c-35ef-4f2d-89d0-0fea04732737@cs.ucla.edu> <984eaee1-251f-4917-91f3-d19b5f8a95bc@jguk.org> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 2023-10-30 at 10:04 +0100, Andreas Schwab wrote: > On Okt 29 2023, Jonny Grant wrote: >=20 > > glibc does go beyond POSIX and set errno to EFAULT if a null pointer > > constant is passed. > > https://man7.org/linux/man-pages/man2/olduname.2.html > >=20 > > Although I looked at glibc/posix/uname.c and it has EINVAL there, > > couldn't spot where the EFAULT comes from, probably there is another > > file. >=20 > glibc never generates EFAULT on its own, it always comes from the > kernel. And POSIX is clear that people should not rely on EFAULT, at all: [EFAULT] Bad address. The system detected an invalid address in attempting to use an argument of a call. The reliable detection of this error cannot be guaranteed, and when not detected may result in the generation of a signal, indicating an address violation, which is sent to the process. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University