From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12935 Path: news.gmane.org!.POSTED!not-for-mail From: Matthias Schiffer Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] sys/socket.h: fix SO_PEERSEC value on MIPS Date: Mon, 25 Jun 2018 19:52:18 +0200 Message-ID: <21de6b7c-21d4-ad8c-8680-e26e968e4316@universe-factory.net> References: <4e0877a604bad684be020f68e96a05156131fd44.1529853403.git.mschiffer@universe-factory.net> <20180624153019.GT1392@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6YoBORbq7dLx73MlqoalOWXVjG8RGk0Tk" X-Trace: blaine.gmane.org 1529949027 2336 195.159.176.226 (25 Jun 2018 17:50:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 25 Jun 2018 17:50:27 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 To: musl@lists.openwall.com Original-X-From: musl-return-12951-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 25 19:50:23 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fXVd5-0000Rj-3h for gllmg-musl@m.gmane.org; Mon, 25 Jun 2018 19:50:19 +0200 Original-Received: (qmail 11504 invoked by uid 550); 25 Jun 2018 17:52:25 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 11483 invoked from network); 25 Jun 2018 17:52:24 -0000 Openpgp: preference=signencrypt Autocrypt: addr=mschiffer@universe-factory.net; prefer-encrypt=mutual; keydata= xsFNBFLNIUUBEADtyPGKZY/BVjqAp68oV5xpY557+KDgXN4jDrdtANDDMjIDakbXAD1A1zqX LUREvXMsKA/vacGF2I4/0kwsQhNeOzhGPsBa8y785WFQjxq4LsBJpC4QfDvcheIl4BeKoHzf UYDp4hgPBrKcaRRoBODMwp1FZmJxhRVtiQ2m6piemksF1Wpx+6wZlcw4YhQdEnw7QZByYYgA Bv7ZoxSQZzyeR/Py0G5/zg9ABLcTF56UWq+ZkiLEMg/5K5hzUKLYC4h/xNV58mNHBho0k/D4 jPmCjXy7bouDzKZjnu+CIsMoW9RjGH393GNCc+F3Xuo35g3L4lZ89AdNhZ0zeMLJCTx5uYOQ N5YZP2eHW2PlVZpwtDOR0zWoy1c0q6DniYtn0HGStVLuP+MQxuRe2RloJE7fDRfz7/OfOU6m BVkRyMCCPwWYXyEs2y8m4akXDvBCPTNMMEPRIy3qcAN4HnOrmnc24qfQzYp9ajFt1YrXMqQy SQgcTzuVYkYVnEMFBhN6P2EKoKU+6Mee01UFb7Ww8atiqG3U0oxsXbOIVLrrno6JONdYeAvy YuZbAxJivU3/RkGLSygZV53EUCfyoNldDuUL7Gujtn/R2/CsBPM+RH8oOVuh3od2Frf0PP8p 9yYoa2RD7PfX4WXdNfYv0OWgFgpz0leup9xhoUNE9RknpbLlUwARAQABzTJNYXR0aGlhcyBT Y2hpZmZlciA8bXNjaGlmZmVyQHVuaXZlcnNlLWZhY3RvcnkubmV0PsLBlwQTAQoAQQIbAwUL CQgH In-Reply-To: <20180624153019.GT1392@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:12935 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6YoBORbq7dLx73MlqoalOWXVjG8RGk0Tk Content-Type: multipart/mixed; boundary="zHq8e4OsMUI63Au1Gau1Q1pxAALH4Rbzi"; protected-headers="v1" From: Matthias Schiffer To: musl@lists.openwall.com Message-ID: <21de6b7c-21d4-ad8c-8680-e26e968e4316@universe-factory.net> Subject: Re: [musl] [PATCH] sys/socket.h: fix SO_PEERSEC value on MIPS References: <4e0877a604bad684be020f68e96a05156131fd44.1529853403.git.mschiffer@universe-factory.net> <20180624153019.GT1392@brightrain.aerifal.cx> In-Reply-To: <20180624153019.GT1392@brightrain.aerifal.cx> --zHq8e4OsMUI63Au1Gau1Q1pxAALH4Rbzi Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 06/24/2018 05:30 PM, Rich Felker wrote: > On Sun, Jun 24, 2018 at 05:18:39PM +0200, Matthias Schiffer wrote: >> Differing from all other archs supported by musl, MIPS defines SO_PEER= SEC >> to 30 instead of 31. >> >> Reported-by: Andrey Jr. Mlenikov >> --- >> arch/mips/bits/socket.h | 2 ++ >> arch/mips64/bits/socket.h | 2 ++ >> arch/mipsn32/bits/socket.h | 2 ++ >> include/sys/socket.h | 3 +++ >> 4 files changed, 9 insertions(+) >> >> diff --git a/arch/mips/bits/socket.h b/arch/mips/bits/socket.h >> index 191ebdb5a418..39c42b822ac3 100644 >> --- a/arch/mips/bits/socket.h >> +++ b/arch/mips/bits/socket.h >> @@ -48,5 +48,7 @@ struct cmsghdr { >> #define SO_SNDBUFFORCE 31 >> #define SO_RCVBUFFORCE 33 >> =20 >> +#define SO_PEERSEC 30 >> + >> #define SOCK_NONBLOCK 0200 >> #define SOCK_CLOEXEC 02000000 >> diff --git a/arch/mips64/bits/socket.h b/arch/mips64/bits/socket.h >> index cf801797beb0..39b764df4c62 100644 >> --- a/arch/mips64/bits/socket.h >> +++ b/arch/mips64/bits/socket.h >> @@ -64,5 +64,7 @@ struct cmsghdr { >> #define SO_SNDBUFFORCE 31 >> #define SO_RCVBUFFORCE 33 >> =20 >> +#define SO_PEERSEC 30 >> + >> #define SOCK_NONBLOCK 0200 >> #define SOCK_CLOEXEC 02000000 >> diff --git a/arch/mipsn32/bits/socket.h b/arch/mipsn32/bits/socket.h >> index 191ebdb5a418..39c42b822ac3 100644 >> --- a/arch/mipsn32/bits/socket.h >> +++ b/arch/mipsn32/bits/socket.h >> @@ -48,5 +48,7 @@ struct cmsghdr { >> #define SO_SNDBUFFORCE 31 >> #define SO_RCVBUFFORCE 33 >> =20 >> +#define SO_PEERSEC 30 >> + >> #define SOCK_NONBLOCK 0200 >> #define SOCK_CLOEXEC 02000000 >> diff --git a/include/sys/socket.h b/include/sys/socket.h >> index 507da5cc2a40..6b6cf2fc3988 100644 >> --- a/include/sys/socket.h >> +++ b/include/sys/socket.h >> @@ -203,7 +203,10 @@ struct linger { >> #define SO_TIMESTAMP 29 >> #define SCM_TIMESTAMP SO_TIMESTAMP >> =20 >> +#ifndef SO_PEERSEC >> #define SO_PEERSEC 31 >> +#endif >> + >> #define SO_PASSSEC 34 >> #define SO_TIMESTAMPNS 35 >> #define SCM_TIMESTAMPNS SO_TIMESTAMPNS >> --=20 >> 2.18.0 >=20 > Should we perhaps do this under the SO_DEBUG conditional like all the > other SO_* that vary by arch? Doing so would require adding > definitions to the other weird archs (ibm ones) but might be cleaner > in the top-level header -- I'm not sure. >=20 > Rich >=20 That would actually make sense. I did not research what SO_PEERSEC even i= s before I sent the patch; only know I noticed that both the constants defined under SO_DEBUG and the others below the #endif are SOL_SOCKET, so= it would be more consistent to move it under SO_DEBUG as well. Matthias --zHq8e4OsMUI63Au1Gau1Q1pxAALH4Rbzi-- --6YoBORbq7dLx73MlqoalOWXVjG8RGk0Tk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEZmTnvaa2aYgexS51Fu8/ZMsgHZwFAlsxK9IACgkQFu8/ZMsg HZzALxAAsrU3A4wEj6bhvH7aKoUmJIWwITKZcar3OjxNM8uasTD7U+MeTsLNt4Dn e+2rRBfV5GnTY0umPAHsN9Gp/LpJvPxJjUJ0+aGJ1c5s+ndc3QllFOJnA1Mc+HSh pNIJuDbpKx8pcQRBb4vJCNWyaSG2C8kSAmt3wfQn+qXStiChTkGpvMJtUgF3nlpo COR63LPCuALMZsGMCsLsfwlMXW1JQ1lRy8U6uTpyaojvPxwA+3QtnirZo6VCz4jU ZGVoIggfQg2tFOHWSeO0f7R0SzpY0RZB9QENecoDJfd1UYGXlyJCnk6a8s9M6lQj gPUxbBVPDrEQW1Kj0FjeZR7TuVcOISDKCldj3I86o5Ooos1fS0Z5d0Mn+8w2Vm6a 5ABXFj0TUdSRL+Z4P/uiEleV/PxQkupniEm7YJxQrj+yUOOmoLYVuBeoPPg98jk/ E9BIHm9doqbySdn7QalP/5+bbwYfN+ts8HU+WuWddGQp8vKsPWY2GKIMvVNN5Toc kMiDztCvdCMJQs1w2YLQlkNZ6d9ZLSrpVBJNdi5W6q0ZzGpbSkZEiCapKGsm4p0p T10Jboi9bcrkM5SqBQT3dEH6FTFCkewrcH3U4EqXWMsfCumLhAzi+59rJ7bndQQ6 KCpXA+mVMfjv91R/5sfyt+gmVl6w0LtmnHgIfmlLB4FMrOwhTCk= =bcDe -----END PGP SIGNATURE----- --6YoBORbq7dLx73MlqoalOWXVjG8RGk0Tk--