From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14895 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] missing parts to time64 switchover Date: Fri, 1 Nov 2019 16:04:53 -0400 Message-ID: <20191101200453.GO16318@brightrain.aerifal.cx> References: <20191101145617.GN16318@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="hnsKUeImFCk/igEn" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="66060"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14911-gllmg-musl=m.gmane.org@lists.openwall.com Fri Nov 01 21:05:09 2019 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.89) (envelope-from ) id 1iQdAS-000H6d-Py for gllmg-musl@m.gmane.org; Fri, 01 Nov 2019 21:05:08 +0100 Original-Received: (qmail 21955 invoked by uid 550); 1 Nov 2019 20:05:06 -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 21935 invoked from network); 1 Nov 2019 20:05:05 -0000 Content-Disposition: inline In-Reply-To: <20191101145617.GN16318@brightrain.aerifal.cx> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14895 Archived-At: --hnsKUeImFCk/igEn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 01, 2019 at 10:56:17AM -0400, Rich Felker wrote: > The time64 switchover I had been testing and hoped to push yesterday > turned out to be missing the ioctl and sockopt bits, which I > eventually remembered I'd omitted in the late-summer i386-only draft > because making a bunch more archs have arch variants for these did not > seem fun. So, I've worked out some changes to allow top-level socket.h > to do a lot more. The msghdr move is pretty much orthogonal, aside > from interaction with x32. > > It's probably not perfect at this point, but I think it's an > improvement, and short of errors good enough to commit. It brings > things closer to a state of only needing arch-specific bits for archs > that actually do weird things, rather than repeating things that are > universal to all 32-bit archs or all 64-bit archs on a per-arch basis. > > These patches should apply ok on the last time64 switchover draft > posted to the list. But I'm posting them more for the sake of a (very > brief) comment period about what they're doing, and to have a record > of them as individual patches -- some of them will be squashed since > they yield ABI-inconsistent revisions if left split. I left out the first patch of this series, attached. Unfortunately it had a bug: without changes to the bits headers, it caused SO_TIMESTAMP* definitions to disappear from archs that define their own SO_RCVTIMEO (powerpc* and mips*). It will be fixed by separating these out into 2 groups with separate #ifdefs. Rich --hnsKUeImFCk/igEn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0000-make-time-related-socket-options-overridable-by-arch.patch" >From 057a15f272f28c97b44a266227b1c834db566777 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 31 Oct 2019 16:48:30 -0400 Subject: [PATCH] make time-related socket options overridable by arch bits files --- include/sys/socket.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/sys/socket.h b/include/sys/socket.h index 318a98ef..04077654 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -182,8 +182,6 @@ struct linger { #define SO_PEERCRED 17 #define SO_RCVLOWAT 18 #define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 #define SO_SNDBUFFORCE 32 @@ -192,6 +190,14 @@ struct linger { #define SO_DOMAIN 39 #endif +#ifndef SO_RCVTIMEO +#define SO_RCVTIMEO 20 +#define SO_SNDTIMEO 21 +#define SO_TIMESTAMP 29 +#define SO_TIMESTAMPNS 35 +#define SO_TIMESTAMPING 37 +#endif + #define SO_SECURITY_AUTHENTICATION 22 #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 #define SO_SECURITY_ENCRYPTION_NETWORK 24 @@ -203,14 +209,10 @@ struct linger { #define SO_GET_FILTER SO_ATTACH_FILTER #define SO_PEERNAME 28 -#define SO_TIMESTAMP 29 #define SCM_TIMESTAMP SO_TIMESTAMP - #define SO_PASSSEC 34 -#define SO_TIMESTAMPNS 35 #define SCM_TIMESTAMPNS SO_TIMESTAMPNS #define SO_MARK 36 -#define SO_TIMESTAMPING 37 #define SCM_TIMESTAMPING SO_TIMESTAMPING #define SO_RXQ_OVFL 40 #define SO_WIFI_STATUS 41 -- 2.21.0 --hnsKUeImFCk/igEn--