From owner-svn-src-head@freebsd.org Sun Mar 1 12:34:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 686E526F742; Sun, 1 Mar 2020 12:34:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VjQD57vFz4Q3h; Sun, 1 Mar 2020 12:34:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67B9139F3; Sun, 1 Mar 2020 12:34:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021CYSMB001468; Sun, 1 Mar 2020 12:34:28 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021CYSNI001467; Sun, 1 Mar 2020 12:34:28 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003011234.021CYSNI001467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 1 Mar 2020 12:34:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358482 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 358482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 12:34:29 -0000 Author: tuexen Date: Sun Mar 1 12:34:27 2020 New Revision: 358482 URL: https://svnweb.freebsd.org/changeset/base/358482 Log: Remove stale definitions. The removed definitions are not used right now and are incompatible with the correct ones in RFC 3168. Submitted by: Richard Scheffenegger Differential Revision: https://reviews.freebsd.org/D23903 Modified: head/sys/netinet/ip6.h Modified: head/sys/netinet/ip6.h ============================================================================== --- head/sys/netinet/ip6.h Sun Mar 1 08:53:45 2020 (r358481) +++ head/sys/netinet/ip6.h Sun Mar 1 12:34:27 2020 (r358482) @@ -105,11 +105,6 @@ struct ip6_hdr { #endif /* LITTLE_ENDIAN */ #endif #define IPV6_FLOWLABEL_LEN 20 -#if 1 -/* ECN bits proposed by Sally Floyd */ -#define IP6TOS_CE 0x01 /* congestion experienced */ -#define IP6TOS_ECT 0x02 /* ECN-capable transport */ -#endif /* * Extension Headers From owner-svn-src-head@freebsd.org Sun Mar 1 13:12:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36EBD24058A; Sun, 1 Mar 2020 13:12:05 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VkFc6dlYz3FjF; Sun, 1 Mar 2020 13:12:04 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA8F341FA; Sun, 1 Mar 2020 13:12:04 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021DC4f3022405; Sun, 1 Mar 2020 13:12:04 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021DC4vh022404; Sun, 1 Mar 2020 13:12:04 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <202003011312.021DC4vh022404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Sun, 1 Mar 2020 13:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358483 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 358483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 13:12:05 -0000 Author: tijl Date: Sun Mar 1 13:12:04 2020 New Revision: 358483 URL: https://svnweb.freebsd.org/changeset/base/358483 Log: linuxulator: Map scheduler priorities to Linux priorities. On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR scheduling policies is [1,99]. For SCHED_OTHER the single valid priority is 0. On FreeBSD it is [0,31] for all policies. Programs are supposed to query the valid range using sched_get_priority_(min|max), but of course some programs assume the Linux values are valid. This commit adds a tunable compat.linux.map_sched_prio. When enabled sched_get_priority_(min|max) return the Linux values and sched_setscheduler and sched_(get|set)param translate between FreeBSD and Linux values. Because there are more Linux levels than FreeBSD levels, multiple Linux levels map to a single FreeBSD level, which means pre-emption might not happen as it does on Linux, so the tunable allows to disable this behaviour. It is enabled by default because I think it is unlikely that anyone runs real-time software under Linux emulation on FreeBSD that critically relies on correct pre-emption. This fixes FMOD, a commercial sound library used by several games. PR: 240043 Tested by: Alex S Reviewed by: dchagin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23790 Modified: head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_misc.h Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sun Mar 1 12:34:27 2020 (r358482) +++ head/sys/compat/linux/linux_misc.c Sun Mar 1 13:12:04 2020 (r358483) @@ -144,6 +144,11 @@ struct l_pselect6arg { l_size_t ss_len; }; +static bool map_sched_prio = true; +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, + &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " + "(not POSIX compliant)"); + static int linux_utimensat_nsec_valid(l_long); @@ -1419,6 +1424,33 @@ linux_sched_setscheduler(struct thread *td, if (error) return (error); + if (map_sched_prio) { + switch (policy) { + case SCHED_OTHER: + if (sched_param.sched_priority != 0) + return (EINVAL); + + sched_param.sched_priority = + PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE; + break; + case SCHED_FIFO: + case SCHED_RR: + if (sched_param.sched_priority < 1 || + sched_param.sched_priority >= LINUX_MAX_RT_PRIO) + return (EINVAL); + + /* + * Map [1, LINUX_MAX_RT_PRIO - 1] to + * [0, RTP_PRIO_MAX - RTP_PRIO_MIN] (rounding down). + */ + sched_param.sched_priority = + (sched_param.sched_priority - 1) * + (RTP_PRIO_MAX - RTP_PRIO_MIN + 1) / + (LINUX_MAX_RT_PRIO - 1); + break; + } + } + tdt = linux_tdfind(td, args->pid, -1); if (tdt == NULL) return (ESRCH); @@ -1462,6 +1494,20 @@ linux_sched_get_priority_max(struct thread *td, { struct sched_get_priority_max_args bsd; + if (map_sched_prio) { + switch (args->policy) { + case LINUX_SCHED_OTHER: + td->td_retval[0] = 0; + return (0); + case LINUX_SCHED_FIFO: + case LINUX_SCHED_RR: + td->td_retval[0] = LINUX_MAX_RT_PRIO - 1; + return (0); + default: + return (EINVAL); + } + } + switch (args->policy) { case LINUX_SCHED_OTHER: bsd.policy = SCHED_OTHER; @@ -1484,6 +1530,20 @@ linux_sched_get_priority_min(struct thread *td, { struct sched_get_priority_min_args bsd; + if (map_sched_prio) { + switch (args->policy) { + case LINUX_SCHED_OTHER: + td->td_retval[0] = 0; + return (0); + case LINUX_SCHED_FIFO: + case LINUX_SCHED_RR: + td->td_retval[0] = 1; + return (0); + default: + return (EINVAL); + } + } + switch (args->policy) { case LINUX_SCHED_OTHER: bsd.policy = SCHED_OTHER; @@ -1864,7 +1924,7 @@ linux_sched_setparam(struct thread *td, { struct sched_param sched_param; struct thread *tdt; - int error; + int error, policy; error = copyin(uap->param, &sched_param, sizeof(sched_param)); if (error) @@ -1874,8 +1934,41 @@ linux_sched_setparam(struct thread *td, if (tdt == NULL) return (ESRCH); + if( map_sched_prio ) { + error = kern_sched_getscheduler(td, tdt, &policy); + if (error) + goto out; + + switch (policy) { + case SCHED_OTHER: + if (sched_param.sched_priority != 0) { + error = EINVAL; + goto out; + } + sched_param.sched_priority = + PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE; + break; + case SCHED_FIFO: + case SCHED_RR: + if (sched_param.sched_priority < 1 || + sched_param.sched_priority >= LINUX_MAX_RT_PRIO) { + error = EINVAL; + goto out; + } + /* + * Map [1, LINUX_MAX_RT_PRIO - 1] to + * [0, RTP_PRIO_MAX - RTP_PRIO_MIN] (rounding down). + */ + sched_param.sched_priority = + (sched_param.sched_priority - 1) * + (RTP_PRIO_MAX - RTP_PRIO_MIN + 1) / + (LINUX_MAX_RT_PRIO - 1); + break; + } + } + error = kern_sched_setparam(td, tdt, &sched_param); - PROC_UNLOCK(tdt->td_proc); +out: PROC_UNLOCK(tdt->td_proc); return (error); } @@ -1885,17 +1978,45 @@ linux_sched_getparam(struct thread *td, { struct sched_param sched_param; struct thread *tdt; - int error; + int error, policy; tdt = linux_tdfind(td, uap->pid, -1); if (tdt == NULL) return (ESRCH); error = kern_sched_getparam(td, tdt, &sched_param); - PROC_UNLOCK(tdt->td_proc); - if (error == 0) - error = copyout(&sched_param, uap->param, - sizeof(sched_param)); + if (error) { + PROC_UNLOCK(tdt->td_proc); + return (error); + } + + if (map_sched_prio) { + error = kern_sched_getscheduler(td, tdt, &policy); + PROC_UNLOCK(tdt->td_proc); + if (error) + return (error); + + switch (policy) { + case SCHED_OTHER: + sched_param.sched_priority = 0; + break; + case SCHED_FIFO: + case SCHED_RR: + /* + * Map [0, RTP_PRIO_MAX - RTP_PRIO_MIN] to + * [1, LINUX_MAX_RT_PRIO - 1] (rounding up). + */ + sched_param.sched_priority = + (sched_param.sched_priority * + (LINUX_MAX_RT_PRIO - 1) + + (RTP_PRIO_MAX - RTP_PRIO_MIN - 1)) / + (RTP_PRIO_MAX - RTP_PRIO_MIN) + 1; + break; + } + } else + PROC_UNLOCK(tdt->td_proc); + + error = copyout(&sched_param, uap->param, sizeof(sched_param)); return (error); } Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Sun Mar 1 12:34:27 2020 (r358482) +++ head/sys/compat/linux/linux_misc.h Sun Mar 1 13:12:04 2020 (r358483) @@ -105,6 +105,8 @@ extern const char *linux_kplatform; #define LINUX_SCHED_FIFO 1 #define LINUX_SCHED_RR 2 +#define LINUX_MAX_RT_PRIO 100 + struct l_new_utsname { char sysname[LINUX_MAX_UTSNAME]; char nodename[LINUX_MAX_UTSNAME]; From owner-svn-src-head@freebsd.org Sun Mar 1 14:58:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2E3624274D for ; Sun, 1 Mar 2020 14:58:05 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vmbv4yMMz3Ldk; Sun, 1 Mar 2020 14:58:03 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 021EvnnP028529 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 1 Mar 2020 14:57:50 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: ume@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 021EvlP5073111 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 1 Mar 2020 21:57:47 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Hajimu UMEMOTO References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> Cc: Jung-uk Kim , src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: Date: Sun, 1 Mar 2020 21:57:35 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,CTE_8BIT_MISMATCH, LOCAL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains * 1.0 CTE_8BIT_MISMATCH Header says 7bits but body disagrees X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48Vmbv4yMMz3Ldk X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-2.88 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_BAD_CTE_7BIT(1.05)[7bit,utf8]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.84)[ip: (-5.06), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.55), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 14:58:05 -0000 29.02.2020 11:05, Hajimu UMEMOTO пишет: > Hi, > >>>>>> On Sat, 29 Feb 2020 10:34:28 +0700 >>>>>> Eugene Grosbein said: > > eugen> Base openssl uses 1.1.x API in stable/12, so it does not conflict with SASL2 from ports using same API. > eugen> Base openssl uses 1.0.2 API in stable/11, so it conflicts with SASL2 from ports using 1.1.1 SSL API and linked with openss from ports. > > No, I used to use base sendmail with cyrus-sasl2 on 11-STABLE as well. > You should not specify other than "DEFAULT_VERSIONS= ssl=base". One more time: these days it is not possible to upgrade 11.2-STABLE system to recent stable/11 with stock sendmail and SSL/SASL support if the system has ports that need openssl-1.1.1, so it is installed. Here is the log: ===> usr.sbin/sendmail (all) Building /usr/obj/usr/src/usr.sbin/sendmail/sendmail /usr/obj/usr/src/tmp/usr/bin/ld: warning: libcrypto.so.8, needed by /usr/lib/libssl.so, may conflict with libcrypto.so.11 /usr/obj/usr/src/tmp/usr/bin/ld: undefined reference to symbol `OPENSSL_add_all_algorithms_noconf' (try adding -lcrypto) /usr/obj/usr/src/tmp/lib/libcrypto.so.8: could not read symbols: Bad value cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 From owner-svn-src-head@freebsd.org Sun Mar 1 15:20:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4DEB24314F for ; Sun, 1 Mar 2020 15:20:18 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vn5Z1zyzz4YLw; Sun, 1 Mar 2020 15:20:18 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from vsuiko.mahoroba.org (vsuiko.mahoroba.org [IPv6:2001:2f0:104:8010:a00:27ff:feb0:c2e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: ume) by smtp.freebsd.org (Postfix) with ESMTPSA id 10C1B196F4; Sun, 1 Mar 2020 15:20:16 +0000 (UTC) (envelope-from ume@FreeBSD.org) Date: Mon, 02 Mar 2020 00:20:07 +0900 Message-ID: From: Hajimu UMEMOTO To: Eugene Grosbein Cc: Jung-uk Kim , src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358411 - head/contrib/sendmail/src In-Reply-To: References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/26.3 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 12.1-STABLE X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 15:20:18 -0000 Hi, >>>>> On Sun, 1 Mar 2020 21:57:35 +0700 >>>>> Eugene Grosbein said: eugen> One more time: these days it is not possible to upgrade 11.2-STABLE system to recent stable/11 eugen> with stock sendmail and SSL/SASL support if the system has ports that need openssl-1.1.1, If you wish to use base sendmail with cyrus-sasl2, you must build cyrus-sasl2 with base openssl. If you wish to use cyrus-sasl2 with port openssl, you should use port sendmail. Sincerely, -- Hajimu UMEMOTO ume@mahoroba.org ume@FreeBSD.org http://www.mahoroba.org/~ume/ From owner-svn-src-head@freebsd.org Sun Mar 1 16:45:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 969632454B0; Sun, 1 Mar 2020 16:45:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vq0M1sY0z49DY; Sun, 1 Mar 2020 16:45:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADE836875; Sun, 1 Mar 2020 16:45:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021GjsCo051330; Sun, 1 Mar 2020 16:45:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021GjsiG051329; Sun, 1 Mar 2020 16:45:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011645.021GjsiG051329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 16:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358484 - head/sys/dev/al_eth X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/al_eth X-SVN-Commit-Revision: 358484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 16:45:55 -0000 Author: imp Date: Sun Mar 1 16:45:54 2020 New Revision: 358484 URL: https://svnweb.freebsd.org/changeset/base/358484 Log: Remove FreeBSD 7 conditional code... We've had a lot of other changes since then and al_eth appears only in the Annapurna ARM designs which arrived in the tree after that. Modified: head/sys/dev/al_eth/al_eth.c Modified: head/sys/dev/al_eth/al_eth.c ============================================================================== --- head/sys/dev/al_eth/al_eth.c Sun Mar 1 13:12:04 2020 (r358483) +++ head/sys/dev/al_eth/al_eth.c Sun Mar 1 16:45:54 2020 (r358484) @@ -1639,10 +1639,8 @@ al_eth_rx_recv_work(void *arg, int pending) al_eth_rx_checksum(rx_ring->adapter, hal_pkt, mbuf); } -#if __FreeBSD_version >= 800000 mbuf->m_pkthdr.flowid = qid; M_HASHTYPE_SET(mbuf, M_HASHTYPE_OPAQUE); -#endif /* * LRO is only for IP/TCP packets and TCP checksum of the packet From owner-svn-src-head@freebsd.org Sun Mar 1 17:27:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28C9C246842; Sun, 1 Mar 2020 17:27:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VqwF6r16z4bqP; Sun, 1 Mar 2020 17:27:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97BA36FDC; Sun, 1 Mar 2020 17:27:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021HRPmL076501; Sun, 1 Mar 2020 17:27:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021HRPvd076500; Sun, 1 Mar 2020 17:27:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011727.021HRPvd076500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 17:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358485 - head/sys/dev/ale X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/ale X-SVN-Commit-Revision: 358485 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 17:27:26 -0000 Author: imp Date: Sun Mar 1 17:27:25 2020 New Revision: 358485 URL: https://svnweb.freebsd.org/changeset/base/358485 Log: Remove compatibility code for changing sysctl definitions for pre FreeBSD 9 versions. These are just noise these days. Modified: head/sys/dev/ale/if_ale.c Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Sun Mar 1 16:45:54 2020 (r358484) +++ head/sys/dev/ale/if_ale.c Sun Mar 1 17:27:25 2020 (r358485) @@ -767,16 +767,8 @@ ale_detach(device_t dev) #define ALE_SYSCTL_STAT_ADD32(c, h, n, p, d) \ SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) -#if __FreeBSD_version >= 900030 #define ALE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) -#elif __FreeBSD_version > 800000 -#define ALE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ - SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) -#else -#define ALE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ - SYSCTL_ADD_ULONG(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) -#endif static void ale_sysctl_node(struct ale_softc *sc) From owner-svn-src-head@freebsd.org Sun Mar 1 17:27:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 222A1246878; Sun, 1 Mar 2020 17:27:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VqwM5yGDz4c6C; Sun, 1 Mar 2020 17:27:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A2336FDD; Sun, 1 Mar 2020 17:27:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021HRUuv076650; Sun, 1 Mar 2020 17:27:30 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021HRU5G076569; Sun, 1 Mar 2020 17:27:30 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011727.021HRU5G076569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 17:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358486 - head/sys/dev/bce X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/bce X-SVN-Commit-Revision: 358486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 17:27:32 -0000 Author: imp Date: Sun Mar 1 17:27:30 2020 New Revision: 358486 URL: https://svnweb.freebsd.org/changeset/base/358486 Log: Remove all the compatibility hacks for systems that predate FreeBSD 8. Some of these look to be cut and pasted from other drivers since this driver was committed to FreeBSD 7-current and MFC'd to FreeBSD 6. The ones for FreeBSD 4 and 5 likely never were working... Modified: head/sys/dev/bce/if_bce.c head/sys/dev/bce/if_bcereg.h Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Sun Mar 1 17:27:25 2020 (r358485) +++ head/sys/dev/bce/if_bce.c Sun Mar 1 17:27:30 2020 (r358486) @@ -1407,14 +1407,8 @@ bce_attach(device_t dev) ifp->if_capabilities = BCE_IF_CAPABILITIES; } -#if __FreeBSD_version >= 800505 - /* - * Introducing IFCAP_LINKSTATE didn't bump __FreeBSD_version - * so it's approximate value. - */ if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) ifp->if_capabilities |= IFCAP_LINKSTATE; -#endif ifp->if_capenable = ifp->if_capabilities; @@ -1490,13 +1484,8 @@ bce_attach(device_t dev) /* Attach to the Ethernet interface list. */ ether_ifattach(ifp, sc->eaddr); -#if __FreeBSD_version < 500000 - callout_init(&sc->bce_tick_callout); - callout_init(&sc->bce_pulse_callout); -#else callout_init_mtx(&sc->bce_tick_callout, &sc->bce_mtx, 0); callout_init_mtx(&sc->bce_pulse_callout, &sc->bce_mtx, 0); -#endif /* Hookup IRQ last. */ rc = bus_setup_intr(dev, sc->bce_res_irq, INTR_TYPE_NET | INTR_MPSAFE, @@ -6801,14 +6790,9 @@ bce_rx_intr(struct bce_softc *sc) DBRUN(sc->vlan_tagged_frames_rcvd++); if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) { DBRUN(sc->vlan_tagged_frames_stripped++); -#if __FreeBSD_version < 700000 - VLAN_INPUT_TAG(ifp, m0, - l2fhdr->l2_fhdr_vlan_tag, continue); -#else m0->m_pkthdr.ether_vtag = l2fhdr->l2_fhdr_vlan_tag; m0->m_flags |= M_VLANTAG; -#endif } else { /* * bce(4) controllers can't disable VLAN Modified: head/sys/dev/bce/if_bcereg.h ============================================================================== --- head/sys/dev/bce/if_bcereg.h Sun Mar 1 17:27:25 2020 (r358485) +++ head/sys/dev/bce/if_bcereg.h Sun Mar 1 17:27:30 2020 (r358486) @@ -490,18 +490,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, \ #endif /* BCE_DEBUG */ -#if __FreeBSD_version < 800054 -#if defined(__i386__) || defined(__amd64__) -#define mb() __asm volatile("mfence" ::: "memory") -#define wmb() __asm volatile("sfence" ::: "memory") -#define rmb() __asm volatile("lfence" ::: "memory") -#else -#define mb() -#define rmb() -#define wmb() -#endif -#endif - /****************************************************************************/ /* Device identification definitions. */ /****************************************************************************/ @@ -577,7 +565,6 @@ struct bce_type { /****************************************************************************/ /* Byte order conversions. */ /****************************************************************************/ -#if __FreeBSD_version >= 500000 #define bce_htobe16(x) htobe16(x) #define bce_htobe32(x) htobe32(x) #define bce_htobe64(x) htobe64(x) @@ -591,23 +578,7 @@ struct bce_type { #define bce_le16toh(x) le16toh(x) #define bce_le32toh(x) le32toh(x) #define bce_le64toh(x) le64toh(x) -#else -#define bce_htobe16(x) (x) -#define bce_htobe32(x) (x) -#define bce_htobe64(x) (x) -#define bce_htole16(x) (x) -#define bce_htole32(x) (x) -#define bce_htole64(x) (x) -#define bce_be16toh(x) (x) -#define bce_be32toh(x) (x) -#define bce_be64toh(x) (x) -#define bce_le16toh(x) (x) -#define bce_le32toh(x) (x) -#define bce_le64toh(x) (x) -#endif - - /****************************************************************************/ /* NVRAM Access */ /****************************************************************************/ @@ -6336,14 +6307,9 @@ struct fw_info { #define BCE_IF_HWASSIST (CSUM_TCP | CSUM_UDP) #endif -#if __FreeBSD_version < 700000 -#define BCE_IF_CAPABILITIES (IFCAP_VLAN_MTU | \ - IFCAP_VLAN_HWTAGGING | IFCAP_HWCSUM | IFCAP_JUMBO_MTU) -#else #define BCE_IF_CAPABILITIES (IFCAP_VLAN_MTU | \ IFCAP_VLAN_HWTAGGING | IFCAP_HWCSUM | \ IFCAP_JUMBO_MTU | IFCAP_VLAN_HWCSUM) -#endif #define BCE_MIN_MTU 60 #define BCE_MIN_ETHER_MTU 64 From owner-svn-src-head@freebsd.org Sun Mar 1 17:27:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5494E2468CE; Sun, 1 Mar 2020 17:27:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VqwS6dcZz4cJl; Sun, 1 Mar 2020 17:27:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15F136FDF; Sun, 1 Mar 2020 17:27:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021HRZ29076739; Sun, 1 Mar 2020 17:27:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021HRZex076736; Sun, 1 Mar 2020 17:27:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011727.021HRZex076736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 17:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358487 - head/sys/dev/isci X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/isci X-SVN-Commit-Revision: 358487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 17:27:37 -0000 Author: imp Date: Sun Mar 1 17:27:35 2020 New Revision: 358487 URL: https://svnweb.freebsd.org/changeset/base/358487 Log: Remove support for FreeBSD 8 systems. These workarounds and ways of rescanning devices are no longer done. Modified: head/sys/dev/isci/isci.h head/sys/dev/isci/isci_controller.c head/sys/dev/isci/isci_io_request.c Modified: head/sys/dev/isci/isci.h ============================================================================== --- head/sys/dev/isci/isci.h Sun Mar 1 17:27:30 2020 (r358486) +++ head/sys/dev/isci/isci.h Sun Mar 1 17:27:35 2020 (r358487) @@ -303,10 +303,8 @@ void isci_request_construct(struct ISCI_REQUEST *reque void isci_io_request_execute_scsi_io(union ccb *ccb, struct ISCI_CONTROLLER *controller); -#if __FreeBSD_version >= 900026 void isci_io_request_execute_smp_io( union ccb *ccb, struct ISCI_CONTROLLER *controller); -#endif void isci_io_request_timeout(void *); Modified: head/sys/dev/isci/isci_controller.c ============================================================================== --- head/sys/dev/isci/isci_controller.c Sun Mar 1 17:27:30 2020 (r358486) +++ head/sys/dev/isci/isci_controller.c Sun Mar 1 17:27:35 2020 (r358487) @@ -583,21 +583,6 @@ void isci_controller_domain_discovery_complete( /* Unfreeze simq to allow initial scan to proceed. */ xpt_release_simq(isci_controller->sim, TRUE); -#if __FreeBSD_version < 800000 - /* When driver is loaded after boot, we need to - * explicitly rescan here for versions <8.0, because - * CAM only automatically scans new buses at boot - * time. - */ - union ccb *ccb = xpt_alloc_ccb_nowait(); - - xpt_create_path(&ccb->ccb_h.path, NULL, - cam_sim_path(isci_controller->sim), - CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); - - xpt_rescan(ccb); -#endif - if (next_index < driver->controller_count) { /* There are more controllers that need to * start. So start the next one. @@ -689,9 +674,7 @@ void isci_action(struct cam_sim *sim, union ccb *ccb) cpi->hba_eng_cnt = 0; cpi->max_target = SCI_MAX_REMOTE_DEVICES - 1; cpi->max_lun = ISCI_MAX_LUN; -#if __FreeBSD_version >= 800102 cpi->maxio = isci_io_request_get_max_io_size(); -#endif cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = bus; cpi->initiator_id = SCI_MAX_REMOTE_DEVICES; @@ -752,11 +735,9 @@ void isci_action(struct cam_sim *sim, union ccb *ccb) } isci_io_request_execute_scsi_io(ccb, controller); break; -#if __FreeBSD_version >= 900026 case XPT_SMP_IO: isci_io_request_execute_smp_io(ccb, controller); break; -#endif case XPT_SET_TRAN_SETTINGS: ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_REQ_CMP; Modified: head/sys/dev/isci/isci_io_request.c ============================================================================== --- head/sys/dev/isci/isci_io_request.c Sun Mar 1 17:27:30 2020 (r358486) +++ head/sys/dev/isci/isci_io_request.c Sun Mar 1 17:27:35 2020 (r358487) @@ -102,7 +102,6 @@ isci_io_request_complete(SCI_CONTROLLER_HANDLE_T scif_ switch (completion_status) { case SCI_IO_SUCCESS: case SCI_IO_SUCCESS_COMPLETE_BEFORE_START: -#if __FreeBSD_version >= 900026 if (ccb->ccb_h.func_code == XPT_SMP_IO) { void *smp_response = scif_io_request_get_response_iu_address( @@ -111,7 +110,6 @@ isci_io_request_complete(SCI_CONTROLLER_HANDLE_T scif_ memcpy(ccb->smpio.smp_response, smp_response, ccb->smpio.smp_response_len); } -#endif ccb->ccb_h.status |= CAM_REQ_CMP; break; @@ -802,7 +800,6 @@ isci_io_request_timeout(void *arg) mtx_unlock(&controller->lock); } -#if __FreeBSD_version >= 900026 /** * @brief This callback method gets the size of and pointer to the buffer * (if any) containing the request buffer for an SMP request. @@ -990,4 +987,3 @@ isci_io_request_execute_smp_io(union ccb *ccb, SBT_1MS * ccb->ccb_h.timeout, 0, isci_io_request_timeout, request, 0); } -#endif From owner-svn-src-head@freebsd.org Sun Mar 1 17:46:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAD3D246FAA; Sun, 1 Mar 2020 17:46:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VrLF5YkQz4Srm; Sun, 1 Mar 2020 17:46:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C2B47377; Sun, 1 Mar 2020 17:46:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021HkTRj088683; Sun, 1 Mar 2020 17:46:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021HkSsl088681; Sun, 1 Mar 2020 17:46:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011746.021HkSsl088681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 17:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358488 - head/sys/dev/bxe X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/bxe X-SVN-Commit-Revision: 358488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 17:46:30 -0000 Author: imp Date: Sun Mar 1 17:46:28 2020 New Revision: 358488 URL: https://svnweb.freebsd.org/changeset/base/358488 Log: Remove FreeBSD 7-10 support from bxe driver. Use new PCIER and PCIEM names in the driver rather than relying on old, compat shims. Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/bxe.h Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Sun Mar 1 17:27:35 2020 (r358487) +++ head/sys/dev/bxe/bxe.c Sun Mar 1 17:46:28 2020 (r358488) @@ -13261,8 +13261,8 @@ bxe_pcie_capability_read(struct bxe_softc *sc, static uint8_t bxe_is_pcie_pending(struct bxe_softc *sc) { - return (bxe_pcie_capability_read(sc, PCIR_EXPRESS_DEVICE_STA, 2) & - PCIM_EXP_STA_TRANSACTION_PND); + return (bxe_pcie_capability_read(sc, PCIER_DEVICE_STA, 2) & + PCIEM_STA_TRANSACTION_PND); } /* @@ -13286,7 +13286,7 @@ bxe_probe_pci_caps(struct bxe_softc *sc) } } - link_status = bxe_pcie_capability_read(sc, PCIR_EXPRESS_LINK_STA, 2); + link_status = bxe_pcie_capability_read(sc, PCIER_LINK_STA, 2); /* handle PCIe 2.0 workarounds for 57710 */ if (CHIP_IS_E1(sc)) { @@ -13296,16 +13296,16 @@ bxe_probe_pci_caps(struct bxe_softc *sc) /* workaround for 57710 errata E4_57710_27488 */ sc->devinfo.pcie_link_width = - ((link_status & PCIM_LINK_STA_WIDTH) >> 4); + ((link_status & PCIEM_LINK_STA_WIDTH) >> 4); if (sc->devinfo.pcie_link_speed > 1) { sc->devinfo.pcie_link_width = - ((link_status & PCIM_LINK_STA_WIDTH) >> 4) >> 1; + ((link_status & PCIEM_LINK_STA_WIDTH) >> 4) >> 1; } } else { sc->devinfo.pcie_link_speed = - (link_status & PCIM_LINK_STA_SPEED); + (link_status & PCIEM_LINK_STA_SPEED); sc->devinfo.pcie_link_width = - ((link_status & PCIM_LINK_STA_WIDTH) >> 4); + ((link_status & PCIEM_LINK_STA_WIDTH) >> 4); } BLOGD(sc, DBG_LOAD, "PCIe link speed=%d width=%d\n", @@ -16746,14 +16746,14 @@ bxe_init_pxp(struct bxe_softc *sc) uint16_t devctl; int r_order, w_order; - devctl = bxe_pcie_capability_read(sc, PCIR_EXPRESS_DEVICE_CTL, 2); + devctl = bxe_pcie_capability_read(sc, PCIER_DEVICE_CTL, 2); BLOGD(sc, DBG_LOAD, "read 0x%08x from devctl\n", devctl); - w_order = ((devctl & PCIM_EXP_CTL_MAX_PAYLOAD) >> 5); + w_order = ((devctl & PCIEM_CTL_MAX_PAYLOAD) >> 5); if (sc->mrrs == -1) { - r_order = ((devctl & PCIM_EXP_CTL_MAX_READ_REQUEST) >> 12); + r_order = ((devctl & PCIEM_CTL_MAX_READ_REQUEST) >> 12); } else { BLOGD(sc, DBG_LOAD, "forcing read order to %d\n", sc->mrrs); r_order = sc->mrrs; Modified: head/sys/dev/bxe/bxe.h ============================================================================== --- head/sys/dev/bxe/bxe.h Sun Mar 1 17:27:35 2020 (r358487) +++ head/sys/dev/bxe/bxe.h Sun Mar 1 17:46:28 2020 (r358488) @@ -117,34 +117,6 @@ __FBSDID("$FreeBSD$"); #define VF_MAC_CREDIT_CNT 0 #define VF_VLAN_CREDIT_CNT (0) -#if __FreeBSD_version < 800054 -#if defined(__i386__) || defined(__amd64__) -#define mb() __asm volatile("mfence;" : : : "memory") -#define wmb() __asm volatile("sfence;" : : : "memory") -#define rmb() __asm volatile("lfence;" : : : "memory") -static __inline void prefetch(void *x) -{ - __asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); -} -#else -#define mb() -#define rmb() -#define wmb() -#define prefetch(x) -#endif -#endif - -#if __FreeBSD_version >= 1000000 -#define PCIR_EXPRESS_DEVICE_STA PCIER_DEVICE_STA -#define PCIM_EXP_STA_TRANSACTION_PND PCIEM_STA_TRANSACTION_PND -#define PCIR_EXPRESS_LINK_STA PCIER_LINK_STA -#define PCIM_LINK_STA_WIDTH PCIEM_LINK_STA_WIDTH -#define PCIM_LINK_STA_SPEED PCIEM_LINK_STA_SPEED -#define PCIR_EXPRESS_DEVICE_CTL PCIER_DEVICE_CTL -#define PCIM_EXP_CTL_MAX_PAYLOAD PCIEM_CTL_MAX_PAYLOAD -#define PCIM_EXP_CTL_MAX_READ_REQUEST PCIEM_CTL_MAX_READ_REQUEST -#endif - #ifndef ARRAY_SIZE #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) #endif @@ -708,10 +680,8 @@ struct bxe_fastpath { //uint8_t segs; -#if __FreeBSD_version >= 800000 #define BXE_BR_SIZE 4096 struct buf_ring *tx_br; -#endif }; /* struct bxe_fastpath */ /* sriov XXX */ @@ -2300,16 +2270,8 @@ void bxe_dump_mem(struct bxe_softc *sc, char *tag, void bxe_dump_mbuf_data(struct bxe_softc *sc, char *pTag, struct mbuf *m, uint8_t contents); -#if __FreeBSD_version >= 800000 -#if (__FreeBSD_version >= 1001513 && __FreeBSD_version < 1100000) ||\ - __FreeBSD_version >= 1100048 #define BXE_SET_FLOWID(m) M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE) #define BXE_VALID_FLOWID(m) (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) -#else -#define BXE_VALID_FLOWID(m) ((m->m_flags & M_FLOWID) != 0) -#define BXE_SET_FLOWID(m) m->m_flags |= M_FLOWID -#endif -#endif /* #if __FreeBSD_version >= 800000 */ /***********/ /* INLINES */ From owner-svn-src-head@freebsd.org Sun Mar 1 18:17:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1904B247F62; Sun, 1 Mar 2020 18:17:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vs2T0gV4z4c9d; Sun, 1 Mar 2020 18:17:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60F697944; Sun, 1 Mar 2020 18:17:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021IHq5u007725; Sun, 1 Mar 2020 18:17:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021IHqww007722; Sun, 1 Mar 2020 18:17:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011817.021IHqww007722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 18:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358491 - head/sys/dev/bxe X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/bxe X-SVN-Commit-Revision: 358491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 18:17:54 -0000 Author: imp Date: Sun Mar 1 18:17:51 2020 New Revision: 358491 URL: https://svnweb.freebsd.org/changeset/base/358491 Log: Finish removing support from old versions Eliminate code for old versions, inline pci_find_cap instead of relying on compat ifdef. This commit should have been combined with r358488 before pushing it in. Modified: head/sys/dev/bxe/bxe.c Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Sun Mar 1 18:03:09 2020 (r358490) +++ head/sys/dev/bxe/bxe.c Sun Mar 1 18:17:51 2020 (r358491) @@ -59,14 +59,6 @@ __FBSDID("$FreeBSD$"); #define CSUM_UDP_IPV6 0 #endif -/* - * pci_find_cap was added in r219865. Re-define this at pci_find_extcap - * for older kernels that don't include this changeset. - */ -#if __FreeBSD_version < 900035 -#define pci_find_cap pci_find_extcap -#endif - #define BXE_DEF_SB_ATT_IDX 0x0001 #define BXE_DEF_SB_IDX 0x0002 @@ -3106,11 +3098,9 @@ bxe_tpa_stop(struct bxe_softc *sc, /* assign packet to this interface interface */ if_setrcvif(m, ifp); -#if __FreeBSD_version >= 800000 /* specify what RSS queue was used for this flow */ m->m_pkthdr.flowid = fp->index; BXE_SET_FLOWID(m); -#endif if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); fp->eth_q_stats.rx_tpa_pkts++; @@ -3395,11 +3385,9 @@ bxe_rxeof(struct bxe_softc *sc, m->m_flags |= M_VLANTAG; } -#if __FreeBSD_version >= 800000 /* specify what RSS queue was used for this flow */ m->m_pkthdr.flowid = fp->index; BXE_SET_FLOWID(m); -#endif next_rx: @@ -4749,7 +4737,6 @@ bxe_dump_mbuf(struct bxe_softc *sc, while (m) { -#if __FreeBSD_version >= 1000000 BLOGD(sc, DBG_MBUF, "%02d: mbuf=%p m_len=%d m_flags=0x%b m_data=%p\n", i, m, m->m_len, m->m_flags, M_FLAG_BITS, m->m_data); @@ -4760,27 +4747,7 @@ bxe_dump_mbuf(struct bxe_softc *sc, i, m->m_pkthdr.len, m->m_flags, M_FLAG_BITS, (int)m->m_pkthdr.csum_flags, CSUM_BITS); } -#else - BLOGD(sc, DBG_MBUF, - "%02d: mbuf=%p m_len=%d m_flags=0x%b m_data=%p\n", - i, m, m->m_len, m->m_flags, - "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY", m->m_data); - if (m->m_flags & M_PKTHDR) { - BLOGD(sc, DBG_MBUF, - "%02d: - m_pkthdr: tot_len=%d flags=0x%b csum_flags=%b\n", - i, m->m_pkthdr.len, m->m_flags, - "\20\12M_BCAST\13M_MCAST\14M_FRAG" - "\15M_FIRSTFRAG\16M_LASTFRAG\21M_VLANTAG" - "\22M_PROMISC\23M_NOFREE", - (int)m->m_pkthdr.csum_flags, - "\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP\4CSUM_IP_FRAGS" - "\5CSUM_FRAGMENT\6CSUM_TSO\11CSUM_IP_CHECKED" - "\12CSUM_IP_VALID\13CSUM_DATA_VALID" - "\14CSUM_PSEUDO_HDR"); - } -#endif /* #if __FreeBSD_version >= 1000000 */ - if (m->m_flags & M_EXT) { switch (m->m_ext.ext_type) { case EXT_CLUSTER: type = "EXT_CLUSTER"; break; @@ -5163,9 +5130,7 @@ bxe_tx_encap(struct bxe_fastpath *fp, struct mbuf **m_ sc = fp->sc; -#if __FreeBSD_version >= 800000 M_ASSERTPKTHDR(*m_head); -#endif /* #if __FreeBSD_version >= 800000 */ m0 = *m_head; rc = defragged = nbds = ovlan = vlan_off = total_pkt_size = 0; @@ -5671,8 +5636,6 @@ bxe_tx_start(if_t ifp) BXE_FP_TX_UNLOCK(fp); } -#if __FreeBSD_version >= 901504 - static int bxe_tx_mq_start_locked(struct bxe_softc *sc, if_t ifp, @@ -5860,8 +5823,6 @@ bxe_mq_flush(struct ifnet *ifp) if_qflush(ifp); } -#endif /* FreeBSD_version >= 901504 */ - static uint16_t bxe_cid_ilt_lines(struct bxe_softc *sc) { @@ -6221,7 +6182,6 @@ bxe_free_fp_buffers(struct bxe_softc *sc) for (i = 0; i < sc->num_queues; i++) { fp = &sc->fp[i]; -#if __FreeBSD_version >= 901504 if (fp->tx_br != NULL) { /* just in case bxe_mq_flush() wasn't called */ if (mtx_initialized(&fp->tx_mtx)) { @@ -6233,7 +6193,6 @@ bxe_free_fp_buffers(struct bxe_softc *sc) BXE_FP_TX_UNLOCK(fp); } } -#endif /* free all RX buffers */ bxe_free_rx_bd_chain(fp); @@ -11315,9 +11274,7 @@ bxe_get_q_flags(struct bxe_softc *sc, if (if_getcapenable(sc->ifp) & IFCAP_LRO) { bxe_set_bit(ECORE_Q_FLG_TPA, &flags); -#if __FreeBSD_version >= 800000 bxe_set_bit(ECORE_Q_FLG_TPA_IPV6, &flags); -#endif } if (leading) { @@ -13065,13 +13022,8 @@ bxe_init_ifnet(struct bxe_softc *sc) if_setioctlfn(ifp, bxe_ioctl); if_setstartfn(ifp, bxe_tx_start); if_setgetcounterfn(ifp, bxe_get_counter); -#if __FreeBSD_version >= 901504 if_settransmitfn(ifp, bxe_tx_mq_start); if_setqflushfn(ifp, bxe_mq_flush); -#endif -#ifdef FreeBSD8_0 - if_settimer(ifp, 0); -#endif if_setinitfn(ifp, bxe_init); if_setmtu(ifp, sc->mtu); if_sethwassist(ifp, (CSUM_IP | @@ -13082,15 +13034,8 @@ bxe_init_ifnet(struct bxe_softc *sc) CSUM_UDP_IPV6)); capabilities = -#if __FreeBSD_version < 700000 (IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | - IFCAP_HWCSUM | - IFCAP_JUMBO_MTU | - IFCAP_LRO); -#else - (IFCAP_VLAN_MTU | - IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWFILTER | IFCAP_VLAN_HWCSUM | @@ -13100,7 +13045,6 @@ bxe_init_ifnet(struct bxe_softc *sc) IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_WOL_MAGIC); -#endif if_setcapabilitiesbit(ifp, capabilities, 0); /* XXX */ if_setcapenable(ifp, if_getcapabilities(ifp)); if_setbaudrate(ifp, IF_Gbps(10)); @@ -16107,7 +16051,6 @@ bxe_add_sysctls(struct bxe_softc *sc) sc->debug = bxe_debug; -#if __FreeBSD_version >= 900000 SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "bc_version", CTLFLAG_RD, sc->devinfo.bc_ver_str, 0, "bootcode version"); @@ -16126,26 +16069,6 @@ bxe_add_sysctls(struct bxe_softc *sc) SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "debug", CTLFLAG_RW, &sc->debug, "debug logging mode"); -#else - SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "bc_version", - CTLFLAG_RD, &sc->devinfo.bc_ver_str, 0, - "bootcode version"); - SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "fw_version", - CTLFLAG_RD, &sc->fw_ver_str, 0, - "firmware version"); - SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "mf_mode", - CTLFLAG_RD, &sc->mf_mode_str, 0, - "multifunction mode"); - SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "mac_addr", - CTLFLAG_RD, &sc->mac_addr_str, 0, - "mac address"); - SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "pci_link", - CTLFLAG_RD, &sc->pci_link_str, 0, - "pci link status"); - SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "debug", - CTLFLAG_RW, &sc->debug, 0, - "debug logging mode"); -#endif /* #if __FreeBSD_version >= 900000 */ sc->trigger_grcdump = 0; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "trigger_grcdump", @@ -16206,8 +16129,6 @@ bxe_add_sysctls(struct bxe_softc *sc) static int bxe_alloc_buf_rings(struct bxe_softc *sc) { -#if __FreeBSD_version >= 901504 - int i; struct bxe_fastpath *fp; @@ -16220,15 +16141,13 @@ bxe_alloc_buf_rings(struct bxe_softc *sc) if (fp->tx_br == NULL) return (-1); } -#endif + return (0); } static void bxe_free_buf_rings(struct bxe_softc *sc) { -#if __FreeBSD_version >= 901504 - int i; struct bxe_fastpath *fp; @@ -16241,8 +16160,6 @@ bxe_free_buf_rings(struct bxe_softc *sc) fp->tx_br = NULL; } } - -#endif } static void From owner-svn-src-head@freebsd.org Sun Mar 1 18:17:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AFBE247FBA; Sun, 1 Mar 2020 18:17:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vs2Z4ln9z4cPG; Sun, 1 Mar 2020 18:17:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E7167946; Sun, 1 Mar 2020 18:17:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021IHv1Z007899; Sun, 1 Mar 2020 18:17:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021IHv7D007898; Sun, 1 Mar 2020 18:17:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011817.021IHv7D007898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 18:17:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358492 - head/sys/dev/cxgb X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/cxgb X-SVN-Commit-Revision: 358492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 18:17:59 -0000 Author: imp Date: Sun Mar 1 18:17:56 2020 New Revision: 358492 URL: https://svnweb.freebsd.org/changeset/base/358492 Log: Remove conditional code for FreeBSD 8 and earlier frmo cxgb. Modified: head/sys/dev/cxgb/cxgb_osdep.h head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- head/sys/dev/cxgb/cxgb_osdep.h Sun Mar 1 18:17:51 2020 (r358491) +++ head/sys/dev/cxgb/cxgb_osdep.h Sun Mar 1 18:17:56 2020 (r358492) @@ -70,36 +70,10 @@ struct t3_mbuf_hdr { } while (0) #endif -#if __FreeBSD_version < 800054 -#if defined (__GNUC__) - #if #cpu(i386) || defined __i386 || defined i386 || defined __i386__ || #cpu(x86_64) || defined __x86_64__ - #define mb() __asm__ __volatile__ ("mfence;": : :"memory") - #define wmb() __asm__ __volatile__ ("sfence;": : :"memory") - #define rmb() __asm__ __volatile__ ("lfence;": : :"memory") - #elif #cpu(sparc64) || defined sparc64 || defined __sparcv9 - #define mb() __asm__ __volatile__ ("membar #MemIssue": : :"memory") - #define wmb() mb() - #define rmb() mb() - #elif #cpu(sparc) || defined sparc || defined __sparc__ - #define mb() __asm__ __volatile__ ("stbar;": : :"memory") - #define wmb() mb() - #define rmb() mb() -#else - #define wmb() mb() - #define rmb() mb() - #define mb() /* XXX just to make this compile */ - #endif -#else - #error "unknown compiler" -#endif -#endif - /* * Workaround for weird Chelsio issue */ -#if __FreeBSD_version > 700029 #define PRIV_SUPPORTED -#endif #define CXGB_TX_CLEANUP_THRESHOLD 32 Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Sun Mar 1 18:17:51 2020 (r358491) +++ head/sys/dev/cxgb/cxgb_sge.c Sun Mar 1 18:17:56 2020 (r358492) @@ -559,7 +559,6 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) use_16k = cxgb_use_16k_clusters != -1 ? cxgb_use_16k_clusters : is_offload(adap); -#if __FreeBSD_version >= 700111 if (use_16k) { jumbo_q_size = min(nmbjumbo16/(3*nqsets), JUMBO_Q_SIZE); jumbo_buf_size = MJUM16BYTES; @@ -567,10 +566,6 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) jumbo_q_size = min(nmbjumbo9/(3*nqsets), JUMBO_Q_SIZE); jumbo_buf_size = MJUM9BYTES; } -#else - jumbo_q_size = min(nmbjumbop/(3*nqsets), JUMBO_Q_SIZE); - jumbo_buf_size = MJUMPAGESIZE; -#endif while (!powerof2(jumbo_q_size)) jumbo_q_size--; From owner-svn-src-head@freebsd.org Sun Mar 1 18:18:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9BD72248009; Sun, 1 Mar 2020 18:18:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vs2g6D3nz4cdG; Sun, 1 Mar 2020 18:18:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C8737948; Sun, 1 Mar 2020 18:18:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021II3Zc008097; Sun, 1 Mar 2020 18:18:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021II2B3008090; Sun, 1 Mar 2020 18:18:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011818.021II2B3008090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 18:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358493 - head/sys/dev/iscsi_initiator X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/iscsi_initiator X-SVN-Commit-Revision: 358493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 18:18:04 -0000 Author: imp Date: Sun Mar 1 18:18:01 2020 New Revision: 358493 URL: https://svnweb.freebsd.org/changeset/base/358493 Log: Remove support for FreeBSD 4-7 from the iscsi initiator. Also, inline/remove now empty or trivial macros. CAM has evolved enough this code couldn't work there anyway, and the API sweeep commits made since then were made unconditional. Modified: head/sys/dev/iscsi_initiator/isc_cam.c head/sys/dev/iscsi_initiator/isc_sm.c head/sys/dev/iscsi_initiator/isc_soc.c head/sys/dev/iscsi_initiator/isc_subr.c head/sys/dev/iscsi_initiator/iscsi_subr.c head/sys/dev/iscsi_initiator/iscsivar.h Modified: head/sys/dev/iscsi_initiator/isc_cam.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_cam.c Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/isc_cam.c Sun Mar 1 18:18:01 2020 (r358493) @@ -37,10 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if __FreeBSD_version >= 700000 #include #include -#endif #include #include #include @@ -93,16 +91,12 @@ static __inline int _scsi_encap(struct cam_sim *sim, union ccb *ccb) { int ret; - -#if __FreeBSD_version < 700000 - ret = scsi_encap(sim, ccb); -#else isc_session_t *sp = cam_sim_softc(sim); mtx_unlock(&sp->cam_mtx); ret = scsi_encap(sim, ccb); mtx_lock(&sp->cam_mtx); -#endif + return ret; } @@ -260,11 +254,7 @@ ic_action(struct cam_sim *sim, union ccb *ccb) ccb_h->status = CAM_REQ_INVALID; break; } -#if __FreeBSD_version < 700000 - XPT_DONE(sp, ccb); -#else xpt_done(ccb); -#endif return; } @@ -297,7 +287,6 @@ ic_destroy(isc_session_t *sp ) if(sp->cam_path != NULL) { sdebug(2, "name=%s unit=%d", cam_sim_name(sp->cam_sim), cam_sim_unit(sp->cam_sim)); - CAM_LOCK(sp); #if 0 xpt_async(AC_LOST_DEVICE, sp->cam_path, NULL); #else @@ -307,7 +296,6 @@ ic_destroy(isc_session_t *sp ) xpt_bus_deregister(cam_sim_path(sp->cam_sim)); cam_sim_free(sp->cam_sim, TRUE /*free_devq*/); - CAM_UNLOCK(sp); sdebug(2, "done"); } } @@ -323,42 +311,28 @@ ic_init(isc_session_t *sp) if((devq = cam_simq_alloc(256)) == NULL) return ENOMEM; -#if __FreeBSD_version >= 700000 mtx_init(&sp->cam_mtx, "isc-cam", NULL, MTX_DEF); -#else - isp->cam_mtx = Giant; -#endif sim = cam_sim_alloc(ic_action, ic_poll, "iscsi", sp, sp->sid, // unit -#if __FreeBSD_version >= 700000 &sp->cam_mtx, -#endif 1, // max_dev_transactions 0, // max_tagged_dev_transactions devq); if(sim == NULL) { cam_simq_free(devq); -#if __FreeBSD_version >= 700000 mtx_destroy(&sp->cam_mtx); -#endif return ENXIO; } - CAM_LOCK(sp); if(xpt_bus_register(sim, -#if __FreeBSD_version >= 700000 NULL, -#endif 0/*bus_number*/) != CAM_SUCCESS) { cam_sim_free(sim, /*free_devq*/TRUE); - CAM_UNLOCK(sp); -#if __FreeBSD_version >= 700000 mtx_destroy(&sp->cam_mtx); -#endif return ENXIO; } sp->cam_sim = sim; @@ -366,13 +340,9 @@ ic_init(isc_session_t *sp) CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { xpt_bus_deregister(cam_sim_path(sp->cam_sim)); cam_sim_free(sim, /*free_devq*/TRUE); - CAM_UNLOCK(sp); -#if __FreeBSD_version >= 700000 mtx_destroy(&sp->cam_mtx); -#endif return ENXIO; } - CAM_UNLOCK(sp); sdebug(1, "cam subsystem initialized"); Modified: head/sys/dev/iscsi_initiator/isc_sm.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_sm.c Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/isc_sm.c Sun Mar 1 18:18:01 2020 (r358493) @@ -514,7 +514,7 @@ proc_out(isc_session_t *sp) if(pq->ccb) { xdebug("back to cam"); pq->ccb->ccb_h.status |= CAM_REQUEUE_REQ; // some better error? - XPT_DONE(sp, pq->ccb); + xpt_done(sp, pq->ccb); pdu_free(sp->isc, pq); } else @@ -571,17 +571,11 @@ ism_out(void *vp) wakeup(&sp->soc); wakeup(sp); // XXX: do we need this one? -#if __FreeBSD_version >= 700000 destroy_dev(sp->dev); -#endif debug(3, "terminated sp=%p sp->sid=%d", sp, sp->sid); -#if __FreeBSD_version >= 800000 kproc_exit(0); -#else - kthread_exit(0); -#endif } #if 0 @@ -712,10 +706,6 @@ ism_stop(isc_session_t *sp) sc->nsess--; mtx_unlock(&sc->isc_mtx); -#if __FreeBSD_version < 700000 - destroy_dev(sp->dev); -#endif - mtx_destroy(&sp->rsp_mtx); mtx_destroy(&sp->rsv_mtx); mtx_destroy(&sp->hld_mtx); @@ -756,9 +746,5 @@ ism_start(isc_session_t *sp) debug(4, "starting ism_proc: sp->sid=%d", sp->sid); -#if __FreeBSD_version >= 800000 return kproc_create(ism_out, sp, &sp->stp, 0, 0, "isc_out %d", sp->sid); -#else - return kthread_create(ism_out, sp, &sp->stp, 0, 0, "isc_out %d", sp->sid); -#endif -} +a} Modified: head/sys/dev/iscsi_initiator/isc_soc.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_soc.c Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/isc_soc.c Sun Mar 1 18:18:01 2020 (r358493) @@ -338,21 +338,13 @@ so_getbhs(isc_session_t *sp) if(error) debug(2, -#if __FreeBSD_version > 800000 "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd", -#else - "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd", -#endif error, sp->soc->so_error, uio->uio_resid, iov->iov_len); if(!error && (uio->uio_resid > 0)) { error = EPIPE; // was EAGAIN debug(2, -#if __FreeBSD_version > 800000 "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd so_state=%x", -#else - "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd so_state=%x", -#endif error, sp->soc->so_error, uio->uio_resid, iov->iov_len, sp->soc->so_state); } @@ -411,11 +403,7 @@ so_recv(isc_session_t *sp, pduq_t *pq) // XXX: this needs work! it hangs iscontrol if(error || uio->uio_resid) { debug(2, -#if __FreeBSD_version > 800000 "len=%d error=%d uio->uio_resid=%zd", -#else - "len=%d error=%d uio->uio_resid=%d", -#endif len, error, uio->uio_resid); goto out; } @@ -648,11 +636,7 @@ isc_in(void *vp) mtx_unlock(&sp->io_mtx); sdebug(2, "dropped ISC_CON_RUNNING"); -#if __FreeBSD_version >= 800000 kproc_exit(0); -#else - kthread_exit(0); -#endif } void @@ -692,10 +676,5 @@ isc_start_receiver(isc_session_t *sp) debug_called(8); sp->flags |= ISC_CON_RUN | ISC_LINK_UP; -#if __FreeBSD_version >= 800000 - kproc_create -#else - kthread_create -#endif - (isc_in, sp, &sp->soc_proc, 0, 0, "isc_in %d", sp->sid); + kproc_create(isc_in, sp, &sp->soc_proc, 0, 0, "isc_in %d", sp->sid); } Modified: head/sys/dev/iscsi_initiator/isc_subr.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_subr.c Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/isc_subr.c Sun Mar 1 18:18:01 2020 (r358493) @@ -81,104 +81,6 @@ i_strdupin(char *s, size_t maxlen) return q; } -#if __FreeBSD_version < 800000 -/*****************************************************************/ -/* */ -/* CRC LOOKUP TABLE */ -/* ================ */ -/* The following CRC lookup table was generated automagically */ -/* by the Rocksoft^tm Model CRC Algorithm Table Generation */ -/* Program V1.0 using the following model parameters: */ -/* */ -/* Width : 4 bytes. */ -/* Poly : 0x1EDC6F41L */ -/* Reverse : TRUE. */ -/* */ -/* For more information on the Rocksoft^tm Model CRC Algorithm, */ -/* see the document titled "A Painless Guide to CRC Error */ -/* Detection Algorithms" by Ross Williams */ -/* (ross@guest.adelaide.edu.au.). This document is likely to be */ -/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */ -/* */ -/*****************************************************************/ - -static uint32_t crc32Table[256] = { - 0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L, - 0xC79A971FL, 0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL, - 0x8AD958CFL, 0x78B2DBCCL, 0x6BE22838L, 0x9989AB3BL, - 0x4D43CFD0L, 0xBF284CD3L, 0xAC78BF27L, 0x5E133C24L, - 0x105EC76FL, 0xE235446CL, 0xF165B798L, 0x030E349BL, - 0xD7C45070L, 0x25AFD373L, 0x36FF2087L, 0xC494A384L, - 0x9A879FA0L, 0x68EC1CA3L, 0x7BBCEF57L, 0x89D76C54L, - 0x5D1D08BFL, 0xAF768BBCL, 0xBC267848L, 0x4E4DFB4BL, - 0x20BD8EDEL, 0xD2D60DDDL, 0xC186FE29L, 0x33ED7D2AL, - 0xE72719C1L, 0x154C9AC2L, 0x061C6936L, 0xF477EA35L, - 0xAA64D611L, 0x580F5512L, 0x4B5FA6E6L, 0xB93425E5L, - 0x6DFE410EL, 0x9F95C20DL, 0x8CC531F9L, 0x7EAEB2FAL, - 0x30E349B1L, 0xC288CAB2L, 0xD1D83946L, 0x23B3BA45L, - 0xF779DEAEL, 0x05125DADL, 0x1642AE59L, 0xE4292D5AL, - 0xBA3A117EL, 0x4851927DL, 0x5B016189L, 0xA96AE28AL, - 0x7DA08661L, 0x8FCB0562L, 0x9C9BF696L, 0x6EF07595L, - 0x417B1DBCL, 0xB3109EBFL, 0xA0406D4BL, 0x522BEE48L, - 0x86E18AA3L, 0x748A09A0L, 0x67DAFA54L, 0x95B17957L, - 0xCBA24573L, 0x39C9C670L, 0x2A993584L, 0xD8F2B687L, - 0x0C38D26CL, 0xFE53516FL, 0xED03A29BL, 0x1F682198L, - 0x5125DAD3L, 0xA34E59D0L, 0xB01EAA24L, 0x42752927L, - 0x96BF4DCCL, 0x64D4CECFL, 0x77843D3BL, 0x85EFBE38L, - 0xDBFC821CL, 0x2997011FL, 0x3AC7F2EBL, 0xC8AC71E8L, - 0x1C661503L, 0xEE0D9600L, 0xFD5D65F4L, 0x0F36E6F7L, - 0x61C69362L, 0x93AD1061L, 0x80FDE395L, 0x72966096L, - 0xA65C047DL, 0x5437877EL, 0x4767748AL, 0xB50CF789L, - 0xEB1FCBADL, 0x197448AEL, 0x0A24BB5AL, 0xF84F3859L, - 0x2C855CB2L, 0xDEEEDFB1L, 0xCDBE2C45L, 0x3FD5AF46L, - 0x7198540DL, 0x83F3D70EL, 0x90A324FAL, 0x62C8A7F9L, - 0xB602C312L, 0x44694011L, 0x5739B3E5L, 0xA55230E6L, - 0xFB410CC2L, 0x092A8FC1L, 0x1A7A7C35L, 0xE811FF36L, - 0x3CDB9BDDL, 0xCEB018DEL, 0xDDE0EB2AL, 0x2F8B6829L, - 0x82F63B78L, 0x709DB87BL, 0x63CD4B8FL, 0x91A6C88CL, - 0x456CAC67L, 0xB7072F64L, 0xA457DC90L, 0x563C5F93L, - 0x082F63B7L, 0xFA44E0B4L, 0xE9141340L, 0x1B7F9043L, - 0xCFB5F4A8L, 0x3DDE77ABL, 0x2E8E845FL, 0xDCE5075CL, - 0x92A8FC17L, 0x60C37F14L, 0x73938CE0L, 0x81F80FE3L, - 0x55326B08L, 0xA759E80BL, 0xB4091BFFL, 0x466298FCL, - 0x1871A4D8L, 0xEA1A27DBL, 0xF94AD42FL, 0x0B21572CL, - 0xDFEB33C7L, 0x2D80B0C4L, 0x3ED04330L, 0xCCBBC033L, - 0xA24BB5A6L, 0x502036A5L, 0x4370C551L, 0xB11B4652L, - 0x65D122B9L, 0x97BAA1BAL, 0x84EA524EL, 0x7681D14DL, - 0x2892ED69L, 0xDAF96E6AL, 0xC9A99D9EL, 0x3BC21E9DL, - 0xEF087A76L, 0x1D63F975L, 0x0E330A81L, 0xFC588982L, - 0xB21572C9L, 0x407EF1CAL, 0x532E023EL, 0xA145813DL, - 0x758FE5D6L, 0x87E466D5L, 0x94B49521L, 0x66DF1622L, - 0x38CC2A06L, 0xCAA7A905L, 0xD9F75AF1L, 0x2B9CD9F2L, - 0xFF56BD19L, 0x0D3D3E1AL, 0x1E6DCDEEL, 0xEC064EEDL, - 0xC38D26C4L, 0x31E6A5C7L, 0x22B65633L, 0xD0DDD530L, - 0x0417B1DBL, 0xF67C32D8L, 0xE52CC12CL, 0x1747422FL, - 0x49547E0BL, 0xBB3FFD08L, 0xA86F0EFCL, 0x5A048DFFL, - 0x8ECEE914L, 0x7CA56A17L, 0x6FF599E3L, 0x9D9E1AE0L, - 0xD3D3E1ABL, 0x21B862A8L, 0x32E8915CL, 0xC083125FL, - 0x144976B4L, 0xE622F5B7L, 0xF5720643L, 0x07198540L, - 0x590AB964L, 0xAB613A67L, 0xB831C993L, 0x4A5A4A90L, - 0x9E902E7BL, 0x6CFBAD78L, 0x7FAB5E8CL, 0x8DC0DD8FL, - 0xE330A81AL, 0x115B2B19L, 0x020BD8EDL, 0xF0605BEEL, - 0x24AA3F05L, 0xD6C1BC06L, 0xC5914FF2L, 0x37FACCF1L, - 0x69E9F0D5L, 0x9B8273D6L, 0x88D28022L, 0x7AB90321L, - 0xAE7367CAL, 0x5C18E4C9L, 0x4F48173DL, 0xBD23943EL, - 0xF36E6F75L, 0x0105EC76L, 0x12551F82L, 0xE03E9C81L, - 0x34F4F86AL, 0xC69F7B69L, 0xD5CF889DL, 0x27A40B9EL, - 0x79B737BAL, 0x8BDCB4B9L, 0x988C474DL, 0x6AE7C44EL, - 0xBE2DA0A5L, 0x4C4623A6L, 0x5F16D052L, 0xAD7D5351L -}; - -static __inline int -calculate_crc32c(uint32_t crc, const void *buf, size_t size) -{ - const uint8_t *p = buf; - - while (size--) - crc = crc32Table[(crc ^ *p++) & 0xff] ^ (crc >> 8); - return crc; -} -#endif static uint32_t i_crc32c(const void *buf, size_t size, uint32_t crc) Modified: head/sys/dev/iscsi_initiator/iscsi_subr.c ============================================================================== --- head/sys/dev/iscsi_initiator/iscsi_subr.c Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/iscsi_subr.c Sun Mar 1 18:18:01 2020 (r358493) @@ -106,11 +106,7 @@ iscsi_r2t(isc_session_t *sp, pduq_t *opq, pduq_t *pq) while((wpq = pdu_alloc(sp->isc, M_NOWAIT)) == NULL) { sdebug(2, "waiting..."); -#if __FreeBSD_version >= 700000 pause("isc_r2t", 5*hz); -#else - tsleep(sp->isc, 0, "isc_r2t", 5*hz); -#endif } } cmd = &wpq->pdu.ipdu.data_out; @@ -252,7 +248,7 @@ _scsi_done(isc_session_t *sp, u_int response, u_int st } sdebug(5, "ccb_h->status=%x", ccb_h->status); - XPT_DONE(sp, ccb); + xpt_done(sp, ccb); } /* @@ -412,7 +408,7 @@ iscsi_reject(isc_session_t *sp, pduq_t *opq, pduq_t *p debug_called(8); //XXX: check RFC 10.17.1 (page 176) ccb->ccb_h.status = CAM_REQ_ABORTED; - XPT_DONE(sp, ccb); + xpt_done(sp, ccb); pdu_free(sp->isc, opq); } @@ -471,11 +467,7 @@ scsi_encap(struct cam_sim *sim, union ccb *ccb) sp->isc->npdu_max, sp->isc->npdu_alloc); while((pq = pdu_alloc(sp->isc, M_NOWAIT)) == NULL) { sdebug(2, "waiting..."); -#if __FreeBSD_version >= 700000 pause("isc_encap", 5*hz); -#else - tsleep(sp->isc, 0, "isc_encap", 5*hz); -#endif } } cmd = &pq->pdu.ipdu.scsi_req; Modified: head/sys/dev/iscsi_initiator/iscsivar.h ============================================================================== --- head/sys/dev/iscsi_initiator/iscsivar.h Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/iscsivar.h Sun Mar 1 18:18:01 2020 (r358493) @@ -268,39 +268,6 @@ int iscsi_requeue(isc_session_t *sp); /* | inlines */ -#ifdef _CAM_CAM_XPT_SIM_H - -#if __FreeBSD_version < 600000 -#define CAM_LOCK(arg) -#define CAM_ULOCK(arg) - -static __inline void -XPT_DONE(isc_session_t *sp, union ccb *ccb) -{ - mtx_lock(&Giant); - xpt_done(ccb); - mtx_unlock(&Giant); -} -#elif __FreeBSD_version >= 700000 -#define CAM_LOCK(arg) mtx_lock(&arg->cam_mtx) -#define CAM_UNLOCK(arg) mtx_unlock(&arg->cam_mtx) - -static __inline void -XPT_DONE(isc_session_t *sp, union ccb *ccb) -{ - CAM_LOCK(sp); - xpt_done(ccb); - CAM_UNLOCK(sp); -} -#else -//__FreeBSD_version >= 600000 -#define CAM_LOCK(arg) -#define CAM_UNLOCK(arg) -#define XPT_DONE(ignore, arg) xpt_done(arg) -#endif - -#endif /* _CAM_CAM_XPT_SIM_H */ - static __inline pduq_t * pdu_alloc(struct isc_softc *isc, int wait) { From owner-svn-src-head@freebsd.org Sun Mar 1 18:18:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83C7624805C; Sun, 1 Mar 2020 18:18:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vs2m5Wb4z4cpf; Sun, 1 Mar 2020 18:18:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6C5D794A; Sun, 1 Mar 2020 18:18:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021II7Dm008273; Sun, 1 Mar 2020 18:18:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021II7m8008272; Sun, 1 Mar 2020 18:18:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011818.021II7m8008272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 18:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358494 - head/sys/dev/virtio X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/virtio X-SVN-Commit-Revision: 358494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 18:18:09 -0000 Author: imp Date: Sun Mar 1 18:18:07 2020 New Revision: 358494 URL: https://svnweb.freebsd.org/changeset/base/358494 Log: Remove FreeBSD 8 support from virtio. The sbuf API has evolved since 8, as have many others. The other API sweeps didn't make the changes conditional, so this is now noise. Modified: head/sys/dev/virtio/virtio.c Modified: head/sys/dev/virtio/virtio.c ============================================================================== --- head/sys/dev/virtio/virtio.c Sun Mar 1 18:18:01 2020 (r358493) +++ head/sys/dev/virtio/virtio.c Sun Mar 1 18:18:07 2020 (r358494) @@ -157,12 +157,7 @@ virtio_describe(device_t dev, const char *msg, if (n > 0) sbuf_cat(&sb, ">"); -#if __FreeBSD_version < 900020 - sbuf_finish(&sb); - if (sbuf_overflowed(&sb) == 0) -#else if (sbuf_finish(&sb) == 0) -#endif device_printf(dev, "%s\n", sbuf_data(&sb)); sbuf_delete(&sb); From owner-svn-src-head@freebsd.org Sun Mar 1 18:18:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3F742480C9; Sun, 1 Mar 2020 18:18:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vs2s0zlQz4d1J; Sun, 1 Mar 2020 18:18:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54900794B; Sun, 1 Mar 2020 18:18:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021IICO0008428; Sun, 1 Mar 2020 18:18:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021IICEM008427; Sun, 1 Mar 2020 18:18:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011818.021IICEM008427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 18:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358495 - head/sys/dev/xen/netback X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/xen/netback X-SVN-Commit-Revision: 358495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 18:18:14 -0000 Author: imp Date: Sun Mar 1 18:18:11 2020 New Revision: 358495 URL: https://svnweb.freebsd.org/changeset/base/358495 Log: Remove noise that once upon a time allowed netback to build on FreeBSD 6. The network layer has evolved since then, and this won't compile there. Modified: head/sys/dev/xen/netback/netback.c Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Sun Mar 1 18:18:07 2020 (r358494) +++ head/sys/dev/xen/netback/netback.c Sun Mar 1 18:18:11 2020 (r358495) @@ -67,9 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if __FreeBSD_version >= 700000 #include -#endif #include #include #include From owner-svn-src-head@freebsd.org Sun Mar 1 18:56:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FCB2249B2D; Sun, 1 Mar 2020 18:56:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VstS0Qsjz3QbG; Sun, 1 Mar 2020 18:56:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F21BA8156; Sun, 1 Mar 2020 18:55:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021ItxE6034959; Sun, 1 Mar 2020 18:55:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021Itxvd034957; Sun, 1 Mar 2020 18:55:59 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202003011855.021Itxvd034957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 1 Mar 2020 18:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358496 - head/sys/dev/iscsi_initiator X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/dev/iscsi_initiator X-SVN-Commit-Revision: 358496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 18:56:00 -0000 Author: delphij Date: Sun Mar 1 18:55:59 2020 New Revision: 358496 URL: https://svnweb.freebsd.org/changeset/base/358496 Log: Fix build. Modified: head/sys/dev/iscsi_initiator/isc_sm.c head/sys/dev/iscsi_initiator/iscsi_subr.c Modified: head/sys/dev/iscsi_initiator/isc_sm.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_sm.c Sun Mar 1 18:18:11 2020 (r358495) +++ head/sys/dev/iscsi_initiator/isc_sm.c Sun Mar 1 18:55:59 2020 (r358496) @@ -514,7 +514,7 @@ proc_out(isc_session_t *sp) if(pq->ccb) { xdebug("back to cam"); pq->ccb->ccb_h.status |= CAM_REQUEUE_REQ; // some better error? - xpt_done(sp, pq->ccb); + xpt_done(pq->ccb); pdu_free(sp->isc, pq); } else @@ -747,4 +747,4 @@ ism_start(isc_session_t *sp) debug(4, "starting ism_proc: sp->sid=%d", sp->sid); return kproc_create(ism_out, sp, &sp->stp, 0, 0, "isc_out %d", sp->sid); -a} +} Modified: head/sys/dev/iscsi_initiator/iscsi_subr.c ============================================================================== --- head/sys/dev/iscsi_initiator/iscsi_subr.c Sun Mar 1 18:18:11 2020 (r358495) +++ head/sys/dev/iscsi_initiator/iscsi_subr.c Sun Mar 1 18:55:59 2020 (r358496) @@ -248,7 +248,7 @@ _scsi_done(isc_session_t *sp, u_int response, u_int st } sdebug(5, "ccb_h->status=%x", ccb_h->status); - xpt_done(sp, ccb); + xpt_done(ccb); } /* @@ -408,7 +408,7 @@ iscsi_reject(isc_session_t *sp, pduq_t *opq, pduq_t *p debug_called(8); //XXX: check RFC 10.17.1 (page 176) ccb->ccb_h.status = CAM_REQ_ABORTED; - xpt_done(sp, ccb); + xpt_done(ccb); pdu_free(sp->isc, opq); } From owner-svn-src-head@freebsd.org Sun Mar 1 19:15:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C2FF24A10E; Sun, 1 Mar 2020 19:15:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VtJS5F7hz4X12; Sun, 1 Mar 2020 19:15:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EB6C8500; Sun, 1 Mar 2020 19:15:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021JF4ai047052; Sun, 1 Mar 2020 19:15:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021JF3bW047048; Sun, 1 Mar 2020 19:15:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011915.021JF3bW047048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 19:15:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358497 - in head: . share/man/man4 sys/conf sys/dev/bktr sys/modules sys/modules/bktr sys/modules/bktr/bktr sys/modules/bktr/bktr_mem sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . share/man/man4 sys/conf sys/dev/bktr sys/modules sys/modules/bktr sys/modules/bktr/bktr sys/modules/bktr/bktr_mem sys/sys X-SVN-Commit-Revision: 358497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 19:15:05 -0000 Author: imp Date: Sun Mar 1 19:15:03 2020 New Revision: 358497 URL: https://svnweb.freebsd.org/changeset/base/358497 Log: Remove bktr(4) Remove the brooktree driver as discussed on arch@. Bump FreeBSD version to 1300082, though I doubt anything will care. Relnote: yes Deleted: head/share/man/man4/bktr.4 head/sys/dev/bktr/CHANGELOG.TXT head/sys/dev/bktr/bktr_audio.c head/sys/dev/bktr/bktr_audio.h head/sys/dev/bktr/bktr_card.c head/sys/dev/bktr/bktr_card.h head/sys/dev/bktr/bktr_core.c head/sys/dev/bktr/bktr_core.h head/sys/dev/bktr/bktr_i2c.c head/sys/dev/bktr/bktr_i2c.h head/sys/dev/bktr/bktr_mem.c head/sys/dev/bktr/bktr_mem.h head/sys/dev/bktr/bktr_os.c head/sys/dev/bktr/bktr_os.h head/sys/dev/bktr/bktr_reg.h head/sys/dev/bktr/bktr_tuner.c head/sys/dev/bktr/bktr_tuner.h head/sys/dev/bktr/ioctl_bt848.h head/sys/dev/bktr/ioctl_meteor.h head/sys/dev/bktr/msp34xx.c head/sys/modules/bktr/Makefile head/sys/modules/bktr/Makefile.inc head/sys/modules/bktr/bktr/Makefile head/sys/modules/bktr/bktr_mem/Makefile Modified: head/UPDATING head/share/man/man4/Makefile head/sys/conf/files head/sys/modules/Makefile head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Mar 1 18:55:59 2020 (r358496) +++ head/UPDATING Sun Mar 1 19:15:03 2020 (r358497) @@ -26,6 +26,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20200301: + Removed brooktree driver (bktr.4) from the tree. + 20200229: The WITH_GPL_DTC option has been removed. The BSD-licenced device tree compiler in usr.bin/dtc is used on all architectures which use dtc, and Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Mar 1 18:55:59 2020 (r358496) +++ head/share/man/man4/Makefile Sun Mar 1 19:15:03 2020 (r358497) @@ -79,7 +79,6 @@ MAN= aac.4 \ bhnd_pmu.4 \ bhndb.4 \ bhndb_pci.4 \ - bktr.4 \ blackhole.4 \ bnxt.4 \ bpf.4 \ @@ -601,7 +600,6 @@ MLINKS+=axe.4 if_axe.4 MLINKS+=bce.4 if_bce.4 MLINKS+=bfe.4 if_bfe.4 MLINKS+=bge.4 if_bge.4 -MLINKS+=bktr.4 brooktree.4 MLINKS+=bnxt.4 if_bnxt.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Mar 1 18:55:59 2020 (r358496) +++ head/sys/conf/files Sun Mar 1 19:15:03 2020 (r358497) @@ -1335,13 +1335,6 @@ dev/bhnd/siba/siba_bhndb.c optional siba bhnd bhndb dev/bhnd/siba/siba_erom.c optional siba bhnd dev/bhnd/siba/siba_subr.c optional siba bhnd # -dev/bktr/bktr_audio.c optional bktr pci -dev/bktr/bktr_card.c optional bktr pci -dev/bktr/bktr_core.c optional bktr pci -dev/bktr/bktr_i2c.c optional bktr pci smbus -dev/bktr/bktr_os.c optional bktr pci -dev/bktr/bktr_tuner.c optional bktr pci -dev/bktr/msp34xx.c optional bktr pci dev/bnxt/bnxt_hwrm.c optional bnxt iflib pci dev/bnxt/bnxt_sysctl.c optional bnxt iflib pci dev/bnxt/bnxt_txrx.c optional bnxt iflib pci Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Mar 1 18:55:59 2020 (r358496) +++ head/sys/modules/Makefile Sun Mar 1 19:15:03 2020 (r358497) @@ -67,7 +67,6 @@ SUBDIR= \ bhnd \ ${_bxe} \ ${_bios} \ - ${_bktr} \ ${_blake2} \ bnxt \ bridgestp \ @@ -583,7 +582,6 @@ _agp= agp _an= an _aout= aout _bios= bios -_bktr= bktr .if ${MK_SOURCELESS_UCODE} != "no" _bxe= bxe .endif Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Mar 1 18:55:59 2020 (r358496) +++ head/sys/sys/param.h Sun Mar 1 19:15:03 2020 (r358497) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300081 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300082 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Sun Mar 1 19:47:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 605BA24AEFC for ; Sun, 1 Mar 2020 19:47:18 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vv1c1VgJz3MNh; Sun, 1 Mar 2020 19:47:15 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 021Jl6RO031926 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 1 Mar 2020 19:47:08 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: ume@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 021JkxnR008257 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 2 Mar 2020 02:46:59 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Hajimu UMEMOTO References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> Cc: Jung-uk Kim , src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> Date: Mon, 2 Mar 2020 02:46:48 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48Vv1c1VgJz3MNh X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.84)[ip: (-5.09), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.55), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 19:47:18 -0000 01.03.2020 22:20, Hajimu UMEMOTO wrote: >>>>>> On Sun, 1 Mar 2020 21:57:35 +0700 >>>>>> Eugene Grosbein said: > > eugen> One more time: these days it is not possible to upgrade 11.2-STABLE system to recent stable/11 > eugen> with stock sendmail and SSL/SASL support if the system has ports that need openssl-1.1.1, > > If you wish to use base sendmail with cyrus-sasl2, you must build > cyrus-sasl2 with base openssl. If you wish to use cyrus-sasl2 with > port openssl, you should use port sendmail. One more time: these days it is not possible. Dependency error: This port wants the OpenSSL library from the FreeBSD base system. You can't build against it, while a newer version is installed by a port. Please deinstall the port, remove DEFAULT_VERSIONS=ssl=base or undefine WITH_OPENSSL_BASE. *** Error code 1 Meantime, openssl-1.1.1 is needed by multiple other ports and cannod be deinstalled. And if I force building cyrus-sasl2 with base openssl using SSL option that was rolled back, it STILL does not help. You can easily repeat the problem using recent ports tree and recent stable/11 and handbook-recommended way. From owner-svn-src-head@freebsd.org Sun Mar 1 20:07:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A8A924B4AF for ; Sun, 1 Mar 2020 20:07:11 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48VvSZ4kXrz4Wgd for ; Sun, 1 Mar 2020 20:07:10 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1583093229; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=MvkpMIgp/geelTp8muNVfLFHyASckhtyiCstPynYg0BoBED0tABWKj/Xati9T0tXvBSqFjTAP88bN yhZix92RrYk6Rpvro9O571mEa/o40Xjr/8HRwD4T4qtcPrFM3jT0fgakWZ7dPpQCd7Km7ZmzVtShjc LO+xSXKNT31BNKrPvx8itO/OIBNkIRruOPi5CpMLbTLFcrnVW7GH7Xq0tBSPMOe5lbuQtDvOynUFLy R8IBK8S+jUOWV2RR+tqS5p8J928i5jnEFGJ4IAvCarEp/UTEIuFrNVurz1lJiamOAzQi88TtUghqju uIp0soa7FVElDFXJHDFwrNqaBDXbP4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=+FHI1zFrk/HhSmuBZOKxCgHQCm2uUFHhwp8g8APaUc0=; b=EeWAMCotV6CRlJaJNGwxiY9mDSfo1UoBS6RwQPsCr9BfuxOEfZhioN3AgEAOt/T6CTcn6dQmvLmyh We3OU2LWSGJJpn87wzghIiSF98JCQFAfnVpOl4Bzj4ysZE/3Y1PYwaHq5TvdmFcX+aV+SGP2lRbQkH unNIHWTe0EppsYJZ/ThJCVaZVoa/PJWKGSo0v2bO+CFYUVdVfOr8TR3h8obOFQzZTZFOfAhPXeJrpB AdE57kfIaJCNkUgxXe6IevlVlL0+TwF//qLJ5+JoWnW3BB5X/bkSR0QHVMKx/z6QMq+uHT8bUIPdTI j3HJmCIrosffD4HmOqWPRZUX7mNp/rA== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=+FHI1zFrk/HhSmuBZOKxCgHQCm2uUFHhwp8g8APaUc0=; b=VZgZT5gpFTRpQtQKxqnPRSuN8hWmbo6yzxUVIXTc4aPxgQCPSrj4OoALth2be4qWBLbBSmS3mkE5p v0gGGdIDEtrZEjfU40brlILhEMTrtbzSvQIQg/k1Rb260tm7MOXLcnmHUnIvatGPQFJyvnqvTLfnWy kJbw/OTellJhUimmHzd7gWtusHGiNue/ovrnl+uVEUroLNOcq8Xnea1ww3HWlzh6Wi/A0FB6DGoKcL dz41qPOXGRmK3OTI7vZpVuEa7hGohsTnjPdGC8PC3+nEpNFo1xFDznuVOxyftSJypCZgRdIJDG0Fv9 174xngv65I+p19pRHLxzkE1U6yeSVYg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 3964db28-5bf8-11ea-b80e-052b4a66b6b2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 3964db28-5bf8-11ea-b80e-052b4a66b6b2; Sun, 01 Mar 2020 20:07:08 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 021K752Z009189; Sun, 1 Mar 2020 13:07:05 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <3f6459f56fa20a76895cc4890435ade49ee24874.camel@freebsd.org> Subject: Re: svn commit: r358411 - head/contrib/sendmail/src From: Ian Lepore To: Eugene Grosbein , Hajimu UMEMOTO Cc: Jung-uk Kim , src-committers@freebsd.org, svn-src-head@freebsd.org Date: Sun, 01 Mar 2020 13:07:05 -0700 In-Reply-To: <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48VvSZ4kXrz4Wgd X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.77 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.77)[-0.771,0]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 20:07:11 -0000 On Mon, 2020-03-02 at 02:46 +0700, Eugene Grosbein wrote: > 01.03.2020 22:20, Hajimu UMEMOTO wrote: > > > > > > > > On Sun, 1 Mar 2020 21:57:35 +0700 > > > > > > > Eugene Grosbein said: > > > > eugen> One more time: these days it is not possible to upgrade > > 11.2-STABLE system to recent stable/11 > > eugen> with stock sendmail and SSL/SASL support if the system has > > ports that need openssl-1.1.1, > > > > If you wish to use base sendmail with cyrus-sasl2, you must build > > cyrus-sasl2 with base openssl. If you wish to use cyrus-sasl2 with > > port openssl, you should use port sendmail. > > One more time: these days it is not possible. > > Dependency error: This port wants the OpenSSL library from the > FreeBSD > base system. You can't build against it, while a newer > version is installed by a port. > Please deinstall the port, remove DEFAULT_VERSIONS=ssl=base or > undefine WITH_OPENSSL_BASE. > *** Error code 1 > > Meantime, openssl-1.1.1 is needed by multiple other ports and cannod > be deinstalled. > And if I force building cyrus-sasl2 with base openssl using SSL > option that was rolled back, > it STILL does not help. > > You can easily repeat the problem using recent ports tree and recent > stable/11 and handbook-recommended way. > And why can't you use the mail/sendmail port with the SSL options set the same as for other ports? -- Ian From owner-svn-src-head@freebsd.org Sun Mar 1 20:19:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B6FC24B7FE; Sun, 1 Mar 2020 20:19:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vvky6tRxz44T7; Sun, 1 Mar 2020 20:19:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3F138FF3; Sun, 1 Mar 2020 20:19:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021KJcu8083068; Sun, 1 Mar 2020 20:19:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021KJcIC083067; Sun, 1 Mar 2020 20:19:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003012019.021KJcIC083067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 1 Mar 2020 20:19:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358498 - head/tools/tools/controlelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/tools/controlelf X-SVN-Commit-Revision: 358498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 20:19:39 -0000 Author: emaste Date: Sun Mar 1 20:19:38 2020 New Revision: 358498 URL: https://svnweb.freebsd.org/changeset/base/358498 Log: controlelf: fix indentation for larger flags Sponsored by: The FreeBSD Foundation Modified: head/tools/tools/controlelf/controlelf.c Modified: head/tools/tools/controlelf/controlelf.c ============================================================================== --- head/tools/tools/controlelf/controlelf.c Sun Mar 1 19:15:03 2020 (r358497) +++ head/tools/tools/controlelf/controlelf.c Sun Mar 1 20:19:38 2020 (r358498) @@ -273,7 +273,7 @@ print_features(void) printf("Known features are:\n"); for (i = 0; i < nitems(featurelist); ++i) - printf("%s\t\t %s\n", featurelist[i].alias, + printf("%-16s%s\n", featurelist[i].alias, featurelist[i].desc); } @@ -289,7 +289,7 @@ print_file_features(Elf *elf, int phcount, int fd, cha printf("File '%s' features:\n", filename); for (i = 0; i < nitems(featurelist); ++i) { - printf("%s\t\t'%s' is ", featurelist[i].alias, + printf("%-16s'%s' is ", featurelist[i].alias, featurelist[i].desc); if ((featurelist[i].value & features) == 0) From owner-svn-src-head@freebsd.org Sun Mar 1 20:23:56 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 325DA24BAA4 for ; Sun, 1 Mar 2020 20:23:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vvqt3d4Rz4GcN for ; Sun, 1 Mar 2020 20:23:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x735.google.com with SMTP id q18so8155717qki.10 for ; Sun, 01 Mar 2020 12:23:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=so2ELDTt4IihVyXaLxkOY0aKxRtO5juM+nd46W/m1no=; b=EEupJ5k+S8o0cRLSBL3bSHZku3pAIB4UiMykmsZID1CVwRZPIsMUwsVUQz90lVOQZG UxtTID/T0jCuyuJwXJmm8HSfpgNozpz6RDI1jgk7vB45ROQVh1rRGlKqTi4yC/Tpe98m lElLswCoHj/T2m5Uq4LBKEQOM6jIgXTT8Mh43+J8xmAjMAqC9Xy/g1DKmTvlRU1Otlg0 WSMPSg1OZyQGjAw3QBKsSQhwICWn0WSyOuUEYgiX7/a8b6NZd24sr9dqmV+FKKy/2Q/p DU7WhlMT5cPGLr9Nqa5rEAP+qiPEQ0VGV/kwu5ECU/k9BpFTJULQG/4uHsTYvku6JGEq 6XpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=so2ELDTt4IihVyXaLxkOY0aKxRtO5juM+nd46W/m1no=; b=qSphdQtxZauBxoD2TRwkkckJhMiV87s4eFmfJ8as9EjG8Qht01flnEh8xAMNCNagDR 1CwjaMgeeLh6MPbOkaMrwpM1Oe8rillq0n/ZgZ8OnWBWxtM6gUewb4on55BlPJXhQQei swlg7t04VN8kSd0XhfKhfXr8JcEGQ3aCMLWxbChhpHPH7MK3T1QdQ7wYXkkMctzPV2K+ y7Aqbu1TC82ln7P7XC2pGQZSE1j7qyThGfrOKOIyvGtvAZWfvtK2GgGwRAoqyGxVn5LJ 1r2fVXtmRZxZ0EokFOUAq7uFU8zI0tt2KA5rGRJ2E+de5EGGQaBJqMRcJbyiUFcppb+B VLPQ== X-Gm-Message-State: APjAAAWZX3TUqyTvtBRnfLXfRObxsP65fY5IOCT5S9C9L27Z8rEJEqI/ REjiOstfMgS0AmUK8kbXpi4HKHHKRnkvKx4Fk6l+1w== X-Google-Smtp-Source: APXvYqzrp3zVZVukopCRpnY+15XuXnCC8XBwL2SW4Gzg6aVcY5oxLaMsfBWrkSn8qdlooAZ5Dp/aV7J8xOo3Yxfy2Do= X-Received: by 2002:a37:993:: with SMTP id 141mr12204351qkj.240.1583094232934; Sun, 01 Mar 2020 12:23:52 -0800 (PST) MIME-Version: 1.0 References: <202003011915.021JF3bW047048@repo.freebsd.org> In-Reply-To: <202003011915.021JF3bW047048@repo.freebsd.org> From: Warner Losh Date: Sun, 1 Mar 2020 13:23:42 -0700 Message-ID: Subject: Re: svn commit: r358497 - in head: . share/man/man4 sys/conf sys/dev/bktr sys/modules sys/modules/bktr sys/modules/bktr/bktr sys/modules/bktr/bktr_mem sys/sys To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48Vvqt3d4Rz4GcN X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=EEupJ5k+; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::735) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.56 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[5.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.56)[ip: (-9.23), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 20:23:56 -0000 This broke installworld... Testing a fix now... Today is not my day :( Warner On Sun, Mar 1, 2020 at 12:15 PM Warner Losh wrote: > Author: imp > Date: Sun Mar 1 19:15:03 2020 > New Revision: 358497 > URL: https://svnweb.freebsd.org/changeset/base/358497 > > Log: > Remove bktr(4) > > Remove the brooktree driver as discussed on arch@. Bump FreeBSD version > to > 1300082, though I doubt anything will care. > > Relnote: yes > > Deleted: > head/share/man/man4/bktr.4 > head/sys/dev/bktr/CHANGELOG.TXT > head/sys/dev/bktr/bktr_audio.c > head/sys/dev/bktr/bktr_audio.h > head/sys/dev/bktr/bktr_card.c > head/sys/dev/bktr/bktr_card.h > head/sys/dev/bktr/bktr_core.c > head/sys/dev/bktr/bktr_core.h > head/sys/dev/bktr/bktr_i2c.c > head/sys/dev/bktr/bktr_i2c.h > head/sys/dev/bktr/bktr_mem.c > head/sys/dev/bktr/bktr_mem.h > head/sys/dev/bktr/bktr_os.c > head/sys/dev/bktr/bktr_os.h > head/sys/dev/bktr/bktr_reg.h > head/sys/dev/bktr/bktr_tuner.c > head/sys/dev/bktr/bktr_tuner.h > head/sys/dev/bktr/ioctl_bt848.h > head/sys/dev/bktr/ioctl_meteor.h > head/sys/dev/bktr/msp34xx.c > head/sys/modules/bktr/Makefile > head/sys/modules/bktr/Makefile.inc > head/sys/modules/bktr/bktr/Makefile > head/sys/modules/bktr/bktr_mem/Makefile > Modified: > head/UPDATING > head/share/man/man4/Makefile > head/sys/conf/files > head/sys/modules/Makefile > head/sys/sys/param.h > > Modified: head/UPDATING > > ============================================================================== > --- head/UPDATING Sun Mar 1 18:55:59 2020 (r358496) > +++ head/UPDATING Sun Mar 1 19:15:03 2020 (r358497) > @@ -26,6 +26,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: > disable the most expensive debugging functionality run > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > > +20200301: > + Removed brooktree driver (bktr.4) from the tree. > + > 20200229: > The WITH_GPL_DTC option has been removed. The BSD-licenced device > tree > compiler in usr.bin/dtc is used on all architectures which use > dtc, and > > Modified: head/share/man/man4/Makefile > > ============================================================================== > --- head/share/man/man4/Makefile Sun Mar 1 18:55:59 2020 > (r358496) > +++ head/share/man/man4/Makefile Sun Mar 1 19:15:03 2020 > (r358497) > @@ -79,7 +79,6 @@ MAN= aac.4 \ > bhnd_pmu.4 \ > bhndb.4 \ > bhndb_pci.4 \ > - bktr.4 \ > blackhole.4 \ > bnxt.4 \ > bpf.4 \ > @@ -601,7 +600,6 @@ MLINKS+=axe.4 if_axe.4 > MLINKS+=bce.4 if_bce.4 > MLINKS+=bfe.4 if_bfe.4 > MLINKS+=bge.4 if_bge.4 > -MLINKS+=bktr.4 brooktree.4 > MLINKS+=bnxt.4 if_bnxt.4 > MLINKS+=bridge.4 if_bridge.4 > MLINKS+=bwi.4 if_bwi.4 > > Modified: head/sys/conf/files > > ============================================================================== > --- head/sys/conf/files Sun Mar 1 18:55:59 2020 (r358496) > +++ head/sys/conf/files Sun Mar 1 19:15:03 2020 (r358497) > @@ -1335,13 +1335,6 @@ dev/bhnd/siba/siba_bhndb.c optional > siba bhnd bhndb > dev/bhnd/siba/siba_erom.c optional siba bhnd > dev/bhnd/siba/siba_subr.c optional siba bhnd > # > -dev/bktr/bktr_audio.c optional bktr pci > -dev/bktr/bktr_card.c optional bktr pci > -dev/bktr/bktr_core.c optional bktr pci > -dev/bktr/bktr_i2c.c optional bktr pci smbus > -dev/bktr/bktr_os.c optional bktr pci > -dev/bktr/bktr_tuner.c optional bktr pci > -dev/bktr/msp34xx.c optional bktr pci > dev/bnxt/bnxt_hwrm.c optional bnxt iflib pci > dev/bnxt/bnxt_sysctl.c optional bnxt iflib pci > dev/bnxt/bnxt_txrx.c optional bnxt iflib pci > > Modified: head/sys/modules/Makefile > > ============================================================================== > --- head/sys/modules/Makefile Sun Mar 1 18:55:59 2020 (r358496) > +++ head/sys/modules/Makefile Sun Mar 1 19:15:03 2020 (r358497) > @@ -67,7 +67,6 @@ SUBDIR= \ > bhnd \ > ${_bxe} \ > ${_bios} \ > - ${_bktr} \ > ${_blake2} \ > bnxt \ > bridgestp \ > @@ -583,7 +582,6 @@ _agp= agp > _an= an > _aout= aout > _bios= bios > -_bktr= bktr > .if ${MK_SOURCELESS_UCODE} != "no" > _bxe= bxe > .endif > > Modified: head/sys/sys/param.h > > ============================================================================== > --- head/sys/sys/param.h Sun Mar 1 18:55:59 2020 (r358496) > +++ head/sys/sys/param.h Sun Mar 1 19:15:03 2020 (r358497) > @@ -60,7 +60,7 @@ > * in the range 5 to 9. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1300081 /* Master, propagated to newvers */ > +#define __FreeBSD_version 1300082 /* Master, propagated to newvers */ > > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of > FreeBSD, > From owner-svn-src-head@freebsd.org Sun Mar 1 20:25:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A262124BB72; Sun, 1 Mar 2020 20:25:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VvtG2bNcz4M3V; Sun, 1 Mar 2020 20:25:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 492FE91B6; Sun, 1 Mar 2020 20:25:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021KPwXv088701; Sun, 1 Mar 2020 20:25:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021KPw4F088700; Sun, 1 Mar 2020 20:25:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003012025.021KPw4F088700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 1 Mar 2020 20:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358499 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 20:25:58 -0000 Author: emaste Date: Sun Mar 1 20:25:57 2020 New Revision: 358499 URL: https://svnweb.freebsd.org/changeset/base/358499 Log: readelf: add PROTMAX_DISABLE and STKGAP_DISABLE From r349609 (PROTMAX_DISABLE) and r354790 (STKGAP_DISABLE). Commited upstream (in a slightly different form) as r3831. Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Sun Mar 1 20:19:38 2020 (r358498) +++ head/contrib/elftoolchain/readelf/readelf.c Sun Mar 1 20:25:57 2020 (r358499) @@ -3669,6 +3669,8 @@ dump_notes(struct readelf *re) static struct flag_desc note_feature_ctl_flags[] = { { NT_FREEBSD_FCTL_ASLR_DISABLE, "ASLR_DISABLE" }, + { NT_FREEBSD_FCTL_PROTMAX_DISABLE, "PROTMAX_DISABLE" }, + { NT_FREEBSD_FCTL_STKGAP_DISABLE, "STKGAP_DISABLE" }, { 0, NULL } }; From owner-svn-src-head@freebsd.org Sun Mar 1 20:37:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A71D24BE75; Sun, 1 Mar 2020 20:37:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vw7r5wfZz3JRn; Sun, 1 Mar 2020 20:37:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5BDF937B; Sun, 1 Mar 2020 20:37:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021Kbi4q095082; Sun, 1 Mar 2020 20:37:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021KbhtQ095074; Sun, 1 Mar 2020 20:37:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003012037.021KbhtQ095074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 20:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358500 - in head: . etc/mtree include sys/conf sys/i386/include sys/powerpc/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . etc/mtree include sys/conf sys/i386/include sys/powerpc/conf X-SVN-Commit-Revision: 358500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 20:37:45 -0000 Author: imp Date: Sun Mar 1 20:37:42 2020 New Revision: 358500 URL: https://svnweb.freebsd.org/changeset/base/358500 Log: Finish removal of bktr Remove the old ioctl .h files Remove copying/linking ioctl .h files in instasllworld Remove bktr from lint Add now-removed files with ObsoleteFiles Deleted: head/sys/i386/include/ioctl_bt848.h head/sys/i386/include/ioctl_meteor.h Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.include.dist head/include/Makefile head/sys/conf/NOTES head/sys/conf/options head/sys/powerpc/conf/NOTES Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 1 20:25:57 2020 (r358499) +++ head/ObsoleteFiles.inc Sun Mar 1 20:37:42 2020 (r358500) @@ -36,6 +36,15 @@ # xargs -n1 | sort | uniq -d; # done +# 20200301: bktr removed +OLD_DIRS+=usr/include/dev/bktr +OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h +OLD_FILES+=usr/include/dev/bktr/ioctl_meteor.h +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/ioctl_bktr.h +OLD_FILES+=usr/include/machine/ioctl_meteor.h +.endif +OLD_FILES+=usr/share/man/man4/bktr.4.gz # 20200229: GCC 4.2.1 removed .if !defined(WITH_PORT_BASE_GCC) OLD_FILES+=usr/bin/g++ Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Sun Mar 1 20:25:57 2020 (r358499) +++ head/etc/mtree/BSD.include.dist Sun Mar 1 20:37:42 2020 (r358500) @@ -46,8 +46,6 @@ .. an .. - bktr - .. ciss .. evdev Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Mar 1 20:25:57 2020 (r358499) +++ head/include/Makefile Sun Mar 1 20:37:42 2020 (r358500) @@ -43,7 +43,7 @@ LDIRS= bsm cam geom net net80211 netgraph netinet neti netipsec netsmb nfs nfsclient nfsserver sys vm LSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \ - dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \ + dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ @@ -158,7 +158,7 @@ copies: .PHONY .META done; \ fi .endfor -.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS} +.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hyperv:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS} cd ${SRCTOP}/sys; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ ${SDESTDIR}${INCLUDEDIR}/$i @@ -171,9 +171,6 @@ copies: .PHONY .META cd ${SRCTOP}/sys/dev/agp; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \ ${SDESTDIR}${INCLUDEDIR}/dev/agp - cd ${SRCTOP}/sys/dev/bktr; \ - ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \ - ${SDESTDIR}${INCLUDEDIR}/dev/bktr cd ${SRCTOP}/sys/dev/evdev; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 input.h \ ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \ @@ -261,7 +258,7 @@ symlinks: .PHONY .META ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \ done .endfor -.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/pci:Ndev/veriexec} +.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hyperv:Ndev/pci:Ndev/veriexec} cd ${SRCTOP}/sys/$i; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \ @@ -276,11 +273,6 @@ symlinks: .PHONY .META for h in agpreg.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/agp/$$h \ ${SDESTDIR}${INCLUDEDIR}/dev/agp; \ - done - cd ${SRCTOP}/sys/dev/bktr; \ - for h in ioctl_*.h; do \ - ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/bktr/$$h \ - ${SDESTDIR}${INCLUDEDIR}/dev/bktr; \ done cd ${SRCTOP}/sys/dev/evdev; \ for h in input.h input-event-codes.h uinput.h; do \ Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Mar 1 20:25:57 2020 (r358499) +++ head/sys/conf/NOTES Sun Mar 1 20:37:42 2020 (r358500) @@ -2172,73 +2172,11 @@ options SND_OLDSTEREO # # Miscellaneous hardware: # -# bktr: Brooktree bt848/848a/849a/878/879 video capture and TV Tuner board # cmx: OmniKey CardMan 4040 pccard smartcard reader device cmx # -# The 'bktr' device is a PCI video capture device using the Brooktree -# bt848/bt848a/bt849a/bt878/bt879 chipset. When used with a TV Tuner it forms a -# TV card, e.g. Miro PC/TV, Hauppauge WinCast/TV WinTV, VideoLogic Captivator, -# Intel Smart Video III, AverMedia, IMS Turbo, FlyVideo. -# -# options OVERRIDE_CARD=xxx -# options OVERRIDE_TUNER=xxx -# options OVERRIDE_MSP=1 -# options OVERRIDE_DBX=1 -# These options can be used to override the auto detection -# The current values for xxx are found in src/sys/dev/bktr/bktr_card.h -# Using sysctl(8) run-time overrides on a per-card basis can be made -# -# options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_PAL -# or -# options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC -# Specifies the default video capture mode. -# This is required for Dual Crystal (28&35MHz) boards where PAL is used -# to prevent hangs during initialization, e.g. VideoLogic Captivator PCI. -# -# options BKTR_USE_PLL -# This is required for PAL or SECAM boards with a 28MHz crystal and no 35MHz -# crystal, e.g. some new Bt878 cards. -# -# options BKTR_GPIO_ACCESS -# This enables IOCTLs which give user level access to the GPIO port. -# -# options BKTR_NO_MSP_RESET -# Prevents the MSP34xx reset. Good if you initialize the MSP in another OS first -# -# options BKTR_430_FX_MODE -# Switch Bt878/879 cards into Intel 430FX chipset compatibility mode. -# -# options BKTR_SIS_VIA_MODE -# Switch Bt878/879 cards into SIS/VIA chipset compatibility mode which is -# needed for some old SiS and VIA chipset motherboards. -# This also allows Bt878/879 chips to work on old OPTi (<1997) chipset -# motherboards and motherboards with bad or incomplete PCI 2.1 support. -# As a rough guess, old = before 1998 -# -# options BKTR_NEW_MSP34XX_DRIVER -# Use new, more complete initialization scheme for the msp34* soundchip. -# Should fix stereo autodetection if the old driver does only output -# mono sound. - -# -# options BKTR_USE_FREEBSD_SMBUS -# Compile with FreeBSD SMBus implementation -# -# Brooktree driver has been ported to the new I2C framework. Thus, -# you'll need to have the following 3 lines in the kernel config. -# device smbus -# device iicbus -# device iicbb -# device iicsmb -# The iic and smb devices are only needed if you want to control other -# I2C slaves connected to the external connector of some cards. -# -device bktr - -# # PC Card/PCMCIA and Cardbus # # cbb: pci/cardbus bridge implementing YENTA interface @@ -2271,7 +2209,6 @@ device sdhci # # Supported SMB interfaces: # iicsmb I2C to SMB bridge with any iicbus interface -# bktr brooktree848 I2C hardware interface # intpm Intel PIIX4 (82371AB, 82443MX) Power Management Unit # alpm Acer Aladdin-IV/V/Pro2 Power Management Unit # ichsmb Intel ICH SMBus controller chips (82801AA, 82801AB, 82801BA) @@ -2312,11 +2249,8 @@ device jedec_dimm # iicsmb i2c to smb bridge. Allow i2c i/o with smb commands. # iicoc simple polling driver for OpenCores I2C controller # -# Supported interfaces: -# bktr brooktree848 I2C software interface -# # Other: -# iicbb generic I2C bit-banging code (needed by lpbb, bktr) +# iicbb generic I2C bit-banging code (needed by lpbb) # device iicbus # Bus support, required for ic/iic/iicsmb below. device iicbb # bitbang driver; implements i2c on a pair of gpio pins Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Mar 1 20:25:57 2020 (r358499) +++ head/sys/conf/options Sun Mar 1 20:37:42 2020 (r358500) @@ -645,27 +645,6 @@ NFS_DEBUG opt_nfs.h # TMPFS options TMPFS_PAGES_MINRESERVED opt_tmpfs.h -# For the Bt848/Bt848A/Bt849/Bt878/Bt879 driver -OVERRIDE_CARD opt_bktr.h -OVERRIDE_TUNER opt_bktr.h -OVERRIDE_DBX opt_bktr.h -OVERRIDE_MSP opt_bktr.h -BROOKTREE_SYSTEM_DEFAULT opt_bktr.h -BROOKTREE_ALLOC_PAGES opt_bktr.h -BKTR_OVERRIDE_CARD opt_bktr.h -BKTR_OVERRIDE_TUNER opt_bktr.h -BKTR_OVERRIDE_DBX opt_bktr.h -BKTR_OVERRIDE_MSP opt_bktr.h -BKTR_SYSTEM_DEFAULT opt_bktr.h -BKTR_ALLOC_PAGES opt_bktr.h -BKTR_USE_PLL opt_bktr.h -BKTR_GPIO_ACCESS opt_bktr.h -BKTR_NO_MSP_RESET opt_bktr.h -BKTR_430_FX_MODE opt_bktr.h -BKTR_SIS_VIA_MODE opt_bktr.h -BKTR_USE_FREEBSD_SMBUS opt_bktr.h -BKTR_NEW_MSP34XX_DRIVER opt_bktr.h - # Options for uart(4) UART_PPS_ON_CTS opt_uart.h UART_POLL_FREQ opt_uart.h Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Sun Mar 1 20:25:57 2020 (r358499) +++ head/sys/powerpc/conf/NOTES Sun Mar 1 20:37:42 2020 (r358500) @@ -72,7 +72,6 @@ device adm1030 # Apple G4 MDD fan controller ##################################################################### # Devices we don't want to deal with -nodevice bktr nodevice ccr nodevice cxgbe # XXX: builds on powerpc64 only. nodevice cxgbev From owner-svn-src-head@freebsd.org Sun Mar 1 20:40:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5929F24BF15 for ; Sun, 1 Mar 2020 20:40:06 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VwBY1QSVz3Jky; Sun, 1 Mar 2020 20:40:04 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 021KdrAo032620 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 1 Mar 2020 20:39:54 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: ian@freebsd.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 021KdqBN008874 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 2 Mar 2020 03:39:52 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Ian Lepore , Hajimu UMEMOTO References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> <3f6459f56fa20a76895cc4890435ade49ee24874.camel@freebsd.org> Cc: Jung-uk Kim , src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: Date: Mon, 2 Mar 2020 03:39:40 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <3f6459f56fa20a76895cc4890435ade49ee24874.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48VwBY1QSVz3Jky X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.84)[ip: (-5.09), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.55), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 20:40:06 -0000 02.03.2020 3:07, Ian Lepore wrote: >> You can easily repeat the problem using recent ports tree and recent >> stable/11 and handbook-recommended way. >> > > And why can't you use the mail/sendmail port with the SSL options set > the same as for other ports? That's not about possible work-arounds that are numerous. That's about our Handbook and fixing what was not broken before. From owner-svn-src-head@freebsd.org Sun Mar 1 20:46:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3BDD824C28B for ; Sun, 1 Mar 2020 20:46:43 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48VwLB3TyYz41dm for ; Sun, 1 Mar 2020 20:46:42 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1583095600; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=qSKEUu0Jbc52ccFYwHtReTjA0S99hhyipFFgUdLZnSkuYDJG8VAWQDmWzTQFg/arrb6wIfvKCSUWT a98JV1tLWHnSpYZRJKgsyEOSNU84lAJiD8dy/E+QRN35OpOpUDEcQWL2z5vmhcGX1TBmh80OnXdQ7v ArzlHt+iuwtfOB0xUk3G9PsO7gHVdWUPxbdBZF6mgovPd6PpRAQyjAPje3ZXtCW5oMwHq7IzUZQH2D 6q5GaB9szvbVLLjP9YnsUE+AlS10FXJ0pPW/9CllpI36VdGZc5fMfk2gpLces7ZlvIbeJM47VrJ0Nz jq7z7m0x7dlJLa+MJfd1XsYVBcpvLwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=Ik4kNo5Toi4z+hDlvVM4MaHNEu5h7SPmZr9buJOqjAM=; b=C9Ra0YfgX9aHi7JYy2W59a9C0PZxFUOFwP3/7LKL9zavRUi74qt3bxpyzjTcBSmNDfU1E3JVHPYS5 27wcfqTNvsYfS6eM1FiTuuXeVeiii0LtLWcG43+UZlBCSWdC+D4kUbZIQAQM1aP6ABZPs4s8OxEPm4 nUsnwfWcJv+elRvXs61KRy7/cYAKbTnRUDi8N+p0YvfharfoDagNgZL+TC01UlQhJfa0+2foxWreIt 9wnzMJWHzEgUMEbBRC2cIQrgExeml6k8+h6dm+m3c364UGOUHp7EKoa/97ONG0w8hYcVrRDZYda0XC noZjNo99ng0taEAEw7SMTxjXFnxZdxA== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=Ik4kNo5Toi4z+hDlvVM4MaHNEu5h7SPmZr9buJOqjAM=; b=qA7k7c0t3rGddpsTRh7q4Kx5I/BQxXrWN+WYuYzfviwX6LF0Re8x1f4ZWJ5nz5osXAYR9Mk7s6KUs 5MLTJHqRl+FRcO3CgKPkOTw4yzxU23R/TON4C2row7DZa8DMiFEodScqpTYj0nWi4w2UOoFBbmJEEe msfUIYauTpJYrIovc71ERKHpH9rV+uu9d98rplbIebN+UEVrEcoSxiABmZ6yWx7CdnHVFZ6TuOCNSv wFAbea4SI2eeBWMG2S1BzJ3foNZI7gLI+V/t2CYD6Wb1DduLn/J1TMeNxtZ6fiPNfAo9eFNCn+5Wda gG1JO9Io0zGE3VM2QniwvCv+IExsXKg== X-MHO-RoutePath: aGlwcGll X-MHO-User: bebd336a-5bfd-11ea-9eb3-25e2dfa9fa8d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id bebd336a-5bfd-11ea-9eb3-25e2dfa9fa8d; Sun, 01 Mar 2020 20:46:39 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 021KkbGr009299; Sun, 1 Mar 2020 13:46:37 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r358411 - head/contrib/sendmail/src From: Ian Lepore To: Eugene Grosbein Cc: src-committers@freebsd.org, svn-src-head@freebsd.org Date: Sun, 01 Mar 2020 13:46:37 -0700 In-Reply-To: References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> <3f6459f56fa20a76895cc4890435ade49ee24874.camel@freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48VwLB3TyYz41dm X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.69 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.70)[-0.696,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 20:46:43 -0000 On Mon, 2020-03-02 at 03:39 +0700, Eugene Grosbein wrote: > 02.03.2020 3:07, Ian Lepore wrote: > > > > You can easily repeat the problem using recent ports tree and > > > recent > > > stable/11 and handbook-recommended way. > > > > > > > And why can't you use the mail/sendmail port with the SSL options > > set > > the same as for other ports? > > That's not about possible work-arounds that are numerous. > That's about our Handbook and fixing what was not broken before. > Oh, so you're not actually looking for a solution, you just want to complain until somebody acknowledges your "pain" in having to change something. I mean... it can't be about inaccuracy in the handbook, because that also is totally within your power to fix. -- Ian From owner-svn-src-head@freebsd.org Sun Mar 1 20:52:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F014D24C5D6 for ; Sun, 1 Mar 2020 20:52:47 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VwTB53jKz47HJ; Sun, 1 Mar 2020 20:52:46 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 021KqaZS032834 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 1 Mar 2020 20:52:39 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: ian@freebsd.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 021KqYgY008954 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 2 Mar 2020 03:52:34 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Ian Lepore References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> <3f6459f56fa20a76895cc4890435ade49ee24874.camel@freebsd.org> Cc: src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <55111827-b4e5-73a9-b054-5e4cfbc80e8e@grosbein.net> Date: Mon, 2 Mar 2020 03:52:22 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48VwTB53jKz47HJ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.84)[ip: (-5.10), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.55), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 20:52:48 -0000 02.03.2020 3:46, Ian Lepore wrote: > On Mon, 2020-03-02 at 03:39 +0700, Eugene Grosbein wrote: >> 02.03.2020 3:07, Ian Lepore wrote: >> >>>> You can easily repeat the problem using recent ports tree and >>>> recent >>>> stable/11 and handbook-recommended way. >>>> >>> >>> And why can't you use the mail/sendmail port with the SSL options >>> set >>> the same as for other ports? >> >> That's not about possible work-arounds that are numerous. >> That's about our Handbook and fixing what was not broken before. >> > > Oh, so you're not actually looking for a solution, you just want to > complain until somebody acknowledges your "pain" in having to change > something. I mean... it can't be about inaccuracy in the handbook, > because that also is totally within your power to fix. I suggested possible solution with my first post in this thread, for discussion. And I cannot fix the Handbook due to multiple reasons (no doc commit bit, not native English speaker). But mainly because "the solution" should be discussed first. From owner-svn-src-head@freebsd.org Sun Mar 1 21:25:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E11E724E6DD; Sun, 1 Mar 2020 21:25:45 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VxCD0dYSz4D3D; Sun, 1 Mar 2020 21:25:43 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x744.google.com with SMTP id p62so5543748qkb.0; Sun, 01 Mar 2020 13:25:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4rL2QP/EfFgR9rSwEwTKa284KgKHwHCOEGFSe4rlJn4=; b=PHqtntCl4tt7kW5nkd9owRzJiYFSt0/tI8z04vgqcbQfrx3XNTBad3QpCPGKQaGnWu TFHR5f2hz0ndEmqVeYQ9LFLEKpoB8m258qeEAYbAl0N7/kKjX4Wv+8EWDMF0uIlcRxHK BjorC556ampAPm/AitG3UgRGF3/cA1O0bBNEtEVsFpTcESqHs0crIAnFwlsk9O3hqVZ7 HKwr6NF7Z22enwEu2ikijCkdmP+uR4wnRKnPVlDKNEk/nxeEJ++4e+hIk2OynVtJ1Wnj Tk1hrtpB98LZ0ujapTANErMcf+AkA5kydr9VHyBDJ0opC7h13QQVuUjURKwO4O3u5jxb CDqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=4rL2QP/EfFgR9rSwEwTKa284KgKHwHCOEGFSe4rlJn4=; b=ELzKmlGBjv8jMck5eeRniGdBIrLtyj54nABqovxDgXCbLrvqb5kkUkC02Jx0diIAxF xf+G6SiatdsChtqNPX9CleohYoiqWjyE6/R9KYZNAGXfzGuBpFD+ho/6kDkv31UwS7V3 I+PYHVMrGQpICKAMzmH9XAuYPcsJktovtoaUJ4hu0n7k8VFYnZQkpD9Hh4pJXjQ/bbyR bkncSKICAHFER8665Ta+U16c8u/0mGUS8wX9uUgtBN4RQENR40sl4wJ0vsYgquPpSiAK /zemuHo5xYvyhalTvg8ONfWOLZg9GKFBle1swafxqxgTKpS3uP2stvCAGkfRzE/Zn8xu YFCQ== X-Gm-Message-State: APjAAAV+SO4rXAX9xNPAV/GEwzMnleRgYNO5zdVS+0IWmdGTC1tOriZg NuYxHFugXzhoW+26ADRSjchLdpdc X-Google-Smtp-Source: APXvYqy/cSOuOsNtbrCjeArmcMgvI8S4iTODRjpHaX9gdw033FYVMQtOHQga9bVrCf8d295uInBtiA== X-Received: by 2002:a37:a8c3:: with SMTP id r186mr13176613qke.37.1583097943057; Sun, 01 Mar 2020 13:25:43 -0800 (PST) Received: from raichu (toroon0560w-lp130-11-70-50-21-248.dsl.bell.ca. [70.50.21.248]) by smtp.gmail.com with ESMTPSA id u49sm7846859qtj.42.2020.03.01.13.25.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 13:25:42 -0800 (PST) Sender: Mark Johnston Date: Sun, 1 Mar 2020 16:25:37 -0500 From: Mark Johnston To: Emmanuel Vadot Cc: Jeff Roberson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Jan Beich Subject: Re: svn commit: r358363 - head/sys/vm Message-ID: <20200301212537.GA33873@raichu> References: <202002270237.01R2bRLJ023799@repo.freebsd.org> <20200229212411.1e6aed2d49d6644937b78452@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200229212411.1e6aed2d49d6644937b78452@bidouilliste.com> X-Rspamd-Queue-Id: 48VxCD0dYSz4D3D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=PHqtntCl; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::744 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.08 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[4.4.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.39)[ip: (1.63), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 21:25:46 -0000 On Sat, Feb 29, 2020 at 09:24:11PM +0100, Emmanuel Vadot wrote: > > Hi Jeff, > > On Thu, 27 Feb 2020 02:37:27 +0000 (UTC) > Jeff Roberson wrote: > > > Author: jeff > > Date: Thu Feb 27 02:37:27 2020 > > New Revision: 358363 > > URL: https://svnweb.freebsd.org/changeset/base/358363 > > > > Log: > > Add unlocked grab* function variants that use lockless radix code to > > lookup pages. These variants will fall back to their locked counterparts > > if the page is not present. > > > > Discussed with: kib, markj > > Differential Revision: https://reviews.freebsd.org/D23449 > > > > Modified: > > head/sys/vm/vm_page.c > > head/sys/vm/vm_page.h > > > > We're (jbeich@ and me) seeing wired memory leak since this commit. > A simple way to reproduce is to have drm-kmod (either 4.16 or 5.0) and > liba-intel-driver/libva-intel-media-driver and start mpv in a loop : > > while mpv --hwdec=vaapi --start=10.0 --end=10.1 /path/to/file ; do > done > > Reverting this commit on one of my test machine shows that this is the > culprit. > If you need anymore info/debug let me know. > > Thanks. Could you give this patch a try? diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 9d50881ed27e..41e7a5bb3099 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -4535,7 +4535,8 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, int al (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0, ("vm_page_grab_valid: Invalid flags 0x%X", allocflags)); VM_OBJECT_ASSERT_WLOCKED(object); - pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY); + pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY | + VM_ALLOC_WIRED); pflags |= VM_ALLOC_WAITFAIL; retrylookup: From owner-svn-src-head@freebsd.org Sun Mar 1 21:49:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51EA724EDFF; Sun, 1 Mar 2020 21:49:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VxkP0NL2z4GQf; Sun, 1 Mar 2020 21:49:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE65AA1E6; Sun, 1 Mar 2020 21:49:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021LnGnu037194; Sun, 1 Mar 2020 21:49:16 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021LnGI1037193; Sun, 1 Mar 2020 21:49:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003012149.021LnGI1037193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 1 Mar 2020 21:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358501 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 21:49:17 -0000 Author: mjg Date: Sun Mar 1 21:49:16 2020 New Revision: 358501 URL: https://svnweb.freebsd.org/changeset/base/358501 Log: vm: add debug to uma_zone_set_smr Reviewed by: markj, rlibby Differential Revision: https://reviews.freebsd.org/D23902 Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Mar 1 20:37:42 2020 (r358500) +++ head/sys/vm/uma_core.c Sun Mar 1 21:49:16 2020 (r358501) @@ -4659,6 +4659,9 @@ uma_zone_set_smr(uma_zone_t zone, smr_t smr) ZONE_ASSERT_COLD(zone); + KASSERT(smr != NULL, ("Got NULL smr")); + KASSERT((zone->uz_flags & UMA_ZONE_SMR) == 0, + ("zone %p (%s) already uses SMR", zone, zone->uz_name)); zone->uz_flags |= UMA_ZONE_SMR; zone->uz_smr = smr; zone_update_caches(zone); From owner-svn-src-head@freebsd.org Sun Mar 1 21:50:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A6D624EEBD; Sun, 1 Mar 2020 21:50:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VxlT53G5z4JMD; Sun, 1 Mar 2020 21:50:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7055EA1EE; Sun, 1 Mar 2020 21:50:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021LoDc9037317; Sun, 1 Mar 2020 21:50:13 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021LoDtn037316; Sun, 1 Mar 2020 21:50:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003012150.021LoDtn037316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 1 Mar 2020 21:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358502 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 21:50:14 -0000 Author: mjg Date: Sun Mar 1 21:50:13 2020 New Revision: 358502 URL: https://svnweb.freebsd.org/changeset/base/358502 Log: fd: make fgetvp_rights work without the filedesc lock Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23883 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Mar 1 21:49:16 2020 (r358501) +++ head/sys/kern/kern_descrip.c Sun Mar 1 21:50:13 2020 (r358502) @@ -3028,13 +3028,11 @@ int fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp, struct filecaps *havecaps, struct vnode **vpp) { - struct filedesc *fdp; struct filecaps caps; struct file *fp; int error; - fdp = td->td_proc->p_fd; - error = fget_cap_locked(fdp, fd, needrightsp, &fp, &caps); + error = fget_cap(td, fd, needrightsp, &fp, &caps); if (error != 0) return (error); if (fp->f_ops == &badfileops) { @@ -3049,10 +3047,12 @@ fgetvp_rights(struct thread *td, int fd, cap_rights_t *havecaps = caps; *vpp = fp->f_vnode; vrefact(*vpp); + fdrop(fp, td); return (0); out: filecaps_free(&caps); + fdrop(fp, td); return (error); } From owner-svn-src-head@freebsd.org Sun Mar 1 21:53:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83FA024F4F3; Sun, 1 Mar 2020 21:53:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vxqd0qskz4R3F; Sun, 1 Mar 2020 21:53:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBBE0A3B3; Sun, 1 Mar 2020 21:53:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021LrmN6043500; Sun, 1 Mar 2020 21:53:48 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021LrkJe043469; Sun, 1 Mar 2020 21:53:46 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003012153.021LrkJe043469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 1 Mar 2020 21:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358503 - in head: lib/libprocstat sys/compat/linprocfs sys/kern sys/security/audit sys/sys sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head: lib/libprocstat sys/compat/linprocfs sys/kern sys/security/audit sys/sys sys/ufs/ffs X-SVN-Commit-Revision: 358503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 21:53:49 -0000 Author: mjg Date: Sun Mar 1 21:53:46 2020 New Revision: 358503 URL: https://svnweb.freebsd.org/changeset/base/358503 Log: fd: move vnodes out of filedesc into a dedicated structure The new structure is copy-on-write. With the assumption that path lookups are significantly more frequent than chdirs and chrooting this is a win. This provides stable root and jail root vnodes without the need to reference them on lookup, which in turn means less work on globally shared structures. Note this also happens to fix a bug where jail vnode was never referenced, meaning subsequent access on lookup could run into use-after-free. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23884 Modified: head/lib/libprocstat/libprocstat.c head/sys/compat/linprocfs/linprocfs.c head/sys/kern/kern_descrip.c head/sys/kern/kern_linker.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_mountroot.c head/sys/security/audit/audit_bsm_klib.c head/sys/sys/filedesc.h head/sys/ufs/ffs/ffs_alloc.c Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/lib/libprocstat/libprocstat.c Sun Mar 1 21:53:46 2020 (r358503) @@ -459,6 +459,7 @@ procstat_getfiles_kvm(struct procstat *procstat, struc { struct file file; struct filedesc filed; + struct pwd pwd; struct vm_map_entry vmentry; struct vm_object object; struct vmspace vmspace; @@ -473,6 +474,7 @@ procstat_getfiles_kvm(struct procstat *procstat, struc int i, fflags; int prot, type; unsigned int nfiles; + bool haspwd; assert(procstat); kd = procstat->kd; @@ -485,6 +487,15 @@ procstat_getfiles_kvm(struct procstat *procstat, struc warnx("can't read filedesc at %p", (void *)kp->ki_fd); return (NULL); } + haspwd = false; + if (filed.fd_pwd != NULL) { + if (!kvm_read_all(kd, (unsigned long)filed.fd_pwd, &pwd, + sizeof(pwd))) { + warnx("can't read fd_pwd at %p", (void *)filed.fd_pwd); + return (NULL); + } + haspwd = true; + } /* * Allocate list head. @@ -495,25 +506,27 @@ procstat_getfiles_kvm(struct procstat *procstat, struc STAILQ_INIT(head); /* root directory vnode, if one. */ - if (filed.fd_rdir) { - entry = filestat_new_entry(filed.fd_rdir, PS_FST_TYPE_VNODE, -1, - PS_FST_FFLAG_READ, PS_FST_UFLAG_RDIR, 0, 0, NULL, NULL); - if (entry != NULL) - STAILQ_INSERT_TAIL(head, entry, next); - } - /* current working directory vnode. */ - if (filed.fd_cdir) { - entry = filestat_new_entry(filed.fd_cdir, PS_FST_TYPE_VNODE, -1, - PS_FST_FFLAG_READ, PS_FST_UFLAG_CDIR, 0, 0, NULL, NULL); - if (entry != NULL) - STAILQ_INSERT_TAIL(head, entry, next); - } - /* jail root, if any. */ - if (filed.fd_jdir) { - entry = filestat_new_entry(filed.fd_jdir, PS_FST_TYPE_VNODE, -1, - PS_FST_FFLAG_READ, PS_FST_UFLAG_JAIL, 0, 0, NULL, NULL); - if (entry != NULL) - STAILQ_INSERT_TAIL(head, entry, next); + if (haspwd) { + if (pwd.pwd_rdir) { + entry = filestat_new_entry(pwd.pwd_rdir, PS_FST_TYPE_VNODE, -1, + PS_FST_FFLAG_READ, PS_FST_UFLAG_RDIR, 0, 0, NULL, NULL); + if (entry != NULL) + STAILQ_INSERT_TAIL(head, entry, next); + } + /* current working directory vnode. */ + if (pwd.pwd_cdir) { + entry = filestat_new_entry(pwd.pwd_cdir, PS_FST_TYPE_VNODE, -1, + PS_FST_FFLAG_READ, PS_FST_UFLAG_CDIR, 0, 0, NULL, NULL); + if (entry != NULL) + STAILQ_INSERT_TAIL(head, entry, next); + } + /* jail root, if any. */ + if (pwd.pwd_jdir) { + entry = filestat_new_entry(pwd.pwd_jdir, PS_FST_TYPE_VNODE, -1, + PS_FST_FFLAG_READ, PS_FST_UFLAG_JAIL, 0, 0, NULL, NULL); + if (entry != NULL) + STAILQ_INSERT_TAIL(head, entry, next); + } } /* ktrace vnode, if one */ if (kp->ki_tracep) { Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/compat/linprocfs/linprocfs.c Sun Mar 1 21:53:46 2020 (r358503) @@ -1028,23 +1028,16 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) static int linprocfs_doproccwd(PFS_FILL_ARGS) { - struct filedesc *fdp; - struct vnode *vp; + struct pwd *pwd; char *fullpath = "unknown"; char *freepath = NULL; - fdp = p->p_fd; - FILEDESC_SLOCK(fdp); - vp = fdp->fd_cdir; - if (vp != NULL) - VREF(vp); - FILEDESC_SUNLOCK(fdp); - vn_fullpath(td, vp, &fullpath, &freepath); - if (vp != NULL) - vrele(vp); + pwd = pwd_hold(td); + vn_fullpath(td, pwd->pwd_cdir, &fullpath, &freepath); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); + pwd_drop(pwd); return (0); } @@ -1054,23 +1047,18 @@ linprocfs_doproccwd(PFS_FILL_ARGS) static int linprocfs_doprocroot(PFS_FILL_ARGS) { - struct filedesc *fdp; + struct pwd *pwd; struct vnode *vp; char *fullpath = "unknown"; char *freepath = NULL; - fdp = p->p_fd; - FILEDESC_SLOCK(fdp); - vp = jailed(p->p_ucred) ? fdp->fd_jdir : fdp->fd_rdir; - if (vp != NULL) - VREF(vp); - FILEDESC_SUNLOCK(fdp); + pwd = pwd_hold(td); + vp = jailed(p->p_ucred) ? pwd->pwd_jdir : pwd->pwd_rdir; vn_fullpath(td, vp, &fullpath, &freepath); - if (vp != NULL) - vrele(vp); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); + pwd_drop(pwd); return (0); } Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/kern/kern_descrip.c Sun Mar 1 21:53:46 2020 (r358503) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #include static MALLOC_DEFINE(M_FILEDESC, "filedesc", "Open file descriptor table"); +static MALLOC_DEFINE(M_PWD, "pwd", "Descriptor table vnodes"); static MALLOC_DEFINE(M_FILEDESC_TO_LEADER, "filedesc_to_leader", "file desc to leader structures"); static MALLOC_DEFINE(M_SIGIO, "sigio", "sigio structures"); @@ -116,6 +117,8 @@ static void filecaps_copy_finish(const struct filecaps static u_long *filecaps_free_prep(struct filecaps *fcaps); static void filecaps_free_finish(u_long *ioctls); +static struct pwd *pwd_alloc(void); + /* * Each process has: * @@ -314,24 +317,6 @@ fdfree(struct filedesc *fdp, int fd) fdunused(fdp, fd); } -void -pwd_ensure_dirs(void) -{ - struct filedesc *fdp; - - fdp = curproc->p_fd; - FILEDESC_XLOCK(fdp); - if (fdp->fd_cdir == NULL) { - fdp->fd_cdir = rootvnode; - vrefact(rootvnode); - } - if (fdp->fd_rdir == NULL) { - fdp->fd_rdir = rootvnode; - vrefact(rootvnode); - } - FILEDESC_XUNLOCK(fdp); -} - /* * System calls on descriptors. */ @@ -2014,22 +1999,16 @@ fdinit(struct filedesc *fdp, bool prepfiles) newfdp->fd_files = (struct fdescenttbl *)&newfdp0->fd_dfiles; newfdp->fd_files->fdt_nfiles = NDFILE; - if (fdp == NULL) + if (fdp == NULL) { + newfdp->fd_pwd = pwd_alloc(); return (newfdp); + } if (prepfiles && fdp->fd_lastfile >= newfdp->fd_nfiles) fdgrowtable(newfdp, fdp->fd_lastfile + 1); FILEDESC_SLOCK(fdp); - newfdp->fd_cdir = fdp->fd_cdir; - if (newfdp->fd_cdir) - vrefact(newfdp->fd_cdir); - newfdp->fd_rdir = fdp->fd_rdir; - if (newfdp->fd_rdir) - vrefact(newfdp->fd_rdir); - newfdp->fd_jdir = fdp->fd_jdir; - if (newfdp->fd_jdir) - vrefact(newfdp->fd_jdir); + newfdp->fd_pwd = pwd_hold_filedesc(fdp); if (!prepfiles) { FILEDESC_SUNLOCK(fdp); @@ -2327,7 +2306,7 @@ fdescfree(struct thread *td) { struct proc *p; struct filedesc *fdp; - struct vnode *cdir, *jdir, *rdir; + struct pwd *pwd; p = td->td_proc; fdp = p->p_fd; @@ -2349,20 +2328,11 @@ fdescfree(struct thread *td) return; FILEDESC_XLOCK(fdp); - cdir = fdp->fd_cdir; - fdp->fd_cdir = NULL; - rdir = fdp->fd_rdir; - fdp->fd_rdir = NULL; - jdir = fdp->fd_jdir; - fdp->fd_jdir = NULL; + pwd = fdp->fd_pwd; + pwd_set(fdp, NULL); FILEDESC_XUNLOCK(fdp); - if (cdir != NULL) - vrele(cdir); - if (rdir != NULL) - vrele(rdir); - if (jdir != NULL) - vrele(jdir); + pwd_drop(pwd); fdescfree_fds(td, fdp, 1); } @@ -2371,13 +2341,7 @@ void fdescfree_remapped(struct filedesc *fdp) { - if (fdp->fd_cdir != NULL) - vrele(fdp->fd_cdir); - if (fdp->fd_rdir != NULL) - vrele(fdp->fd_rdir); - if (fdp->fd_jdir != NULL) - vrele(fdp->fd_jdir); - + pwd_drop(fdp->fd_pwd); fdescfree_fds(curthread, fdp, 0); } @@ -3287,37 +3251,117 @@ chroot_refuse_vdir_fds(struct filedesc *fdp) return (0); } +static void +pwd_fill(struct pwd *oldpwd, struct pwd *newpwd) +{ + + if (newpwd->pwd_cdir == NULL && oldpwd->pwd_cdir != NULL) { + vrefact(oldpwd->pwd_cdir); + newpwd->pwd_cdir = oldpwd->pwd_cdir; + } + + if (newpwd->pwd_rdir == NULL && oldpwd->pwd_rdir != NULL) { + vrefact(oldpwd->pwd_rdir); + newpwd->pwd_rdir = oldpwd->pwd_rdir; + } + + if (newpwd->pwd_jdir == NULL && oldpwd->pwd_jdir != NULL) { + vrefact(oldpwd->pwd_jdir); + newpwd->pwd_jdir = oldpwd->pwd_jdir; + } +} + +struct pwd * +pwd_hold_filedesc(struct filedesc *fdp) +{ + struct pwd *pwd; + + FILEDESC_LOCK_ASSERT(fdp); + pwd = fdp->fd_pwd; + if (pwd != NULL) + refcount_acquire(&pwd->pwd_refcount); + return (pwd); +} + +struct pwd * +pwd_hold(struct thread *td) +{ + struct filedesc *fdp; + struct pwd *pwd; + + fdp = td->td_proc->p_fd; + + FILEDESC_SLOCK(fdp); + pwd = fdp->fd_pwd; + MPASS(pwd != NULL); + refcount_acquire(&pwd->pwd_refcount); + FILEDESC_SUNLOCK(fdp); + return (pwd); +} + +static struct pwd * +pwd_alloc(void) +{ + struct pwd *pwd; + + pwd = malloc(sizeof(*pwd), M_PWD, M_WAITOK | M_ZERO); + refcount_init(&pwd->pwd_refcount, 1); + return (pwd); +} + +void +pwd_drop(struct pwd *pwd) +{ + + if (!refcount_release(&pwd->pwd_refcount)) + return; + + if (pwd->pwd_cdir != NULL) + vrele(pwd->pwd_cdir); + if (pwd->pwd_rdir != NULL) + vrele(pwd->pwd_rdir); + if (pwd->pwd_jdir != NULL) + vrele(pwd->pwd_jdir); + free(pwd, M_PWD); +} + /* - * Common routine for kern_chroot() and jail_attach(). The caller is - * responsible for invoking priv_check() and mac_vnode_check_chroot() to - * authorize this operation. - */ +* Common routine for kern_chroot() and jail_attach(). The caller is +* responsible for invoking priv_check() and mac_vnode_check_chroot() to +* authorize this operation. +*/ int pwd_chroot(struct thread *td, struct vnode *vp) { struct filedesc *fdp; - struct vnode *oldvp; + struct pwd *newpwd, *oldpwd; int error; fdp = td->td_proc->p_fd; + newpwd = pwd_alloc(); FILEDESC_XLOCK(fdp); + oldpwd = fdp->fd_pwd; if (chroot_allow_open_directories == 0 || - (chroot_allow_open_directories == 1 && fdp->fd_rdir != rootvnode)) { + (chroot_allow_open_directories == 1 && + oldpwd->pwd_rdir != rootvnode)) { error = chroot_refuse_vdir_fds(fdp); if (error != 0) { FILEDESC_XUNLOCK(fdp); + pwd_drop(newpwd); return (error); } } - oldvp = fdp->fd_rdir; + vrefact(vp); - fdp->fd_rdir = vp; - if (fdp->fd_jdir == NULL) { + newpwd->pwd_rdir = vp; + if (oldpwd->pwd_jdir == NULL) { vrefact(vp); - fdp->fd_jdir = vp; + newpwd->pwd_jdir = vp; } + pwd_fill(oldpwd, newpwd); + pwd_set(fdp, newpwd); FILEDESC_XUNLOCK(fdp); - vrele(oldvp); + pwd_drop(oldpwd); return (0); } @@ -3325,18 +3369,53 @@ void pwd_chdir(struct thread *td, struct vnode *vp) { struct filedesc *fdp; - struct vnode *oldvp; + struct pwd *newpwd, *oldpwd; + VNPASS(vp->v_usecount > 0, vp); + + newpwd = pwd_alloc(); fdp = td->td_proc->p_fd; FILEDESC_XLOCK(fdp); - VNASSERT(vp->v_usecount > 0, vp, - ("chdir to a vnode with zero usecount")); - oldvp = fdp->fd_cdir; - fdp->fd_cdir = vp; + oldpwd = fdp->fd_pwd; + newpwd->pwd_cdir = vp; + pwd_fill(oldpwd, newpwd); + pwd_set(fdp, newpwd); FILEDESC_XUNLOCK(fdp); - vrele(oldvp); + pwd_drop(oldpwd); } +void +pwd_ensure_dirs(void) +{ + struct filedesc *fdp; + struct pwd *oldpwd, *newpwd; + + fdp = curproc->p_fd; + FILEDESC_XLOCK(fdp); + oldpwd = fdp->fd_pwd; + if (oldpwd->pwd_cdir != NULL && oldpwd->pwd_rdir != NULL) { + FILEDESC_XUNLOCK(fdp); + return; + } + FILEDESC_XUNLOCK(fdp); + + newpwd = pwd_alloc(); + FILEDESC_XLOCK(fdp); + oldpwd = fdp->fd_pwd; + pwd_fill(oldpwd, newpwd); + if (newpwd->pwd_cdir == NULL) { + vrefact(rootvnode); + newpwd->pwd_cdir = rootvnode; + } + if (newpwd->pwd_rdir == NULL) { + vrefact(rootvnode); + newpwd->pwd_rdir = rootvnode; + } + pwd_set(fdp, newpwd); + FILEDESC_XUNLOCK(fdp); + pwd_drop(oldpwd); +} + /* * Scan all active processes and prisons to see if any of them have a current * or root directory of `olddp'. If so, replace them with the new mount point. @@ -3345,6 +3424,7 @@ void mountcheckdirs(struct vnode *olddp, struct vnode *newdp) { struct filedesc *fdp; + struct pwd *newpwd, *oldpwd; struct prison *pr; struct proc *p; int nrele; @@ -3352,6 +3432,7 @@ mountcheckdirs(struct vnode *olddp, struct vnode *newd if (vrefcnt(olddp) == 1) return; nrele = 0; + newpwd = pwd_alloc(); sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); @@ -3360,25 +3441,36 @@ mountcheckdirs(struct vnode *olddp, struct vnode *newd if (fdp == NULL) continue; FILEDESC_XLOCK(fdp); - if (fdp->fd_cdir == olddp) { + oldpwd = fdp->fd_pwd; + if (oldpwd == NULL || + (oldpwd->pwd_cdir != olddp && + oldpwd->pwd_rdir != olddp && + oldpwd->pwd_jdir != olddp)) { + FILEDESC_XUNLOCK(fdp); + fddrop(fdp); + continue; + } + if (oldpwd->pwd_cdir == olddp) { vrefact(newdp); - fdp->fd_cdir = newdp; - nrele++; + newpwd->pwd_cdir = newdp; } - if (fdp->fd_rdir == olddp) { + if (oldpwd->pwd_rdir == olddp) { vrefact(newdp); - fdp->fd_rdir = newdp; - nrele++; + newpwd->pwd_rdir = newdp; } - if (fdp->fd_jdir == olddp) { + if (oldpwd->pwd_jdir == olddp) { vrefact(newdp); - fdp->fd_jdir = newdp; - nrele++; + newpwd->pwd_jdir = newdp; } + pwd_fill(oldpwd, newpwd); + pwd_set(fdp, newpwd); FILEDESC_XUNLOCK(fdp); + pwd_drop(oldpwd); fddrop(fdp); + newpwd = pwd_alloc(); } sx_sunlock(&allproc_lock); + pwd_drop(newpwd); if (rootvnode == olddp) { vrefact(newdp); rootvnode = newdp; @@ -3714,6 +3806,7 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *s struct filedesc *fdp; struct export_fd_buf *efbuf; struct vnode *cttyvp, *textvp, *tracevp; + struct pwd *pwd; int error, i; cap_rights_t rights; @@ -3754,21 +3847,25 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *s goto fail; efbuf->fdp = fdp; FILEDESC_SLOCK(fdp); - /* working directory */ - if (fdp->fd_cdir != NULL) { - vrefact(fdp->fd_cdir); - export_vnode_to_sb(fdp->fd_cdir, KF_FD_TYPE_CWD, FREAD, efbuf); + pwd = pwd_hold_filedesc(fdp); + if (pwd != NULL) { + /* working directory */ + if (pwd->pwd_cdir != NULL) { + vrefact(pwd->pwd_cdir); + export_vnode_to_sb(pwd->pwd_cdir, KF_FD_TYPE_CWD, FREAD, efbuf); + } + /* root directory */ + if (pwd->pwd_rdir != NULL) { + vrefact(pwd->pwd_rdir); + export_vnode_to_sb(pwd->pwd_rdir, KF_FD_TYPE_ROOT, FREAD, efbuf); + } + /* jail directory */ + if (pwd->pwd_jdir != NULL) { + vrefact(pwd->pwd_jdir); + export_vnode_to_sb(pwd->pwd_jdir, KF_FD_TYPE_JAIL, FREAD, efbuf); + } + pwd_drop(pwd); } - /* root directory */ - if (fdp->fd_rdir != NULL) { - vrefact(fdp->fd_rdir); - export_vnode_to_sb(fdp->fd_rdir, KF_FD_TYPE_ROOT, FREAD, efbuf); - } - /* jail directory */ - if (fdp->fd_jdir != NULL) { - vrefact(fdp->fd_jdir); - export_vnode_to_sb(fdp->fd_jdir, KF_FD_TYPE_JAIL, FREAD, efbuf); - } for (i = 0; fdp->fd_refcnt > 0 && i <= fdp->fd_lastfile; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; @@ -3882,6 +3979,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) struct kinfo_ofile *okif; struct kinfo_file *kif; struct filedesc *fdp; + struct pwd *pwd; int error, i, *name; struct file *fp; struct proc *p; @@ -3897,15 +3995,19 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) kif = malloc(sizeof(*kif), M_TEMP, M_WAITOK); okif = malloc(sizeof(*okif), M_TEMP, M_WAITOK); FILEDESC_SLOCK(fdp); - if (fdp->fd_cdir != NULL) - export_vnode_for_osysctl(fdp->fd_cdir, KF_FD_TYPE_CWD, kif, - okif, fdp, req); - if (fdp->fd_rdir != NULL) - export_vnode_for_osysctl(fdp->fd_rdir, KF_FD_TYPE_ROOT, kif, - okif, fdp, req); - if (fdp->fd_jdir != NULL) - export_vnode_for_osysctl(fdp->fd_jdir, KF_FD_TYPE_JAIL, kif, - okif, fdp, req); + pwd = pwd_hold_filedesc(fdp); + if (pwd != NULL) { + if (pwd->pwd_cdir != NULL) + export_vnode_for_osysctl(pwd->pwd_cdir, KF_FD_TYPE_CWD, kif, + okif, fdp, req); + if (pwd->pwd_rdir != NULL) + export_vnode_for_osysctl(pwd->pwd_rdir, KF_FD_TYPE_ROOT, kif, + okif, fdp, req); + if (pwd->pwd_jdir != NULL) + export_vnode_for_osysctl(pwd->pwd_jdir, KF_FD_TYPE_JAIL, kif, + okif, fdp, req); + pwd_drop(pwd); + } for (i = 0; fdp->fd_refcnt > 0 && i <= fdp->fd_lastfile; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; @@ -3973,6 +4075,7 @@ kern_proc_cwd_out(struct proc *p, struct sbuf *sb, ss { struct filedesc *fdp; struct export_fd_buf *efbuf; + struct vnode *cdir; int error; PROC_LOCK_ASSERT(p, MA_OWNED); @@ -3988,12 +4091,12 @@ kern_proc_cwd_out(struct proc *p, struct sbuf *sb, ss efbuf->remainder = maxlen; FILEDESC_SLOCK(fdp); - if (fdp->fd_cdir == NULL) + cdir = fdp->fd_pwd->pwd_cdir; + if (cdir == NULL) { error = EINVAL; - else { - vrefact(fdp->fd_cdir); - error = export_vnode_to_sb(fdp->fd_cdir, KF_FD_TYPE_CWD, - FREAD, efbuf); + } else { + vrefact(cdir); + error = export_vnode_to_sb(cdir, KF_FD_TYPE_CWD, FREAD, efbuf); } FILEDESC_SUNLOCK(fdp); fddrop(fdp); Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/kern/kern_linker.c Sun Mar 1 21:53:46 2020 (r358503) @@ -2085,14 +2085,14 @@ linker_load_module(const char *kldname, const char *mo KASSERT(verinfo == NULL, ("linker_load_module: verinfo" " is not NULL")); /* check if root file system is not mounted */ - if (rootvnode == NULL || curproc->p_fd->fd_rdir == NULL) + if (rootvnode == NULL || curproc->p_fd->fd_pwd->pwd_rdir == NULL) return (ENXIO); pathname = linker_search_kld(kldname); } else { if (modlist_lookup2(modname, verinfo) != NULL) return (EEXIST); /* check if root file system is not mounted */ - if (rootvnode == NULL || curproc->p_fd->fd_rdir == NULL) + if (rootvnode == NULL || curproc->p_fd->fd_pwd->pwd_rdir == NULL) return (ENXIO); if (kldname != NULL) pathname = strdup(kldname, M_LINKER); Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/kern/vfs_cache.c Sun Mar 1 21:53:46 2020 (r358503) @@ -2196,20 +2196,12 @@ sys___getcwd(struct thread *td, struct __getcwd_args * int vn_getcwd(struct thread *td, char *buf, char **retbuf, size_t *buflen) { - struct filedesc *fdp; - struct vnode *cdir, *rdir; + struct pwd *pwd; int error; - fdp = td->td_proc->p_fd; - FILEDESC_SLOCK(fdp); - cdir = fdp->fd_cdir; - vrefact(cdir); - rdir = fdp->fd_rdir; - vrefact(rdir); - FILEDESC_SUNLOCK(fdp); - error = vn_fullpath_any(td, cdir, rdir, buf, retbuf, buflen); - vrele(rdir); - vrele(cdir); + pwd = pwd_hold(td); + error = vn_fullpath_any(td, pwd->pwd_cdir, pwd->pwd_rdir, buf, retbuf, buflen); + pwd_drop(pwd); #ifdef KTRACE if (KTRPOINT(curthread, KTR_NAMEI) && error == 0) @@ -2256,9 +2248,8 @@ sys___realpathat(struct thread *td, struct __realpatha int vn_fullpath(struct thread *td, struct vnode *vn, char **retbuf, char **freebuf) { + struct pwd *pwd; char *buf; - struct filedesc *fdp; - struct vnode *rdir; size_t buflen; int error; @@ -2267,13 +2258,9 @@ vn_fullpath(struct thread *td, struct vnode *vn, char buflen = MAXPATHLEN; buf = malloc(buflen, M_TEMP, M_WAITOK); - fdp = td->td_proc->p_fd; - FILEDESC_SLOCK(fdp); - rdir = fdp->fd_rdir; - vrefact(rdir); - FILEDESC_SUNLOCK(fdp); - error = vn_fullpath_any(td, vn, rdir, buf, retbuf, &buflen); - vrele(rdir); + pwd = pwd_hold(td); + error = vn_fullpath_any(td, vn, pwd->pwd_rdir, buf, retbuf, &buflen); + pwd_drop(pwd); if (!error) *freebuf = buf; @@ -2541,8 +2528,7 @@ vn_fullpath_hardlink(struct thread *td, struct nameida char **freebuf, size_t *buflen) { char *buf, *tmpbuf; - struct filedesc *fdp; - struct vnode *rdir; + struct pwd *pwd; struct componentname *cnp; struct vnode *vp; size_t addend; @@ -2557,11 +2543,7 @@ vn_fullpath_hardlink(struct thread *td, struct nameida slash_prefixed = false; buf = malloc(*buflen, M_TEMP, M_WAITOK); - fdp = td->td_proc->p_fd; - FILEDESC_SLOCK(fdp); - rdir = fdp->fd_rdir; - vrefact(rdir); - FILEDESC_SUNLOCK(fdp); + pwd = pwd_hold(td); addend = 0; vp = ndp->ni_vp; @@ -2582,16 +2564,17 @@ vn_fullpath_hardlink(struct thread *td, struct nameida } vref(vp); - error = vn_fullpath_dir(td, vp, rdir, buf, retbuf, buflen, slash_prefixed, addend); + error = vn_fullpath_dir(td, vp, pwd->pwd_rdir, buf, retbuf, buflen, + slash_prefixed, addend); if (error != 0) goto out_bad; - vrele(rdir); + pwd_drop(pwd); *freebuf = buf; return (0); out_bad: - vrele(rdir); + pwd_drop(pwd); free(buf, M_TEMP); return (error); } Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/kern/vfs_lookup.c Sun Mar 1 21:53:46 2020 (r358503) @@ -303,7 +303,6 @@ namei_handle_root(struct nameidata *ndp, struct vnode int namei(struct nameidata *ndp) { - struct filedesc *fdp; /* pointer to file descriptor state */ char *cp; /* pointer into pathname argument */ struct vnode *dp; /* the directory we are searching */ struct iovec aiov; /* uio for reading symbolic links */ @@ -311,6 +310,7 @@ namei(struct nameidata *ndp) struct file *dfp; struct thread *td; struct proc *p; + struct pwd *pwd; cap_rights_t rights; struct filecaps dirfd_caps; struct uio auio; @@ -327,7 +327,6 @@ namei(struct nameidata *ndp) ("namei: flags contaminated with nameiops")); MPASS(ndp->ni_startdir == NULL || ndp->ni_startdir->v_type == VDIR || ndp->ni_startdir->v_type == VBAD); - fdp = p->p_fd; TAILQ_INIT(&ndp->ni_cap_tracker); ndp->ni_lcf = 0; @@ -395,13 +394,13 @@ namei(struct nameidata *ndp) /* * Get starting point for the translation. */ - FILEDESC_SLOCK(fdp); + pwd = pwd_hold(td); /* * The reference on ni_rootdir is acquired in the block below to avoid * back-to-back atomics for absolute lookups. */ - ndp->ni_rootdir = fdp->fd_rdir; - ndp->ni_topdir = fdp->fd_jdir; + ndp->ni_rootdir = pwd->pwd_rdir; + ndp->ni_topdir = pwd->pwd_jdir; startdir_used = 0; dp = NULL; @@ -422,7 +421,7 @@ namei(struct nameidata *ndp) dp = ndp->ni_startdir; startdir_used = 1; } else if (ndp->ni_dirfd == AT_FDCWD) { - dp = fdp->fd_cdir; + dp = pwd->pwd_cdir; if (dp == ndp->ni_rootdir) { vrefactn(dp, 2); } else { @@ -442,7 +441,7 @@ namei(struct nameidata *ndp) * Effectively inlined fgetvp_rights, because we need to * inspect the file as well as grabbing the vnode. */ - error = fget_cap_locked(fdp, ndp->ni_dirfd, &rights, + error = fget_cap(td, ndp->ni_dirfd, &rights, &dfp, &ndp->ni_filecaps); if (error != 0) { /* @@ -450,16 +449,19 @@ namei(struct nameidata *ndp) * or capability-related, both of which can be * safely returned to the caller. */ - } else if (dfp->f_ops == &badfileops) { - error = EBADF; - } else if (dfp->f_vnode == NULL) { - error = ENOTDIR; } else { - dp = dfp->f_vnode; - vrefact(dp); + if (dfp->f_ops == &badfileops) { + error = EBADF; + } else if (dfp->f_vnode == NULL) { + error = ENOTDIR; + } else { + dp = dfp->f_vnode; + vrefact(dp); - if ((dfp->f_flag & FSEARCH) != 0) - cnp->cn_flags |= NOEXECCHECK; + if ((dfp->f_flag & FSEARCH) != 0) + cnp->cn_flags |= NOEXECCHECK; + } + fdrop(dfp, td); } #ifdef CAPABILITIES /* @@ -481,7 +483,7 @@ namei(struct nameidata *ndp) } if (error == 0 && (cnp->cn_flags & BENEATH) != 0) { if (ndp->ni_dirfd == AT_FDCWD) { - ndp->ni_beneath_latch = fdp->fd_cdir; + ndp->ni_beneath_latch = pwd->pwd_cdir; vrefact(ndp->ni_beneath_latch); } else { rights = ndp->ni_rightsneeded; @@ -496,7 +498,6 @@ namei(struct nameidata *ndp) if (error == 0) ndp->ni_lcf |= NI_LCF_LATCH; } - FILEDESC_SUNLOCK(fdp); /* * If we are auditing the kernel pathname, save the user pathname. */ @@ -542,6 +543,7 @@ namei(struct nameidata *ndp) nameicap_cleanup(ndp, true); SDT_PROBE2(vfs, namei, lookup, return, error, (error == 0 ? ndp->ni_vp : NULL)); + pwd_drop(pwd); return (error); } if (ndp->ni_loopcnt++ >= MAXSYMLINKS) { @@ -617,6 +619,7 @@ out: namei_cleanup_cnp(cnp); nameicap_cleanup(ndp, true); SDT_PROBE2(vfs, namei, lookup, return, error, NULL); + pwd_drop(pwd); return (error); } Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/kern/vfs_mountroot.c Sun Mar 1 21:53:46 2020 (r358503) @@ -237,27 +237,13 @@ root_mounted(void) static void set_rootvnode(void) { - struct proc *p; if (VFS_ROOT(TAILQ_FIRST(&mountlist), LK_EXCLUSIVE, &rootvnode)) panic("set_rootvnode: Cannot find root vnode"); VOP_UNLOCK(rootvnode); - p = curthread->td_proc; - FILEDESC_XLOCK(p->p_fd); - - if (p->p_fd->fd_cdir != NULL) - vrele(p->p_fd->fd_cdir); - p->p_fd->fd_cdir = rootvnode; - VREF(rootvnode); - - if (p->p_fd->fd_rdir != NULL) - vrele(p->p_fd->fd_rdir); - p->p_fd->fd_rdir = rootvnode; - VREF(rootvnode); - - FILEDESC_XUNLOCK(p->p_fd); + pwd_ensure_dirs(); } static int Modified: head/sys/security/audit/audit_bsm_klib.c ============================================================================== --- head/sys/security/audit/audit_bsm_klib.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/security/audit/audit_bsm_klib.c Sun Mar 1 21:53:46 2020 (r358503) @@ -493,38 +493,35 @@ void audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath) { struct vnode *cdir, *rdir; - struct filedesc *fdp; + struct pwd *pwd; cap_rights_t rights; int error; + bool vrele_cdir; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s: at %s:%d", __func__, __FILE__, __LINE__); - rdir = cdir = NULL; - fdp = td->td_proc->p_fd; - FILEDESC_SLOCK(fdp); - if (*path == '/') { - rdir = fdp->fd_rdir; - vrefact(rdir); - } else { + pwd = pwd_hold(td); + rdir = pwd->pwd_rdir; + cdir = NULL; + vrele_cdir = false; + if (*path != '/') { if (dirfd == AT_FDCWD) { - cdir = fdp->fd_cdir; - vrefact(cdir); + cdir = pwd->pwd_cdir; } else { error = fgetvp(td, dirfd, cap_rights_init(&rights), &cdir); if (error != 0) { - FILEDESC_SUNLOCK(fdp); cpath[0] = '\0'; + pwd_drop(pwd); return; } + vrele_cdir = true; } } - FILEDESC_SUNLOCK(fdp); audit_canon_path_vp(td, rdir, cdir, path, cpath); - if (rdir != NULL) - vrele(rdir); - if (cdir != NULL) + pwd_drop(pwd); + if (vrele_cdir) vrele(cdir); } Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/sys/filedesc.h Sun Mar 1 21:53:46 2020 (r358503) @@ -76,11 +76,16 @@ struct fdescenttbl { */ #define NDSLOTTYPE u_long +struct pwd { + volatile u_int pwd_refcount; + struct vnode *pwd_cdir; /* current directory */ + struct vnode *pwd_rdir; /* root directory */ + struct vnode *pwd_jdir; /* jail root directory */ +}; + struct filedesc { struct fdescenttbl *fd_files; /* open files table */ - struct vnode *fd_cdir; /* current directory */ - struct vnode *fd_rdir; /* root directory */ - struct vnode *fd_jdir; /* jail root directory */ + struct pwd *fd_pwd; /* directories */ NDSLOTTYPE *fd_map; /* bitmap of free fds */ int fd_lastfile; /* high-water mark of fd_ofiles */ int fd_freefile; /* approx. next free file */ @@ -252,6 +257,17 @@ fd_modified(struct filedesc *fdp, int fd, seqc_t seqc) void pwd_chdir(struct thread *td, struct vnode *vp); int pwd_chroot(struct thread *td, struct vnode *vp); void pwd_ensure_dirs(void); + +struct pwd *pwd_hold_filedesc(struct filedesc *fdp); +struct pwd *pwd_hold(struct thread *td); +void pwd_drop(struct pwd *pwd); +static inline void +pwd_set(struct filedesc *fdp, struct pwd *newpwd) +{ + + FILEDESC_XLOCK_ASSERT(fdp); + fdp->fd_pwd = newpwd; +} #endif /* _KERNEL */ Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/ufs/ffs/ffs_alloc.c Sun Mar 1 21:53:46 2020 (r358503) @@ -3190,6 +3190,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) struct inode *ip, *dp; struct mount *mp; struct fs *fs; + struct pwd *pwd; ufs2_daddr_t blkno; long blkcnt, blksize; u_long key; @@ -3448,11 +3449,11 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) /* * Now we get and lock the child directory containing "..". */ - FILEDESC_SLOCK(td->td_proc->p_fd); - dvp = td->td_proc->p_fd->fd_cdir; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Mar 1 21:54:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD9BF24F5C2; Sun, 1 Mar 2020 21:54:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VxrN5z9jz4S3K; Sun, 1 Mar 2020 21:54:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8320CA3B7; Sun, 1 Mar 2020 21:54:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021LsSCU043582; Sun, 1 Mar 2020 21:54:28 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021LsS7X043581; Sun, 1 Mar 2020 21:54:28 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003012154.021LsS7X043581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 1 Mar 2020 21:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358504 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 21:54:29 -0000 Author: mjg Date: Sun Mar 1 21:54:28 2020 New Revision: 358504 URL: https://svnweb.freebsd.org/changeset/base/358504 Log: vfs: stop taking additional refs on root vnode during lookup They are spurious since introduction of struct pwd, which provides them implicitly. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23885 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sun Mar 1 21:53:46 2020 (r358503) +++ head/sys/kern/vfs_lookup.c Sun Mar 1 21:54:28 2020 (r358504) @@ -254,7 +254,7 @@ namei_cleanup_cnp(struct componentname *cnp) } static int -namei_handle_root(struct nameidata *ndp, struct vnode **dpp, u_int n) +namei_handle_root(struct nameidata *ndp, struct vnode **dpp) { struct componentname *cnp; @@ -276,7 +276,7 @@ namei_handle_root(struct nameidata *ndp, struct vnode ndp->ni_pathlen--; } *dpp = ndp->ni_rootdir; - vrefactn(*dpp, n); + vrefact(*dpp); return (0); } @@ -407,29 +407,15 @@ namei(struct nameidata *ndp) cnp->cn_nameptr = cnp->cn_pnbuf; if (cnp->cn_pnbuf[0] == '/') { ndp->ni_resflags |= NIRES_ABS; - error = namei_handle_root(ndp, &dp, 2); - if (error != 0) { - /* - * Simplify error handling, we should almost never be - * here. - */ - vrefact(ndp->ni_rootdir); - } + error = namei_handle_root(ndp, &dp); } else { if (ndp->ni_startdir != NULL) { - vrefact(ndp->ni_rootdir); dp = ndp->ni_startdir; startdir_used = 1; } else if (ndp->ni_dirfd == AT_FDCWD) { dp = pwd->pwd_cdir; - if (dp == ndp->ni_rootdir) { - vrefactn(dp, 2); - } else { - vrefact(ndp->ni_rootdir); - vrefact(dp); - } + vrefact(dp); } else { - vrefact(ndp->ni_rootdir); rights = ndp->ni_rightsneeded; cap_rights_set_one(&rights, CAP_LOOKUP); @@ -530,7 +516,6 @@ namei(struct nameidata *ndp) * If not a symbolic link, we're done. */ if ((cnp->cn_flags & ISSYMLINK) == 0) { - vrele(ndp->ni_rootdir); if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) { namei_cleanup_cnp(cnp); } else @@ -605,7 +590,7 @@ namei(struct nameidata *ndp) cnp->cn_nameptr = cnp->cn_pnbuf; if (*(cnp->cn_nameptr) == '/') { vrele(dp); - error = namei_handle_root(ndp, &dp, 1); + error = namei_handle_root(ndp, &dp); if (error != 0) goto out; } @@ -614,7 +599,6 @@ namei(struct nameidata *ndp) ndp->ni_vp = NULL; vrele(ndp->ni_dvp); out: - vrele(ndp->ni_rootdir); MPASS(error != 0); namei_cleanup_cnp(cnp); nameicap_cleanup(ndp, true); From owner-svn-src-head@freebsd.org Sun Mar 1 21:58:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D206524F7B9; Sun, 1 Mar 2020 21:58:19 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vxwq4hGBz4XrL; Sun, 1 Mar 2020 21:58:19 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 7314C9757; Sun, 1 Mar 2020 21:58:19 +0000 (UTC) From: Jan Beich To: Mark Johnston Cc: Emmanuel Vadot , Jeff Roberson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358363 - head/sys/vm References: <202002270237.01R2bRLJ023799@repo.freebsd.org> <20200229212411.1e6aed2d49d6644937b78452@bidouilliste.com> <20200301212537.GA33873@raichu> Date: Sun, 01 Mar 2020 22:58:17 +0100 In-Reply-To: <20200301212537.GA33873@raichu> (Mark Johnston's message of "Sun, 1 Mar 2020 16:25:37 -0500") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 21:58:19 -0000 Mark Johnston writes: > On Sat, Feb 29, 2020 at 09:24:11PM +0100, Emmanuel Vadot wrote: > >> >> Hi Jeff, >> >> On Thu, 27 Feb 2020 02:37:27 +0000 (UTC) >> Jeff Roberson wrote: >> >> > Author: jeff >> > Date: Thu Feb 27 02:37:27 2020 >> > New Revision: 358363 >> > URL: https://svnweb.freebsd.org/changeset/base/358363 >> > >> > Log: >> > Add unlocked grab* function variants that use lockless radix code to >> > lookup pages. These variants will fall back to their locked counterparts >> > if the page is not present. >> > >> > Discussed with: kib, markj >> > Differential Revision: https://reviews.freebsd.org/D23449 >> > >> > Modified: >> > head/sys/vm/vm_page.c >> > head/sys/vm/vm_page.h >> > >> >> We're (jbeich@ and me) seeing wired memory leak since this commit. >> A simple way to reproduce is to have drm-kmod (either 4.16 or 5.0) and >> liba-intel-driver/libva-intel-media-driver and start mpv in a loop : >> >> while mpv --hwdec=vaapi --start=10.0 --end=10.1 /path/to/file ; do >> done >> >> Reverting this commit on one of my test machine shows that this is the >> culprit. >> If you need anymore info/debug let me know. >> >> Thanks. > > Could you give this patch a try? > > diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c > index 9d50881ed27e..41e7a5bb3099 100644 > --- a/sys/vm/vm_page.c > +++ b/sys/vm/vm_page.c > @@ -4535,7 +4535,8 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, int al > (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0, > ("vm_page_grab_valid: Invalid flags 0x%X", allocflags)); > VM_OBJECT_ASSERT_WLOCKED(object); > - pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY); > + pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY | > + VM_ALLOC_WIRED); > pflags |= VM_ALLOC_WAITFAIL; > > retrylookup: I confirm, the patch fixes the issue. After trying to reproduce for a few minutes Wired doesn't grow several times larger than ARC Total. Mem: 1151M Active, 300M Inact, 41M Laundry, 3417M Wired, 57G Free ARC: 2020M Total, 861M MFU, 992M MRU, 3512K Anon, 23M Header, 140M Other 711M Compressed, 1311M Uncompressed, 1.84:1 Ratio From owner-svn-src-head@freebsd.org Sun Mar 1 22:09:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3DEE24FF2D; Sun, 1 Mar 2020 22:09:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vy9N36qmz3Hg6; Sun, 1 Mar 2020 22:09:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 588D0A5B4; Sun, 1 Mar 2020 22:09:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021M9Cd0049660; Sun, 1 Mar 2020 22:09:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021M9CM3049659; Sun, 1 Mar 2020 22:09:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003012209.021M9CM3049659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 1 Mar 2020 22:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358505 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 22:09:12 -0000 Author: markj Date: Sun Mar 1 22:09:11 2020 New Revision: 358505 URL: https://svnweb.freebsd.org/changeset/base/358505 Log: Avoid doubly wiring a newly allocated page in vm_page_grab_valid(). This fixes a regression from r358363. Reported by: manu, jbeich Tested by: jbeich Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Mar 1 21:54:28 2020 (r358504) +++ head/sys/vm/vm_page.c Sun Mar 1 22:09:11 2020 (r358505) @@ -4535,7 +4535,8 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0, ("vm_page_grab_valid: Invalid flags 0x%X", allocflags)); VM_OBJECT_ASSERT_WLOCKED(object); - pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY); + pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY | + VM_ALLOC_WIRED); pflags |= VM_ALLOC_WAITFAIL; retrylookup: From owner-svn-src-head@freebsd.org Sun Mar 1 22:10:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C69FD24FFED; Sun, 1 Mar 2020 22:10:37 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VyC148ZXz3LqR; Sun, 1 Mar 2020 22:10:37 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E6B1A5C2; Sun, 1 Mar 2020 22:10:37 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021MAbPT049808; Sun, 1 Mar 2020 22:10:37 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021MAbZT049807; Sun, 1 Mar 2020 22:10:37 GMT (envelope-from grog@FreeBSD.org) Message-Id: <202003012210.021MAbZT049807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Sun, 1 Mar 2020 22:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358506 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 358506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 22:10:37 -0000 Author: grog Date: Sun Mar 1 22:10:37 2020 New Revision: 358506 URL: https://svnweb.freebsd.org/changeset/base/358506 Log: Remove comment about Blackthorn winds, apparently imported from 4.4BSD Lite. Nowadays it's trivial to find the explanation, such as at https://www.deseret.com/2000/2/27/19493013/blackthorn-winds-make-bushes-bud. It doesn't seem appropriate to replace it with an explanation. Modified: head/usr.bin/calendar/calendars/calendar.history Modified: head/usr.bin/calendar/calendars/calendar.history ============================================================================== --- head/usr.bin/calendar/calendars/calendar.history Sun Mar 1 22:09:11 2020 (r358505) +++ head/usr.bin/calendar/calendars/calendar.history Sun Mar 1 22:10:37 2020 (r358506) @@ -70,7 +70,7 @@ 02/29 French and Indian raid on Deerfield MA, 1704 03/01 Sarah Goode, Sarah Osborne, and Tituba arrested for witchcraft in Salem, Massachusetts, 1692 -03/02 Blackthorn winds (New England) (Does anyone know what this is?) +03/02 Blackthorn winds (New England) 03/04 First meeting of Congress, 1789, in N.Y.C. 03/13 "Striptease" introduced, Paris, 1894 03/14 Teddy Roosevelt excludes Japanese laborers from continental US, 1907 From owner-svn-src-head@freebsd.org Sun Mar 1 22:10:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB6F325003E; Sun, 1 Mar 2020 22:10:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VyCK2s9cz3MQF; Sun, 1 Mar 2020 22:10:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x841.google.com with SMTP id v22so2610818qtp.10; Sun, 01 Mar 2020 14:10:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tbIZi4rxEzwy1XLFVcv+DE+zH44CJZnzsWhr0vmRRn8=; b=p4icAgZBc1CN6wNPmQFO2E9nIK58lszTTBXdq/P8zbkBw/lQY1++/cK3ytJhR2n26K o7Sa0rdVq509Sion44sMa/50jvMyf89j63/gPGhNmYGGfyZFYClwmb6xqa7uDPZPfWIh XWB2Z15AutaUX46u0zTbh06F+IADKZFJ9JkQuxyYZr6l2sABUV62rhieFWZiAr3x/LpQ ZygwVafofhmhJ6qcg9PTkKapaNuTDd81XfIWWW+WGepRtkI8ALRL9NS9CQN99xJhtGNh vjwrAin+ZBh7tnEnASEMDYSFb0xVD4bZJ+7o0T+uBDbGnaBBc3yPeXBc1Uqv2qCBnKu7 kU1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=tbIZi4rxEzwy1XLFVcv+DE+zH44CJZnzsWhr0vmRRn8=; b=WrKqvlegnP8JHa4KPUPA4YGMuxoN2u/YCCYYPuwmwo6g1mDLQk/kALDBaoYAHXFF1j p+xt6gCNMBAJZ7rVKltzulvq6hzTqQSIfKxAWaQZt0Xko8ddCwfXJ1o+M4rzlSgm5W4L AvVVW+Kmk82tHR13oNyXMajUG4PkK2iFK6j9riOxgqk9m+ivTUiRLs0TXy6d4exMYjQy INuUbqIau+4vukehdu0XKxWkaWgwtWoAqYj3Mk/khniQcGMMJytAtvb5kdP8KDUgQc6+ BGicSgHj4ulVKgI/BXJaOOwWf/zzwqmBp8L6jx60R+b6aGKEtRADUhpSxT8MvUofOZPz 3N5Q== X-Gm-Message-State: APjAAAURplYmUqJ8j35pbkEPBsTzhiKhCQFMCEWPCmK7AbjnjJT53+lh M1TbnoyAjLMt/BZo2FxPGIWI5gRY X-Google-Smtp-Source: APXvYqw6r9hpb34D6sqJEP2GB12ZrodBUYrkxMDhgA6YjNDCtf10AY3AkFtTJC4hei9ZtRLvRTJGPA== X-Received: by 2002:ac8:1673:: with SMTP id x48mr13099523qtk.201.1583100652250; Sun, 01 Mar 2020 14:10:52 -0800 (PST) Received: from raichu (toroon0560w-lp130-11-70-50-21-248.dsl.bell.ca. [70.50.21.248]) by smtp.gmail.com with ESMTPSA id f12sm738616qkm.13.2020.03.01.14.10.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 14:10:51 -0800 (PST) Sender: Mark Johnston Date: Sun, 1 Mar 2020 17:10:49 -0500 From: Mark Johnston To: Jan Beich Cc: Emmanuel Vadot , Jeff Roberson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358363 - head/sys/vm Message-ID: <20200301221049.GB33873@raichu> References: <202002270237.01R2bRLJ023799@repo.freebsd.org> <20200229212411.1e6aed2d49d6644937b78452@bidouilliste.com> <20200301212537.GA33873@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 48VyCK2s9cz3MQF X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 22:10:53 -0000 On Sun, Mar 01, 2020 at 10:58:17PM +0100, Jan Beich wrote: > Mark Johnston writes: > > > On Sat, Feb 29, 2020 at 09:24:11PM +0100, Emmanuel Vadot wrote: > > > >> > >> Hi Jeff, > >> > >> On Thu, 27 Feb 2020 02:37:27 +0000 (UTC) > >> Jeff Roberson wrote: > >> > >> > Author: jeff > >> > Date: Thu Feb 27 02:37:27 2020 > >> > New Revision: 358363 > >> > URL: https://svnweb.freebsd.org/changeset/base/358363 > >> > > >> > Log: > >> > Add unlocked grab* function variants that use lockless radix code to > >> > lookup pages. These variants will fall back to their locked counterparts > >> > if the page is not present. > >> > > >> > Discussed with: kib, markj > >> > Differential Revision: https://reviews.freebsd.org/D23449 > >> > > >> > Modified: > >> > head/sys/vm/vm_page.c > >> > head/sys/vm/vm_page.h > >> > > >> > >> We're (jbeich@ and me) seeing wired memory leak since this commit. > >> A simple way to reproduce is to have drm-kmod (either 4.16 or 5.0) and > >> liba-intel-driver/libva-intel-media-driver and start mpv in a loop : > >> > >> while mpv --hwdec=vaapi --start=10.0 --end=10.1 /path/to/file ; do > >> done > >> > >> Reverting this commit on one of my test machine shows that this is the > >> culprit. > >> If you need anymore info/debug let me know. > >> > >> Thanks. > > > > Could you give this patch a try? > > > > diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c > > index 9d50881ed27e..41e7a5bb3099 100644 > > --- a/sys/vm/vm_page.c > > +++ b/sys/vm/vm_page.c > > @@ -4535,7 +4535,8 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, int al > > (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0, > > ("vm_page_grab_valid: Invalid flags 0x%X", allocflags)); > > VM_OBJECT_ASSERT_WLOCKED(object); > > - pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY); > > + pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY | > > + VM_ALLOC_WIRED); > > pflags |= VM_ALLOC_WAITFAIL; > > > > retrylookup: > > I confirm, the patch fixes the issue. After trying to reproduce for a > few minutes Wired doesn't grow several times larger than ARC Total. Thanks, committed in r358505. From owner-svn-src-head@freebsd.org Sun Mar 1 23:01:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29A7F250FF4; Sun, 1 Mar 2020 23:01:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VzKt0Pqqz47CN; Sun, 1 Mar 2020 23:01:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07AE3B065; Sun, 1 Mar 2020 23:01:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021N1bnV084002; Sun, 1 Mar 2020 23:01:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021N1biZ084001; Sun, 1 Mar 2020 23:01:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003012301.021N1biZ084001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 23:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358507 - head/sys/nlm X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/nlm X-SVN-Commit-Revision: 358507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 23:01:38 -0000 Author: imp Date: Sun Mar 1 23:01:37 2020 New Revision: 358507 URL: https://svnweb.freebsd.org/changeset/base/358507 Log: Remove stale FreeBSD_version checks. Modified: head/sys/nlm/nlm_prot_impl.c Modified: head/sys/nlm/nlm_prot_impl.c ============================================================================== --- head/sys/nlm/nlm_prot_impl.c Sun Mar 1 22:10:37 2020 (r358506) +++ head/sys/nlm/nlm_prot_impl.c Sun Mar 1 23:01:37 2020 (r358507) @@ -40,9 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if __FreeBSD_version >= 700000 #include -#endif #include #include #include @@ -1688,11 +1686,7 @@ sys_nlm_syscall(struct thread *td, struct nlm_syscall_ { int error; -#if __FreeBSD_version >= 700000 error = priv_check(td, PRIV_NFS_LOCKD); -#else - error = suser(td); -#endif if (error) return (error); @@ -1797,11 +1791,7 @@ nlm_get_vfs_state(struct nlm_host *host, struct svc_re goto out; } -#if __FreeBSD_version < 800011 - VOP_UNLOCK(vs->vs_vp, 0, curthread); -#else VOP_UNLOCK(vs->vs_vp); -#endif vs->vs_vnlocked = FALSE; out: From owner-svn-src-head@freebsd.org Sun Mar 1 23:01:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3A4E251073; Sun, 1 Mar 2020 23:01:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VzL34sFfz47Ht; Sun, 1 Mar 2020 23:01:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E1E3B073; Sun, 1 Mar 2020 23:01:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021N1l5h084794; Sun, 1 Mar 2020 23:01:47 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021N1ljn084793; Sun, 1 Mar 2020 23:01:47 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003012301.021N1ljn084793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 23:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358508 - head/sys/cam/ctl X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/ctl X-SVN-Commit-Revision: 358508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 23:01:47 -0000 Author: imp Date: Sun Mar 1 23:01:47 2020 New Revision: 358508 URL: https://svnweb.freebsd.org/changeset/base/358508 Log: Remove pre-FreeBSD 11 compat code. Modified: head/sys/cam/ctl/ctl_ha.c Modified: head/sys/cam/ctl/ctl_ha.c ============================================================================== --- head/sys/cam/ctl/ctl_ha.c Sun Mar 1 23:01:37 2020 (r358507) +++ head/sys/cam/ctl/ctl_ha.c Sun Mar 1 23:01:47 2020 (r358508) @@ -66,68 +66,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version < 1100000) -struct mbufq { - struct mbuf *head; - struct mbuf *tail; -}; - -static void -mbufq_init(struct mbufq *q, int limit) -{ - - q->head = q->tail = NULL; -} - -static void -mbufq_drain(struct mbufq *q) -{ - struct mbuf *m; - - while ((m = q->head) != NULL) { - q->head = m->m_nextpkt; - m_freem(m); - } - q->tail = NULL; -} - -static struct mbuf * -mbufq_dequeue(struct mbufq *q) -{ - struct mbuf *m; - - m = q->head; - if (m) { - if (q->tail == m) - q->tail = NULL; - q->head = m->m_nextpkt; - m->m_nextpkt = NULL; - } - return (m); -} - -static void -mbufq_enqueue(struct mbufq *q, struct mbuf *m) -{ - - m->m_nextpkt = NULL; - if (q->tail) - q->tail->m_nextpkt = m; - else - q->head = m; - q->tail = m; -} - -static u_int -sbavail(struct sockbuf *sb) -{ - return (sb->sb_cc); -} - -#if (__FreeBSD_version < 1000000) -#define mtodo(m, o) ((void *)(((m)->m_data) + (o))) -#endif -#endif struct ha_msg_wire { uint32_t channel; From owner-svn-src-head@freebsd.org Sun Mar 1 23:01:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 468952511FA; Sun, 1 Mar 2020 23:01:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VzL810dMz47Mp; Sun, 1 Mar 2020 23:01:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1AD0CB07B; Sun, 1 Mar 2020 23:01:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021N1pcr084847; Sun, 1 Mar 2020 23:01:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021N1pFm084846; Sun, 1 Mar 2020 23:01:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003012301.021N1pFm084846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 23:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358509 - head/sys/rpc X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/rpc X-SVN-Commit-Revision: 358509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2020 23:01:52 -0000 Author: imp Date: Sun Mar 1 23:01:51 2020 New Revision: 358509 URL: https://svnweb.freebsd.org/changeset/base/358509 Log: Remove obsolete old-freebsd version compat shim. Modified: head/sys/rpc/rpc_generic.c Modified: head/sys/rpc/rpc_generic.c ============================================================================== --- head/sys/rpc/rpc_generic.c Sun Mar 1 23:01:47 2020 (r358508) +++ head/sys/rpc/rpc_generic.c Sun Mar 1 23:01:51 2020 (r358509) @@ -67,10 +67,6 @@ __FBSDID("$FreeBSD$"); extern u_long sb_max_adj; /* not defined in socketvar.h */ -#if __FreeBSD_version < 700000 -#define strrchr rindex -#endif - /* Provide an entry point hook for the rpcsec_gss module. */ struct rpc_gss_entries rpc_gss_entries; From owner-svn-src-head@freebsd.org Mon Mar 2 00:23:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 159D8253A62; Mon, 2 Mar 2020 00:23:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48W18M6bLSz4DTX; Mon, 2 Mar 2020 00:23:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBCA6C111; Mon, 2 Mar 2020 00:23:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0220NV3P032262; Mon, 2 Mar 2020 00:23:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0220NVFo032261; Mon, 2 Mar 2020 00:23:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003020023.0220NVFo032261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 2 Mar 2020 00:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358510 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 358510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 00:23:32 -0000 Author: imp Date: Mon Mar 2 00:23:31 2020 New Revision: 358510 URL: https://svnweb.freebsd.org/changeset/base/358510 Log: Remove BROOKTREE_ALLOC_PAGES now that bktr is now gone. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Mar 1 23:01:51 2020 (r358509) +++ head/sys/conf/NOTES Mon Mar 2 00:23:31 2020 (r358510) @@ -2755,11 +2755,6 @@ options RACCT options RCTL # Yet more undocumented options for linting. -# BKTR_ALLOC_PAGES has no effect except to cause warnings, and -# BROOKTREE_ALLOC_PAGES hasn't actually been superseded by it, since the -# driver still mostly spells this option BROOKTREE_ALLOC_PAGES. -##options BKTR_ALLOC_PAGES=(217*4+1) -options BROOKTREE_ALLOC_PAGES=(217*4+1) options MAXFILES=999 # Random number generator From owner-svn-src-head@freebsd.org Mon Mar 2 02:36:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3170256732; Mon, 2 Mar 2020 02:36:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48W4625f1tz3KFD; Mon, 2 Mar 2020 02:36:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEAF5D8AB; Mon, 2 Mar 2020 02:36:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222agtu010108; Mon, 2 Mar 2020 02:36:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222af3O010104; Mon, 2 Mar 2020 02:36:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003020236.0222af3O010104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 2 Mar 2020 02:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358512 - in head: tools/tools/controlelf usr.bin usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: tools/tools/controlelf usr.bin usr.bin/elfctl X-SVN-Commit-Revision: 358512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 02:36:43 -0000 Author: emaste Date: Mon Mar 2 02:36:41 2020 New Revision: 358512 URL: https://svnweb.freebsd.org/changeset/base/358512 Log: Move ELF feature note tool to usr.bin/elfctl elfctl is a tool for modifying the NT_FREEBSD_FEATURE_CTL ELF note, which contains a set of flags for enabling or disabling vulnerability mitigations and other features. Reviewed by: csjp, kib MFC after: 2 weeks Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23910 Added: head/usr.bin/elfctl/ - copied from r358511, head/tools/tools/controlelf/ head/usr.bin/elfctl/elfctl.1 - copied, changed from r358469, head/tools/tools/controlelf/controlelf.1 head/usr.bin/elfctl/elfctl.c - copied unchanged from r358511, head/tools/tools/controlelf/controlelf.c Deleted: head/tools/tools/controlelf/ head/usr.bin/elfctl/controlelf.1 head/usr.bin/elfctl/controlelf.c Modified: head/usr.bin/Makefile head/usr.bin/elfctl/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Mar 2 02:12:53 2020 (r358511) +++ head/usr.bin/Makefile Mon Mar 2 02:36:41 2020 (r358512) @@ -31,6 +31,7 @@ SUBDIR= alias \ diff \ dirname \ du \ + elfctl \ elfdump \ enigma \ env \ Modified: head/usr.bin/elfctl/Makefile ============================================================================== --- head/tools/tools/controlelf/Makefile Mon Mar 2 02:12:53 2020 (r358511) +++ head/usr.bin/elfctl/Makefile Mon Mar 2 02:36:41 2020 (r358512) @@ -2,13 +2,10 @@ ELFTCDIR= ${SRCTOP}/contrib/elftoolchain -PROG= controlelf -SRCS= controlelf.c +PROG= elfctl LIBADD= elftc elf CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common - -WARNS?= 6 .include Copied and modified: head/usr.bin/elfctl/elfctl.1 (from r358469, head/tools/tools/controlelf/controlelf.1) ============================================================================== --- head/tools/tools/controlelf/controlelf.1 Sat Feb 29 17:24:02 2020 (r358469, copy source) +++ head/usr.bin/elfctl/elfctl.1 Mon Mar 2 02:36:41 2020 (r358512) @@ -26,11 +26,11 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2019 -.Dt CONTROLELF 1 +.Dd March 1, 2020 +.Dt ELFCTL 1 .Os .Sh NAME -.Nm controlelf +.Nm elfctl .Nd change an ELF binary's feature control note .Sh SYNOPSIS .Nm @@ -79,8 +79,8 @@ of the .Nm command: .Bd -literal -offset indent -controlelf file -controlelf -e +aslr file +elfctl file +elfctl -e +aslr file .Ed .Sh HISTORY .Nm Copied: head/usr.bin/elfctl/elfctl.c (from r358511, head/tools/tools/controlelf/controlelf.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/elfctl/elfctl.c Mon Mar 2 02:36:41 2020 (r358512, copy of r358511, head/tools/tools/controlelf/controlelf.c) @@ -0,0 +1,392 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 The FreeBSD Foundation. + * + * This software was developed by Bora Ozarslan under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "_elftc.h" + +__FBSDID("$FreeBSD$"); + +static bool convert_to_feature_val(char *, u_int32_t *); +static bool edit_file_features(Elf *, int, int, char *); +static bool get_file_features(Elf *, int, int, u_int32_t *, u_int64_t *); +static void print_features(void); +static bool print_file_features(Elf *, int, int, char *); +static void usage(void); + +struct ControlFeatures { + const char *alias; + unsigned long value; + const char *desc; +}; + +static struct ControlFeatures featurelist[] = { + { "aslr", NT_FREEBSD_FCTL_ASLR_DISABLE, "Disable ASLR" }, + { "protmax", NT_FREEBSD_FCTL_PROTMAX_DISABLE, + "Disable implicit PROT_MAX" }, + { "stackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" }, +}; + +static struct option long_opts[] = { + { "help", no_argument, NULL, 'h' }, + { NULL, 0, NULL, 0 } +}; + +#if BYTE_ORDER == LITTLE_ENDIAN +#define SUPPORTED_ENDIAN ELFDATA2LSB +#else +#define SUPPORTED_ENDIAN ELFDATA2MSB +#endif + +int +main(int argc, char **argv) +{ + GElf_Ehdr ehdr; + Elf *elf; + Elf_Kind kind; + int ch, fd, editfeatures, retval; + char *features; + bool lflag; + + lflag = 0; + editfeatures = 0; + retval = 0; + + if (elf_version(EV_CURRENT) == EV_NONE) + errx(EXIT_FAILURE, "elf_version error"); + + while ((ch = getopt_long(argc, argv, "hle:", long_opts, NULL)) != -1) { + switch (ch) { + case 'l': + print_features(); + lflag = true; + break; + case 'e': + features = optarg; + editfeatures = 1; + break; + case 'h': + default: + usage(); + } + } + argc -= optind; + argv += optind; + if (argc == 0) { + if (lflag) + exit(0); + else { + warnx("no file(s) specified"); + usage(); + } + } + + while (argc) { + elf = NULL; + + if ((fd = open(argv[0], + editfeatures ? O_RDWR : O_RDONLY, 0)) < 0) { + warn("error opening file %s", argv[0]); + retval = 1; + goto fail; + } + + if ((elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { + warnx("elf_begin failed: %s", elf_errmsg(-1)); + retval = 1; + goto fail; + } + + if ((kind = elf_kind(elf)) != ELF_K_ELF) { + if (kind == ELF_K_AR) + warnx("file '%s' is an archive", argv[0]); + else + warnx("file '%s' is not an ELF file", argv[0]); + retval = 1; + goto fail; + } + + if (gelf_getehdr(elf, &ehdr) == NULL) { + warnx("gelf_getehdr: %s", elf_errmsg(-1)); + retval = 1; + goto fail; + } + /* + * XXX need to support cross-endian operation, but for now + * exit on error rather than misbehaving. + */ + if (ehdr.e_ident[EI_DATA] != SUPPORTED_ENDIAN) { + warnx("file endianness must match host"); + retval = 1; + goto fail; + } + + if (!editfeatures) { + if (!print_file_features(elf, ehdr.e_phnum, fd, + argv[0])) { + retval = 1; + goto fail; + } + } else if (!edit_file_features(elf, ehdr.e_phnum, fd, + features)) { + retval = 1; + goto fail; + } +fail: + if (elf != NULL) + elf_end(elf); + + if (fd >= 0) + close(fd); + + argc--; + argv++; + } + + return (retval); +} + +#define USAGE_MESSAGE \ + "\ +Usage: %s [options] file...\n\ + Set or display the control features for an ELF object.\n\n\ + Supported options are:\n\ + -l List known control features.\n\ + -e [+-=]feature,list Edit features from a comma separated list.\n\ + -h | --help Print a usage message and exit.\n" + +static void +usage(void) +{ + + fprintf(stderr, USAGE_MESSAGE, ELFTC_GETPROGNAME()); + exit(1); +} + +static bool +convert_to_feature_val(char *feature_str, u_int32_t *feature_val) +{ + char *feature; + int i, len; + u_int32_t input; + char operation; + + input = 0; + operation = *feature_str; + feature_str++; + len = nitems(featurelist); + while ((feature = strsep(&feature_str, ",")) != NULL) { + for (i = 0; i < len; ++i) { + if (strcmp(featurelist[i].alias, feature) == 0) { + input |= featurelist[i].value; + break; + } + } + if (i == len) { + warnx("%s is not a valid feature", feature); + return (false); + } + } + + if (operation == '+') { + *feature_val |= input; + } else if (operation == '=') { + *feature_val = input; + } else if (operation == '-') { + *feature_val &= ~input; + } else { + warnx("'%c' not an operator - use '+', '-', '='", + feature_str[0]); + return (false); + } + return (true); +} + +static bool +edit_file_features(Elf *elf, int phcount, int fd, char *val) +{ + u_int32_t features; + u_int64_t off; + + if (!get_file_features(elf, phcount, fd, &features, &off)) { + warnx("NT_FREEBSD_FEATURE_CTL note not found"); + return (false); + } + + if (!convert_to_feature_val(val, &features)) + return (false); + + if (lseek(fd, off, SEEK_SET) == -1 || + write(fd, &features, sizeof(features)) < + (ssize_t)sizeof(features)) { + warnx("error writing feature value"); + return (false); + } + return (true); +} + +static void +print_features(void) +{ + size_t i; + + printf("Known features are:\n"); + for (i = 0; i < nitems(featurelist); ++i) + printf("%-16s%s\n", featurelist[i].alias, + featurelist[i].desc); +} + +static bool +print_file_features(Elf *elf, int phcount, int fd, char *filename) +{ + u_int32_t features; + unsigned long i; + + if (!get_file_features(elf, phcount, fd, &features, NULL)) { + return (false); + } + + printf("File '%s' features:\n", filename); + for (i = 0; i < nitems(featurelist); ++i) { + printf("%-16s'%s' is ", featurelist[i].alias, + featurelist[i].desc); + + if ((featurelist[i].value & features) == 0) + printf("un"); + + printf("set.\n"); + } + return (true); +} + +static bool +get_file_features(Elf *elf, int phcount, int fd, u_int32_t *features, + u_int64_t *off) +{ + GElf_Phdr phdr; + Elf_Note note; + unsigned long read_total; + int namesz, descsz, i; + char *name; + ssize_t size; + + /* + * Go through each program header to find one that is of type PT_NOTE + * and has a note for feature control. + */ + for (i = 0; i < phcount; ++i) { + if (gelf_getphdr(elf, i, &phdr) == NULL) { + warnx("gelf_getphdr failed: %s", elf_errmsg(-1)); + return (false); + } + + if (phdr.p_type != PT_NOTE) + continue; + + if (lseek(fd, phdr.p_offset, SEEK_SET) < 0) { + warn("lseek() failed:"); + return (false); + } + + read_total = 0; + while (read_total < phdr.p_filesz) { + size = read(fd, ¬e, sizeof(note)); + if (size < (ssize_t)sizeof(note)) { + warn("read() failed:"); + return (false); + } + read_total += sizeof(note); + + /* + * XXX: Name and descriptor are 4 byte aligned, however, + * the size given doesn't include the padding. + */ + namesz = roundup2(note.n_namesz, 4); + name = malloc(namesz); + if (name == NULL) { + warn("malloc() failed."); + return (false); + } + descsz = roundup2(note.n_descsz, 4); + size = read(fd, name, namesz); + read_total += namesz; + + if (note.n_namesz != 8 || + strncmp("FreeBSD", name, 7) != 0 || + note.n_type != NT_FREEBSD_FEATURE_CTL) { + /* Not the right note. Skip the description */ + if (lseek(fd, descsz, SEEK_CUR) < 0) { + warn("lseek() failed."); + free(name); + return (false); + } + read_total += descsz; + free(name); + continue; + } + + if (note.n_descsz < sizeof(u_int32_t)) { + warnx("Feature descriptor can't " + "be less than 4 bytes"); + free(name); + return (false); + } + + /* + * XXX: For now we look at only 4 bytes of the + * descriptor. This should respect descsz. + */ + if (note.n_descsz > sizeof(u_int32_t)) + warnx("Feature note is bigger than expected"); + read(fd, features, sizeof(u_int32_t)); + if (off != NULL) + *off = phdr.p_offset + read_total; + free(name); + return (true); + } + } + + warnx("NT_FREEBSD_FEATURE_CTL note not found"); + return (false); +} From owner-svn-src-head@freebsd.org Mon Mar 2 02:45:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7DAA256BEA; Mon, 2 Mar 2020 02:45:58 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48W4Jk2NHHz432f; Mon, 2 Mar 2020 02:45:58 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 000F0DA91; Mon, 2 Mar 2020 02:45:57 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222jvod016373; Mon, 2 Mar 2020 02:45:57 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222jvg5016372; Mon, 2 Mar 2020 02:45:57 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003020245.0222jvg5016372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 2 Mar 2020 02:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358515 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 358515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 02:45:58 -0000 Author: kevans Date: Mon Mar 2 02:45:57 2020 New Revision: 358515 URL: https://svnweb.freebsd.org/changeset/base/358515 Log: if_edsc: generate an arbitrary MAC address When generating an cloned interface instance in edsc_clone_create(), generate a MAC address from the FF OUI with ether_gen_addr(). This allows us to have unique local-link addresses. Previously, the MAC address was zero. Submitted by: Neel Chauhan Differential Revision: https://reviews.freebsd.org/D23842 Modified: head/sys/net/if_edsc.c Modified: head/sys/net/if_edsc.c ============================================================================== --- head/sys/net/if_edsc.c Mon Mar 2 02:45:52 2020 (r358514) +++ head/sys/net/if_edsc.c Mon Mar 2 02:45:57 2020 (r358515) @@ -98,7 +98,7 @@ edsc_clone_create(struct if_clone *ifc, int unit, cadd { struct edsc_softc *sc; struct ifnet *ifp; - static u_char eaddr[ETHER_ADDR_LEN]; /* 0:0:0:0:0:0 */ + struct ether_addr eaddr; /* * Allocate soft and ifnet structures. Link each to the other. @@ -149,11 +149,15 @@ edsc_clone_create(struct if_clone *ifc, int unit, cadd ifp->if_snd.ifq_maxlen = ifqmaxlen; /* + * Generate an arbitrary MAC address for the cloned interface. + */ + ether_gen_addr(ifp, &eaddr); + + /* * Do ifnet initializations common to all Ethernet drivers * and attach to the network interface framework. - * TODO: Pick a non-zero link level address. */ - ether_ifattach(ifp, eaddr); + ether_ifattach(ifp, eaddr.octet); /* * Now we can mark the interface as running, i.e., ready From owner-svn-src-head@freebsd.org Mon Mar 2 03:56:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA70D25822B for ; Mon, 2 Mar 2020 03:56:44 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-21.consmr.mail.gq1.yahoo.com (sonic305-21.consmr.mail.gq1.yahoo.com [98.137.64.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48W5tM3Bjbz4JF5 for ; Mon, 2 Mar 2020 03:56:43 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: tRkDlrsVM1kTAb_Ae7cS3OkxwNAU_fuc1e3Jh0QLDTiKBepGRQc8AxgNqvHxbNW FnFWV2kgFjfYoevXrmy7tLYtd8eKH2jLDf47BQa17zyU8Tg4_0G.Gkq3.KytsioxF.lNWkTsjrxO dnuG0guT.uaB4OQT.rfpIUeYAc8F0dZ447MRwcEkKa2tns1pmrLBiRgITSJsPIYGymRjtCQSiaqx yAj_3KYQ5ajxcrSzrnhzpYuHyOiwv5pb9V.IxT6.OMgu5.cQNTqqYYXsT8bVVGsG24xbhEMs_A60 3hz5ZkXAvYJNhO6OkoblDl_C3SatPUyZntMB2D184n6bzXp2lH0OsL2ZIm5dOiSkEl7uXFtEX7Hs Lck8GiFMKYD.nmYBqifh4O4yvg01quH9EBl2myh7z6yaO3P0c4J130NKGI0FXC28a2k0r5RaYQXo 1pfU5AcIzk0Dt3bKnaSYBKAxwR5txJJ0IIKVvgV94e2B2dWneGPURdhirVM1Mi6i1Xx.3bsuoF3k VIezBzMhEgZAR6hioiYTZSH_ckq9q5FLaTSrcKyPA4S6GJzOVQ.1jVIjWcnZxD9K9B_asy65SXwv oncfcqGiYNIkIwW1hOBDpAg.YdzIEcVqW.BDUKgaZ.EohAwfODHClAeeO9T06EQ9Gazzy8EkqXGF pG2pkn8nPsHJx5gNRts8GUa7inyo4RIPWfK54cNvWHL6Em_j640KpnkiEbziVSS23LP1SAI64Bwd szpdGdlQLQ2oHyx0b9F0jn8758.sJHJfypUqmpukdzITvhmyD3v827SlTlnK48Ab_kutylv6XlQ4 JxqDJf_DKvgqV.HLqemKLRpq8BTOaQouFMElpaaE5fSnBbYljr11PZtp_gP6RjolVysmJ4a09viC _Fck2DHb0Bxkb3QpuCt2AV9o9v9RvBFoV8kDD8GeNXnK7eDpE2LWK7PJ2Jt_2uOPbQyoA1s7b.3v sDSEXzi1t2i0SxJM0aNmoqSLqnlusnU096joTTlsaK9zgFNFApQ3hRxX5rH0xklcjeaaa3zwaI0s geV36.3BF7RIjiTZiXuobYbYn7pUVUeC8usOCU4SzXMRK9FauuLEg6FrV6stkOomKubB7z6VXNUJ Rm5ge.nH0cQN6czKi6BmKLIYlFcSoL0UCFQ4Uvmu9m1wq6Hvik2YtTwCKZu.EXvkWtjU55xEO0Av c3iQlK.zX1AlbVeNPwVeU4i9hzPYCXbKWa6M25DKfEQhNog1ewWR_v9z2JaulPbl3D2zkew_mu1Y zLA2j.YZ74v76.xHOuiDPxxuiqev.hAsxZjUVOKtLuvraTEJqpBlMKQvVCShEUSHzPX3iYHvekgh lSeaNkmy8qqM5sEU2A4Us7S_vRQZmM0IRTkUj52Kba1WDe4jIb1VUm.foUCBazr4dRjKNuE4ed.O HzTSfo5YdAcR47VtsY7Z5iHsZQTVObbSgc5SIMb5v5XqWvhHdvYfWqvI- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Mon, 2 Mar 2020 03:56:41 +0000 Received: by smtp429.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID cff737325b4073425d8fd77f62e768ff; Mon, 02 Mar 2020 03:56:41 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358500 - in head: . etc/mtree include sys/conf sys/i386/include sys/powerpc/conf Message-Id: <6FE6D0FA-7F34-4E3D-83D5-E02B9F89A11D@yahoo.com> Date: Sun, 1 Mar 2020 19:56:40 -0800 To: "imp@freebsd.org" , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.60.0.2.5) References: <6FE6D0FA-7F34-4E3D-83D5-E02B9F89A11D.ref@yahoo.com> X-Rspamd-Queue-Id: 48W5tM3Bjbz4JF5 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.56 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.86)[-0.855,0]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_SPAM_MEDIUM(0.79)[0.791,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[84.64.137.98.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (4.30), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.66), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 03:56:44 -0000 Warner Losh imp at FreeBSD.org wrote on Sun Mar 1 20:37:45 UTC 2020 : > +# 20200301: bktr removed > +OLD_DIRS+=3Dusr/include/dev/bktr > +OLD_FILES+=3Dusr/include/dev/bktr/ioctl_bktr.h > +OLD_FILES+=3Dusr/include/dev/bktr/ioctl_meteor.h > +.if ${TARGET_ARCH} =3D=3D "i386" > +OLD_FILES+=3Dusr/include/machine/ioctl_bktr.h > +OLD_FILES+=3Dusr/include/machine/ioctl_meteor.h > +.endif > +OLD_FILES+=3Dusr/share/man/man4/bktr.4.gz But I'm seeing rmdir failures in head -r358510 : (It is an example from my cross builds. I replaced the leading >>>'s with []'s.) [] Removing old files (only deletes safe to delete libs) = /usr/obj/DESTDIRs/clang-cortexA72-installworld-poud/usr/include/dev/bktr/i= octl_meteor.h = /usr/obj/DESTDIRs/clang-cortexA72-installworld-poud/usr/share/man/man4/bkt= r.4.gz = /usr/obj/DESTDIRs/clang-cortexA72-installworld-poud/usr/share/zoneinfo/Etc= /UCT [] Old files removed [] Removing old directories rmdir: = /usr/obj/DESTDIRs/clang-cortexA72-installworld-poud/usr/include/dev/bktr: = Directory not empty [] Old directories removed Where afterwards: # ls -laT = /usr/obj/DESTDIRs/clang-cortexA72-installworld-poud/usr/include/dev/bktr/ total 20 drwxr-xr-x 2 root wheel 512 Mar 1 19:32:47 2020 . drwxr-xr-x 34 root wheel 512 Jul 31 20:50:10 2019 .. -r--r--r-- 1 root wheel 9780 Mar 27 01:33:24 2019 ioctl_bt848.h But I also see (from the host environment this time): # grep -r ioctl_bt848 /usr/src/* | more /usr/src/usr.bin/setchannel/setchannel.c:#include = =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Mon Mar 2 04:22:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 33EBC258FC4; Mon, 2 Mar 2020 04:22:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48W6SH4xxmz4jDk; Mon, 2 Mar 2020 04:22:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 383CBEDA2; Mon, 2 Mar 2020 04:22:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0224Mdv7076914; Mon, 2 Mar 2020 04:22:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0224Mdfa076913; Mon, 2 Mar 2020 04:22:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003020422.0224Mdfa076913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 2 Mar 2020 04:22:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358518 - head/usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/elfctl X-SVN-Commit-Revision: 358518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 04:22:40 -0000 Author: kevans Date: Mon Mar 2 04:22:38 2020 New Revision: 358518 URL: https://svnweb.freebsd.org/changeset/base/358518 Log: elfctl: initialize features GCC points out a couple levels down in convert_to_features that this may be used uninitialized. Indeed, this is true- initialize it to NULL so that we at least deref a null pointer. Modified: head/usr.bin/elfctl/elfctl.c Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Mon Mar 2 02:47:56 2020 (r358517) +++ head/usr.bin/elfctl/elfctl.c Mon Mar 2 04:22:38 2020 (r358518) @@ -92,6 +92,7 @@ main(int argc, char **argv) lflag = 0; editfeatures = 0; retval = 0; + features = NULL; if (elf_version(EV_CURRENT) == EV_NONE) errx(EXIT_FAILURE, "elf_version error"); From owner-svn-src-head@freebsd.org Mon Mar 2 08:45:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43D8725EE7A; Mon, 2 Mar 2020 08:45:02 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WDH21CPJz4GP3; Mon, 2 Mar 2020 08:45:02 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 115CB19CE2; Mon, 2 Mar 2020 08:45:02 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0228j1LW035214; Mon, 2 Mar 2020 08:45:01 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0228ixLj035186; Mon, 2 Mar 2020 08:44:59 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202003020844.0228ixLj035186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 2 Mar 2020 08:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358533 - in head: contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head: contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests X-SVN-Commit-Revision: 358533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 08:45:02 -0000 Author: mm Date: Mon Mar 2 08:44:58 2020 New Revision: 358533 URL: https://svnweb.freebsd.org/changeset/base/358533 Log: MFV r358511,r358532: Sync libarchive with vendor. Relevant vendor changes: Issue #1257: Add testcase for ZIPX files with LZMA_STREAM_END marker PR #1331: cpio.5: fix hard link description Issue #1335: archive_read.c: fix UBSan warning about undefined behavior Issue #1338: XAR reader: fix UBSan warning about undefined behavior Issue #1339: bsdcpio_test: fix datatype in from_hex() Issue #1341: Safe writes: delete temporary file if rename fails. Issue #1341: Safe writes: improve error handling MFC after: 1 week Added: head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu - copied unchanged from r358511, vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu Modified: head/contrib/libarchive/cpio/cpio.c head/contrib/libarchive/cpio/cpio.h head/contrib/libarchive/cpio/test/test_format_newc.c head/contrib/libarchive/libarchive/archive_read.c head/contrib/libarchive/libarchive/archive_read_open_filename.c head/contrib/libarchive/libarchive/archive_read_support_format_xar.c head/contrib/libarchive/libarchive/archive_util.c head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive/archive_write_set_format_xar.c head/contrib/libarchive/libarchive/cpio.5 head/contrib/libarchive/libarchive/test/test_read_format_zip.c head/lib/libarchive/tests/Makefile Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/cpio/cpio.c ============================================================================== --- head/contrib/libarchive/cpio/cpio.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/cpio/cpio.c Mon Mar 2 08:44:58 2020 (r358533) @@ -737,7 +737,7 @@ file_to_archive(struct cpio *cpio, const char *srcpath */ destpath = srcpath; if (cpio->destdir) { - len = strlen(cpio->destdir) + strlen(srcpath) + 8; + len = cpio->destdir_len + strlen(srcpath) + 8; if (len >= cpio->pass_destpath_alloc) { while (len >= cpio->pass_destpath_alloc) { cpio->pass_destpath_alloc += 512; @@ -1228,15 +1228,14 @@ mode_pass(struct cpio *cpio, const char *destdir) struct lafe_line_reader *lr; const char *p; int r; - size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - destdir_len = strlen(destdir); - cpio->destdir = malloc(destdir_len + 8); - memcpy(cpio->destdir, destdir, destdir_len); - if (destdir_len == 0 || destdir[destdir_len - 1] != '/') - cpio->destdir[destdir_len++] = '/'; - cpio->destdir[destdir_len++] = '\0'; + cpio->destdir_len = strlen(destdir); + cpio->destdir = malloc(cpio->destdir_len + 8); + memcpy(cpio->destdir, destdir, cpio->destdir_len); + if (cpio->destdir_len == 0 || destdir[cpio->destdir_len - 1] != '/') + cpio->destdir[cpio->destdir_len++] = '/'; + cpio->destdir[cpio->destdir_len] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) Modified: head/contrib/libarchive/cpio/cpio.h ============================================================================== --- head/contrib/libarchive/cpio/cpio.h Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/cpio/cpio.h Mon Mar 2 08:44:58 2020 (r358533) @@ -64,6 +64,7 @@ struct cpio { int option_numeric_uid_gid; /* -n */ int option_rename; /* -r */ char *destdir; + size_t destdir_len; size_t pass_destpath_alloc; char *pass_destpath; int uid_override; Modified: head/contrib/libarchive/cpio/test/test_format_newc.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_format_newc.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/cpio/test/test_format_newc.c Mon Mar 2 08:44:58 2020 (r358533) @@ -49,10 +49,11 @@ is_hex(const char *p, size_t l) return (1); } -static int +/* Convert up to 8 hex characters to unsigned 32-bit decimal integer */ +static uint32_t from_hex(const char *p, size_t l) { - int r = 0; + uint32_t r = 0; while (l > 0) { r *= 16; @@ -82,11 +83,11 @@ DEFINE_TEST(test_format_newc) { FILE *list; int r; - int devmajor, devminor, ino, gid; - int uid = -1; + uint32_t devmajor, devminor, ino, gid, uid; time_t t, t2, now; char *p, *e; - size_t s, fs, ns; + size_t s; + uint64_t fs, ns; char result[1024]; assertUmask(0); @@ -199,9 +200,11 @@ DEFINE_TEST(test_format_newc) #else assertEqualInt(0x81a4, from_hex(e + 14, 8)); /* Mode */ #endif - if (uid < 0) - uid = from_hex(e + 22, 8); +#if defined(_WIN32) + uid = from_hex(e + 22, 8); +#else assertEqualInt(from_hex(e + 22, 8), uid); /* uid */ +#endif gid = from_hex(e + 30, 8); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t = from_hex(e + 46, 8); /* mtime */ @@ -215,14 +218,14 @@ DEFINE_TEST(test_format_newc) " first appearance should be empty, so this file size\n" " field should be zero"); assertEqualInt(0, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); devmajor = from_hex(e + 62, 8); /* devmajor */ devminor = from_hex(e + 70, 8); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000006", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "file1\0", 6); /* Name contents */ @@ -249,14 +252,14 @@ DEFINE_TEST(test_format_newc) " at t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000005", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000008", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "symlink\0\0\0", 10); /* Name contents */ @@ -285,14 +288,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000000", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000004", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "dir\0\0\0", 6); /* Name contents */ @@ -319,14 +322,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualInt(10, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000009", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "hardlink\0\0", 10); /* Name contents */ Modified: head/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_read.c Mon Mar 2 08:44:58 2020 (r358533) @@ -892,15 +892,16 @@ archive_read_data(struct archive *_a, void *buff, size len = a->read_data_remaining; if (len > s) len = s; - if (len) + if (len) { memcpy(dest, a->read_data_block, len); - s -= len; - a->read_data_block += len; - a->read_data_remaining -= len; - a->read_data_output_offset += len; - a->read_data_offset += len; - dest += len; - bytes_read += len; + s -= len; + a->read_data_block += len; + a->read_data_remaining -= len; + a->read_data_output_offset += len; + a->read_data_offset += len; + dest += len; + bytes_read += len; + } } } a->read_data_is_posix_read = 0; Modified: head/contrib/libarchive/libarchive/archive_read_open_filename.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_open_filename.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_read_open_filename.c Mon Mar 2 08:44:58 2020 (r358533) @@ -221,7 +221,9 @@ file_open(struct archive *a, void *client_data) struct read_file_data *mine = (struct read_file_data *)client_data; void *buffer; const char *filename = NULL; +#if defined(_WIN32) && !defined(__CYGWIN__) const wchar_t *wfilename = NULL; +#endif int fd = -1; int is_disk_like = 0; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -281,10 +283,12 @@ file_open(struct archive *a, void *client_data) #endif } if (fstat(fd, &st) != 0) { +#if defined(_WIN32) && !defined(__CYGWIN__) if (mine->filename_type == FNT_WCS) archive_set_error(a, errno, "Can't stat '%S'", wfilename); else +#endif archive_set_error(a, errno, "Can't stat '%s'", filename); goto fail; Modified: head/contrib/libarchive/libarchive/archive_read_support_format_xar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Mon Mar 2 08:44:58 2020 (r358533) @@ -458,6 +458,11 @@ archive_read_support_format_xar(struct archive *_a) return (ARCHIVE_FATAL); } + /* initialize xar->file_queue */ + xar->file_queue.allocated = 0; + xar->file_queue.used = 0; + xar->file_queue.files = NULL; + r = __archive_read_register_format(a, xar, "xar", @@ -1221,10 +1226,12 @@ heap_add_entry(struct archive_read *a, /* Expand our pending files list as necessary. */ if (heap->used >= heap->allocated) { struct xar_file **new_pending_files; - int new_size = heap->allocated * 2; + int new_size; if (heap->allocated < 1024) new_size = 1024; + else + new_size = heap->allocated * 2; /* Overflow might keep us from growing the list. */ if (new_size <= heap->allocated) { archive_set_error(&a->archive, @@ -1238,9 +1245,11 @@ heap_add_entry(struct archive_read *a, ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); - free(heap->files); + if (heap->allocated) { + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); + free(heap->files); + } heap->files = new_pending_files; heap->allocated = new_size; } Modified: head/contrib/libarchive/libarchive/archive_util.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_util.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_util.c Mon Mar 2 08:44:58 2020 (r358533) @@ -365,6 +365,7 @@ __archive_mktempx(const char *tmpdir, wchar_t *templat } fd = _open_osfhandle((intptr_t)h, _O_BINARY | _O_RDWR); if (fd == -1) { + la_dosmaperr(GetLastError()); CloseHandle(h); goto exit_tmpfile; } else Modified: head/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk_posix.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_write_disk_posix.c Mon Mar 2 08:44:58 2020 (r358533) @@ -1856,8 +1856,9 @@ finish_metadata: if (a->tmpname) { if (rename(a->tmpname, a->name) == -1) { archive_set_error(&a->archive, errno, - "rename failed"); - ret = ARCHIVE_FATAL; + "Failed to rename temporary file"); + ret = ARCHIVE_FAILED; + unlink(a->tmpname); } a->tmpname = NULL; } @@ -2144,8 +2145,11 @@ restore_entry(struct archive_write_disk *a) if ((a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) && S_ISREG(a->st.st_mode)) { /* Use a temporary file to extract */ - if ((a->fd = la_mktemp(a)) == -1) + if ((a->fd = la_mktemp(a)) == -1) { + archive_set_error(&a->archive, errno, + "Can't create temporary file"); return ARCHIVE_FAILED; + } a->pst = NULL; en = 0; } else { Modified: head/contrib/libarchive/libarchive/archive_write_set_format_xar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_xar.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_write_set_format_xar.c Mon Mar 2 08:44:58 2020 (r358533) @@ -681,7 +681,8 @@ xar_write_data(struct archive_write *a, const void *bu { struct xar *xar; enum la_zaction run; - size_t size, rsize; + size_t size = 0; + size_t rsize; int r; xar = (struct xar *)a->format_data; Modified: head/contrib/libarchive/libarchive/cpio.5 ============================================================================== --- head/contrib/libarchive/libarchive/cpio.5 Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/cpio.5 Mon Mar 2 08:44:58 2020 (r358533) @@ -244,7 +244,7 @@ Note that this format supports only 4 gigabyte files ( older ASCII format, which supports 8 gigabyte files). .Pp In this format, hardlinked files are handled by setting the -filesize to zero for each entry except the last one that +filesize to zero for each entry except the first one that appears in the archive. .Ss New CRC Format The CRC format is identical to the new ASCII format described Modified: head/contrib/libarchive/libarchive/test/test_read_format_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_zip.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/test/test_read_format_zip.c Mon Mar 2 08:44:58 2020 (r358533) @@ -916,3 +916,53 @@ DEFINE_TEST(test_read_format_zip_lzma_alone_leak) * suite under Valgrind or ASan, the test runner won't return with * exit code 0 in case if a memory leak. */ } + +DEFINE_TEST(test_read_format_zip_lzma_stream_end) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one(a, ae, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} + +DEFINE_TEST(test_read_format_zip_lzma_stream_end_blockread) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one_using_blocks(a, 13, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} Copied: head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu (from r358511, vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu Mon Mar 2 08:44:58 2020 (r358533, copy of r358511, vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu) @@ -0,0 +1,19 @@ +begin 664 test_read_format_zip_lzma_stream_end.zipx +M4$L#!#\``@`.`#TQD4VJ.XZZ/@(``)`#```%````=FEM)82Q1PWAL +M+U`,N0L_$]^&650C/X$D6#4QFD$\A/"_![4!O/5O/!KH`WCQ*4?T2*]4P#/D +M0'9I?EZG=N69Z0V;H0I=CP*$?".I\ +MGMG/80.A'^W>R4J'S/CZ%P`8`>F=R>R&R$2T@EM#X)"OQH1?A7,`:4IU9WV! +M#2W*DXT',;.4YIN4A:-X)O=IREL201ZSOC=YSAU[C4-::/YV8\)%"L17+>VC +M%/'B]ZCQN$2(Q*9*\KJZ`Y131`]5C&G';@1S-QES_RZF!2OX45@58+??ES%( +MUJ<(\`11M$NO)HK#/MK-9RT"15.2I:IZN8VTM1_?$G\L#BH67]$S%[4 +M%C-$\Q<+./&HV](4,7)OL-@C^M0F"2O!0N$OHOW54H87^QLBQVH*D%A<#SI% +M/#+-5U(W';:KC)RE>0Y^5YI!RECQNR"R4.UW9IR!@:B!UB8?_D5$FT8YCJHJ +M2[2"-&-_D2BJ6#XK[6G=%K"%;'^-+0]FHCY4ER#`^ Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4B3225EEE8; Mon, 2 Mar 2020 08:45:34 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward501p.mail.yandex.net (forward501p.mail.yandex.net [77.88.28.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48WDHb2g4hz4GqW; Mon, 2 Mar 2020 08:45:30 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mxback28o.mail.yandex.net (mxback28o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::79]) by forward501p.mail.yandex.net (Yandex) with ESMTP id D3F6D3500771; Mon, 2 Mar 2020 11:45:27 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback28o.mail.yandex.net (mxback/Yandex) with ESMTP id SVxI2ozUCe-jRF8ce70; Mon, 02 Mar 2020 11:45:27 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1583138727; bh=LV5uAEYnYdJ3hMK4jAgIZC3CxlXJi3Ia0sHhCWA6e2Y=; h=References:Date:Message-Id:Subject:In-Reply-To:To:From; b=pb8F+YywLdXWGJdWFhX2RulZBXT/LcqMGkx4FTPJuK874XoTJy1NOaSUScVsbyVne DXfsV+pvXqK/00iCCKGzvQPRNSCAFOwdxwtGrXXJscFwAeQUhi1ikvij+Rc6OpXXbn 07RNE1vUmN4n+qo0sb8DBhOWiro2SyH9oKw1Ix0U= Received: by sas1-c7aad230fe87.qloud-c.yandex.net with HTTP; Mon, 02 Mar 2020 11:45:27 +0300 From: Alexander V. Chernikov To: Ryan Libby , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" In-Reply-To: <202002281832.01SIWaEL071685@repo.freebsd.org> References: <202002281832.01SIWaEL071685@repo.freebsd.org> Subject: Re: svn commit: r358439 - head/sys/amd64/include MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Mon, 02 Mar 2020 08:45:27 +0000 Message-Id: <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 48WDHb2g4hz4GqW X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ipfw.ru header.s=mail header.b=pb8F+Yyw; dmarc=none; spf=pass (mx1.freebsd.org: domain of melifaro@ipfw.ru designates 77.88.28.111 as permitted sender) smtp.mailfrom=melifaro@ipfw.ru X-Spamd-Result: default: False [-6.28 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[ipfw.ru:s=mail]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:77.88.0.0/18]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[ipfw.ru]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-3.69)[ip: (-9.77), ipnet: 77.88.0.0/18(-4.85), asn: 13238(-3.84), country: RU(0.01)]; DKIM_TRACE(0.00)[ipfw.ru:+]; RCVD_IN_DNSWL_LOW(-0.10)[111.28.88.77.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13238, ipnet:77.88.0.0/18, country:RU]; RCVD_TLS_LAST(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 08:45:34 -0000 28.02.2020, 18:32, "Ryan Libby" : > Author: rlibby > Date: Fri Feb 28 18:32:36 2020 > New Revision: 358439 > URL: https://svnweb.freebsd.org/changeset/base/358439 > > Log: >   amd64 atomic.h: minor codegen optimization in flag access > >   Previously the pattern to extract status flags from inline assembly >   blocks was to use setcc in the block to write the flag to a register. >   This was suboptimal in a few ways: >    - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag >      would just be loaded into a register and then reloaded to a flag. >    - The setcc would force the block to use an additional register. >    - If the client code didn't care for the flag value then the setcc >      would be entirely pointless but could not be eliminated by the >      optimizer. > >   A more modern inline asm construct (since gcc 6 and clang 9) allows for This effectively restricts kernel builds by all older compilers. Is there any chance of making it conditional depending on the compiler version/features? >   "flag output operands", where a C variable can be written directly from >   a flag. The optimizer can then use this to produce direct code where >   the flag does not take a trip through a register. > >   In practice this makes each affected operation sequence shorter by five >   bytes of instructions. It's unlikely this has a measurable performance >   impact. > >   Reviewed by: kib, markj, mjg >   Sponsored by: Dell EMC Isilon >   Differential Revision: https://reviews.freebsd.org/D23869 > > Modified: >   head/sys/amd64/include/atomic.h > > Modified: head/sys/amd64/include/atomic.h > ============================================================================== > --- head/sys/amd64/include/atomic.h Fri Feb 28 17:41:46 2020 (r358438) > +++ head/sys/amd64/include/atomic.h Fri Feb 28 18:32:36 2020 (r358439) > @@ -201,9 +201,8 @@ atomic_cmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE >          __asm __volatile( \ >          " " MPLOCKED " " \ >          " cmpxchg %3,%1 ; " \ > - " sete %0 ; " \ >          "# atomic_cmpset_" #TYPE " " \ > - : "=q" (res), /* 0 */ \ > + : "=@cce" (res), /* 0 */ \ >            "+m" (*dst), /* 1 */ \ >            "+a" (expect) /* 2 */ \ >          : "r" (src) /* 3 */ \ > @@ -219,9 +218,8 @@ atomic_fcmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE >          __asm __volatile( \ >          " " MPLOCKED " " \ >          " cmpxchg %3,%1 ; " \ > - " sete %0 ; " \ >          "# atomic_fcmpset_" #TYPE " " \ > - : "=q" (res), /* 0 */ \ > + : "=@cce" (res), /* 0 */ \ >            "+m" (*dst), /* 1 */ \ >            "+a" (*expect) /* 2 */ \ >          : "r" (src) /* 3 */ \ > @@ -278,9 +276,8 @@ atomic_testandset_int(volatile u_int *p, u_int v) >          __asm __volatile( >          " " MPLOCKED " " >          " btsl %2,%1 ; " > - " setc %0 ; " >          "# atomic_testandset_int" > - : "=q" (res), /* 0 */ > + : "=@ccc" (res), /* 0 */ >            "+m" (*p) /* 1 */ >          : "Ir" (v & 0x1f) /* 2 */ >          : "cc"); > @@ -295,9 +292,8 @@ atomic_testandset_long(volatile u_long *p, u_int v) >          __asm __volatile( >          " " MPLOCKED " " >          " btsq %2,%1 ; " > - " setc %0 ; " >          "# atomic_testandset_long" > - : "=q" (res), /* 0 */ > + : "=@ccc" (res), /* 0 */ >            "+m" (*p) /* 1 */ >          : "Jr" ((u_long)(v & 0x3f)) /* 2 */ >          : "cc"); > @@ -312,9 +308,8 @@ atomic_testandclear_int(volatile u_int *p, u_int v) >          __asm __volatile( >          " " MPLOCKED " " >          " btrl %2,%1 ; " > - " setc %0 ; " >          "# atomic_testandclear_int" > - : "=q" (res), /* 0 */ > + : "=@ccc" (res), /* 0 */ >            "+m" (*p) /* 1 */ >          : "Ir" (v & 0x1f) /* 2 */ >          : "cc"); > @@ -329,9 +324,8 @@ atomic_testandclear_long(volatile u_long *p, u_int v) >          __asm __volatile( >          " " MPLOCKED " " >          " btrq %2,%1 ; " > - " setc %0 ; " >          "# atomic_testandclear_long" > - : "=q" (res), /* 0 */ > + : "=@ccc" (res), /* 0 */ >            "+m" (*p) /* 1 */ >          : "Jr" ((u_long)(v & 0x3f)) /* 2 */ >          : "cc"); From owner-svn-src-head@freebsd.org Mon Mar 2 09:45:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 432061A8C40; Mon, 2 Mar 2020 09:45:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WFcL6PbXz3CcP; Mon, 2 Mar 2020 09:45:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF5441A7F7; Mon, 2 Mar 2020 09:45:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0229j6q0072819; Mon, 2 Mar 2020 09:45:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0229j6q0072818; Mon, 2 Mar 2020 09:45:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003020945.0229j6q0072818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 2 Mar 2020 09:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358537 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 358537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 09:45:08 -0000 Author: hselasky Date: Mon Mar 2 09:45:06 2020 New Revision: 358537 URL: https://svnweb.freebsd.org/changeset/base/358537 Log: Expose the ACPI power button, sleep button and LID state as evdev's. This allows libinput to disable touchpads when the lid is closed and various desktop environments can show power-off dialogs when the power button is pressed. While the latter is doable with devd a cross-platform solution is nicer. Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D23863 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/acpica/acpi_button.c head/sys/dev/acpica/acpi_lid.c Modified: head/sys/dev/acpica/acpi_button.c ============================================================================== --- head/sys/dev/acpica/acpi_button.c Mon Mar 2 09:16:48 2020 (r358536) +++ head/sys/dev/acpica/acpi_button.c Mon Mar 2 09:45:06 2020 (r358537) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" +#include "opt_evdev.h" #include #include #include @@ -40,6 +41,11 @@ __FBSDID("$FreeBSD$"); #include +#ifdef EVDEV_SUPPORT +#include +#include +#endif + /* Hooks for the ACPI CA debugging infrastructure */ #define _COMPONENT ACPI_BUTTON ACPI_MODULE_NAME("BUTTON") @@ -51,6 +57,9 @@ struct acpi_button_softc { #define ACPI_POWER_BUTTON 0 #define ACPI_SLEEP_BUTTON 1 boolean_t fixed; +#ifdef EVDEV_SUPPORT + struct evdev_dev *button_evdev; +#endif }; #define ACPI_NOTIFY_BUTTON_PRESSED_FOR_SLEEP 0x80 @@ -142,6 +151,20 @@ acpi_button_attach(device_t dev) event = (sc->button_type == ACPI_SLEEP_BUTTON) ? ACPI_EVENT_SLEEP_BUTTON : ACPI_EVENT_POWER_BUTTON; +#ifdef EVDEV_SUPPORT + sc->button_evdev = evdev_alloc(); + evdev_set_name(sc->button_evdev, device_get_desc(dev)); + evdev_set_phys(sc->button_evdev, device_get_nameunit(dev)); + evdev_set_id(sc->button_evdev, BUS_HOST, 0, 0, 1); + evdev_support_event(sc->button_evdev, EV_SYN); + evdev_support_event(sc->button_evdev, EV_KEY); + evdev_support_key(sc->button_evdev, + (sc->button_type == ACPI_SLEEP_BUTTON) ? KEY_SLEEP : KEY_POWER); + + if (evdev_register(sc->button_evdev)) + return (ENXIO); +#endif + /* * Install the new handler. We could remove any fixed handlers added * from the FADT once we have a duplicate from the AML but some systems @@ -248,6 +271,9 @@ static void acpi_button_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) { struct acpi_button_softc *sc; +#ifdef EVDEV_SUPPORT + uint16_t key; +#endif ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); @@ -263,6 +289,14 @@ acpi_button_notify_handler(ACPI_HANDLE h, UINT32 notif device_printf(sc->button_dev, "unknown notify %#x\n", notify); break; } + +#ifdef EVDEV_SUPPORT + key = (sc->button_type == ACPI_SLEEP_BUTTON) ? KEY_SLEEP : KEY_POWER; + evdev_push_key(sc->button_evdev, key, 1); + evdev_sync(sc->button_evdev); + evdev_push_key(sc->button_evdev, key, 0); + evdev_sync(sc->button_evdev); +#endif } static ACPI_STATUS Modified: head/sys/dev/acpica/acpi_lid.c ============================================================================== --- head/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:16:48 2020 (r358536) +++ head/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:45:06 2020 (r358537) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" +#include "opt_evdev.h" #include #include #include @@ -43,6 +44,11 @@ __FBSDID("$FreeBSD$"); #include +#ifdef EVDEV_SUPPORT +#include +#include +#endif + /* Hooks for the ACPI CA debugging infrastructure */ #define _COMPONENT ACPI_BUTTON ACPI_MODULE_NAME("LID") @@ -51,6 +57,9 @@ struct acpi_lid_softc { device_t lid_dev; ACPI_HANDLE lid_handle; int lid_status; /* open or closed */ +#ifdef EVDEV_SUPPORT + struct evdev_dev *lid_evdev; +#endif }; ACPI_HANDLE acpi_lid_handle; @@ -104,6 +113,12 @@ acpi_lid_status_update(struct acpi_lid_softc *sc) /* range check value */ sc->lid_status = lid_status ? 1 : 0; + +#ifdef EVDEV_SUPPORT + /* Notify evdev about lid status */ + evdev_push_sw(sc->lid_evdev, SW_LID, lid_status ? 0 : 1); + evdev_sync(sc->lid_evdev); +#endif } static int @@ -131,6 +146,20 @@ acpi_lid_attach(device_t dev) sc = device_get_softc(dev); sc->lid_dev = dev; acpi_lid_handle = sc->lid_handle = acpi_get_handle(dev); + +#ifdef EVDEV_SUPPORT + /* Register evdev device before initial status update */ + sc->lid_evdev = evdev_alloc(); + evdev_set_name(sc->lid_evdev, device_get_desc(dev)); + evdev_set_phys(sc->lid_evdev, device_get_nameunit(dev)); + evdev_set_id(sc->lid_evdev, BUS_HOST, 0, 0, 1); + evdev_support_event(sc->lid_evdev, EV_SYN); + evdev_support_event(sc->lid_evdev, EV_SW); + evdev_support_sw(sc->lid_evdev, SW_LID); + + if (evdev_register(sc->lid_evdev)) + return (ENXIO); +#endif /* * If a system does not get lid events, it may make sense to change From owner-svn-src-head@freebsd.org Mon Mar 2 13:11:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B01FC1AE34B; Mon, 2 Mar 2020 13:11:55 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WLBy4fm5z4PCl; Mon, 2 Mar 2020 13:11:54 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f47.google.com with SMTP id m22so5053915ioj.7; Mon, 02 Mar 2020 05:11:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FCy1AEYtH3GvAwTDryhWo5F+/c0qQrNYEBCPjIQ8iJM=; b=QqYok49GqnDqDAMMYRa3NVbBg3a0KX1OVNW/4N9LwOC4W6PcDPyp+HzmSshvftr6jX GQ/XI1QOkXm8WLxCLaK9EDr2G+8/suQSIhm8LkvsZVz2c+6YML9hrY3scYv0nsGNyhjw WCAOtAxNAsgzHK3PAfVpbp2XsF0HOEJlglJjAd3ogE5mw5M4XlhZ7s8M3KXmYrHlTi9Z RWNa1KRQL1s5+AkzOC+DCZQKXMmxxeIQ1eAH9hGS2OppDaZgRd4Kn+iWemljXbDuRkGn m4xFbudnVbTciLUQNkpk7rQecrmbFSqrPfdsXQtbVZPL/3TnvZpKN7Hq2z99dFWKIS8n CbLw== X-Gm-Message-State: APjAAAXpQi0oD6ylb3YUbaMytVrDvkp1W+sZf93DzhKXroql0prueJbW kqknAhhm+6fJ3UyWa8aeTlkPld2KlSzo1qcMpQUA9K7f X-Google-Smtp-Source: APXvYqzZjR4Ue1Ksp7C8JxLVr0VbUH0bxun/BazvZ2h8hHQLGUyaNn/noWagzKdVi+jVxbBo3R7v4vHfLx/oXht5djc= X-Received: by 2002:a6b:400b:: with SMTP id k11mr13083675ioa.256.1583154712503; Mon, 02 Mar 2020 05:11:52 -0800 (PST) MIME-Version: 1.0 References: <202003020422.0224Mdfa076913@repo.freebsd.org> In-Reply-To: <202003020422.0224Mdfa076913@repo.freebsd.org> From: Ed Maste Date: Sun, 1 Mar 2020 22:28:35 -0500 Message-ID: Subject: Re: svn commit: r358518 - head/usr.bin/elfctl To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48WLBy4fm5z4PCl X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 13:11:55 -0000 On Sun, 1 Mar 2020 at 23:22, Kyle Evans wrote: > > Author: kevans > Date: Mon Mar 2 04:22:38 2020 > New Revision: 358518 > URL: https://svnweb.freebsd.org/changeset/base/358518 > > Log: > elfctl: initialize features > > GCC points out a couple levels down in convert_to_features that this may be > used uninitialized. Indeed, this is true- initialize it to NULL so that we > at least deref a null pointer. Note that features is only used in the case that editfeatures = 1, so I believe this is a false positive from GCC. But, thank you for fixing the warning / build. This code code definitely use some style(9) and tidying; I'll try to get to that shortly. From owner-svn-src-head@freebsd.org Mon Mar 2 14:04:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F75D1AFBEB; Mon, 2 Mar 2020 14:04:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WMMG0747z3Jbd; Mon, 2 Mar 2020 14:04:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D98281D77F; Mon, 2 Mar 2020 14:04:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022E49Ir035966; Mon, 2 Mar 2020 14:04:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022E490h035965; Mon, 2 Mar 2020 14:04:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003021404.022E490h035965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 2 Mar 2020 14:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358544 - head/contrib/libstdc++ X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/libstdc++ X-SVN-Commit-Revision: 358544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 14:04:10 -0000 Author: emaste Date: Mon Mar 2 14:04:09 2020 New Revision: 358544 URL: https://svnweb.freebsd.org/changeset/base/358544 Log: Remove old contrib/libstdc++, unused since r358454 Sponsored by: The FreeBSD Foundation Deleted: head/contrib/libstdc++/ From owner-svn-src-head@freebsd.org Mon Mar 2 14:06:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FFDC1AFCAB; Mon, 2 Mar 2020 14:06:14 +0000 (UTC) (envelope-from rene@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WMPf1wxpz3KR8; Mon, 2 Mar 2020 14:06:14 +0000 (UTC) (envelope-from rene@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1185) id D9E714EF2; Mon, 2 Mar 2020 14:05:28 +0000 (UTC) Date: Mon, 2 Mar 2020 14:05:28 +0000 From: Rene Ladan To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358497 - in head: . share/man/man4 sys/conf sys/dev/bktr sys/modules sys/modules/bktr sys/modules/bktr/bktr sys/modules/bktr/bktr_mem sys/sys Message-ID: <20200302140528.GA41796@freefall.freebsd.org> References: <202003011915.021JF3bW047048@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202003011915.021JF3bW047048@repo.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 14:06:14 -0000 On Sun, Mar 01, 2020 at 07:15:03PM +0000, Warner Losh wrote: > Author: imp > Date: Sun Mar 1 19:15:03 2020 > New Revision: 358497 > URL: https://svnweb.freebsd.org/changeset/base/358497 > > Log: > Remove bktr(4) > > Remove the brooktree driver as discussed on arch@. Bump FreeBSD version to > 1300082, though I doubt anything will care. > > Relnote: yes > > Deleted: > head/share/man/man4/bktr.4 > head/sys/dev/bktr/CHANGELOG.TXT > head/sys/dev/bktr/bktr_audio.c > head/sys/dev/bktr/bktr_audio.h > head/sys/dev/bktr/bktr_card.c > head/sys/dev/bktr/bktr_card.h > head/sys/dev/bktr/bktr_core.c > head/sys/dev/bktr/bktr_core.h > head/sys/dev/bktr/bktr_i2c.c > head/sys/dev/bktr/bktr_i2c.h > head/sys/dev/bktr/bktr_mem.c > head/sys/dev/bktr/bktr_mem.h > head/sys/dev/bktr/bktr_os.c > head/sys/dev/bktr/bktr_os.h > head/sys/dev/bktr/bktr_reg.h > head/sys/dev/bktr/bktr_tuner.c > head/sys/dev/bktr/bktr_tuner.h > head/sys/dev/bktr/ioctl_bt848.h > head/sys/dev/bktr/ioctl_meteor.h > head/sys/dev/bktr/msp34xx.c > head/sys/modules/bktr/Makefile > head/sys/modules/bktr/Makefile.inc > head/sys/modules/bktr/bktr/Makefile > head/sys/modules/bktr/bktr_mem/Makefile > Modified: > head/UPDATING > head/share/man/man4/Makefile > head/sys/conf/files > head/sys/modules/Makefile > head/sys/sys/param.h > Hmm, /usr/src/share/man/man4/meteor.4 is still present, should that file be removed too? René From owner-svn-src-head@freebsd.org Mon Mar 2 14:06:51 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 486121AFD4A; Mon, 2 Mar 2020 14:06:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WMQM0LTQz3LmK; Mon, 2 Mar 2020 14:06:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C260C1D780; Mon, 2 Mar 2020 14:06:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022E6oZm036138; Mon, 2 Mar 2020 14:06:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022E6o4w036137; Mon, 2 Mar 2020 14:06:50 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003021406.022E6o4w036137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 2 Mar 2020 14:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358545 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 358545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 14:06:51 -0000 Author: andrew Date: Mon Mar 2 14:06:50 2020 New Revision: 358545 URL: https://svnweb.freebsd.org/changeset/base/358545 Log: Generate the offsets for struct arm64_bootparams and use it in locore.S This removes one place with hard coded offsets in locore.S Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/genassym.c head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Mon Mar 2 14:04:09 2020 (r358544) +++ head/sys/arm64/arm64/genassym.c Mon Mar 2 14:06:50 2020 (r358545) @@ -34,7 +34,17 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include + +/* Sizeof arm64_bootparams, rounded to keep stack alignment */ +ASSYM(BOOTPARAMS_SIZE, roundup2(sizeof(struct arm64_bootparams), + STACKALIGNBYTES + 1)); +ASSYM(BP_MODULEP, offsetof(struct arm64_bootparams, modulep)); +ASSYM(BP_KERN_L1PT, offsetof(struct arm64_bootparams, kern_l1pt)); +ASSYM(BP_KERN_DELTA, offsetof(struct arm64_bootparams, kern_delta)); +ASSYM(BP_KERN_STACK, offsetof(struct arm64_bootparams, kern_stack)); +ASSYM(BP_KERN_L0PT, offsetof(struct arm64_bootparams,kern_l0pt)); ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Mon Mar 2 14:04:09 2020 (r358544) +++ head/sys/arm64/arm64/locore.S Mon Mar 2 14:06:50 2020 (r358545) @@ -153,18 +153,18 @@ virtdone: sub x26, x26, x29 sub x24, x24, x29 - sub sp, sp, #(64 * 4) + sub sp, sp, #BOOTPARAMS_SIZE mov x0, sp /* Degate the delda so it is VA -> PA */ neg x29, x29 - str x1, [x0] /* modulep */ - str x26, [x0, 8] /* kern_l1pt */ - str x29, [x0, 16] /* kern_delta */ + str x1, [x0, #BP_MODULEP] + str x26, [x0, #BP_KERN_L1PT] + str x29, [x0, #BP_KERN_DELTA] adr x25, initstack - str x25, [x0, 24] /* kern_stack */ - str x24, [x0, 32] /* kern_l0pt */ + str x25, [x0, #BP_KERN_STACK] + str x24, [x0, #BP_KERN_L0PT] /* trace back starts here */ mov fp, #0 From owner-svn-src-head@freebsd.org Mon Mar 2 14:18:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1019C25019A for ; Mon, 2 Mar 2020 14:18:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WMgd5yS9z4N9b; Mon, 2 Mar 2020 14:18:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 644362C124; Mon, 2 Mar 2020 14:18:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Eugene Grosbein , Hajimu UMEMOTO Cc: src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <66b377d6-cb80-ef9a-c87f-fcb893b9d631@FreeBSD.org> Date: Mon, 2 Mar 2020 09:18:15 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 14:18:22 -0000 On 20. 3. 1., Eugene Grosbein wrote: > 01.03.2020 22:20, Hajimu UMEMOTO wrote: > >>>>>>> On Sun, 1 Mar 2020 21:57:35 +0700 >>>>>>> Eugene Grosbein said: >> >> eugen> One more time: these days it is not possible to upgrade 11.2-STABLE system to recent stable/11 >> eugen> with stock sendmail and SSL/SASL support if the system has ports that need openssl-1.1.1, >> >> If you wish to use base sendmail with cyrus-sasl2, you must build >> cyrus-sasl2 with base openssl. If you wish to use cyrus-sasl2 with >> port openssl, you should use port sendmail. > > One more time: these days it is not possible. > > Dependency error: This port wants the OpenSSL library from the FreeBSD > base system. You can't build against it, while a newer > version is installed by a port. > Please deinstall the port, remove DEFAULT_VERSIONS=ssl=base or undefine WITH_OPENSSL_BASE. > *** Error code 1 > > Meantime, openssl-1.1.1 is needed by multiple other ports and cannod be deinstalled. > And if I force building cyrus-sasl2 with base openssl using SSL option that was rolled back, > it STILL does not help. > > You can easily repeat the problem using recent ports tree and recent stable/11 and handbook-recommended way. Mixing base and ports OpenSSLs is a bad idea. If you decided to build some ports with ports OpenSSL for some reason, every ports using OpenSSL should be rebuilt with it to avoid this mayhem. Jung-uk Kim From owner-svn-src-head@freebsd.org Mon Mar 2 14:29:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 386F8250475 for ; Mon, 2 Mar 2020 14:29:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WMw733dSz3NTS; Mon, 2 Mar 2020 14:29:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1CA562C24B; Mon, 2 Mar 2020 14:29:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src From: Jung-uk Kim To: Eugene Grosbein , Hajimu UMEMOTO Cc: src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> <66b377d6-cb80-ef9a-c87f-fcb893b9d631@FreeBSD.org> Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: Date: Mon, 2 Mar 2020 09:29:06 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <66b377d6-cb80-ef9a-c87f-fcb893b9d631@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 14:29:12 -0000 On 20. 3. 2., Jung-uk Kim wrote: > On 20. 3. 1., Eugene Grosbein wrote: >> 01.03.2020 22:20, Hajimu UMEMOTO wrote: >> >>>>>>>> On Sun, 1 Mar 2020 21:57:35 +0700 Eugene Grosbein >>>>>>>> said: >>> >>> eugen> One more time: these days it is not possible to upgrade >>> 11.2-STABLE system to recent stable/11 eugen> with stock >>> sendmail and SSL/SASL support if the system has ports that need >>> openssl-1.1.1, >>> >>> If you wish to use base sendmail with cyrus-sasl2, you must >>> build cyrus-sasl2 with base openssl. If you wish to use >>> cyrus-sasl2 with port openssl, you should use port sendmail. >> >> One more time: these days it is not possible. >> >> Dependency error: This port wants the OpenSSL library from the >> FreeBSD base system. You can't build against it, while a newer >> version is installed by a port. Please deinstall the port, remove >> DEFAULT_VERSIONS=ssl=base or undefine WITH_OPENSSL_BASE. *** >> Error code 1 >> >> Meantime, openssl-1.1.1 is needed by multiple other ports and >> cannod be deinstalled. And if I force building cyrus-sasl2 with >> base openssl using SSL option that was rolled back, it STILL does >> not help. >> >> You can easily repeat the problem using recent ports tree and >> recent stable/11 and handbook-recommended way. > > Mixing base and ports OpenSSLs is a bad idea. If you decided to > build some ports with ports OpenSSL for some reason, every ports > using OpenSSL should be rebuilt with it to avoid this mayhem. And vice versa, i.e., every port using OpenSSL should be rebuilt if you decided to go back to base OpenSSL. Jung-uk Kim From owner-svn-src-head@freebsd.org Mon Mar 2 14:34:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C3F02506C5; Mon, 2 Mar 2020 14:34:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WN2C3mZHz479v; Mon, 2 Mar 2020 14:34:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 594161DD00; Mon, 2 Mar 2020 14:34:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022EYRLd054355; Mon, 2 Mar 2020 14:34:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022EYRR4054354; Mon, 2 Mar 2020 14:34:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003021434.022EYRR4054354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 2 Mar 2020 14:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358546 - head/usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/elfctl X-SVN-Commit-Revision: 358546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 14:34:28 -0000 Author: emaste Date: Mon Mar 2 14:34:26 2020 New Revision: 358546 URL: https://svnweb.freebsd.org/changeset/base/358546 Log: elfctl: tiny style(9) cleanup, use bool where appropriate Modified: head/usr.bin/elfctl/elfctl.c Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Mon Mar 2 14:06:50 2020 (r358545) +++ head/usr.bin/elfctl/elfctl.c Mon Mar 2 14:34:26 2020 (r358546) @@ -85,12 +85,12 @@ main(int argc, char **argv) GElf_Ehdr ehdr; Elf *elf; Elf_Kind kind; - int ch, fd, editfeatures, retval; + int ch, fd, retval; char *features; - bool lflag; + bool editfeatures, lflag; lflag = 0; - editfeatures = 0; + editfeatures = false; retval = 0; features = NULL; @@ -105,7 +105,7 @@ main(int argc, char **argv) break; case 'e': features = optarg; - editfeatures = 1; + editfeatures = true; break; case 'h': default: From owner-svn-src-head@freebsd.org Mon Mar 2 14:36:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78EF925075D; Mon, 2 Mar 2020 14:36:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WN4K06gTz4CLS; Mon, 2 Mar 2020 14:36:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C7671DD13; Mon, 2 Mar 2020 14:36:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022EaG0Q054495; Mon, 2 Mar 2020 14:36:16 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022EaGkD054494; Mon, 2 Mar 2020 14:36:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003021436.022EaGkD054494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 2 Mar 2020 14:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358547 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 358547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 14:36:17 -0000 Author: andrew Date: Mon Mar 2 14:36:15 2020 New Revision: 358547 URL: https://svnweb.freebsd.org/changeset/base/358547 Log: Add a space missed in r358545 Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/genassym.c Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Mon Mar 2 14:34:26 2020 (r358546) +++ head/sys/arm64/arm64/genassym.c Mon Mar 2 14:36:15 2020 (r358547) @@ -44,7 +44,7 @@ ASSYM(BP_MODULEP, offsetof(struct arm64_bootparams, mo ASSYM(BP_KERN_L1PT, offsetof(struct arm64_bootparams, kern_l1pt)); ASSYM(BP_KERN_DELTA, offsetof(struct arm64_bootparams, kern_delta)); ASSYM(BP_KERN_STACK, offsetof(struct arm64_bootparams, kern_stack)); -ASSYM(BP_KERN_L0PT, offsetof(struct arm64_bootparams,kern_l0pt)); +ASSYM(BP_KERN_L0PT, offsetof(struct arm64_bootparams, kern_l0pt)); ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); From owner-svn-src-head@freebsd.org Mon Mar 2 15:30:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AF0F251A95; Mon, 2 Mar 2020 15:30:55 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WPHL1wmzz3xRh; Mon, 2 Mar 2020 15:30:54 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3348B1E7A1; Mon, 2 Mar 2020 15:30:54 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022FUsDH084517; Mon, 2 Mar 2020 15:30:54 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022FUqT5084509; Mon, 2 Mar 2020 15:30:52 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202003021530.022FUqT5084509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 2 Mar 2020 15:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358548 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 15:30:55 -0000 Author: kaktus Date: Mon Mar 2 15:30:52 2020 New Revision: 358548 URL: https://svnweb.freebsd.org/changeset/base/358548 Log: sys/: Document few more sysctls. Submitted by: Antranig Vartanian Reviewed by: kaktus Commented by: jhb Approved by: kib (mentor) Sponsored by: illuria security Differential Revision: https://reviews.freebsd.org/D23759 Modified: head/sys/kern/kern_exec.c head/sys/kern/kern_shutdown.c head/sys/kern/kern_synch.c head/sys/kern/kern_umtx.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/kern/subr_kobj.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/kern_exec.c Mon Mar 2 15:30:52 2020 (r358548) @@ -123,18 +123,22 @@ static int do_execve(struct thread *td, struct image_a /* XXX This should be vm_size_t. */ SYSCTL_PROC(_kern, KERN_PS_STRINGS, ps_strings, CTLTYPE_ULONG|CTLFLAG_RD| - CTLFLAG_CAPRD|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_ps_strings, "LU", ""); + CTLFLAG_CAPRD|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_ps_strings, "LU", + "Location of process' ps_strings structure"); /* XXX This should be vm_size_t. */ SYSCTL_PROC(_kern, KERN_USRSTACK, usrstack, CTLTYPE_ULONG|CTLFLAG_RD| - CTLFLAG_CAPRD|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_usrstack, "LU", ""); + CTLFLAG_CAPRD|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_usrstack, "LU", + "Top of process stack"); SYSCTL_PROC(_kern, OID_AUTO, stackprot, CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSAFE, - NULL, 0, sysctl_kern_stackprot, "I", ""); + NULL, 0, sysctl_kern_stackprot, "I", + "Stack memory permissions"); u_long ps_arg_cache_limit = PAGE_SIZE / 16; SYSCTL_ULONG(_kern, OID_AUTO, ps_arg_cache_limit, CTLFLAG_RW, - &ps_arg_cache_limit, 0, ""); + &ps_arg_cache_limit, 0, + "Process' command line characters cache limit"); static int disallow_high_osrel; SYSCTL_INT(_kern, OID_AUTO, disallow_high_osrel, CTLFLAG_RW, Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/kern_shutdown.c Mon Mar 2 15:30:52 2020 (r358548) @@ -167,7 +167,8 @@ static int show_busybufs; static int show_busybufs = 1; #endif SYSCTL_INT(_kern_shutdown, OID_AUTO, show_busybufs, CTLFLAG_RW, - &show_busybufs, 0, ""); + &show_busybufs, 0, + "Show busy buffers during shutdown"); int suspend_blocked = 0; SYSCTL_INT(_kern, OID_AUTO, suspend_blocked, CTLFLAG_RW, Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/kern_synch.c Mon Mar 2 15:30:52 2020 (r358548) @@ -94,7 +94,8 @@ static fixpt_t cexp[3] = { }; /* kernel uses `FSCALE', userland (SHOULD) use kern.fscale */ -SYSCTL_INT(_kern, OID_AUTO, fscale, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, FSCALE, ""); +SYSCTL_INT(_kern, OID_AUTO, fscale, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, FSCALE, + "Fixed-point scale factor used for calculating load average values"); static void loadav(void *arg); Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/kern_umtx.c Mon Mar 2 15:30:52 2020 (r358548) @@ -240,7 +240,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, umtx_vnode_persistent, static int umtx_max_rb = 1000; SYSCTL_INT(_kern_ipc, OID_AUTO, umtx_max_robust, CTLFLAG_RWTUN, &umtx_max_rb, 0, - ""); + "Maximum number of robust mutexes allowed for each thread"); static uma_zone_t umtx_pi_zone; static struct umtxq_chain umtxq_chains[2][UMTX_CHAINS]; Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/sched_4bsd.c Mon Mar 2 15:30:52 2020 (r358548) @@ -437,7 +437,8 @@ maybe_preempt(struct thread *td) /* decay 95% of `ts_pctcpu' in 60 seconds; see CCPU_SHIFT before changing */ static fixpt_t ccpu = 0.95122942450071400909 * FSCALE; /* exp(-1/20) */ -SYSCTL_UINT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, ""); +SYSCTL_UINT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, + "Decay factor used for updating %CPU"); /* * If `ccpu' is not equal to `exp(-1/20)' and you still want to use the Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/sched_ule.c Mon Mar 2 15:30:52 2020 (r358548) @@ -3128,4 +3128,5 @@ SYSCTL_PROC(_kern_sched, OID_AUTO, topology_spec, CTLT /* ps compat. All cpu percentages from ULE are weighted. */ static int ccpu = 0; -SYSCTL_INT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, + "Decay factor used for updating %CPU in 4BSD scheduler"); Modified: head/sys/kern/subr_kobj.c ============================================================================== --- head/sys/kern/subr_kobj.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/subr_kobj.c Mon Mar 2 15:30:52 2020 (r358548) @@ -67,7 +67,8 @@ static int kobj_next_id = 1; #define KOBJ_ASSERT(what) mtx_assert(&kobj_mtx, what); SYSCTL_INT(_kern, OID_AUTO, kobj_methodcount, CTLFLAG_RD, - &kobj_next_id, 0, ""); + &kobj_next_id, 0, + "Number of kernel object methods registered"); static void kobj_init_mutex(void *arg) From owner-svn-src-head@freebsd.org Mon Mar 2 15:55:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED6C7252066; Mon, 2 Mar 2020 15:55:58 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48WPrG2Mc5z45RZ; Mon, 2 Mar 2020 15:55:57 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 022FtmaI027231; Mon, 2 Mar 2020 07:55:48 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 022FtmS2027230; Mon, 2 Mar 2020 07:55:48 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202003021555.022FtmS2027230@gndrsh.dnsmgr.net> Subject: Re: svn commit: r358497 - in head: . share/man/man4 sys/conf sys/dev/bktr sys/modules sys/modules/bktr sys/modules/bktr/bktr sys/modules/bktr/bktr_mem sys/sys In-Reply-To: <20200302140528.GA41796@freefall.freebsd.org> To: Rene Ladan Date: Mon, 2 Mar 2020 07:55:48 -0800 (PST) CC: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48WPrG2Mc5z45RZ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.92 / 15.00]; NEURAL_HAM_MEDIUM(-0.92)[-0.924,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 15:55:59 -0000 [ Charset ISO-8859-1 unsupported, converting... ] > On Sun, Mar 01, 2020 at 07:15:03PM +0000, Warner Losh wrote: > > Author: imp > > Date: Sun Mar 1 19:15:03 2020 > > New Revision: 358497 > > URL: https://svnweb.freebsd.org/changeset/base/358497 > > > > Log: > > Remove bktr(4) > > > > Remove the brooktree driver as discussed on arch@. Bump FreeBSD version to > > 1300082, though I doubt anything will care. > > > > Relnote: yes > > > > Deleted: > > head/share/man/man4/bktr.4 > > head/sys/dev/bktr/CHANGELOG.TXT > > head/sys/dev/bktr/bktr_audio.c > > head/sys/dev/bktr/bktr_audio.h > > head/sys/dev/bktr/bktr_card.c > > head/sys/dev/bktr/bktr_card.h > > head/sys/dev/bktr/bktr_core.c > > head/sys/dev/bktr/bktr_core.h > > head/sys/dev/bktr/bktr_i2c.c > > head/sys/dev/bktr/bktr_i2c.h > > head/sys/dev/bktr/bktr_mem.c > > head/sys/dev/bktr/bktr_mem.h > > head/sys/dev/bktr/bktr_os.c > > head/sys/dev/bktr/bktr_os.h > > head/sys/dev/bktr/bktr_reg.h > > head/sys/dev/bktr/bktr_tuner.c > > head/sys/dev/bktr/bktr_tuner.h > > head/sys/dev/bktr/ioctl_bt848.h > > head/sys/dev/bktr/ioctl_meteor.h > > head/sys/dev/bktr/msp34xx.c > > head/sys/modules/bktr/Makefile > > head/sys/modules/bktr/Makefile.inc > > head/sys/modules/bktr/bktr/Makefile > > head/sys/modules/bktr/bktr_mem/Makefile > > Modified: > > head/UPDATING > > head/share/man/man4/Makefile > > head/sys/conf/files > > head/sys/modules/Makefile > > head/sys/sys/param.h > > > Hmm, /usr/src/share/man/man4/meteor.4 is still present, > should that file be removed too? > > Ren? And there is also /usr/src/sys/i386/include/ioctl_meteor.h -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Mon Mar 2 15:58:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C06A02521A4; Mon, 2 Mar 2020 15:58:54 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WPvb4T7Dz49V8; Mon, 2 Mar 2020 15:58:51 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D3DD1EBE7; Mon, 2 Mar 2020 15:58:51 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022FwojF002411; Mon, 2 Mar 2020 15:58:50 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022FwosY002410; Mon, 2 Mar 2020 15:58:50 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003021558.022FwosY002410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 2 Mar 2020 15:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358549 - head/release/packages X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/release/packages X-SVN-Commit-Revision: 358549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 15:58:55 -0000 Author: kevans Date: Mon Mar 2 15:58:50 2020 New Revision: 358549 URL: https://svnweb.freebsd.org/changeset/base/358549 Log: pkgbase: remove logic for _profile packages We don't produce these anymore as of r356797, remove the remnant in generate-ucl.sh that accounted for them. This isn't strictly necessary, but future work is needed for the various packages that can be generated on a lib build. Namely, we may produce -development packages for private/internal libs that should be installed but won't have the base FreeBSD-libfoo pkg to depend on because it's internal (e.g. liby, libpmcstat, libifconfig) but we want the headers installed. It may be a better move to just shove these into -runtime-development instead, but if not then we've just simplified the cases that need to take private/internal libs into account. Modified: head/release/packages/generate-ucl.sh Modified: head/release/packages/generate-ucl.sh ============================================================================== --- head/release/packages/generate-ucl.sh Mon Mar 2 15:30:52 2020 (r358548) +++ head/release/packages/generate-ucl.sh Mon Mar 2 15:58:50 2020 (r358549) @@ -71,11 +71,6 @@ main() { _descr="32-bit Libraries, Debugging Symbols" pkgdeps="${outname}" ;; - *_lib32_profile) - outname="${outname%%_lib32_profile}" - _descr="32-bit Libraries, Profiling" - pkgdeps="${outname}" - ;; *_lib32) outname="${outname%%_lib32}" _descr="32-bit Libraries" @@ -84,11 +79,6 @@ main() { *_development) outname="${outname%%_development}" _descr="Development Files" - pkgdeps="${outname}" - ;; - *_profile) - outname="${outname%%_profile}" - _descr="Profiling Libraries" pkgdeps="${outname}" ;; *_debug) From owner-svn-src-head@freebsd.org Mon Mar 2 16:11:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD0D42528F1; Mon, 2 Mar 2020 16:11:27 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WQB65htBz4L2K; Mon, 2 Mar 2020 16:11:26 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA10C1EF23; Mon, 2 Mar 2020 16:11:25 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022GBPbo012939; Mon, 2 Mar 2020 16:11:25 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022GBPl6012938; Mon, 2 Mar 2020 16:11:25 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202003021611.022GBPl6012938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 2 Mar 2020 16:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358550 - head/sys/dev/aacraid X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/dev/aacraid X-SVN-Commit-Revision: 358550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 16:11:27 -0000 Author: luporl Date: Mon Mar 2 16:11:25 2020 New Revision: 358550 URL: https://svnweb.freebsd.org/changeset/base/358550 Log: [aacraid] Prevent sense data from causing a buffer overflow This issue was observed on a PowerPC64 machine with an Adaptec RAID Controller with PCI device ID 0x028d, where sense data was causing a buffer overflow because of wrong max sense length logic. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D23667 Modified: head/sys/dev/aacraid/aacraid_cam.c Modified: head/sys/dev/aacraid/aacraid_cam.c ============================================================================== --- head/sys/dev/aacraid/aacraid_cam.c Mon Mar 2 15:58:50 2020 (r358549) +++ head/sys/dev/aacraid/aacraid_cam.c Mon Mar 2 16:11:25 2020 (r358550) @@ -1182,7 +1182,7 @@ aac_cam_complete(struct aac_command *cm) scsi_sense_len) ? scsi_sense_len : srbr->sense_len; bcopy(&srbr->sense[0], &ccb->csio.sense_data, - srbr->sense_len); + sense_len); ccb->csio.sense_len = sense_len; ccb->ccb_h.status |= CAM_AUTOSNS_VALID; // scsi_sense_print(&ccb->csio); From owner-svn-src-head@freebsd.org Mon Mar 2 17:14:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD5A32543DB; Mon, 2 Mar 2020 17:14:10 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WRZT558Jz4TLT; Mon, 2 Mar 2020 17:14:08 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f170.google.com with SMTP id f198so347975qke.11; Mon, 02 Mar 2020 09:14:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w89quh4wCTdw71ykhoeqdQ/aHSiVp/DT1bqd2gyMc8E=; b=c3kcn8QfnjngIeiNw0ooViThuKp0DgA94+s1kfMEvtJOnbZtAagpi5jyoCe3b060e0 luaXcGnOpP9D6FjfMwy4jYV3I0NUvpJ1cBo9Wl7ZL4ow8tFN7ZjeObdkWNgIWiisklDh 9nyOeQxmJL+9zKRRfrJOtlkDalHl+UBymsps2uF3LER01L7OuPrqUzmEYdjQ/9RzpzFi b7b268m4gjvYBtVjEB7V6gSjnX5HIaV/XMbboYkpE3789Vh07pXkcUVfQrSgHwcDwyT0 nEFL14MaaJpiMWGVfuAJCd93FTNgZLcdxTIMx0SUYaJ6xQaEoF/Ffx13M+zXv27KhZbu DaJg== X-Gm-Message-State: ANhLgQ2SGKVvWyZ2TgtNidLvaeiCJ1FGlKIQSTMkGsflmYU4G+ih2ytv t6muxAZtG1ddk0TxUZhU7h0BtncE X-Google-Smtp-Source: ADFU+vvmUJQRs+bvsFUewEOJCey1FEKWcKf2yrjeZSvVwf7U64tEe2ObtMTFecgr8OgKUaftQh+UQg== X-Received: by 2002:a37:b86:: with SMTP id 128mr304568qkl.154.1583169244936; Mon, 02 Mar 2020 09:14:04 -0800 (PST) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com. [209.85.222.175]) by smtp.gmail.com with ESMTPSA id i28sm11001074qtc.57.2020.03.02.09.14.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Mar 2020 09:14:04 -0800 (PST) Received: by mail-qk1-f175.google.com with SMTP id u124so333978qkh.13; Mon, 02 Mar 2020 09:14:04 -0800 (PST) X-Received: by 2002:a05:620a:2116:: with SMTP id l22mr241302qkl.311.1583169244181; Mon, 02 Mar 2020 09:14:04 -0800 (PST) MIME-Version: 1.0 References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> In-Reply-To: <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> From: Ryan Libby Date: Mon, 2 Mar 2020 09:13:53 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358439 - head/sys/amd64/include To: "Alexander V. Chernikov" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48WRZT558Jz4TLT X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 209.85.222.170 as permitted sender) smtp.mailfrom=rlibby@gmail.com X-Spamd-Result: default: False [-3.45 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[170.222.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; IP_SCORE(-1.45)[ip: (-2.54), ipnet: 209.85.128.0/17(-2.99), asn: 15169(-1.66), country: US(-0.05)]; FORGED_SENDER(0.30)[rlibby@freebsd.org,rlibby@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[170.222.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[rlibby@freebsd.org,rlibby@gmail.com] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 17:14:11 -0000 On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > > 28.02.2020, 18:32, "Ryan Libby" : > > Author: rlibby > > Date: Fri Feb 28 18:32:36 2020 > > New Revision: 358439 > > URL: https://svnweb.freebsd.org/changeset/base/358439 > > > > Log: > > amd64 atomic.h: minor codegen optimization in flag access > > > > Previously the pattern to extract status flags from inline assembly > > blocks was to use setcc in the block to write the flag to a register. > > This was suboptimal in a few ways: > > - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > > would just be loaded into a register and then reloaded to a flag. > > - The setcc would force the block to use an additional register. > > - If the client code didn't care for the flag value then the setcc > > would be entirely pointless but could not be eliminated by the > > optimizer. > > > > A more modern inline asm construct (since gcc 6 and clang 9) allows for > This effectively restricts kernel builds by all older compilers. > Is there any chance of making it conditional depending on the compiler version/features? Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more maintenance effort going forward. If building current with an old cross compiler is an important scenario, we can either revert this and the following revision or work up a patch to make it conditional. I'll see what that might look like. > > "flag output operands", where a C variable can be written directly from > > a flag. The optimizer can then use this to produce direct code where > > the flag does not take a trip through a register. > > > > In practice this makes each affected operation sequence shorter by five > > bytes of instructions. It's unlikely this has a measurable performance > > impact. > > > > Reviewed by: kib, markj, mjg > > Sponsored by: Dell EMC Isilon > > Differential Revision: https://reviews.freebsd.org/D23869 > > > > Modified: > > head/sys/amd64/include/atomic.h > > > > Modified: head/sys/amd64/include/atomic.h > > ============================================================================== > > --- head/sys/amd64/include/atomic.h Fri Feb 28 17:41:46 2020 (r358438) > > +++ head/sys/amd64/include/atomic.h Fri Feb 28 18:32:36 2020 (r358439) > > @@ -201,9 +201,8 @@ atomic_cmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE > > __asm __volatile( \ > > " " MPLOCKED " " \ > > " cmpxchg %3,%1 ; " \ > > - " sete %0 ; " \ > > "# atomic_cmpset_" #TYPE " " \ > > - : "=q" (res), /* 0 */ \ > > + : "=@cce" (res), /* 0 */ \ > > "+m" (*dst), /* 1 */ \ > > "+a" (expect) /* 2 */ \ > > : "r" (src) /* 3 */ \ > > @@ -219,9 +218,8 @@ atomic_fcmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE > > __asm __volatile( \ > > " " MPLOCKED " " \ > > " cmpxchg %3,%1 ; " \ > > - " sete %0 ; " \ > > "# atomic_fcmpset_" #TYPE " " \ > > - : "=q" (res), /* 0 */ \ > > + : "=@cce" (res), /* 0 */ \ > > "+m" (*dst), /* 1 */ \ > > "+a" (*expect) /* 2 */ \ > > : "r" (src) /* 3 */ \ > > @@ -278,9 +276,8 @@ atomic_testandset_int(volatile u_int *p, u_int v) > > __asm __volatile( > > " " MPLOCKED " " > > " btsl %2,%1 ; " > > - " setc %0 ; " > > "# atomic_testandset_int" > > - : "=q" (res), /* 0 */ > > + : "=@ccc" (res), /* 0 */ > > "+m" (*p) /* 1 */ > > : "Ir" (v & 0x1f) /* 2 */ > > : "cc"); > > @@ -295,9 +292,8 @@ atomic_testandset_long(volatile u_long *p, u_int v) > > __asm __volatile( > > " " MPLOCKED " " > > " btsq %2,%1 ; " > > - " setc %0 ; " > > "# atomic_testandset_long" > > - : "=q" (res), /* 0 */ > > + : "=@ccc" (res), /* 0 */ > > "+m" (*p) /* 1 */ > > : "Jr" ((u_long)(v & 0x3f)) /* 2 */ > > : "cc"); > > @@ -312,9 +308,8 @@ atomic_testandclear_int(volatile u_int *p, u_int v) > > __asm __volatile( > > " " MPLOCKED " " > > " btrl %2,%1 ; " > > - " setc %0 ; " > > "# atomic_testandclear_int" > > - : "=q" (res), /* 0 */ > > + : "=@ccc" (res), /* 0 */ > > "+m" (*p) /* 1 */ > > : "Ir" (v & 0x1f) /* 2 */ > > : "cc"); > > @@ -329,9 +324,8 @@ atomic_testandclear_long(volatile u_long *p, u_int v) > > __asm __volatile( > > " " MPLOCKED " " > > " btrq %2,%1 ; " > > - " setc %0 ; " > > "# atomic_testandclear_long" > > - : "=q" (res), /* 0 */ > > + : "=@ccc" (res), /* 0 */ > > "+m" (*p) /* 1 */ > > : "Jr" ((u_long)(v & 0x3f)) /* 2 */ > > : "cc"); From owner-svn-src-head@freebsd.org Mon Mar 2 18:27:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83C68256A7B; Mon, 2 Mar 2020 18:27:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48WTBc2Q7Qz4q4M; Mon, 2 Mar 2020 18:27:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 022IQrDO031971 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 2 Mar 2020 20:26:56 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 022IQrDO031971 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 022IQr8M031970; Mon, 2 Mar 2020 20:26:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 2 Mar 2020 20:26:53 +0200 From: Konstantin Belousov To: "Alexander V. Chernikov" Cc: Ryan Libby , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r358439 - head/sys/amd64/include Message-ID: <20200302182653.GQ29554@kib.kiev.ua> References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 48WTBc2Q7Qz4q4M X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.98 / 15.00]; NEURAL_HAM_MEDIUM(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 18:27:05 -0000 On Mon, Mar 02, 2020 at 09:13:53AM -0800, Ryan Libby wrote: > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > > > > 28.02.2020, 18:32, "Ryan Libby" : > > > Author: rlibby > > > Date: Fri Feb 28 18:32:36 2020 > > > New Revision: 358439 > > > URL: https://svnweb.freebsd.org/changeset/base/358439 > > > > > > Log: > > > amd64 atomic.h: minor codegen optimization in flag access > > > > > > Previously the pattern to extract status flags from inline assembly > > > blocks was to use setcc in the block to write the flag to a register. > > > This was suboptimal in a few ways: > > > - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > > > would just be loaded into a register and then reloaded to a flag. > > > - The setcc would force the block to use an additional register. > > > - If the client code didn't care for the flag value then the setcc > > > would be entirely pointless but could not be eliminated by the > > > optimizer. > > > > > > A more modern inline asm construct (since gcc 6 and clang 9) allows for > > This effectively restricts kernel builds by all older compilers. > > Is there any chance of making it conditional depending on the compiler version/features? What is the older compiler you need to use for base system ? And why ? > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > maintenance effort going forward. If building current with an old cross > compiler is an important scenario, we can either revert this and the > following revision or work up a patch to make it conditional. I'll see > what that might look like. From owner-svn-src-head@freebsd.org Mon Mar 2 18:40:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01455256E5F; Mon, 2 Mar 2020 18:40:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WTVH66m6z3LZL; Mon, 2 Mar 2020 18:40:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CDA920953; Mon, 2 Mar 2020 18:40:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022Iedql000272; Mon, 2 Mar 2020 18:40:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022IeYak098618; Mon, 2 Mar 2020 18:40:34 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003021840.022IeYak098618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 2 Mar 2020 18:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358553 - head/usr.bin/hexdump/tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/hexdump/tests X-SVN-Commit-Revision: 358553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 18:40:40 -0000 Author: kevans Date: Mon Mar 2 18:40:34 2020 New Revision: 358553 URL: https://svnweb.freebsd.org/changeset/base/358553 Log: hexdump: tests: take into account byte order Hexdump test was failling on big endian systems when testing decimal, octal and hexa outputs as the tests were designed on a little endian system. This revision adds the two distinct flavors of output expected and determines at runtime which to compare against. Submitted by: Renato Riolino MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23191 Added: head/usr.bin/hexdump/tests/d_hexdump_dflag_a_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_dflag_a_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out head/usr.bin/hexdump/tests/d_hexdump_dflag_b_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_dflag_b_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out head/usr.bin/hexdump/tests/d_hexdump_dflag_c_eb.out (contents, props changed) - copied, changed from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out head/usr.bin/hexdump/tests/d_hexdump_dflag_c_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out head/usr.bin/hexdump/tests/d_hexdump_oflag_a_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_oflag_a_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out head/usr.bin/hexdump/tests/d_hexdump_oflag_b_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_oflag_b_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out head/usr.bin/hexdump/tests/d_hexdump_oflag_c_eb.out (contents, props changed) - copied, changed from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out head/usr.bin/hexdump/tests/d_hexdump_oflag_c_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out head/usr.bin/hexdump/tests/d_hexdump_xflag_a_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_xflag_a_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out head/usr.bin/hexdump/tests/d_hexdump_xflag_b_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_xflag_b_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out head/usr.bin/hexdump/tests/d_hexdump_xflag_c_eb.out (contents, props changed) - copied, changed from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out head/usr.bin/hexdump/tests/d_hexdump_xflag_c_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out Deleted: head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out Modified: head/usr.bin/hexdump/tests/Makefile head/usr.bin/hexdump/tests/hexdump_test.sh Modified: head/usr.bin/hexdump/tests/Makefile ============================================================================== --- head/usr.bin/hexdump/tests/Makefile Mon Mar 2 18:06:02 2020 (r358552) +++ head/usr.bin/hexdump/tests/Makefile Mon Mar 2 18:40:34 2020 (r358553) @@ -13,20 +13,29 @@ ${PACKAGE}FILES+= d_hexdump_bflag_c.out ${PACKAGE}FILES+= d_hexdump_cflag_a.out ${PACKAGE}FILES+= d_hexdump_cflag_b.out ${PACKAGE}FILES+= d_hexdump_cflag_c.out -${PACKAGE}FILES+= d_hexdump_dflag_a.out -${PACKAGE}FILES+= d_hexdump_dflag_b.out -${PACKAGE}FILES+= d_hexdump_dflag_c.out +${PACKAGE}FILES+= d_hexdump_dflag_a_el.out +${PACKAGE}FILES+= d_hexdump_dflag_b_el.out +${PACKAGE}FILES+= d_hexdump_dflag_c_el.out +${PACKAGE}FILES+= d_hexdump_dflag_a_eb.out +${PACKAGE}FILES+= d_hexdump_dflag_b_eb.out +${PACKAGE}FILES+= d_hexdump_dflag_c_eb.out ${PACKAGE}FILES+= d_hexdump_nflag_a.out -${PACKAGE}FILES+= d_hexdump_oflag_a.out -${PACKAGE}FILES+= d_hexdump_oflag_b.out -${PACKAGE}FILES+= d_hexdump_oflag_c.out +${PACKAGE}FILES+= d_hexdump_oflag_a_el.out +${PACKAGE}FILES+= d_hexdump_oflag_b_el.out +${PACKAGE}FILES+= d_hexdump_oflag_c_el.out +${PACKAGE}FILES+= d_hexdump_oflag_a_eb.out +${PACKAGE}FILES+= d_hexdump_oflag_b_eb.out +${PACKAGE}FILES+= d_hexdump_oflag_c_eb.out ${PACKAGE}FILES+= d_hexdump_sflag_a.out ${PACKAGE}FILES+= d_hexdump_UCflag_a.out ${PACKAGE}FILES+= d_hexdump_UCflag_b.out ${PACKAGE}FILES+= d_hexdump_UCflag_c.out -${PACKAGE}FILES+= d_hexdump_xflag_a.out -${PACKAGE}FILES+= d_hexdump_xflag_b.out -${PACKAGE}FILES+= d_hexdump_xflag_c.out +${PACKAGE}FILES+= d_hexdump_xflag_a_el.out +${PACKAGE}FILES+= d_hexdump_xflag_b_el.out +${PACKAGE}FILES+= d_hexdump_xflag_c_el.out +${PACKAGE}FILES+= d_hexdump_xflag_a_eb.out +${PACKAGE}FILES+= d_hexdump_xflag_b_eb.out +${PACKAGE}FILES+= d_hexdump_xflag_c_eb.out ${PACKAGE}FILES+= d_od_cflag_a.out ${PACKAGE}FILES+= d_od_cflag_b.out Added: head/usr.bin/hexdump/tests/d_hexdump_dflag_a_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_a_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,2 @@ +0000000 21605 29556 02560 +0000005 Copied: head/usr.bin/hexdump/tests/d_hexdump_dflag_a_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_a_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out) @@ -0,0 +1,2 @@ +0000000 25940 29811 00010 +0000005 Added: head/usr.bin/hexdump/tests/d_hexdump_dflag_b_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_b_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,4 @@ +0000000 21608 25888 29045 26979 27424 25202 28535 28192 +0000010 26223 30752 27253 28016 25956 08303 30309 29216 +0000020 29800 25888 25196 30053 08296 28533 29541 02570 +0000030 Copied: head/usr.bin/hexdump/tests/d_hexdump_dflag_b_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_b_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out) @@ -0,0 +1,4 @@ +0000000 26708 08293 30065 25449 08299 29282 30575 08302 +0000010 28518 08312 30058 28781 25701 28448 25974 08306 +0000020 26740 08293 27746 25973 26656 30063 25971 02570 +0000030 Copied and modified: head/usr.bin/hexdump/tests/d_hexdump_dflag_c_eb.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out) ============================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out Mon Mar 2 18:06:02 2020 (r358552, copy source) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_c_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -1,4 +1,4 @@ 0000000 16705 16705 16705 16705 16705 16705 16705 16705 * -0000020 16705 16705 16705 02625 +0000020 16705 16705 16705 16650 0000028 Copied: head/usr.bin/hexdump/tests/d_hexdump_dflag_c_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_c_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out) @@ -0,0 +1,4 @@ +0000000 16705 16705 16705 16705 16705 16705 16705 16705 +* +0000020 16705 16705 16705 02625 +0000028 Added: head/usr.bin/hexdump/tests/d_hexdump_oflag_a_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_a_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,2 @@ +0000000 052145 071564 005000 +0000005 Copied: head/usr.bin/hexdump/tests/d_hexdump_oflag_a_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_a_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out) @@ -0,0 +1,2 @@ +0000000 062524 072163 000012 +0000005 Added: head/usr.bin/hexdump/tests/d_hexdump_oflag_b_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_b_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,4 @@ +0000000 052150 062440 070565 064543 065440 061162 067567 067040 +0000010 063157 074040 065165 066560 062544 020157 073145 071040 +0000020 072150 062440 061154 072545 020150 067565 071545 005012 +0000030 Copied: head/usr.bin/hexdump/tests/d_hexdump_oflag_b_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_b_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out) @@ -0,0 +1,4 @@ +0000000 064124 020145 072561 061551 020153 071142 073557 020156 +0000010 067546 020170 072552 070155 062145 067440 062566 020162 +0000020 064164 020145 066142 062565 064040 072557 062563 005012 +0000030 Copied and modified: head/usr.bin/hexdump/tests/d_hexdump_oflag_c_eb.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out) ============================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out Mon Mar 2 18:06:02 2020 (r358552, copy source) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_c_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -1,4 +1,4 @@ 0000000 040501 040501 040501 040501 040501 040501 040501 040501 * -0000020 040501 040501 040501 005101 +0000020 040501 040501 040501 040412 0000028 Copied: head/usr.bin/hexdump/tests/d_hexdump_oflag_c_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_c_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out) @@ -0,0 +1,4 @@ +0000000 040501 040501 040501 040501 040501 040501 040501 040501 +* +0000020 040501 040501 040501 005101 +0000028 Added: head/usr.bin/hexdump/tests/d_hexdump_xflag_a_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_a_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,2 @@ +0000000 5465 7374 0a00 +0000005 Copied: head/usr.bin/hexdump/tests/d_hexdump_xflag_a_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_a_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out) @@ -0,0 +1,2 @@ +0000000 6554 7473 000a +0000005 Added: head/usr.bin/hexdump/tests/d_hexdump_xflag_b_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_b_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,4 @@ +0000000 5468 6520 7175 6963 6b20 6272 6f77 6e20 +0000010 666f 7820 6a75 6d70 6564 206f 7665 7220 +0000020 7468 6520 626c 7565 2068 6f75 7365 0a0a +0000030 Copied: head/usr.bin/hexdump/tests/d_hexdump_xflag_b_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_b_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out) @@ -0,0 +1,4 @@ +0000000 6854 2065 7571 6369 206b 7262 776f 206e +0000010 6f66 2078 756a 706d 6465 6f20 6576 2072 +0000020 6874 2065 6c62 6575 6820 756f 6573 0a0a +0000030 Copied and modified: head/usr.bin/hexdump/tests/d_hexdump_xflag_c_eb.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out) ============================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out Mon Mar 2 18:06:02 2020 (r358552, copy source) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_c_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -1,4 +1,4 @@ 0000000 4141 4141 4141 4141 4141 4141 4141 4141 * -0000020 4141 4141 4141 0a41 +0000020 4141 4141 4141 410a 0000028 Copied: head/usr.bin/hexdump/tests/d_hexdump_xflag_c_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_c_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out) @@ -0,0 +1,4 @@ +0000000 4141 4141 4141 4141 4141 4141 4141 4141 +* +0000020 4141 4141 4141 0a41 +0000028 Modified: head/usr.bin/hexdump/tests/hexdump_test.sh ============================================================================== --- head/usr.bin/hexdump/tests/hexdump_test.sh Mon Mar 2 18:06:02 2020 (r358552) +++ head/usr.bin/hexdump/tests/hexdump_test.sh Mon Mar 2 18:40:34 2020 (r358553) @@ -26,6 +26,12 @@ # # $FreeBSD$ +ENDIAN=el +ret=$(echo I | tr -d "[:space:]" | od -to2 | head -n1 | awk '{print $2}' | cut -c6) +if [ "$ret" = "0" ]; then + ENDIAN=eb +fi + atf_test_case b_flag b_flag_head() { @@ -93,11 +99,11 @@ d_flag_head() } d_flag_body() { - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_a.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_a_$ENDIAN.out" \ hexdump -d "$(atf_get_srcdir)/d_hexdump_a.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_b.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_b_$ENDIAN.out" \ hexdump -d "$(atf_get_srcdir)/d_hexdump_b.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_c.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_c_$ENDIAN.out" \ hexdump -d "$(atf_get_srcdir)/d_hexdump_c.in" } @@ -120,11 +126,11 @@ o_flag_head() } o_flag_body() { - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_a.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_a_$ENDIAN.out" \ hexdump -o "$(atf_get_srcdir)/d_hexdump_a.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_b.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_b_$ENDIAN.out" \ hexdump -o "$(atf_get_srcdir)/d_hexdump_b.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_c.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_c_$ENDIAN.out" \ hexdump -o "$(atf_get_srcdir)/d_hexdump_c.in" } @@ -168,11 +174,11 @@ x_flag_head() } x_flag_body() { - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_a.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_a_$ENDIAN.out" \ hexdump -x "$(atf_get_srcdir)/d_hexdump_a.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_b.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_b_$ENDIAN.out" \ hexdump -x "$(atf_get_srcdir)/d_hexdump_b.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_c.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_c_$ENDIAN.out" \ hexdump -x "$(atf_get_srcdir)/d_hexdump_c.in" } From owner-svn-src-head@freebsd.org Mon Mar 2 20:14:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F380625985B; Mon, 2 Mar 2020 20:14:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WWZX57Nxz44S4; Mon, 2 Mar 2020 20:14:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 921F221B9A; Mon, 2 Mar 2020 20:14:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022KESBb058145; Mon, 2 Mar 2020 20:14:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022KERkt058142; Mon, 2 Mar 2020 20:14:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003022014.022KERkt058142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 2 Mar 2020 20:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358554 - in head: share/man/man4/man4.i386 sys/dev/ctau sys/dev/cx X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: share/man/man4/man4.i386 sys/dev/ctau sys/dev/cx X-SVN-Commit-Revision: 358554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 20:14:29 -0000 Author: emaste Date: Mon Mar 2 20:14:27 2020 New Revision: 358554 URL: https://svnweb.freebsd.org/changeset/base/358554 Log: Add deprecation notices to ctau and cx drivers These support outdated or obsolete ISA WAN (T1/E1) sync serial cards, and these drivers haven't really been touched (other than in tree-wide sweeps to keep them building) for 15+ years. Related PCI devices ce and cp are still in the tree, with deprecation proposed in D23928. MFC after: 1 week Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/man4.i386/ctau.4 head/share/man/man4/man4.i386/cx.4 head/sys/dev/ctau/if_ct.c head/sys/dev/cx/if_cx.c Modified: head/share/man/man4/man4.i386/ctau.4 ============================================================================== --- head/share/man/man4/man4.i386/ctau.4 Mon Mar 2 18:40:34 2020 (r358553) +++ head/share/man/man4/man4.i386/ctau.4 Mon Mar 2 20:14:27 2020 (r358554) @@ -13,7 +13,7 @@ .\" Cronyx Id: ct.4,v 1.1.2.6 2004/06/21 17:56:40 rik Exp $ .\" $FreeBSD$ .\" -.Dd September 6, 2004 +.Dd March 2, 2020 .Dt CTAU 4 i386 .Os .Sh NAME @@ -33,6 +33,12 @@ In .Cd hint.ctau.0.port="0x240" .Cd hint.ctau.0.irq="15" .Cd hint.ctau.0.drq="7" +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. .Sh DESCRIPTION The .Nm Modified: head/share/man/man4/man4.i386/cx.4 ============================================================================== --- head/share/man/man4/man4.i386/cx.4 Mon Mar 2 18:40:34 2020 (r358553) +++ head/share/man/man4/man4.i386/cx.4 Mon Mar 2 20:14:27 2020 (r358554) @@ -13,7 +13,7 @@ .\" Cronyx Id: cx.4,v 1.1.2.6 2004/06/21 17:56:40 rik Exp $ .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd March 2, 2020 .Dt CX 4 i386 .Os .Sh NAME @@ -45,6 +45,12 @@ In .Cd hint.cx.0.port="0x240" .Cd hint.cx.0.irq="15" .Cd hint.cx.0.drq="7" +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. .Sh DESCRIPTION The .Nm Modified: head/sys/dev/ctau/if_ct.c ============================================================================== --- head/sys/dev/ctau/if_ct.c Mon Mar 2 18:40:34 2020 (r358553) +++ head/sys/dev/ctau/if_ct.c Mon Mar 2 20:14:27 2020 (r358554) @@ -748,6 +748,7 @@ static int ct_attach (device_t dev) } splx (s); + gone_in_dev(dev, 13, "sync serial (T1/E1) ISA card drivers"); return 0; } Modified: head/sys/dev/cx/if_cx.c ============================================================================== --- head/sys/dev/cx/if_cx.c Mon Mar 2 18:40:34 2020 (r358553) +++ head/sys/dev/cx/if_cx.c Mon Mar 2 20:14:27 2020 (r358554) @@ -871,6 +871,7 @@ static int cx_attach (device_t dev) } splx (s); + gone_in_dev(dev, 13, "sync serial (T1/E1) ISA card drivers"); return 0; } From owner-svn-src-head@freebsd.org Mon Mar 2 20:30:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43075259CC0 for ; Mon, 2 Mar 2020 20:30:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic315-55.consmr.mail.gq1.yahoo.com (sonic315-55.consmr.mail.gq1.yahoo.com [98.137.65.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48WWwT4sgyz3H9m for ; Mon, 2 Mar 2020 20:30:01 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: HOrKqRAVM1l8YuysRIm3EPvkj13Nh272BGjZJa8oxA_LGb4TI3zHU0WQ7H0OQNA 7K5F5LiaDY8k06P.x768qPNgEOA6eJBNIZv8Jtk8TSZ8mHW06kgUBKl3rPRbUV7qTie_lGghJELq 7C2EfQNX49xzx9iPlSAiaFYb_Z5rXXk9anngQeErG3QqXvYyMN3YwzV6YhQPwTCmP_p976md9KtI p1PpuV3MQaSaIBDDhDGgaImXslQZKIWLZRzDmIzwvfp4PPO0DKvIqXTWXPN5h1vNwpVajF7BmSGr tnofy5rHt1ZwGoIzjQzHfxKZPyWTdA8lQxYgvLdIOJfMqcgWelFeLCroBlbt88Aqx_LAfZW8Jft2 lY2FAQnwkpGbdwSZ0BqSD0fjlYqTW5oIgowbMPPXWy4F40._1ITgME5ccGVHtHUfvHzFUGjChIik pxAuzv4Psie3hZE3Bm7VAi2JX_ceIZKbgZuixtv1bkbn8IiNY4AXAl0BnbWEKb.2Pg.1ebkkoCFg AptXBqvyC6HEmm_h8f0vkIbAd_fyI97rruJb96oNw8qgmZvXN0IE9q8yCcxH33ZrRUIOeQhnSWJ2 KMyn_kjyiSWuXCnbi00Wxk27h7h92BQYVsCNYDOB0yLnzrFlzfzK0INmnZ_nw3M7I4kVzIn4T8qe .3jXryKeSi.mH62AZfd3YhVav6Mskfqcur0kuoLZrL12SX7ti2GCVQnk0E3dSKU5RO6wwQaXDnuS xuZyAQVhDR8tvdTQDWlMyu8HcQZvRwS53axBHzIaBHrsBnghvyqfw6RocZ2SgD1.sp1ZuDS3FzTF LZEEVkGRDs6D8p1TGsWP6in4WSKMg4n4kwv.xRO0uASRj0y_ol5QdWyK1aWc0LtSjjuAyo7D_kCH DDcx5Oo2VPO3Oi4rNxalHqYDGdCxr12t1YmvvIbafMgodBeWzS2Goxhf3nRc81zAGILSEtphAiUl y5_jt_53cDfgoqXjAK2i7bl7gGGAm75w3hE8aGSaYOcnwwMlnh8NDZWf8wPnRBsM5gQhdPnzF6jK x4JJatrj_AisQckBuKn8atb3XSYTNI1JWNb20idhCl.C.7Pz8PVFPe9XRSI2GUsw6FW8O5JKPYYc bwcKpiwwe9e5X7aS2k8z251HIt05fmeGKqRudO99jbAajQ1wocfLqCjYnbHEsYnWYVKz0ztSKRnQ JWIcFwE.OWNpu_ANEaw3k82tys5rI7zW_Irv2FPTMbJXwyU.lxZKw5GxwomMyGwb6lqlAm3Y_HJh NYjq1jfbRwk6bT_Jh.mzzRptnWXoqHoo9KKUKzhqvyJxqGQ5m0XwgWcXHEh9jT56UCyPZt1TZZ1x Ud4rEeSigBVGDq9oQ_38DQGzxbT3IDBWTG.TUviG2YPXGbLyUE0WiqwcYGKt5q5teL9xwgmFRgNw Ar6WIHKL5_vbXTBp465ck3U4H5mgDEbmwC1I90PexOFwRpTFhxJhHFbk- Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Mon, 2 Mar 2020 20:29:58 +0000 Received: by smtp421.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5e90a35535faa41e09bfc226db67a470; Mon, 02 Mar 2020 20:29:57 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358439 - head/sys/amd64/include Message-Id: <4ED174D6-EBC4-4F0D-B9C5-639E10016C4D@yahoo.com> Date: Mon, 2 Mar 2020 12:29:55 -0800 To: Konstantin Belousov , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.60.0.2.5) References: <4ED174D6-EBC4-4F0D-B9C5-639E10016C4D.ref@yahoo.com> X-Rspamd-Queue-Id: 48WWwT4sgyz3H9m X-Spamd-Bar: / X-Spamd-Result: default: False [-0.76 / 15.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.92)[-0.915,0]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_SPAM_MEDIUM(0.65)[0.655,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[31.65.137.98.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (3.72), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.67), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 20:30:03 -0000 Konstantin Belousov kostikbel at gmail.com wrote on Mon Mar 2 18:27:05 UTC 2020 ": > On Mon, Mar 02, 2020 at 09:13:53AM -0800, Ryan Libby wrote: > > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > > > > > > 28.02.2020, 18:32, "Ryan Libby" : > > > > Author: rlibby > > > > Date: Fri Feb 28 18:32:36 2020 > > > > New Revision: 358439 > > > > URL: https://svnweb.freebsd.org/changeset/base/358439 > > > > > > > > Log: > > > > amd64 atomic.h: minor codegen optimization in flag access > > > > > > > > Previously the pattern to extract status flags from inline = assembly > > > > blocks was to use setcc in the block to write the flag to a = register. > > > > This was suboptimal in a few ways: > > > > - It would lead to code like: sete %cl; test %cl; jne, i.e. a = flag > > > > would just be loaded into a register and then reloaded to a = flag. > > > > - The setcc would force the block to use an additional = register. > > > > - If the client code didn't care for the flag value then the = setcc > > > > would be entirely pointless but could not be eliminated by = the > > > > optimizer. > > > > > > > > A more modern inline asm construct (since gcc 6 and clang 9) = allows for > > > This effectively restricts kernel builds by all older compilers. > > > Is there any chance of making it conditional depending on the = compiler version/features? > What is the older compiler you need to use for base system ? > And why ? [A copy of something I sent to svn-src-head and rlibby a on Feb 29 that showed the example of 2 ports failing to build on FreeBSD build servers, where the server sent out the notice of the failure.] head -r358439 breaks unmodified ports that use, for example, clang70 and clang++70: = https://lists.freebsd.org/pipermail/freebsd-emulation/2020-February/017672= .html = https://lists.freebsd.org/pipermail/freebsd-emulation/2020-February/017675= .html show things like . . . kBuild: Compiling HGSMIGuestR0Lib - = /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/s= rc/VBox/GuestHost/HGSMI/HGSMICommon.cpp clang-7: warning: argument unused during compilation: '--param = inline-unit-growth=3D100' [-Wunused-command-line-argument] clang-7: warning: argument unused during compilation: '--param = large-function-growth=3D1000' [-Wunused-command-line-argument] In file included from = /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/s= rc/VBox/GuestHost/HGSMI/HGSMICommon.cpp:38: In file included from = /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/i= nclude/VBox/Graphics/VBoxVideoIPRT.h:32: In file included from = /wrkdirs/usr/ports/emulators/virtualbox-ose-nox11/work/VirtualBox-5.2.34/i= nclude/iprt/string.h:45: In file included from /usr/src/sys/sys/libkern.h:41: In file included from /usr/src/sys/sys/systm.h:44: /usr/include/machine/atomic.h:230:1: error: invalid output constraint = '=3D@cce' in asm ATOMIC_CMPSET(char); ^ /usr/include/machine/atomic.h:205:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:230:1: error: invalid output constraint = '=3D@cce' in asm /usr/include/machine/atomic.h:222:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:231:1: error: invalid output constraint = '=3D@cce' in asm ATOMIC_CMPSET(short); ^ /usr/include/machine/atomic.h:205:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:231:1: error: invalid output constraint = '=3D@cce' in asm /usr/include/machine/atomic.h:222:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:232:1: error: invalid output constraint = '=3D@cce' in asm ATOMIC_CMPSET(int); ^ /usr/include/machine/atomic.h:205:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:232:1: error: invalid output constraint = '=3D@cce' in asm /usr/include/machine/atomic.h:222:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:233:1: error: invalid output constraint = '=3D@cce' in asm ATOMIC_CMPSET(long); ^ /usr/include/machine/atomic.h:205:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:233:1: error: invalid output constraint = '=3D@cce' in asm /usr/include/machine/atomic.h:222:4: note: expanded from macro = 'ATOMIC_CMPSET' : "=3D@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:280:4: error: invalid output constraint = '=3D@ccc' in asm : "=3D@ccc" (res), /* 0 */ ^ /usr/include/machine/atomic.h:296:4: error: invalid output constraint = '=3D@ccc' in asm : "=3D@ccc" (res), /* 0 */ ^ /usr/include/machine/atomic.h:312:4: error: invalid output constraint = '=3D@ccc' in asm : "=3D@ccc" (res), /* 0 */ ^ /usr/include/machine/atomic.h:328:4: error: invalid output constraint = '=3D@ccc' in asm : "=3D@ccc" (res), /* 0 */ ^ =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Mon Mar 2 21:00:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB00E25A933 for ; Mon, 2 Mar 2020 21:00:46 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WXbx4G6Dz4chM; Mon, 2 Mar 2020 21:00:44 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 022L0TeB051508 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 2 Mar 2020 21:00:30 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jkim@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 022L0RhX021188 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 3 Mar 2020 04:00:27 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Jung-uk Kim , Hajimu UMEMOTO References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> <66b377d6-cb80-ef9a-c87f-fcb893b9d631@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: Date: Tue, 3 Mar 2020 04:00:21 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48WXbx4G6Dz4chM X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.84)[ip: (-5.11), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.56), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 21:00:46 -0000 02.03.2020 21:29, Jung-uk Kim wrote: >>> You can easily repeat the problem using recent ports tree and >>> recent stable/11 and handbook-recommended way. >> >> Mixing base and ports OpenSSLs is a bad idea. If you decided to >> build some ports with ports OpenSSL for some reason, every ports >> using OpenSSL should be rebuilt with it to avoid this mayhem. > > And vice versa, i.e., every port using OpenSSL should be rebuilt if > you decided to go back to base OpenSSL. One more time: these days it is not possible. There are ports that need new 1.1.1 API and cannot be used with stable/11 using base SSL, there is no choice. That's why base sendmail needs to use new SSL API too. From owner-svn-src-head@freebsd.org Mon Mar 2 21:13:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D03925AD8F for ; Mon, 2 Mar 2020 21:13:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WXvB6JfLz4394; Mon, 2 Mar 2020 21:13:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 5A8E62F2B5; Mon, 2 Mar 2020 21:13:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Eugene Grosbein , Hajimu UMEMOTO Cc: src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> <66b377d6-cb80-ef9a-c87f-fcb893b9d631@FreeBSD.org> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: Date: Mon, 2 Mar 2020 16:13:52 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 21:13:59 -0000 On 20. 3. 2., Eugene Grosbein wrote: > 02.03.2020 21:29, Jung-uk Kim wrote: > >>>> You can easily repeat the problem using recent ports tree and >>>> recent stable/11 and handbook-recommended way. >>> >>> Mixing base and ports OpenSSLs is a bad idea. If you decided to >>> build some ports with ports OpenSSL for some reason, every ports >>> using OpenSSL should be rebuilt with it to avoid this mayhem. >> >> And vice versa, i.e., every port using OpenSSL should be rebuilt if >> you decided to go back to base OpenSSL. > > One more time: these days it is not possible. There are ports that need new 1.1.1 API > and cannot be used with stable/11 using base SSL, there is no choice. > That's why base sendmail needs to use new SSL API too. I don't understand why you insist on patching Sendmail to use new SSL API. Are you trying to build base Sendmail with ports OpenSSL? AFAIK, there is no way to do that. Jung-uk Kim From owner-svn-src-head@freebsd.org Mon Mar 2 21:19:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C476225AE5B; Mon, 2 Mar 2020 21:19:52 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WY202qM8z4KP7; Mon, 2 Mar 2020 21:19:52 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A1862269F; Mon, 2 Mar 2020 21:19:52 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022LJpDU094870; Mon, 2 Mar 2020 21:19:51 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022LJpAW094869; Mon, 2 Mar 2020 21:19:51 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003022119.022LJpAW094869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 2 Mar 2020 21:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358555 - head/sys/dev/cpufreq X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/cpufreq X-SVN-Commit-Revision: 358555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 21:19:52 -0000 Author: manu Date: Mon Mar 2 21:19:51 2020 New Revision: 358555 URL: https://svnweb.freebsd.org/changeset/base/358555 Log: cpufreq_dt: Improve multiple opp support When looking for cpu with the same OPP starts from the root /cpus node so each instance of cpufreq_dt will now each cpu with the same operating point. Also test that the node we are testing have the property "device_type" set to be equal to "cpu". While here add more debug printfs (off by defaults). MFC after: 2 weeks Modified: head/sys/dev/cpufreq/cpufreq_dt.c Modified: head/sys/dev/cpufreq/cpufreq_dt.c ============================================================================== --- head/sys/dev/cpufreq/cpufreq_dt.c Mon Mar 2 20:14:27 2020 (r358554) +++ head/sys/dev/cpufreq/cpufreq_dt.c Mon Mar 2 21:19:51 2020 (r358555) @@ -81,6 +81,7 @@ struct cpufreq_dt_softc { struct cpufreq_dt_opp *opp; ssize_t nopp; + int cpu; cpuset_t cpus; }; @@ -169,6 +170,13 @@ cpufreq_dt_set(device_t dev, const struct cf_setting * sc = device_get_softc(dev); + DEBUG(dev, "Working on cpu %d\n", sc->cpu); + DEBUG(dev, "We have %d cpu on this dev\n", CPU_COUNT(&sc->cpus)); + if (!CPU_ISSET(sc->cpu, &sc->cpus)) { + DEBUG(dev, "Not for this CPU\n"); + return (0); + } + if (clk_get_freq(sc->clk, &freq) != 0) { device_printf(dev, "Can't get current clk freq\n"); return (ENXIO); @@ -190,7 +198,6 @@ cpufreq_dt_set(device_t dev, const struct cf_setting * return (ENOENT); } uvolt = copp->uvolt_target; - } opp = cpufreq_dt_find_opp(sc->dev, set->freq * 1000000); @@ -449,14 +456,16 @@ cpufreq_dt_attach(device_t dev) int cpu; uint64_t freq; int rv = 0; + char device_type[16]; enum opp_version version; sc = device_get_softc(dev); sc->dev = dev; node = ofw_bus_get_node(device_get_parent(dev)); - cpu = device_get_unit(device_get_parent(dev)); + sc->cpu = device_get_unit(device_get_parent(dev)); - if (cpu >= mp_ncpus) { + DEBUG(dev, "cpu=%d\n", sc->cpu); + if (sc->cpu >= mp_ncpus) { device_printf(dev, "Not attaching as cpu is not present\n"); return (ENXIO); } @@ -502,7 +511,18 @@ cpufreq_dt_attach(device_t dev) * Find all CPUs that share the same opp table */ CPU_ZERO(&sc->cpus); - for (cnode = node; cnode > 0; cnode = OF_peer(cnode), cpu++) { + cnode = OF_parent(node); + for (cpu = 0, cnode = OF_child(cnode); cnode > 0; cnode = OF_peer(cnode)) { + if (OF_getprop(cnode, "device_type", device_type, sizeof(device_type)) <= 0) + continue; + if (strcmp(device_type, "cpu") != 0) + continue; + if (cpu == sc->cpu) { + DEBUG(dev, "Skipping our cpu\n"); + cpu++; + continue; + } + DEBUG(dev, "Testing CPU %d\n", cpu); copp = -1; if (version == OPP_V1) OF_getencprop(cnode, "operating-points", &copp, @@ -510,8 +530,11 @@ cpufreq_dt_attach(device_t dev) else if (version == OPP_V2) OF_getencprop(cnode, "operating-points-v2", &copp, sizeof(copp)); - if (opp == copp) + if (opp == copp) { + DEBUG(dev, "CPU %d is using the same opp as this one (%d)\n", cpu, sc->cpu); CPU_SET(cpu, &sc->cpus); + } + cpu++; } if (clk_get_freq(sc->clk, &freq) == 0) From owner-svn-src-head@freebsd.org Mon Mar 2 21:22:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BE4E25B0EA for ; Mon, 2 Mar 2020 21:22:04 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WY4W1Rmwz4QQ5; Mon, 2 Mar 2020 21:22:02 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 022LLsLY051848 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 2 Mar 2020 21:21:55 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jkim@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 022LLsOa021471 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 3 Mar 2020 04:21:54 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Jung-uk Kim , Hajimu UMEMOTO References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> <66b377d6-cb80-ef9a-c87f-fcb893b9d631@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> Date: Tue, 3 Mar 2020 04:21:48 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48WY4W1Rmwz4QQ5 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.95 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.85)[ip: (-5.11), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.56), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 21:22:04 -0000 03.03.2020 4:13, Jung-uk Kim wrote: > On 20. 3. 2., Eugene Grosbein wrote: >> 02.03.2020 21:29, Jung-uk Kim wrote: >> >>>>> You can easily repeat the problem using recent ports tree and >>>>> recent stable/11 and handbook-recommended way. >>>> >>>> Mixing base and ports OpenSSLs is a bad idea. If you decided to >>>> build some ports with ports OpenSSL for some reason, every ports >>>> using OpenSSL should be rebuilt with it to avoid this mayhem. >>> >>> And vice versa, i.e., every port using OpenSSL should be rebuilt if >>> you decided to go back to base OpenSSL. >> >> One more time: these days it is not possible. There are ports that need new 1.1.1 API >> and cannot be used with stable/11 using base SSL, there is no choice. >> That's why base sendmail needs to use new SSL API too. > > I don't understand why you insist on patching Sendmail to use new SSL > API. Are you trying to build base Sendmail with ports OpenSSL? AFAIK, > there is no way to do that. I merely try to understand how to unbreak upgrade path for 11.2-STABLE workstations with stock sendmail and SSL support that also has many ports installed including ports requiring new openssl API. Because buildworld fails and upgrade is broken. From owner-svn-src-head@freebsd.org Mon Mar 2 21:45:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C5D325B5A6 for ; Mon, 2 Mar 2020 21:45:08 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WYb76dmQz4V9v; Mon, 2 Mar 2020 21:45:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id A216A2F62A; Mon, 2 Mar 2020 21:45:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Eugene Grosbein , Hajimu UMEMOTO Cc: src-committers@freebsd.org, svn-src-head@freebsd.org References: <202002272202.01RM20j9030410@repo.freebsd.org> <525c9e77-9b86-ba95-ede5-54f3bbbb1aa7@grosbein.net> <9eb3986d-3726-300d-506f-8051a3a84728@grosbein.net> <66b377d6-cb80-ef9a-c87f-fcb893b9d631@FreeBSD.org> <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> Date: Mon, 2 Mar 2020 16:45:04 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 21:45:08 -0000 On 20. 3. 2., Eugene Grosbein wrote: > 03.03.2020 4:13, Jung-uk Kim wrote: > >> On 20. 3. 2., Eugene Grosbein wrote: >>> 02.03.2020 21:29, Jung-uk Kim wrote: >>> >>>>>> You can easily repeat the problem using recent ports tree and >>>>>> recent stable/11 and handbook-recommended way. >>>>> >>>>> Mixing base and ports OpenSSLs is a bad idea. If you decided to >>>>> build some ports with ports OpenSSL for some reason, every ports >>>>> using OpenSSL should be rebuilt with it to avoid this mayhem. >>>> >>>> And vice versa, i.e., every port using OpenSSL should be rebuilt if >>>> you decided to go back to base OpenSSL. >>> >>> One more time: these days it is not possible. There are ports that need new 1.1.1 API >>> and cannot be used with stable/11 using base SSL, there is no choice. >>> That's why base sendmail needs to use new SSL API too. >> >> I don't understand why you insist on patching Sendmail to use new SSL >> API. Are you trying to build base Sendmail with ports OpenSSL? AFAIK, >> there is no way to do that. > > I merely try to understand how to unbreak upgrade path for 11.2-STABLE workstations > with stock sendmail and SSL support that also has many ports installed including > ports requiring new openssl API. Because buildworld fails and upgrade is broken. I am also trying to understand your problem. Which port is specifically requiring new OpenSSL API for you? Jung-uk Kim From owner-svn-src-head@freebsd.org Mon Mar 2 22:06:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 627AE25C0F7; Mon, 2 Mar 2020 22:06:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WZ431hDbz3PMZ; Mon, 2 Mar 2020 22:06:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id A39FD2F894; Mon, 2 Mar 2020 22:06:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358486 - head/sys/dev/bce To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003011727.021HRU5G076569@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <81a089ea-d8a4-9f4b-dc24-3a7bd7e4cbba@FreeBSD.org> Date: Mon, 2 Mar 2020 14:06:40 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <202003011727.021HRU5G076569@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 22:06:43 -0000 On 3/1/20 9:27 AM, Warner Losh wrote: > Author: imp > Date: Sun Mar 1 17:27:30 2020 > New Revision: 358486 > URL: https://svnweb.freebsd.org/changeset/base/358486 > > Log: > Remove all the compatibility hacks for systems that predate FreeBSD 8. Some of > these look to be cut and pasted from other drivers since this driver was > committed to FreeBSD 7-current and MFC'd to FreeBSD 6. The ones for FreeBSD 4 > and 5 likely never were working... You'd be surprised. I had to backport this to 4.x for Y!BSD, so I do suspect the 4.x bits worked fine. Good to clean out the cruft regardless. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Mar 2 22:19:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A677625C436; Mon, 2 Mar 2020 22:19:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WZLs2qxzz4R1K; Mon, 2 Mar 2020 22:19:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B6AA231C4; Mon, 2 Mar 2020 22:19:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022MJXB7030304; Mon, 2 Mar 2020 22:19:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022MJUOk030293; Mon, 2 Mar 2020 22:19:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202003022219.022MJUOk030293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 2 Mar 2020 22:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358556 - in head: libexec/tftpd libexec/tftpd/tests usr.bin/tftp X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: libexec/tftpd libexec/tftpd/tests usr.bin/tftp X-SVN-Commit-Revision: 358556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 22:19:33 -0000 Author: jhb Date: Mon Mar 2 22:19:30 2020 New Revision: 358556 URL: https://svnweb.freebsd.org/changeset/base/358556 Log: Add support for the TFTP windowsize option described in RFC 7440. The windowsize option permits multiple blocks to be transmitted before the receiver sends an ACK improving throughput for larger files. Reviewed by: asomers MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23836 Modified: head/libexec/tftpd/tests/functional.c head/libexec/tftpd/tftp-file.c head/libexec/tftpd/tftp-file.h head/libexec/tftpd/tftp-options.c head/libexec/tftpd/tftp-options.h head/libexec/tftpd/tftp-transfer.c head/libexec/tftpd/tftp-utils.c head/libexec/tftpd/tftp-utils.h head/libexec/tftpd/tftpd.8 head/usr.bin/tftp/main.c head/usr.bin/tftp/tftp.1 Modified: head/libexec/tftpd/tests/functional.c ============================================================================== --- head/libexec/tftpd/tests/functional.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tests/functional.c Mon Mar 2 22:19:30 2020 (r358556) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -89,6 +90,13 @@ recv_ack(uint16_t blocknum) RECV(hdr, NULL, 0); } +static void +recv_oack(const char *options, size_t options_len) +{ + char hdr[] = {0, 6}; + RECV(hdr, options, options_len); +} + /* * Receive a data packet from tftpd * @param blocknum Expected block number to be received @@ -159,6 +167,11 @@ send_ack(uint16_t blocknum) } +/* + * build an option string + */ +#define OPTION_STR(name, value) name "\000" value "\000" + /* * send a read request to tftpd. * @param filename filename as a string, absolute or relative @@ -166,6 +179,11 @@ send_ack(uint16_t blocknum) */ #define SEND_RRQ(filename, mode) SEND_STR("\0\001" filename "\0" mode "\0") +/* + * send a read request with options + */ +#define SEND_RRQ_OPT(filename, mode, options) SEND_STR("\0\001" filename "\0" mode "\000" options) + /* * send a write request to tftpd. * @param filename filename as a string, absolute or relative @@ -173,6 +191,11 @@ send_ack(uint16_t blocknum) */ #define SEND_WRQ(filename, mode) SEND_STR("\0\002" filename "\0" mode "\0") +/* + * send a write request with options + */ +#define SEND_WRQ_OPT(filename, mode, options) SEND_STR("\0\002" filename "\0" mode "\000" options) + /* Define a test case, for both IPv4 and IPv6 */ #define TFTPD_TC_DEFINE(name, head, ...) \ static void \ @@ -573,6 +596,32 @@ TFTPD_TC_DEFINE(rrq_medium,) } /* + * Read a medium file with a window size of 2. + */ +TFTPD_TC_DEFINE(rrq_medium_window,) +{ + int fd; + size_t i; + uint32_t contents[192]; + char options[] = OPTION_STR("windowsize", "2"); + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, sizeof(contents)); + close(fd); + + SEND_RRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); + recv_oack(options, sizeof(options) - 1); + send_ack(0); + recv_data(1, (const char*)&contents[0], 512); + recv_data(2, (const char*)&contents[128], 256); + send_ack(2); +} + +/* * Read a file in netascii format */ TFTPD_TC_DEFINE(rrq_netascii,) @@ -652,6 +701,59 @@ TFTPD_TC_DEFINE(rrq_small,) } /* + * Read a file following the example in RFC 7440. + */ +TFTPD_TC_DEFINE(rrq_window_rfc7440,) +{ + int fd; + size_t i; + char options[] = OPTION_STR("windowsize", "4"); + alignas(uint32_t) char contents[13 * 512 - 4]; + uint32_t *u32p; + + u32p = (uint32_t *)contents; + for (i = 0; i < sizeof(contents) / sizeof(uint32_t); i++) + u32p[i] = i; + + fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, sizeof(contents)); + close(fd); + + SEND_RRQ_OPT("rfc7440.txt", "octet", OPTION_STR("windowsize", "4")); + recv_oack(options, sizeof(options) - 1); + send_ack(0); + recv_data(1, &contents[0 * 512], 512); + recv_data(2, &contents[1 * 512], 512); + recv_data(3, &contents[2 * 512], 512); + recv_data(4, &contents[3 * 512], 512); + send_ack(4); + recv_data(5, &contents[4 * 512], 512); + recv_data(6, &contents[5 * 512], 512); + recv_data(7, &contents[6 * 512], 512); + recv_data(8, &contents[7 * 512], 512); + + /* ACK 5 as if 6-8 were dropped. */ + send_ack(5); + recv_data(6, &contents[5 * 512], 512); + recv_data(7, &contents[6 * 512], 512); + recv_data(8, &contents[7 * 512], 512); + recv_data(9, &contents[8 * 512], 512); + send_ack(9); + recv_data(10, &contents[9 * 512], 512); + recv_data(11, &contents[10 * 512], 512); + recv_data(12, &contents[11 * 512], 512); + recv_data(13, &contents[12 * 512], 508); + + /* Drop ACK and after timeout receive 10-13. */ + recv_data(10, &contents[9 * 512], 512); + recv_data(11, &contents[10 * 512], 512); + recv_data(12, &contents[11 * 512], 512); + recv_data(13, &contents[12 * 512], 508); + send_ack(13); +} + +/* * Try to transfer a file with an unknown mode. */ TFTPD_TC_DEFINE(unknown_modes,) @@ -872,6 +974,38 @@ TFTPD_TC_DEFINE(wrq_medium,) } /* + * Write a medium file with a window size of 2. + */ +TFTPD_TC_DEFINE(wrq_medium_window,) +{ + int fd; + size_t i; + ssize_t r; + uint32_t contents[192]; + char buffer[1024]; + char options[] = OPTION_STR("windowsize", "2"); + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); + recv_oack(options, sizeof(options) - 1); + send_data(1, (const char*)&contents[0], 512); + send_data(2, (const char*)&contents[128], 256); + recv_ack(2); + + fd = open("medium.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq((const char*)contents, 768, buffer, r); +} + +/* * Write a file in netascii format */ TFTPD_TC_DEFINE(wrq_netascii,) @@ -965,7 +1099,71 @@ TFTPD_TC_DEFINE(wrq_truncate,) ATF_REQUIRE_EQ(sb.st_size, 0); } +/* + * Write a file following the example in RFC 7440. + */ +TFTPD_TC_DEFINE(wrq_window_rfc7440,) +{ + int fd; + size_t i; + ssize_t r; + char options[] = OPTION_STR("windowsize", "4"); + alignas(uint32_t) char contents[13 * 512 - 4]; + char buffer[sizeof(contents)]; + uint32_t *u32p; + u32p = (uint32_t *)contents; + for (i = 0; i < sizeof(contents) / sizeof(uint32_t); i++) + u32p[i] = i; + + fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ_OPT("rfc7440.txt", "octet", OPTION_STR("windowsize", "4")); + recv_oack(options, sizeof(options) - 1); + send_data(1, &contents[0 * 512], 512); + send_data(2, &contents[1 * 512], 512); + send_data(3, &contents[2 * 512], 512); + send_data(4, &contents[3 * 512], 512); + recv_ack(4); + send_data(5, &contents[4 * 512], 512); + + /* Drop 6-8. */ + recv_ack(5); + send_data(6, &contents[5 * 512], 512); + send_data(7, &contents[6 * 512], 512); + send_data(8, &contents[7 * 512], 512); + send_data(9, &contents[8 * 512], 512); + recv_ack(9); + + /* Drop 11. */ + send_data(10, &contents[9 * 512], 512); + send_data(12, &contents[11 * 512], 512); + + /* + * We can't send 13 here as tftpd has probably already seen 12 + * and sent the ACK of 10 if running locally. While it would + * recover by sending another ACK of 10, our state machine + * would be out of sync. + */ + + /* Ignore ACK for 10 and resend 10-13. */ + recv_ack(10); + send_data(10, &contents[9 * 512], 512); + send_data(11, &contents[10 * 512], 512); + send_data(12, &contents[11 * 512], 512); + send_data(13, &contents[12 * 512], 508); + recv_ack(13); + + fd = open("rfc7440.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq(contents, sizeof(contents), buffer, r); +} + + /* * Main */ @@ -981,10 +1179,12 @@ ATF_TP_ADD_TCS(tp) TFTPD_TC_ADD(tp, rrq_eaccess); TFTPD_TC_ADD(tp, rrq_empty); TFTPD_TC_ADD(tp, rrq_medium); + TFTPD_TC_ADD(tp, rrq_medium_window); TFTPD_TC_ADD(tp, rrq_netascii); TFTPD_TC_ADD(tp, rrq_nonexistent); TFTPD_TC_ADD(tp, rrq_path_max); TFTPD_TC_ADD(tp, rrq_small); + TFTPD_TC_ADD(tp, rrq_window_rfc7440); TFTPD_TC_ADD(tp, unknown_modes); TFTPD_TC_ADD(tp, unknown_opcode); TFTPD_TC_ADD(tp, w_flag); @@ -994,10 +1194,12 @@ ATF_TP_ADD_TCS(tp) TFTPD_TC_ADD(tp, wrq_eaccess); TFTPD_TC_ADD(tp, wrq_eaccess_world_readable); TFTPD_TC_ADD(tp, wrq_medium); + TFTPD_TC_ADD(tp, wrq_medium_window); TFTPD_TC_ADD(tp, wrq_netascii); TFTPD_TC_ADD(tp, wrq_nonexistent); TFTPD_TC_ADD(tp, wrq_small); TFTPD_TC_ADD(tp, wrq_truncate); + TFTPD_TC_ADD(tp, wrq_window_rfc7440); return (atf_no_error()); } Modified: head/libexec/tftpd/tftp-file.c ============================================================================== --- head/libexec/tftpd/tftp-file.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-file.c Mon Mar 2 22:19:30 2020 (r358556) @@ -214,6 +214,20 @@ write_close(void) return 0; } +off_t +tell_file(void) +{ + + return ftello(file); +} + +int +seek_file(off_t offset) +{ + + return fseeko(file, offset, SEEK_SET); +} + int read_init(int fd, FILE *f, const char *mode) { Modified: head/libexec/tftpd/tftp-file.h ============================================================================== --- head/libexec/tftpd/tftp-file.h Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-file.h Mon Mar 2 22:19:30 2020 (r358556) @@ -36,4 +36,7 @@ int read_init(int fd, FILE *f, const char *mode); size_t read_file(char *buffer, int count); int read_close(void); +int seek_file(off_t offset); +off_t tell_file(void); + int synchnet(int peer); Modified: head/libexec/tftpd/tftp-options.c ============================================================================== --- head/libexec/tftpd/tftp-options.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-options.c Mon Mar 2 22:19:30 2020 (r358556) @@ -56,6 +56,7 @@ struct options options[] = { { "blksize", NULL, NULL, option_blksize, 1 }, { "blksize2", NULL, NULL, option_blksize2, 0 }, { "rollover", NULL, NULL, option_rollover, 0 }, + { "windowsize", NULL, NULL, option_windowsize, 1 }, { NULL, NULL, NULL, NULL, 0 } }; @@ -271,6 +272,41 @@ option_blksize2(int peer __unused) if (debug&DEBUG_OPTIONS) tftp_log(LOG_DEBUG, "Setting blksize2 to '%s'", options[OPT_BLKSIZE2].o_reply); + + return (0); +} + +int +option_windowsize(int peer) +{ + int size; + + if (options[OPT_WINDOWSIZE].o_request == NULL) + return (0); + + size = atoi(options[OPT_WINDOWSIZE].o_request); + if (size < WINDOWSIZE_MIN || size > WINDOWSIZE_MAX) { + if (acting_as_client) { + tftp_log(LOG_ERR, + "Invalid windowsize (%d blocks), aborting", + size); + send_error(peer, EBADOP); + return (1); + } else { + tftp_log(LOG_WARNING, + "Invalid windowsize (%d blocks), ignoring request", + size); + return (0); + } + } + + /* XXX: Should force a windowsize of 1 for non-seekable files. */ + asprintf(&options[OPT_WINDOWSIZE].o_reply, "%d", size); + windowsize = size; + + if (debug&DEBUG_OPTIONS) + tftp_log(LOG_DEBUG, "Setting windowsize to '%s'", + options[OPT_WINDOWSIZE].o_reply); return (0); } Modified: head/libexec/tftpd/tftp-options.h ============================================================================== --- head/libexec/tftpd/tftp-options.h Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-options.h Mon Mar 2 22:19:30 2020 (r358556) @@ -42,6 +42,7 @@ int option_timeout(int peer); int option_blksize(int peer); int option_blksize2(int peer); int option_rollover(int peer); +int option_windowsize(int peer); extern int options_extra_enabled; extern int options_rfc_enabled; @@ -61,4 +62,5 @@ enum opt_enum { OPT_BLKSIZE, OPT_BLKSIZE2, OPT_ROLLOVER, + OPT_WINDOWSIZE, }; Modified: head/libexec/tftpd/tftp-transfer.c ============================================================================== --- head/libexec/tftpd/tftp-transfer.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-transfer.c Mon Mar 2 22:19:30 2020 (r358556) @@ -48,6 +48,12 @@ __FBSDID("$FreeBSD$"); #include "tftp-options.h" #include "tftp-transfer.h" +struct block_data { + off_t offset; + uint16_t block; + int size; +}; + /* * Send a file via the TFTP data session. */ @@ -55,54 +61,73 @@ void tftp_send(int peer, uint16_t *block, struct tftp_stats *ts) { struct tftphdr *rp; - int size, n_data, n_ack, try; - uint16_t oldblock; + int size, n_data, n_ack, sendtry, acktry; + u_int i, j; + uint16_t oldblock, windowblock; char sendbuffer[MAXPKTSIZE]; char recvbuffer[MAXPKTSIZE]; + struct block_data window[WINDOWSIZE_MAX]; rp = (struct tftphdr *)recvbuffer; *block = 1; ts->amount = 0; + windowblock = 0; + acktry = 0; do { +read_block: if (debug&DEBUG_SIMPLE) - tftp_log(LOG_DEBUG, "Sending block %d", *block); + tftp_log(LOG_DEBUG, "Sending block %d (window block %d)", + *block, windowblock); + window[windowblock].offset = tell_file(); + window[windowblock].block = *block; size = read_file(sendbuffer, segsize); if (size < 0) { tftp_log(LOG_ERR, "read_file returned %d", size); send_error(peer, errno + 100); goto abort; } + window[windowblock].size = size; + windowblock++; - for (try = 0; ; try++) { + for (sendtry = 0; ; sendtry++) { n_data = send_data(peer, *block, sendbuffer, size); - if (n_data > 0) { - if (try == maxtimeouts) { - tftp_log(LOG_ERR, - "Cannot send DATA packet #%d, " - "giving up", *block); - return; - } + if (n_data == 0) + break; + + if (sendtry == maxtimeouts) { tftp_log(LOG_ERR, - "Cannot send DATA packet #%d, trying again", - *block); - continue; + "Cannot send DATA packet #%d, " + "giving up", *block); + return; } + tftp_log(LOG_ERR, + "Cannot send DATA packet #%d, trying again", + *block); + } + /* Only check for ACK for last block in window. */ + if (windowblock == windowsize || size != segsize) { n_ack = receive_packet(peer, recvbuffer, MAXPKTSIZE, NULL, timeoutpacket); if (n_ack < 0) { if (n_ack == RP_TIMEOUT) { - if (try == maxtimeouts) { + if (acktry == maxtimeouts) { tftp_log(LOG_ERR, "Timeout #%d send ACK %d " - "giving up", try, *block); + "giving up", acktry, *block); return; } tftp_log(LOG_WARNING, "Timeout #%d on ACK %d", - try, *block); - continue; + acktry, *block); + + acktry++; + ts->retries++; + seek_file(window[0].offset); + *block = window[0].block; + windowblock = 0; + goto read_block; } /* Either read failure or ERROR packet */ @@ -112,18 +137,60 @@ tftp_send(int peer, uint16_t *block, struct tftp_stats goto abort; } if (rp->th_opcode == ACK) { - ts->blocks++; - if (rp->th_block == *block) { - ts->amount += size; - break; + /* + * Look for the ACKed block in our open + * window. + */ + for (i = 0; i < windowblock; i++) { + if (rp->th_block == window[i].block) + break; } - /* Re-synchronize with the other side */ - (void) synchnet(peer); - if (rp->th_block == (*block - 1)) { + if (i == windowblock) { + /* Did not recognize ACK. */ + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "ACK %d out of window", + rp->th_block); + + /* Re-synchronize with the other side */ + (void) synchnet(peer); + + /* Resend the current window. */ ts->retries++; - continue; + seek_file(window[0].offset); + *block = window[0].block; + windowblock = 0; + goto read_block; } + + /* ACKed at least some data. */ + acktry = 0; + for (j = 0; j <= i; j++) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "ACKed block %d", + window[j].block); + ts->blocks++; + ts->amount += window[j].size; + } + + /* + * Partial ACK. Rewind state to first + * un-ACKed block. + */ + if (i + 1 != windowblock) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "Partial ACK"); + seek_file(window[i + 1].offset); + *block = window[i + 1].block; + windowblock = 0; + ts->retries++; + goto read_block; + } + + windowblock = 0; } } @@ -161,31 +228,35 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st struct tftphdr *firstblock, size_t fb_size) { struct tftphdr *rp; - uint16_t oldblock; - int n_data, n_ack, writesize, i, retry; + uint16_t oldblock, windowstart; + int n_data, n_ack, writesize, i, retry, windowblock; char recvbuffer[MAXPKTSIZE]; ts->amount = 0; + windowblock = 0; if (firstblock != NULL) { writesize = write_file(firstblock->th_data, fb_size); ts->amount += writesize; - for (i = 0; ; i++) { - n_ack = send_ack(peer, *block); - if (n_ack > 0) { - if (i == maxtimeouts) { + windowblock++; + if (windowsize == 1 || fb_size != segsize) { + for (i = 0; ; i++) { + n_ack = send_ack(peer, *block); + if (n_ack > 0) { + if (i == maxtimeouts) { + tftp_log(LOG_ERR, + "Cannot send ACK packet #%d, " + "giving up", *block); + return; + } tftp_log(LOG_ERR, - "Cannot send ACK packet #%d, " - "giving up", *block); - return; + "Cannot send ACK packet #%d, trying again", + *block); + continue; } - tftp_log(LOG_ERR, - "Cannot send ACK packet #%d, trying again", - *block); - continue; - } - break; + break; + } } if (fb_size != segsize) { @@ -216,7 +287,8 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st for (retry = 0; ; retry++) { if (debug&DEBUG_SIMPLE) tftp_log(LOG_DEBUG, - "Receiving DATA block %d", *block); + "Receiving DATA block %d (window block %d)", + *block, windowblock); n_data = receive_packet(peer, recvbuffer, MAXPKTSIZE, NULL, timeoutpacket); @@ -232,6 +304,7 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st "Timeout #%d on DATA block %d", retry, *block); send_ack(peer, oldblock); + windowblock = 0; continue; } @@ -247,19 +320,42 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st if (rp->th_block == *block) break; + /* + * Ignore duplicate blocks within the + * window. + * + * This does not handle duplicate + * blocks during a rollover as + * gracefully, but that should still + * recover eventually. + */ + if (*block > windowsize) + windowstart = *block - windowsize; + else + windowstart = 0; + if (rp->th_block > windowstart && + rp->th_block < *block) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "Ignoring duplicate DATA block %d", + rp->th_block); + windowblock++; + retry = 0; + continue; + } + tftp_log(LOG_WARNING, "Expected DATA block %d, got block %d", *block, rp->th_block); /* Re-synchronize with the other side */ (void) synchnet(peer); - if (rp->th_block == (*block-1)) { - tftp_log(LOG_INFO, "Trying to sync"); - *block = oldblock; - ts->retries++; - goto send_ack; /* rexmit */ - } + tftp_log(LOG_INFO, "Trying to sync"); + *block = oldblock; + ts->retries++; + goto send_ack; /* rexmit */ + } else { tftp_log(LOG_WARNING, "Expected DATA block, got %s block", @@ -282,7 +378,11 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st if (n_data != segsize) write_close(); } + windowblock++; + /* Only send ACKs for the last block in the window. */ + if (windowblock < windowsize && n_data == segsize) + continue; send_ack: for (i = 0; ; i++) { n_ack = send_ack(peer, *block); @@ -301,6 +401,9 @@ send_ack: continue; } + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, "Sent ACK for %d", *block); + windowblock = 0; break; } gettimeofday(&(ts->tstop), NULL); Modified: head/libexec/tftpd/tftp-utils.c ============================================================================== --- head/libexec/tftpd/tftp-utils.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-utils.c Mon Mar 2 22:19:30 2020 (r358556) @@ -51,6 +51,7 @@ int timeoutnetwork = MAX_TIMEOUTS * TIMEOUT; int maxtimeouts = MAX_TIMEOUTS; uint16_t segsize = SEGSIZE; uint16_t pktsize = SEGSIZE + 4; +uint16_t windowsize = WINDOWSIZE; int acting_as_client; Modified: head/libexec/tftpd/tftp-utils.h ============================================================================== --- head/libexec/tftpd/tftp-utils.h Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-utils.h Mon Mar 2 22:19:30 2020 (r358556) @@ -46,6 +46,11 @@ __FBSDID("$FreeBSD$"); #define TIMEOUT_MAX 255 /* Maximum timeout value */ #define MIN_TIMEOUTS 3 +/* For the windowsize option */ +#define WINDOWSIZE 1 +#define WINDOWSIZE_MIN 1 +#define WINDOWSIZE_MAX 65535 + extern int timeoutpacket; extern int timeoutnetwork; extern int maxtimeouts; @@ -53,6 +58,7 @@ int settimeouts(int timeoutpacket, int timeoutnetwork, extern uint16_t segsize; extern uint16_t pktsize; +extern uint16_t windowsize; extern int acting_as_client; Modified: head/libexec/tftpd/tftpd.8 ============================================================================== --- head/libexec/tftpd/tftpd.8 Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftpd.8 Mon Mar 2 22:19:30 2020 (r358556) @@ -28,7 +28,7 @@ .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 22, 2011 +.Dd March 2, 2020 .Dt TFTPD 8 .Os .Sh NAME @@ -245,6 +245,9 @@ The following RFC's are supported: .Rs .%T RFC 2349: TFTP Timeout Interval and Transfer Size Options .Re +.Rs +.%T RFC 7440: TFTP Windowsize Option +.Re .Pp The non-standard .Cm rollover @@ -291,6 +294,9 @@ Edwin Groothuis performed a major and .Xr tftp 1 code to support RFC2348. +.Pp +Support for the windowsize option (RFC7440) was introduced in +.Fx 13.0 . .Sh NOTES Files larger than 33,553,919 octets (65535 blocks, last one <512 octets) cannot be correctly transferred without client and server Modified: head/usr.bin/tftp/main.c ============================================================================== --- head/usr.bin/tftp/main.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/usr.bin/tftp/main.c Mon Mar 2 22:19:30 2020 (r358556) @@ -114,6 +114,7 @@ static void setblocksize2(int, char **); static void setoptions(int, char **); static void setrollover(int, char **); static void setpacketdrop(int, char **); +static void setwindowsize(int, char **); static void command(bool, EditLine *, History *, HistEvent *) __dead2; static const char *command_prompt(void); @@ -158,6 +159,7 @@ static struct cmd cmdtab[] = { "enable or disable RFC2347 style options" }, { "help", help, "print help information" }, { "packetdrop", setpacketdrop, "artificial packetloss feature" }, + { "windowsize", setwindowsize, "set windowsize[*]" }, { "?", help, "print help information" }, { NULL, NULL, NULL } }; @@ -1068,4 +1070,28 @@ setpacketdrop(int argc, char *argv[]) printf("Randomly %d in 100 packets will be dropped\n", packetdroppercentage); +} + +static void +setwindowsize(int argc, char *argv[]) +{ + + if (!options_rfc_enabled) + printf("RFC2347 style options are not enabled " + "(but proceeding anyway)\n"); + + if (argc != 1) { + int size = atoi(argv[1]); + + if (size < WINDOWSIZE_MIN || size > WINDOWSIZE_MAX) { + printf("Windowsize should be between %d and %d " + "blocks.\n", WINDOWSIZE_MIN, WINDOWSIZE_MAX); + return; + } else { + asprintf(&options[OPT_WINDOWSIZE].o_request, "%d", + size); + } + } + printf("Windowsize is now %s blocks.\n", + options[OPT_WINDOWSIZE].o_request); } Modified: head/usr.bin/tftp/tftp.1 ============================================================================== --- head/usr.bin/tftp/tftp.1 Mon Mar 2 21:19:51 2020 (r358555) +++ head/usr.bin/tftp/tftp.1 Mon Mar 2 22:19:30 2020 (r358556) @@ -28,7 +28,7 @@ .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd Aug 22, 2018 +.Dd March 2, 2020 .Dt TFTP 1 .Os .Sh NAME @@ -216,6 +216,14 @@ Toggle packet tracing. .Pp .It Cm verbose Toggle verbose mode. +.Pp +.It Cm windowsize Op Ar size +Sets the TFTP windowsize option in TFTP Read Request or Write Request packets to +.Op Ar size +blocks as specified in RFC 7440. +Valid values are between 1 and 65535. +If no windowsize is specified, +then the default windowsize of 1 block will be used. .El .Sh SEE ALSO .Xr tftpd 8 @@ -235,6 +243,9 @@ The following RFC's are supported: .Re .Rs .%T RFC 3617: Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) +.Re +.Rs +.%T RFC 7440: TFTP Windowsize Option .Re .Pp The non-standard From owner-svn-src-head@freebsd.org Mon Mar 2 22:52:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1855925D043 for ; Mon, 2 Mar 2020 22:52:53 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wb5J3ZQMz3xFC; Mon, 2 Mar 2020 22:52:52 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from localhost (unknown [IPv6:2409:11:a740:4700:16:ceff:fe34:2700]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: hrs) by smtp.freebsd.org (Postfix) with ESMTPSA id 316482FE6E; Mon, 2 Mar 2020 22:52:51 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Date: Tue, 03 Mar 2020 07:50:47 +0900 (JST) Message-Id: <20200303.075047.1159550404273266246.hrs@FreeBSD.org> To: eugen@grosbein.net, jkim@FreeBSD.org Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358411 - head/contrib/sendmail/src From: Hiroki Sato In-Reply-To: <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> X-Old-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-PGPkey-fingerprint: 6C0D 2353 27CF 80C7 901E FDD2 DBB0 7DC6 6F1F 737F X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="--Security_Multipart0(Tue_Mar__3_07_50_47_2020_142)--" Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 22:52:53 -0000 ----Security_Multipart0(Tue_Mar__3_07_50_47_2020_142)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Mar__3_07_50_47_2020_490)--" Content-Transfer-Encoding: 7bit ----Next_Part(Tue_Mar__3_07_50_47_2020_490)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jung-uk Kim wrote in <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org>: jk> > I merely try to understand how to unbreak upgrade path for 11.2-STABLE workstations jk> > with stock sendmail and SSL support that also has many ports installed including jk> > ports requiring new openssl API. Because buildworld fails and upgrade is broken. jk> I am also trying to understand your problem. Which port is specifically jk> requiring new OpenSSL API for you? The problem eugen@ is trying to explain is (correct me if this is wrong): 1. One needs to install OpenSSL from ports if she wants to install software which depends on it. deskutils/nextcloudclient, for example. Setting DEFAILT_VERSION+=ssl=openssl is strongly recommended in this case for consistency. 2. Handbook says enabling SMTP AUTH requires the following in make.conf: SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL SENDMAIL_LDFLAGS=-L/usr/local/lib SENDMAIL_LDADD=-lsasl2 However, this variables make the buildworld target to pick up OpenSSL from ports if installed, not from base, in the middle of building sendmail. "make buildworld" will always fail. There is no way to avoid OpenSSL from ports if she wants software such as deskutils/nextcloudclient. This build breakage occurs with sendmail + openssl from ports, not related to cyrus-sasl2. A shlib mismatch between sendmail and cyrus-sasl2 in terms of OpenSSL library is another issue. I think there are several workaround, but the primary problem is that people can get confused with instructions in the handbook. I suggest to update the handbook: a) If you do not have security/openssl on your system, set the following in make.conf and rebuilt the world: SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL SENDMAIL_LDFLAGS=-L/usr/local/lib SENDMAIL_LDADD=-lsasl2 b) If you have security/openssl, sendmail in the base system does not support SMTP AUTH because of incompatibility with the newer versions of OpenSSL. Use mail/sendmail from ports. I still feel that b) is sub-optimal, but it would be too complex to make them coexist with each other. The attached patch and putting SASLBASEDIR=/usr/local into /etc/make.conf instead of the SENDMAIL_* variables should mitigate the first problem but if security/cyrus-sasl2 was built with OpenSSL from ports, the shlib mismatch still occurs. -- Hiroki ----Next_Part(Tue_Mar__3_07_50_47_2020_490)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="usr.sbin_sendmail_Makefile.20200303-1.diff" Index: usr.sbin/sendmail/Makefile =================================================================== --- usr.sbin/sendmail/Makefile (revision 358301) +++ usr.sbin/sendmail/Makefile (working copy) @@ -72,3 +72,15 @@ ln -sf ${.ALLSRC} ${.TARGET} .include + +# libsasl2 support +.if defined(SASLBASEDIR) && exists(${SASLBASEDIR}) +${OBJS}: libsasl2.so sasl +libsasl2.so: + ln -s -f ${SASLBASEDIR}/lib/libsasl2.so ${.OBJDIR} +sasl: + ln -s -f ${SASLBASEDIR}/include/sasl ${.OBJDIR} +CLEANFILES+=libsasl2.so sasl +LDADD+= -lsasl2 -L. +CFLAGS+= -I. -DSASL +.endif ----Next_Part(Tue_Mar__3_07_50_47_2020_490)---- ----Security_Multipart0(Tue_Mar__3_07_50_47_2020_142)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iMgEABMKAC4WIQRsDSNTJ8+Ax5Ae/dLbsH3Gbx9zfwUCXl2NxxAcaHJzQGZyZWVi c2Qub3JnAAoJENuwfcZvH3N/5uMCCJqncsGovmO6QOBzYZAHzf7LaP5b0x7ZZL0n 4zqvnWr7P4yxvnPIqnVhTr/pb3mlvm8X6gmd/zWa/v8FeLR+qEH/AgjGqNvjP8D9 WQ9ygjfnQNg8nkK8uKCfHyO/Xw/YiMiwUNxyPzPtzonJfTrbtW9mbLo2cyC2zDM/ 4JeUHBpXYBEe9A== =xlZT -----END PGP SIGNATURE----- ----Security_Multipart0(Tue_Mar__3_07_50_47_2020_142)---- From owner-svn-src-head@freebsd.org Mon Mar 2 23:24:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4841525DA28 for ; Mon, 2 Mar 2020 23:24:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WbnW014Qz4dfK; Mon, 2 Mar 2020 23:24:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 170D8447; Mon, 2 Mar 2020 23:24:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Hiroki Sato , eugen@grosbein.net Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <031ad6fe-5483-939a-29f5-2ccfe62890ab@FreeBSD.org> Date: Mon, 2 Mar 2020 18:24:07 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200303.075047.1159550404273266246.hrs@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 23:24:15 -0000 On 20. 3. 2., Hiroki Sato wrote: > Jung-uk Kim wrote > in <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org>: > > jk> > I merely try to understand how to unbreak upgrade path for 11.2-STABLE workstations > jk> > with stock sendmail and SSL support that also has many ports installed including > jk> > ports requiring new openssl API. Because buildworld fails and upgrade is broken. > jk> I am also trying to understand your problem. Which port is specifically > jk> requiring new OpenSSL API for you? > > The problem eugen@ is trying to explain is (correct me if this is > wrong): > > 1. One needs to install OpenSSL from ports if she wants to install > software which depends on it. deskutils/nextcloudclient, for > example. Setting DEFAILT_VERSION+=ssl=openssl is strongly > recommended in this case for consistency. > > 2. Handbook says enabling SMTP AUTH requires the following in make.conf: > > SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL > SENDMAIL_LDFLAGS=-L/usr/local/lib > SENDMAIL_LDADD=-lsasl2 > > However, this variables make the buildworld target to pick up > OpenSSL from ports if installed, not from base, in the middle of > building sendmail. "make buildworld" will always fail. There is > no way to avoid OpenSSL from ports if she wants software such as > deskutils/nextcloudclient. > > This build breakage occurs with sendmail + openssl from ports, not > related to cyrus-sasl2. A shlib mismatch between sendmail and > cyrus-sasl2 in terms of OpenSSL library is another issue. > > I think there are several workaround, but the primary problem is that > people can get confused with instructions in the handbook. I suggest > to update the handbook: > > a) If you do not have security/openssl on your system, set the > following in make.conf and rebuilt the world: > > SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL > SENDMAIL_LDFLAGS=-L/usr/local/lib > SENDMAIL_LDADD=-lsasl2 > > b) If you have security/openssl, sendmail in the base system does not > support SMTP AUTH because of incompatibility with the newer > versions of OpenSSL. Use mail/sendmail from ports. > > I still feel that b) is sub-optimal, but it would be too complex to > make them coexist with each other. The attached patch and putting > SASLBASEDIR=/usr/local into /etc/make.conf instead of the SENDMAIL_* > variables should mitigate the first problem but if > security/cyrus-sasl2 was built with OpenSSL from ports, the shlib > mismatch still occurs. Ah, now I see the whole picture. Yes, the Handbook needs some improvement. Yes, b) is sub-optimal but I guess it is the only clean solution for now. Thanks for the explanation! Jung-uk Kim From owner-svn-src-head@freebsd.org Mon Mar 2 23:24:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACD3D25DA5D; Mon, 2 Mar 2020 23:24:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WbpH1zphz4gBk; Mon, 2 Mar 2020 23:24:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D78023EA5; Mon, 2 Mar 2020 23:24:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022NOtGf071591; Mon, 2 Mar 2020 23:24:55 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022NOsMB071584; Mon, 2 Mar 2020 23:24:54 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003022324.022NOsMB071584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 2 Mar 2020 23:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358558 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 23:24:55 -0000 Author: cy Date: Mon Mar 2 23:24:53 2020 New Revision: 358558 URL: https://svnweb.freebsd.org/changeset/base/358558 Log: Continuing the effort started in r343701, #ifdef cleanup, checking for __FreeBSD_version > 3.0 and 5.0 is redundant. MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h head/sys/contrib/ipfilter/netinet/ip_fil.h head/sys/contrib/ipfilter/netinet/ip_proxy.c head/sys/contrib/ipfilter/netinet/ip_state.c head/sys/contrib/ipfilter/netinet/ip_sync.c Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 22:54:32 2020 (r358557) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:24:53 2020 (r358558) @@ -126,7 +126,7 @@ * There may be other, safe, kernels but this is not extensively tested yet. */ # define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && (__FreeBSD_version >= 300000) +# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) # include "opt_ipfilter.h" # endif # define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil.h Mon Mar 2 22:54:32 2020 (r358557) +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Mon Mar 2 23:24:53 2020 (r358558) @@ -1420,8 +1420,7 @@ typedef struct ipftune { ** HPUX Port */ -#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) && \ - (__FreeBSD_version >= 220000) +#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) # define CDEV_MAJOR 79 #endif Modified: head/sys/contrib/ipfilter/netinet/ip_proxy.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_proxy.c Mon Mar 2 22:54:32 2020 (r358557) +++ head/sys/contrib/ipfilter/netinet/ip_proxy.c Mon Mar 2 23:24:53 2020 (r358558) @@ -51,7 +51,7 @@ # include # include #endif -#if __FreeBSD_version >= 300000 +#ifdef __FreeBSD_version # include #endif #include Modified: head/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_state.c Mon Mar 2 22:54:32 2020 (r358557) +++ head/sys/contrib/ipfilter/netinet/ip_state.c Mon Mar 2 23:24:53 2020 (r358558) @@ -82,7 +82,7 @@ #ifdef USE_INET6 #include #endif -#if FREEBSD_GE_REV(300000) +#ifdef __FreeBSD_version # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include @@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max /* * XXX - ipf_state_seed[X] should be a random number of sorts. */ -#if FREEBSD_GE_REV(400000) +#ifdef __FreeBSD_version state_seed[i] = arc4random(); #else state_seed[i] = ((u_long)state_seed + i) * state_size; Modified: head/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_sync.c Mon Mar 2 22:54:32 2020 (r358557) +++ head/sys/contrib/ipfilter/netinet/ip_sync.c Mon Mar 2 23:24:53 2020 (r358558) @@ -30,7 +30,7 @@ # include # endif # include -# if __FreeBSD_version >= 500000 +# ifdef __FreeBSD_version # include # endif #endif From owner-svn-src-head@freebsd.org Mon Mar 2 23:24:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 951C625DA85; Mon, 2 Mar 2020 23:24:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WbpM2Shlz4gMs; Mon, 2 Mar 2020 23:24:59 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF8E023EA6; Mon, 2 Mar 2020 23:24:58 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022NOwJl071639; Mon, 2 Mar 2020 23:24:58 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022NOw77071638; Mon, 2 Mar 2020 23:24:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003022324.022NOw77071638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 2 Mar 2020 23:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358559 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 23:24:59 -0000 Author: cy Date: Mon Mar 2 23:24:58 2020 New Revision: 358559 URL: https://svnweb.freebsd.org/changeset/base/358559 Log: Remove the now unused FREEBSD_GE_REV, FREEBSD_GT_REV, and FREEBSD_LT_REV macros. MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:24:53 2020 (r358558) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:24:58 2020 (r358559) @@ -89,12 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define FREEBSD_GE_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version >= (x))) -#define FREEBSD_GT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version > (x))) -#define FREEBSD_LT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version < (x))) #define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) #define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) #define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) From owner-svn-src-head@freebsd.org Mon Mar 2 23:25:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3745425DAAA; Mon, 2 Mar 2020 23:25:04 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WbpS04WGz4gZc; Mon, 2 Mar 2020 23:25:04 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1AEC123EA7; Mon, 2 Mar 2020 23:25:03 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022NP2iu071702; Mon, 2 Mar 2020 23:25:02 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022NP2g2071700; Mon, 2 Mar 2020 23:25:02 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003022325.022NP2g2071700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 2 Mar 2020 23:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358560 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 23:25:04 -0000 Author: cy Date: Mon Mar 2 23:25:02 2020 New Revision: 358560 URL: https://svnweb.freebsd.org/changeset/base/358560 Log: Retire macros: BSD_GE_YEAR BSD_GT_YEAR BSD_LT_YEAR MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h head/sys/contrib/ipfilter/netinet/ip_nat.c head/sys/contrib/ipfilter/netinet/ip_sync.c Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:24:58 2020 (r358559) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:25:02 2020 (r358560) @@ -89,9 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) -#define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) -#define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) /* ----------------------------------------------------------------------- */ @@ -439,7 +436,7 @@ extern mb_t *allocmbt(size_t); * On BSD's use quad_t as a guarantee for getting at least a 64bit sized * object. */ -#if !defined(__amd64__) && BSD_GT_YEAR(199306) +#if !defined(__amd64__) && !SOLARIS # define USE_QUAD_T # define U_QUAD_T unsigned long long # define QUAD_T long long @@ -733,7 +730,7 @@ typedef struct tcpiphdr tcpiphdr_t; #define TCPF_ALL (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|\ TH_ECN|TH_CWR) -#if BSD_GE_YEAR(199306) && !defined(m_act) +#if !SOLARIS && !defined(m_act) # define m_act m_nextpkt #endif Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Mon Mar 2 23:24:58 2020 (r358559) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Mon Mar 2 23:25:02 2020 (r358560) @@ -1010,7 +1010,7 @@ ipf_nat_ioctl(softc, data, cmd, mode, uid, ctx) ipnat_t natd; SPL_INT(s); -#if BSD_GE_YEAR(199306) && defined(_KERNEL) +#if !SOLARIS && defined(_KERNEL) # if NETBSD_GE_REV(399002000) if ((mode & FWRITE) && kauth_authorize_network(curlwp->l_cred, KAUTH_NETWORK_FIREWALL, Modified: head/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_sync.c Mon Mar 2 23:24:58 2020 (r358559) +++ head/sys/contrib/ipfilter/netinet/ip_sync.c Mon Mar 2 23:25:02 2020 (r358560) @@ -437,7 +437,7 @@ ipf_sync_write(softc, uio) int err = 0; -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_WRITE; # endif @@ -585,7 +585,7 @@ ipf_sync_read(softc, uio) return EINVAL; } -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_READ; # endif From owner-svn-src-head@freebsd.org Mon Mar 2 23:37:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 614A425DE67; Mon, 2 Mar 2020 23:37:50 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wc5B0XYYz3xqS; Mon, 2 Mar 2020 23:37:50 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF59424078; Mon, 2 Mar 2020 23:37:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022NbnDO078090; Mon, 2 Mar 2020 23:37:49 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022NblgD078080; Mon, 2 Mar 2020 23:37:47 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202003022337.022NblgD078080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 2 Mar 2020 23:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin/calendar/calendars/de_AT... X-SVN-Commit-Revision: 358561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2020 23:37:50 -0000 Author: cem Date: Mon Mar 2 23:37:47 2020 New Revision: 358561 URL: https://svnweb.freebsd.org/changeset/base/358561 Log: Fix typo in r278616 FreeBSD isn't an encyclopedia. Deleted: head/tools/build/options/WITHOUT_CALENDAR head/usr.bin/calendar/Makefile head/usr.bin/calendar/Makefile.depend head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/calendar.c head/usr.bin/calendar/calendar.h head/usr.bin/calendar/calendars/calendar.all head/usr.bin/calendar/calendars/calendar.australia head/usr.bin/calendar/calendars/calendar.birthday head/usr.bin/calendar/calendars/calendar.brazilian head/usr.bin/calendar/calendars/calendar.christian head/usr.bin/calendar/calendars/calendar.computer head/usr.bin/calendar/calendars/calendar.croatian head/usr.bin/calendar/calendars/calendar.dutch head/usr.bin/calendar/calendars/calendar.french head/usr.bin/calendar/calendars/calendar.german head/usr.bin/calendar/calendars/calendar.history head/usr.bin/calendar/calendars/calendar.holiday head/usr.bin/calendar/calendars/calendar.hungarian head/usr.bin/calendar/calendars/calendar.judaic head/usr.bin/calendar/calendars/calendar.lotr head/usr.bin/calendar/calendars/calendar.music head/usr.bin/calendar/calendars/calendar.newzealand head/usr.bin/calendar/calendars/calendar.russian head/usr.bin/calendar/calendars/calendar.southafrica head/usr.bin/calendar/calendars/calendar.ukrainian head/usr.bin/calendar/calendars/calendar.usholiday head/usr.bin/calendar/calendars/calendar.world head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ head/usr.bin/calendar/calendars/pt_BR.UTF-8/ head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ head/usr.bin/calendar/calendars/ru_RU.UTF-8/ head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ head/usr.bin/calendar/dates.c head/usr.bin/calendar/day.c head/usr.bin/calendar/events.c head/usr.bin/calendar/io.c head/usr.bin/calendar/locale.c head/usr.bin/calendar/ostern.c head/usr.bin/calendar/parsedata.c head/usr.bin/calendar/paskha.c head/usr.bin/calendar/pathnames.h head/usr.bin/calendar/pom.c head/usr.bin/calendar/sunpos.c head/usr.bin/calendar/tests/ head/usr.sbin/periodic/etc/daily/300.calendar Modified: head/ObsoleteFiles.inc head/share/man/man5/periodic.conf.5 head/share/man/man5/src.conf.5 head/share/man/man7/hier.7 head/tools/tools/nanobsd/dhcpd/common head/tools/tools/nanobsd/embedded/common head/usr.bin/Makefile head/usr.bin/leave/leave.1 head/usr.sbin/periodic/etc/daily/Makefile head/usr.sbin/periodic/periodic.conf Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Mar 2 23:25:02 2020 (r358560) +++ head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) @@ -36,6 +36,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20200302: calendar(1) removed +OLD_DIRS+=usr/share/calendar +OLD_FILES+=usr/bin/calendar +OLD_FILES+=usr/share/man/man1/calendar.1.gz + # 20200301: bktr removed OLD_DIRS+=usr/include/dev/bktr OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:25:02 2020 (r358560) +++ head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 (r358561) @@ -273,13 +273,6 @@ Set to if you want the .Pa /etc/mail/aliases file backed up and modifications to be displayed in your daily output. -.It Va daily_calendar_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to run -.Nm calendar Fl a -daily. .It Va daily_accounting_enable .Pq Vt bool Set to @@ -970,7 +963,6 @@ is shared or distributed. .El .Sh SEE ALSO .Xr apropos 1 , -.Xr calendar 1 , .Xr df 1 , .Xr diff 1 , .Xr gzip 1 , Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Mar 2 23:25:02 2020 (r358560) +++ head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 (r358561) @@ -271,9 +271,6 @@ is set explicitly) .El .It Va WITHOUT_BZIP2_SUPPORT Set to build some programs without optional bzip2 support. -.It Va WITHOUT_CALENDAR -Set to not build -.Xr calendar 1 . .It Va WITHOUT_CAPSICUM Set to not build Capsicum support into system programs. When set, it enforces these options: Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Mon Mar 2 23:25:02 2020 (r358560) +++ head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) @@ -442,10 +442,6 @@ system daemons & system utilities (executed by users) architecture-independent files .Pp .Bl -tag -width Fl -compact -.It Pa calendar/ -a variety of pre-fab calendar files; -see -.Xr calendar 1 .It Pa dict/ word lists; see Modified: head/tools/tools/nanobsd/dhcpd/common ============================================================================== --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:25:02 2020 (r358560) +++ head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 (r358561) @@ -104,7 +104,6 @@ WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true WITHOUT_BLUETOOTH=true -WITHOUT_CALENDAR=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true WITHOUT_GAMES=true Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:25:02 2020 (r358560) +++ head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 (r358561) @@ -135,7 +135,6 @@ WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true WITHOUT_BLUETOOTH=true -WITHOUT_CALENDAR=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true WITHOUT_GAMES=true Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Mar 2 23:25:02 2020 (r358560) +++ head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) @@ -195,7 +195,6 @@ SUBDIR.${MK_AT}+= at SUBDIR.${MK_ATM}+= atm SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BSD_CPIO}+= cpio -SUBDIR.${MK_CALENDAR}+= calendar SUBDIR.${MK_CLANG}+= clang SUBDIR.${MK_DIALOG}+= dpv SUBDIR.${MK_EE}+= ee Modified: head/usr.bin/leave/leave.1 ============================================================================== --- head/usr.bin/leave/leave.1 Mon Mar 2 23:25:02 2020 (r358560) +++ head/usr.bin/leave/leave.1 Mon Mar 2 23:37:47 2020 (r358561) @@ -87,8 +87,6 @@ To get rid of you should either log off or use .Ql kill \-s KILL giving its process id. -.Sh SEE ALSO -.Xr calendar 1 .Sh HISTORY The .Nm Modified: head/usr.sbin/periodic/etc/daily/Makefile ============================================================================== --- head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:25:02 2020 (r358560) +++ head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:37:47 2020 (r358561) @@ -33,10 +33,6 @@ ACCTMODE= ${BINMODE} ACCTPACKAGE= acct .endif -.if ${MK_CALENDAR} != "no" -CONFS+= 300.calendar -.endif - .if ${MK_MAIL} != "no" CONFS+= 130.clean-msgs .endif Modified: head/usr.sbin/periodic/periodic.conf ============================================================================== --- head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:25:02 2020 (r358560) +++ head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:37:47 2020 (r358561) @@ -77,9 +77,6 @@ daily_backup_passwd_enable="YES" # Backup passwd & g # 210.backup-aliases daily_backup_aliases_enable="YES" # Backup mail aliases -# 300.calendar -daily_calendar_enable="NO" # Run calendar -a - # 310.accounting daily_accounting_enable="YES" # Rotate acct files daily_accounting_compress="NO" # Gzip rotated files From owner-svn-src-head@freebsd.org Tue Mar 3 00:04:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 565DD25ED3C; Tue, 3 Mar 2020 00:04:25 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yw1-xc32.google.com (mail-yw1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wcgq6Qqfz41X2; Tue, 3 Mar 2020 00:04:23 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by mail-yw1-xc32.google.com with SMTP id t192so1689851ywe.7; Mon, 02 Mar 2020 16:04:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9QrMbnkHS7UQzBL0wN4nWPCPiGcBUYJrTBHejSKthj4=; b=kp+3zruu3ZmyhZB/l0vp2i5eprM1qzXMFAOeoNU4t6ukDfvB12int/RyiSLWzgyf6h rgsylUCPe9vIMT25yMH6QCbRuON0DB3H1V8/62StE/RLLUXVUtpfp84hdAbTpSShGtyd 5mgLi+6m/Nb0r4TdxD3dpH5nx+DD4e3SwVjmqbdlARPs0b+m6dUdd/iQHVbPHLQGTaL9 iOSX7wmSL0w/h90VKfGklBVwUNJUYKDV9tdqrMiNWQiOOEiPkJuD6ZYYiNSKGYd0mcgQ 8IBYY8YcHKIu1FEI/beJC9oV8kLoKkI1xmnz22XFPyFnKIJ8WXNk2LSeI2wbdhnfzqbj 6ulw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9QrMbnkHS7UQzBL0wN4nWPCPiGcBUYJrTBHejSKthj4=; b=AFcTO6x6URQd6qgavc/6WoUeScST4aiU/XI4gUuZhUrk2fe/ulxFY8GzWDeuT50tTR 46uHz/iQGAmCIKiRhdbLdK1IaOjOefD4Fejy/p4m+sWs5RSy48W0p3PqRHcywn7+GbKb KC4nIRTbAGbKgfROxRQCI0m9dzDk/APU+JTPNlu/KlaRwvFZWk2h+cYmwNinK+USHBfE edD+HPDjFfQzv4mQfyNsK+7kZxz/2o86lY9E6xjAHLFBWbHZ3nbYMqj75R2xV+VuGVaL 9Wdm3csFleZ0xgqZDBuuNJ4BVqbZQRyghfxANLpLoPPhT8zi/gErAx1lS7Kibi4UJjdr rpjg== X-Gm-Message-State: ANhLgQ2IXYt6nxfKpEsEr9IjSEdxohVt+0z5D9VxN8kt3WKYVJBLD62o lWoNJ0+Rlbrp4VjFDWRw2OGG9TvM1tVW4J7rLQHsD3sR X-Google-Smtp-Source: ADFU+vsLy2mTEhx3Bl16hVQcPxN3xyvLDnUf3qgLQK0zGLscnngQg9c7OPqWQlj36nV/kK7LZf1YNGx5PZkMc9V9R5o= X-Received: by 2002:a25:785:: with SMTP id 127mr1565229ybh.405.1583193861653; Mon, 02 Mar 2020 16:04:21 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:698b:0:0:0:0:0 with HTTP; Mon, 2 Mar 2020 16:04:20 -0800 (PST) In-Reply-To: <202003022337.022NblgD078080@repo.freebsd.org> References: <202003022337.022NblgD078080@repo.freebsd.org> From: Oliver Pinter Date: Tue, 3 Mar 2020 01:04:20 +0100 Message-ID: Subject: Re: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... To: Conrad Meyer Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 48Wcgq6Qqfz41X2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=kp+3zruu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of oliverpntr@gmail.com designates 2607:f8b0:4864:20::c32 as permitted sender) smtp.mailfrom=oliverpntr@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; IP_SCORE(0.00)[ip: (-8.78), ipnet: 2607:f8b0::/32(-1.86), asn: 15169(-1.66), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2.3.c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 00:04:25 -0000 On Tuesday, March 3, 2020, Conrad Meyer wrote: > Author: cem > Date: Mon Mar 2 23:37:47 2020 > New Revision: 358561 > URL: https://svnweb.freebsd.org/changeset/base/358561 > > Log: > Fix typo in r278616 Umm, this commit isn't really just a typo fix. Please revert it. > > FreeBSD isn't an encyclopedia. > > Deleted: > head/tools/build/options/WITHOUT_CALENDAR > head/usr.bin/calendar/Makefile > head/usr.bin/calendar/Makefile.depend > head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/calendar.c > head/usr.bin/calendar/calendar.h > head/usr.bin/calendar/calendars/calendar.all > head/usr.bin/calendar/calendars/calendar.australia > head/usr.bin/calendar/calendars/calendar.birthday > head/usr.bin/calendar/calendars/calendar.brazilian > head/usr.bin/calendar/calendars/calendar.christian > head/usr.bin/calendar/calendars/calendar.computer > head/usr.bin/calendar/calendars/calendar.croatian > head/usr.bin/calendar/calendars/calendar.dutch > head/usr.bin/calendar/calendars/calendar.french > head/usr.bin/calendar/calendars/calendar.german > head/usr.bin/calendar/calendars/calendar.history > head/usr.bin/calendar/calendars/calendar.holiday > head/usr.bin/calendar/calendars/calendar.hungarian > head/usr.bin/calendar/calendars/calendar.judaic > head/usr.bin/calendar/calendars/calendar.lotr > head/usr.bin/calendar/calendars/calendar.music > head/usr.bin/calendar/calendars/calendar.newzealand > head/usr.bin/calendar/calendars/calendar.russian > head/usr.bin/calendar/calendars/calendar.southafrica > head/usr.bin/calendar/calendars/calendar.ukrainian > head/usr.bin/calendar/calendars/calendar.usholiday > head/usr.bin/calendar/calendars/calendar.world > head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > head/usr.bin/calendar/dates.c > head/usr.bin/calendar/day.c > head/usr.bin/calendar/events.c > head/usr.bin/calendar/io.c > head/usr.bin/calendar/locale.c > head/usr.bin/calendar/ostern.c > head/usr.bin/calendar/parsedata.c > head/usr.bin/calendar/paskha.c > head/usr.bin/calendar/pathnames.h > head/usr.bin/calendar/pom.c > head/usr.bin/calendar/sunpos.c > head/usr.bin/calendar/tests/ > head/usr.sbin/periodic/etc/daily/300.calendar > Modified: > head/ObsoleteFiles.inc > head/share/man/man5/periodic.conf.5 > head/share/man/man5/src.conf.5 > head/share/man/man7/hier.7 > head/tools/tools/nanobsd/dhcpd/common > head/tools/tools/nanobsd/embedded/common > head/usr.bin/Makefile > head/usr.bin/leave/leave.1 > head/usr.sbin/periodic/etc/daily/Makefile > head/usr.sbin/periodic/periodic.conf > > Modified: head/ObsoleteFiles.inc > ============================================================ > ================== > --- head/ObsoleteFiles.inc Mon Mar 2 23:25:02 2020 (r358560) > +++ head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) > @@ -36,6 +36,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20200302: calendar(1) removed > +OLD_DIRS+=usr/share/calendar > +OLD_FILES+=usr/bin/calendar > +OLD_FILES+=usr/share/man/man1/calendar.1.gz > + > # 20200301: bktr removed > OLD_DIRS+=usr/include/dev/bktr > OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h > > Modified: head/share/man/man5/periodic.conf.5 > ============================================================ > ================== > --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 > (r358561) > @@ -273,13 +273,6 @@ Set to > if you want the > .Pa /etc/mail/aliases > file backed up and modifications to be displayed in your daily output. > -.It Va daily_calendar_enable > -.Pq Vt bool > -Set to > -.Dq Li YES > -if you want to run > -.Nm calendar Fl a > -daily. > .It Va daily_accounting_enable > .Pq Vt bool > Set to > @@ -970,7 +963,6 @@ is shared or distributed. > .El > .Sh SEE ALSO > .Xr apropos 1 , > -.Xr calendar 1 , > .Xr df 1 , > .Xr diff 1 , > .Xr gzip 1 , > > Modified: head/share/man/man5/src.conf.5 > ============================================================ > ================== > --- head/share/man/man5/src.conf.5 Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 > (r358561) > @@ -271,9 +271,6 @@ is set explicitly) > .El > .It Va WITHOUT_BZIP2_SUPPORT > Set to build some programs without optional bzip2 support. > -.It Va WITHOUT_CALENDAR > -Set to not build > -.Xr calendar 1 . > .It Va WITHOUT_CAPSICUM > Set to not build Capsicum support into system programs. > When set, it enforces these options: > > Modified: head/share/man/man7/hier.7 > ============================================================ > ================== > --- head/share/man/man7/hier.7 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) > @@ -442,10 +442,6 @@ system daemons & system utilities (executed by users) > architecture-independent files > .Pp > .Bl -tag -width Fl -compact > -.It Pa calendar/ > -a variety of pre-fab calendar files; > -see > -.Xr calendar 1 > .It Pa dict/ > word lists; > see > > Modified: head/tools/tools/nanobsd/dhcpd/common > ============================================================ > ================== > --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 > (r358561) > @@ -104,7 +104,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/tools/tools/nanobsd/embedded/common > ============================================================ > ================== > --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 > (r358561) > @@ -135,7 +135,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/usr.bin/Makefile > ============================================================ > ================== > --- head/usr.bin/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -195,7 +195,6 @@ SUBDIR.${MK_AT}+= at > SUBDIR.${MK_ATM}+= atm > SUBDIR.${MK_BLUETOOTH}+= bluetooth > SUBDIR.${MK_BSD_CPIO}+= cpio > -SUBDIR.${MK_CALENDAR}+= calendar > SUBDIR.${MK_CLANG}+= clang > SUBDIR.${MK_DIALOG}+= dpv > SUBDIR.${MK_EE}+= ee > > Modified: head/usr.bin/leave/leave.1 > ============================================================ > ================== > --- head/usr.bin/leave/leave.1 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/leave/leave.1 Mon Mar 2 23:37:47 2020 (r358561) > @@ -87,8 +87,6 @@ To get rid of > you should either log off or use > .Ql kill \-s KILL > giving its process id. > -.Sh SEE ALSO > -.Xr calendar 1 > .Sh HISTORY > The > .Nm > > Modified: head/usr.sbin/periodic/etc/daily/Makefile > ============================================================ > ================== > --- head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:37:47 2020 > (r358561) > @@ -33,10 +33,6 @@ ACCTMODE= ${BINMODE} > ACCTPACKAGE= acct > .endif > > -.if ${MK_CALENDAR} != "no" > -CONFS+= 300.calendar > -.endif > - > .if ${MK_MAIL} != "no" > CONFS+= 130.clean-msgs > .endif > > Modified: head/usr.sbin/periodic/periodic.conf > ============================================================ > ================== > --- head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:37:47 2020 > (r358561) > @@ -77,9 +77,6 @@ daily_backup_passwd_enable="YES" # > Backup passwd & g > # 210.backup-aliases > daily_backup_aliases_enable="YES" # Backup mail > aliases > > -# 300.calendar > -daily_calendar_enable="NO" # Run calendar -a > - > # 310.accounting > daily_accounting_enable="YES" # Rotate acct files > daily_accounting_compress="NO" # Gzip rotated > files > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@freebsd.org Tue Mar 3 00:05:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09C1D25EECB; Tue, 3 Mar 2020 00:05:06 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wchb4T6Kz42c2; Tue, 3 Mar 2020 00:05:03 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 023050Yb029049; Mon, 2 Mar 2020 16:05:00 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 023050xE029048; Mon, 2 Mar 2020 16:05:00 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202003030005.023050xE029048@gndrsh.dnsmgr.net> Subject: Re: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... In-Reply-To: <202003022337.022NblgD078080@repo.freebsd.org> To: Conrad Meyer Date: Mon, 2 Mar 2020 16:04:59 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 48Wchb4T6Kz42c2 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.64 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; TO_DN_SOME(0.00)[]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.61)[0.612,0]; IP_SCORE(0.03)[ip: (0.13), ipnet: 69.59.192.0/19(0.07), asn: 13868(0.03), country: US(-0.05)]; NEURAL_SPAM_LONG(0.09)[0.092,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 00:05:06 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: cem > Date: Mon Mar 2 23:37:47 2020 > New Revision: 358561 > URL: https://svnweb.freebsd.org/changeset/base/358561 > > Log: > Fix typo in r278616 > > FreeBSD isn't an encyclopedia. Hang on here, you just removed a base system tool without any discussion.. ??? This is far more than a typo fix. > > Deleted: > head/tools/build/options/WITHOUT_CALENDAR > head/usr.bin/calendar/Makefile > head/usr.bin/calendar/Makefile.depend > head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/calendar.c > head/usr.bin/calendar/calendar.h > head/usr.bin/calendar/calendars/calendar.all > head/usr.bin/calendar/calendars/calendar.australia > head/usr.bin/calendar/calendars/calendar.birthday > head/usr.bin/calendar/calendars/calendar.brazilian > head/usr.bin/calendar/calendars/calendar.christian > head/usr.bin/calendar/calendars/calendar.computer > head/usr.bin/calendar/calendars/calendar.croatian > head/usr.bin/calendar/calendars/calendar.dutch > head/usr.bin/calendar/calendars/calendar.french > head/usr.bin/calendar/calendars/calendar.german > head/usr.bin/calendar/calendars/calendar.history > head/usr.bin/calendar/calendars/calendar.holiday > head/usr.bin/calendar/calendars/calendar.hungarian > head/usr.bin/calendar/calendars/calendar.judaic > head/usr.bin/calendar/calendars/calendar.lotr > head/usr.bin/calendar/calendars/calendar.music > head/usr.bin/calendar/calendars/calendar.newzealand > head/usr.bin/calendar/calendars/calendar.russian > head/usr.bin/calendar/calendars/calendar.southafrica > head/usr.bin/calendar/calendars/calendar.ukrainian > head/usr.bin/calendar/calendars/calendar.usholiday > head/usr.bin/calendar/calendars/calendar.world > head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > head/usr.bin/calendar/dates.c > head/usr.bin/calendar/day.c > head/usr.bin/calendar/events.c > head/usr.bin/calendar/io.c > head/usr.bin/calendar/locale.c > head/usr.bin/calendar/ostern.c > head/usr.bin/calendar/parsedata.c > head/usr.bin/calendar/paskha.c > head/usr.bin/calendar/pathnames.h > head/usr.bin/calendar/pom.c > head/usr.bin/calendar/sunpos.c > head/usr.bin/calendar/tests/ > head/usr.sbin/periodic/etc/daily/300.calendar > Modified: > head/ObsoleteFiles.inc > head/share/man/man5/periodic.conf.5 > head/share/man/man5/src.conf.5 > head/share/man/man7/hier.7 > head/tools/tools/nanobsd/dhcpd/common > head/tools/tools/nanobsd/embedded/common > head/usr.bin/Makefile > head/usr.bin/leave/leave.1 > head/usr.sbin/periodic/etc/daily/Makefile > head/usr.sbin/periodic/periodic.conf > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Mon Mar 2 23:25:02 2020 (r358560) > +++ head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) > @@ -36,6 +36,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20200302: calendar(1) removed > +OLD_DIRS+=usr/share/calendar > +OLD_FILES+=usr/bin/calendar > +OLD_FILES+=usr/share/man/man1/calendar.1.gz > + > # 20200301: bktr removed > OLD_DIRS+=usr/include/dev/bktr > OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h > > Modified: head/share/man/man5/periodic.conf.5 > ============================================================================== > --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 (r358561) > @@ -273,13 +273,6 @@ Set to > if you want the > .Pa /etc/mail/aliases > file backed up and modifications to be displayed in your daily output. > -.It Va daily_calendar_enable > -.Pq Vt bool > -Set to > -.Dq Li YES > -if you want to run > -.Nm calendar Fl a > -daily. > .It Va daily_accounting_enable > .Pq Vt bool > Set to > @@ -970,7 +963,6 @@ is shared or distributed. > .El > .Sh SEE ALSO > .Xr apropos 1 , > -.Xr calendar 1 , > .Xr df 1 , > .Xr diff 1 , > .Xr gzip 1 , > > Modified: head/share/man/man5/src.conf.5 > ============================================================================== > --- head/share/man/man5/src.conf.5 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 (r358561) > @@ -271,9 +271,6 @@ is set explicitly) > .El > .It Va WITHOUT_BZIP2_SUPPORT > Set to build some programs without optional bzip2 support. > -.It Va WITHOUT_CALENDAR > -Set to not build > -.Xr calendar 1 . > .It Va WITHOUT_CAPSICUM > Set to not build Capsicum support into system programs. > When set, it enforces these options: > > Modified: head/share/man/man7/hier.7 > ============================================================================== > --- head/share/man/man7/hier.7 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) > @@ -442,10 +442,6 @@ system daemons & system utilities (executed by users) > architecture-independent files > .Pp > .Bl -tag -width Fl -compact > -.It Pa calendar/ > -a variety of pre-fab calendar files; > -see > -.Xr calendar 1 > .It Pa dict/ > word lists; > see > > Modified: head/tools/tools/nanobsd/dhcpd/common > ============================================================================== > --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:25:02 2020 (r358560) > +++ head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 (r358561) > @@ -104,7 +104,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/tools/tools/nanobsd/embedded/common > ============================================================================== > --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:25:02 2020 (r358560) > +++ head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 (r358561) > @@ -135,7 +135,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/usr.bin/Makefile > ============================================================================== > --- head/usr.bin/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -195,7 +195,6 @@ SUBDIR.${MK_AT}+= at > SUBDIR.${MK_ATM}+= atm > SUBDIR.${MK_BLUETOOTH}+= bluetooth > SUBDIR.${MK_BSD_CPIO}+= cpio > -SUBDIR.${MK_CALENDAR}+= calendar > SUBDIR.${MK_CLANG}+= clang > SUBDIR.${MK_DIALOG}+= dpv > SUBDIR.${MK_EE}+= ee > > Modified: head/usr.bin/leave/leave.1 > ============================================================================== > --- head/usr.bin/leave/leave.1 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/leave/leave.1 Mon Mar 2 23:37:47 2020 (r358561) > @@ -87,8 +87,6 @@ To get rid of > you should either log off or use > .Ql kill \-s KILL > giving its process id. > -.Sh SEE ALSO > -.Xr calendar 1 > .Sh HISTORY > The > .Nm > > Modified: head/usr.sbin/periodic/etc/daily/Makefile > ============================================================================== > --- head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -33,10 +33,6 @@ ACCTMODE= ${BINMODE} > ACCTPACKAGE= acct > .endif > > -.if ${MK_CALENDAR} != "no" > -CONFS+= 300.calendar > -.endif > - > .if ${MK_MAIL} != "no" > CONFS+= 130.clean-msgs > .endif > > Modified: head/usr.sbin/periodic/periodic.conf > ============================================================================== > --- head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:37:47 2020 (r358561) > @@ -77,9 +77,6 @@ daily_backup_passwd_enable="YES" # Backup passwd & g > # 210.backup-aliases > daily_backup_aliases_enable="YES" # Backup mail aliases > > -# 300.calendar > -daily_calendar_enable="NO" # Run calendar -a > - > # 310.accounting > daily_accounting_enable="YES" # Rotate acct files > daily_accounting_compress="NO" # Gzip rotated files > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Mar 3 00:05:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BD3F25EF88 for ; Tue, 3 Mar 2020 00:05:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wcj20GGvz42wD for ; Tue, 3 Mar 2020 00:05:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x734.google.com with SMTP id q18so1656849qki.10 for ; Mon, 02 Mar 2020 16:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ElsqFDcoxvGJZ8xhQDF0k8xyuDtqnYn99s6nuzd4Czs=; b=aQ279dqylyHjzQffLMZgMJ6CBq9Rkh/okOaPPvYLIYSIuR300DNCdx7a9SVsUkma7w NuTGsPPwTdLOdQeL7PL6B26dupLBxD3c8BNQBOaff47JX43auu8azyvFQ+q0xfvoqOV3 A0q3MUWGBEs8W4HkAybH3nvqsuO93ElzlVvgvIe93TqYVq5fDS2upT+XCvf/80YyHfcf M/73sR3sNY7/fuFVyUghCsQv5U6PC4M3byZsVNDxnstUFmEz6LD5l4I+n4ekwnKXlSTt RaF5+VImRfLCLKI+AOeaPBO85P2TZYwyOUuTKh9C2rUDCedZZx6FSw8K1pA0vAmzOfKU qbJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ElsqFDcoxvGJZ8xhQDF0k8xyuDtqnYn99s6nuzd4Czs=; b=f4Qd2mipV6p7jFmZbZLV4rxEExFia3k6k2zxpmkwxHzGqnLcJAd8b6hyrVAmC1FMYD Bvla0TPGOJ0HUIiK2yPwBeXIOISQj4VjEw+5jmdmSzvRyM3hSfg/CR598NrOppF6hSiX r1M1Kpd3Ez+7KrqenXM61lpFQu6DlEbSRXThJtu9SdpuoUz1IKUMlhpybLby52+1r0KY kevCZTRTt8SngeLYFU3a3czxBDg7SP1KcBAu6VKMLm/rT8LPTHJr8ksUYLAvI2hqJ9xx VU7i0xJivwzT+3mIfxs3yB/WuA3dQj2WxMERfRrDaIVvsFr2+Gk7fjthk0OHBLTFTSCf 8mvA== X-Gm-Message-State: ANhLgQ0lhLxheCvjq/Q9cmfoZ8cyUdM4MT3X4O8P5Uojh/q6lWa1f1RV 5T3HD5aH+5lqb4Y/D5JPAXW49CzFmgeCYS9HGYBTdw== X-Google-Smtp-Source: ADFU+vu7O/ZJHyWoUh+ddADDagP370/S/KWzaAGgkC4lalxKT4BW4ANWOiGKc9mRCskJMUNc3CTEaabtWnkiH/McIwQ= X-Received: by 2002:a37:993:: with SMTP id 141mr1587748qkj.240.1583193924788; Mon, 02 Mar 2020 16:05:24 -0800 (PST) MIME-Version: 1.0 References: <202003022337.022NblgD078080@repo.freebsd.org> In-Reply-To: <202003022337.022NblgD078080@repo.freebsd.org> From: Warner Losh Date: Mon, 2 Mar 2020 17:05:13 -0700 Message-ID: Subject: Re: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... To: Conrad Meyer Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48Wcj20GGvz42wD X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=aQ279dqy; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::734) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.54 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[4.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.55)[ip: (-9.17), ipnet: 2607:f8b0::/32(-1.86), asn: 15169(-1.66), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 00:05:27 -0000 Can you point me at the discussion where this was decided? Warner On Mon, Mar 2, 2020 at 4:38 PM Conrad Meyer wrote: > Author: cem > Date: Mon Mar 2 23:37:47 2020 > New Revision: 358561 > URL: https://svnweb.freebsd.org/changeset/base/358561 > > Log: > Fix typo in r278616 > > FreeBSD isn't an encyclopedia. > > Deleted: > head/tools/build/options/WITHOUT_CALENDAR > head/usr.bin/calendar/Makefile > head/usr.bin/calendar/Makefile.depend > head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/calendar.c > head/usr.bin/calendar/calendar.h > head/usr.bin/calendar/calendars/calendar.all > head/usr.bin/calendar/calendars/calendar.australia > head/usr.bin/calendar/calendars/calendar.birthday > head/usr.bin/calendar/calendars/calendar.brazilian > head/usr.bin/calendar/calendars/calendar.christian > head/usr.bin/calendar/calendars/calendar.computer > head/usr.bin/calendar/calendars/calendar.croatian > head/usr.bin/calendar/calendars/calendar.dutch > head/usr.bin/calendar/calendars/calendar.french > head/usr.bin/calendar/calendars/calendar.german > head/usr.bin/calendar/calendars/calendar.history > head/usr.bin/calendar/calendars/calendar.holiday > head/usr.bin/calendar/calendars/calendar.hungarian > head/usr.bin/calendar/calendars/calendar.judaic > head/usr.bin/calendar/calendars/calendar.lotr > head/usr.bin/calendar/calendars/calendar.music > head/usr.bin/calendar/calendars/calendar.newzealand > head/usr.bin/calendar/calendars/calendar.russian > head/usr.bin/calendar/calendars/calendar.southafrica > head/usr.bin/calendar/calendars/calendar.ukrainian > head/usr.bin/calendar/calendars/calendar.usholiday > head/usr.bin/calendar/calendars/calendar.world > head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > head/usr.bin/calendar/dates.c > head/usr.bin/calendar/day.c > head/usr.bin/calendar/events.c > head/usr.bin/calendar/io.c > head/usr.bin/calendar/locale.c > head/usr.bin/calendar/ostern.c > head/usr.bin/calendar/parsedata.c > head/usr.bin/calendar/paskha.c > head/usr.bin/calendar/pathnames.h > head/usr.bin/calendar/pom.c > head/usr.bin/calendar/sunpos.c > head/usr.bin/calendar/tests/ > head/usr.sbin/periodic/etc/daily/300.calendar > Modified: > head/ObsoleteFiles.inc > head/share/man/man5/periodic.conf.5 > head/share/man/man5/src.conf.5 > head/share/man/man7/hier.7 > head/tools/tools/nanobsd/dhcpd/common > head/tools/tools/nanobsd/embedded/common > head/usr.bin/Makefile > head/usr.bin/leave/leave.1 > head/usr.sbin/periodic/etc/daily/Makefile > head/usr.sbin/periodic/periodic.conf > > Modified: head/ObsoleteFiles.inc > > ============================================================================== > --- head/ObsoleteFiles.inc Mon Mar 2 23:25:02 2020 (r358560) > +++ head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) > @@ -36,6 +36,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20200302: calendar(1) removed > +OLD_DIRS+=usr/share/calendar > +OLD_FILES+=usr/bin/calendar > +OLD_FILES+=usr/share/man/man1/calendar.1.gz > + > # 20200301: bktr removed > OLD_DIRS+=usr/include/dev/bktr > OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h > > Modified: head/share/man/man5/periodic.conf.5 > > ============================================================================== > --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 > (r358561) > @@ -273,13 +273,6 @@ Set to > if you want the > .Pa /etc/mail/aliases > file backed up and modifications to be displayed in your daily output. > -.It Va daily_calendar_enable > -.Pq Vt bool > -Set to > -.Dq Li YES > -if you want to run > -.Nm calendar Fl a > -daily. > .It Va daily_accounting_enable > .Pq Vt bool > Set to > @@ -970,7 +963,6 @@ is shared or distributed. > .El > .Sh SEE ALSO > .Xr apropos 1 , > -.Xr calendar 1 , > .Xr df 1 , > .Xr diff 1 , > .Xr gzip 1 , > > Modified: head/share/man/man5/src.conf.5 > > ============================================================================== > --- head/share/man/man5/src.conf.5 Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 > (r358561) > @@ -271,9 +271,6 @@ is set explicitly) > .El > .It Va WITHOUT_BZIP2_SUPPORT > Set to build some programs without optional bzip2 support. > -.It Va WITHOUT_CALENDAR > -Set to not build > -.Xr calendar 1 . > .It Va WITHOUT_CAPSICUM > Set to not build Capsicum support into system programs. > When set, it enforces these options: > > Modified: head/share/man/man7/hier.7 > > ============================================================================== > --- head/share/man/man7/hier.7 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) > @@ -442,10 +442,6 @@ system daemons & system utilities (executed by users) > architecture-independent files > .Pp > .Bl -tag -width Fl -compact > -.It Pa calendar/ > -a variety of pre-fab calendar files; > -see > -.Xr calendar 1 > .It Pa dict/ > word lists; > see > > Modified: head/tools/tools/nanobsd/dhcpd/common > > ============================================================================== > --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 > (r358561) > @@ -104,7 +104,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/tools/tools/nanobsd/embedded/common > > ============================================================================== > --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 > (r358561) > @@ -135,7 +135,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/usr.bin/Makefile > > ============================================================================== > --- head/usr.bin/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -195,7 +195,6 @@ SUBDIR.${MK_AT}+= at > SUBDIR.${MK_ATM}+= atm > SUBDIR.${MK_BLUETOOTH}+= bluetooth > SUBDIR.${MK_BSD_CPIO}+= cpio > -SUBDIR.${MK_CALENDAR}+= calendar > SUBDIR.${MK_CLANG}+= clang > SUBDIR.${MK_DIALOG}+= dpv > SUBDIR.${MK_EE}+= ee > > Modified: head/usr.bin/leave/leave.1 > > ============================================================================== > --- head/usr.bin/leave/leave.1 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/leave/leave.1 Mon Mar 2 23:37:47 2020 (r358561) > @@ -87,8 +87,6 @@ To get rid of > you should either log off or use > .Ql kill \-s KILL > giving its process id. > -.Sh SEE ALSO > -.Xr calendar 1 > .Sh HISTORY > The > .Nm > > Modified: head/usr.sbin/periodic/etc/daily/Makefile > > ============================================================================== > --- head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:37:47 2020 > (r358561) > @@ -33,10 +33,6 @@ ACCTMODE= ${BINMODE} > ACCTPACKAGE= acct > .endif > > -.if ${MK_CALENDAR} != "no" > -CONFS+= 300.calendar > -.endif > - > .if ${MK_MAIL} != "no" > CONFS+= 130.clean-msgs > .endif > > Modified: head/usr.sbin/periodic/periodic.conf > > ============================================================================== > --- head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:37:47 2020 > (r358561) > @@ -77,9 +77,6 @@ daily_backup_passwd_enable="YES" # > Backup passwd & g > # 210.backup-aliases > daily_backup_aliases_enable="YES" # Backup mail > aliases > > -# 300.calendar > -daily_calendar_enable="NO" # Run calendar -a > - > # 310.accounting > daily_accounting_enable="YES" # Rotate acct files > daily_accounting_compress="NO" # Gzip rotated > files > From owner-svn-src-head@freebsd.org Tue Mar 3 00:08:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 75CFF25F247; Tue, 3 Mar 2020 00:08:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WcmR2P7bz44Z2; Tue, 3 Mar 2020 00:08:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id C65A191D; Tue, 3 Mar 2020 00:08:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003022337.022NblgD078080@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <1b74fdca-71ce-39af-6533-398c26e61677@FreeBSD.org> Date: Mon, 2 Mar 2020 16:08:21 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <202003022337.022NblgD078080@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 00:08:23 -0000 On 3/2/20 3:37 PM, Conrad Meyer wrote: > Author: cem > Date: Mon Mar 2 23:37:47 2020 > New Revision: 358561 > URL: https://svnweb.freebsd.org/changeset/base/358561 > > Log: > Fix typo in r278616 > > FreeBSD isn't an encyclopedia. This isn't a helpful log message, and you didn't post this for review, etc. I actually use calendar in my .login, so it's not completely unused. It was a conscious decision, not a typo to keep calendar(1), and not one for you to unilaterally revisit without at least some discussion. I don't think we've had any calendar CVEs or that it's been a maintenance burden? -- John Baldwin From owner-svn-src-head@freebsd.org Tue Mar 3 00:20:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4148225FAF1; Tue, 3 Mar 2020 00:20:12 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wd240b17z4CZK; Tue, 3 Mar 2020 00:20:12 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F40D224840; Tue, 3 Mar 2020 00:20:11 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0230KBFQ002397; Tue, 3 Mar 2020 00:20:11 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0230K9h2002380; Tue, 3 Mar 2020 00:20:09 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202003030020.0230K9h2002380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 3 Mar 2020 00:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358562 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin/calendar/calendars/de_AT... X-SVN-Commit-Revision: 358562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 00:20:12 -0000 Author: cem Date: Tue Mar 3 00:20:08 2020 New Revision: 358562 URL: https://svnweb.freebsd.org/changeset/base/358562 Log: Add extremely useful calendar(1) application to FreeBSD It does extremely useful things like execute sendmail and spew dubiously accurate factoids. From the feedback, it seems like it is an essential utility in a modern unix and not at all a useless bikeshed. How do those Linux people live without it? Reverts r358561. Added: head/tools/build/options/WITHOUT_CALENDAR - copied unchanged from r358560, head/tools/build/options/WITHOUT_CALENDAR head/usr.bin/calendar/Makefile - copied unchanged from r358560, head/usr.bin/calendar/Makefile head/usr.bin/calendar/Makefile.depend - copied unchanged from r358560, head/usr.bin/calendar/Makefile.depend head/usr.bin/calendar/calendar.1 - copied unchanged from r358560, head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/calendar.c - copied unchanged from r358560, head/usr.bin/calendar/calendar.c head/usr.bin/calendar/calendar.h - copied unchanged from r358560, head/usr.bin/calendar/calendar.h head/usr.bin/calendar/calendars/calendar.all - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.all head/usr.bin/calendar/calendars/calendar.australia - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.australia head/usr.bin/calendar/calendars/calendar.birthday - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.birthday head/usr.bin/calendar/calendars/calendar.brazilian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.brazilian head/usr.bin/calendar/calendars/calendar.christian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.christian head/usr.bin/calendar/calendars/calendar.computer - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.computer head/usr.bin/calendar/calendars/calendar.croatian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.croatian head/usr.bin/calendar/calendars/calendar.dutch - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.dutch head/usr.bin/calendar/calendars/calendar.french - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.french head/usr.bin/calendar/calendars/calendar.german - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.german head/usr.bin/calendar/calendars/calendar.history - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.history head/usr.bin/calendar/calendars/calendar.holiday - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.holiday head/usr.bin/calendar/calendars/calendar.hungarian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.hungarian head/usr.bin/calendar/calendars/calendar.judaic - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.judaic head/usr.bin/calendar/calendars/calendar.lotr - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.lotr head/usr.bin/calendar/calendars/calendar.music - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.music head/usr.bin/calendar/calendars/calendar.newzealand - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.newzealand head/usr.bin/calendar/calendars/calendar.russian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.russian head/usr.bin/calendar/calendars/calendar.southafrica - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.southafrica head/usr.bin/calendar/calendars/calendar.ukrainian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.ukrainian head/usr.bin/calendar/calendars/calendar.usholiday - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.usholiday head/usr.bin/calendar/calendars/calendar.world - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.world head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ - copied from r358560, head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ - copied from r358560, head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ - copied from r358560, head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ - copied from r358560, head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ - copied from r358560, head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ - copied from r358560, head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ head/usr.bin/calendar/calendars/pt_BR.UTF-8/ - copied from r358560, head/usr.bin/calendar/calendars/pt_BR.UTF-8/ head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ - copied from r358560, head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ head/usr.bin/calendar/calendars/ru_RU.UTF-8/ - copied from r358560, head/usr.bin/calendar/calendars/ru_RU.UTF-8/ head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ - copied from r358560, head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ head/usr.bin/calendar/dates.c - copied unchanged from r358560, head/usr.bin/calendar/dates.c head/usr.bin/calendar/day.c - copied unchanged from r358560, head/usr.bin/calendar/day.c head/usr.bin/calendar/events.c - copied unchanged from r358560, head/usr.bin/calendar/events.c head/usr.bin/calendar/io.c - copied unchanged from r358560, head/usr.bin/calendar/io.c head/usr.bin/calendar/locale.c - copied unchanged from r358560, head/usr.bin/calendar/locale.c head/usr.bin/calendar/ostern.c - copied unchanged from r358560, head/usr.bin/calendar/ostern.c head/usr.bin/calendar/parsedata.c - copied unchanged from r358560, head/usr.bin/calendar/parsedata.c head/usr.bin/calendar/paskha.c - copied unchanged from r358560, head/usr.bin/calendar/paskha.c head/usr.bin/calendar/pathnames.h - copied unchanged from r358560, head/usr.bin/calendar/pathnames.h head/usr.bin/calendar/pom.c - copied unchanged from r358560, head/usr.bin/calendar/pom.c head/usr.bin/calendar/sunpos.c - copied unchanged from r358560, head/usr.bin/calendar/sunpos.c head/usr.bin/calendar/tests/ - copied from r358560, head/usr.bin/calendar/tests/ head/usr.sbin/periodic/etc/daily/300.calendar - copied unchanged from r358560, head/usr.sbin/periodic/etc/daily/300.calendar Modified: head/ObsoleteFiles.inc head/share/man/man5/periodic.conf.5 head/share/man/man5/src.conf.5 head/share/man/man7/hier.7 head/tools/tools/nanobsd/dhcpd/common head/tools/tools/nanobsd/embedded/common head/usr.bin/Makefile head/usr.bin/leave/leave.1 head/usr.sbin/periodic/etc/daily/Makefile head/usr.sbin/periodic/periodic.conf Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) +++ head/ObsoleteFiles.inc Tue Mar 3 00:20:08 2020 (r358562) @@ -36,11 +36,6 @@ # xargs -n1 | sort | uniq -d; # done -# 20200302: calendar(1) removed -OLD_DIRS+=usr/share/calendar -OLD_FILES+=usr/bin/calendar -OLD_FILES+=usr/share/man/man1/calendar.1.gz - # 20200301: bktr removed OLD_DIRS+=usr/include/dev/bktr OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 (r358561) +++ head/share/man/man5/periodic.conf.5 Tue Mar 3 00:20:08 2020 (r358562) @@ -273,6 +273,13 @@ Set to if you want the .Pa /etc/mail/aliases file backed up and modifications to be displayed in your daily output. +.It Va daily_calendar_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to run +.Nm calendar Fl a +daily. .It Va daily_accounting_enable .Pq Vt bool Set to @@ -963,6 +970,7 @@ is shared or distributed. .El .Sh SEE ALSO .Xr apropos 1 , +.Xr calendar 1 , .Xr df 1 , .Xr diff 1 , .Xr gzip 1 , Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 (r358561) +++ head/share/man/man5/src.conf.5 Tue Mar 3 00:20:08 2020 (r358562) @@ -271,6 +271,9 @@ is set explicitly) .El .It Va WITHOUT_BZIP2_SUPPORT Set to build some programs without optional bzip2 support. +.It Va WITHOUT_CALENDAR +Set to not build +.Xr calendar 1 . .It Va WITHOUT_CAPSICUM Set to not build Capsicum support into system programs. When set, it enforces these options: Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) +++ head/share/man/man7/hier.7 Tue Mar 3 00:20:08 2020 (r358562) @@ -442,6 +442,10 @@ system daemons & system utilities (executed by users) architecture-independent files .Pp .Bl -tag -width Fl -compact +.It Pa calendar/ +a variety of pre-fab calendar files; +see +.Xr calendar 1 .It Pa dict/ word lists; see Copied: head/tools/build/options/WITHOUT_CALENDAR (from r358560, head/tools/build/options/WITHOUT_CALENDAR) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_CALENDAR Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/tools/build/options/WITHOUT_CALENDAR) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build +.Xr calendar 1 . Modified: head/tools/tools/nanobsd/dhcpd/common ============================================================================== --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 (r358561) +++ head/tools/tools/nanobsd/dhcpd/common Tue Mar 3 00:20:08 2020 (r358562) @@ -104,6 +104,7 @@ WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true WITHOUT_BLUETOOTH=true +WITHOUT_CALENDAR=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true WITHOUT_GAMES=true Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 (r358561) +++ head/tools/tools/nanobsd/embedded/common Tue Mar 3 00:20:08 2020 (r358562) @@ -135,6 +135,7 @@ WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true WITHOUT_BLUETOOTH=true +WITHOUT_CALENDAR=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true WITHOUT_GAMES=true Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) +++ head/usr.bin/Makefile Tue Mar 3 00:20:08 2020 (r358562) @@ -195,6 +195,7 @@ SUBDIR.${MK_AT}+= at SUBDIR.${MK_ATM}+= atm SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BSD_CPIO}+= cpio +SUBDIR.${MK_CALENDAR}+= calendar SUBDIR.${MK_CLANG}+= clang SUBDIR.${MK_DIALOG}+= dpv SUBDIR.${MK_EE}+= ee Copied: head/usr.bin/calendar/Makefile (from r358560, head/usr.bin/calendar/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/Makefile Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/usr.bin/calendar/Makefile) @@ -0,0 +1,117 @@ +# @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $FreeBSD$ + +.include + +PROG= calendar +SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ + ostern.c paskha.c pom.c sunpos.c +LIBADD= m util +INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ + hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \ + pt_BR.UTF-8 ru_RU.KOI8-R ru_RU.UTF-8 uk_UA.KOI8-U +DE_LINKS= de_DE.ISO8859-15 +FR_LINKS= fr_FR.ISO8859-15 + +.if ${MK_ICONV} == "yes" +CFLAGS+= -DWITH_ICONV +.endif + +FILESGROUPS+= CALS +CALS= calendars/calendar.all \ + calendars/calendar.australia \ + calendars/calendar.birthday \ + calendars/calendar.brazilian \ + calendars/calendar.christian \ + calendars/calendar.computer \ + calendars/calendar.croatian \ + calendars/calendar.dutch \ + calendars/calendar.freebsd \ + calendars/calendar.french \ + calendars/calendar.german \ + calendars/calendar.history \ + calendars/calendar.holiday \ + calendars/calendar.hungarian \ + calendars/calendar.judaic \ + calendars/calendar.lotr \ + calendars/calendar.music \ + calendars/calendar.newzealand \ + calendars/calendar.russian \ + calendars/calendar.southafrica \ + calendars/calendar.ukrainian \ + calendars/calendar.usholiday \ + calendars/calendar.world +CALSDIR= ${SHAREDIR}/calendar + +CAL_de_AT.ISO_8859-15= calendar.feiertag + +CAL_de_DE.ISO8859-1= calendar.all \ + calendar.feiertag \ + calendar.geschichte \ + calendar.kirche \ + calendar.literatur \ + calendar.musik \ + calendar.wissenschaft + +CAL_fr_FR.ISO8859-1= calendar.all \ + calendar.fetes \ + calendar.french \ + calendar.jferies \ + calendar.proverbes + +CAL_hr_HR.ISO8859-2= calendar.all \ + calendar.praznici + +CAL_hu_HU.ISO8859-2= calendar.all \ + calendar.nevnapok \ + calendar.unnepek + +CAL_pt_BR.ISO8859-1= calendar.all \ + calendar.commemorative \ + calendar.holidays \ + calendar.mcommemorative + +CAL_pt_BR.UTF-8= calendar.all \ + calendar.commemorative \ + calendar.holidays \ + calendar.mcommemorative + +CAL_ru_RU.KOI8-R= calendar.all \ + calendar.common \ + calendar.holiday \ + calendar.military \ + calendar.orthodox \ + calendar.pagan + +CAL_ru_RU.UTF-8= calendar.all \ + calendar.common \ + calendar.holiday \ + calendar.military \ + calendar.orthodox \ + calendar.pagan + +CAL_uk_UA.KOI8-U= calendar.all \ + calendar.holiday \ + calendar.misc \ + calendar.orthodox + +.for lang in ${INTER} +FILESGROUPS+= CALS_${lang} +CALS_${lang}DIR= ${SHAREDIR}/calendar/${lang} +.for file in ${CAL_${lang}} +CALS_${lang}+= ${file:S@^@calendars/${lang}/@} +.endfor +.endfor + + +.for link in ${DE_LINKS} +SYMLINKS+= de_DE.ISO8859-1 ${SHAREDIR}/calendar/${link} +.endfor +.for link in ${FR_LINKS} +SYMLINKS+= fr_FR.ISO8859-1 ${SHAREDIR}/calendar/${link} +.endfor + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + +.include Copied: head/usr.bin/calendar/Makefile.depend (from r358560, head/usr.bin/calendar/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/Makefile.depend Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/usr.bin/calendar/Makefile.depend) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Copied: head/usr.bin/calendar/calendar.1 (from r358560, head/usr.bin/calendar/calendar.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendar.1 Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/usr.bin/calendar/calendar.1) @@ -0,0 +1,333 @@ +.\" Copyright (c) 1989, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 +.\" $FreeBSD$ +.\" +.Dd July 24, 2016 +.Dt CALENDAR 1 +.Os +.Sh NAME +.Nm calendar +.Nd reminder service +.Sh SYNOPSIS +.Nm +.Op Fl A Ar num +.Op Fl a +.Op Fl B Ar num +.Op Fl D Ar moon|sun +.Op Fl d +.Op Fl F Ar friday +.Op Fl f Ar calendarfile +.Op Fl l Ar longitude +.Oo +.Bk -words +.Fl t Ar dd Ns +.Sm off +.Op . Ar mm Op . Ar year +.Sm on +.Ek +.Oc +.Op Fl U Ar UTC-offset +.Op Fl W Ar num +.Sh DESCRIPTION +The +.Nm +utility checks the current directory for a file named +.Pa calendar +and displays lines that fall into the specified date range. +On the day before a weekend (normally Friday), events for the next +three days are displayed. +.Pp +The following options are available: +.Bl -tag -width Ds +.It Fl A Ar num +Print lines from today and the next +.Ar num +days (forward, future). +.It Fl a +Process the ``calendar'' files of all users and mail the results +to them. +This requires super-user privileges. +.It Fl B Ar num +Print lines from today and the previous +.Ar num +days (backward, past). +.It Fl D Ar moon|sun +Print UTC offset, longitude and moon or sun information. +.It Fl d +Debug option: print current date information. +.It Fl F Ar friday +Specify which day of the week is ``Friday'' (the day before the +weekend begins). +Default is 5. +.It Fl f Pa calendarfile +Use +.Pa calendarfile +as the default calendar file. +.It Fl l Ar longitude +Perform lunar and solar calculations from this longitude. +If neither longitude nor UTC offset is specified, the calculations will +be based on the difference between UTC time and localtime. +If both are specified, UTC offset overrides longitude. +.It Xo Fl t +.Sm off +.Ar dd +.Op . Ar mm Op . Ar year +.Sm on +.Xc +For test purposes only: set date directly to argument values. +.It Fl U Ar UTC-offset +Perform lunar and solar calculations from this UTC offset. +If neither UTC offset nor longitude is specified, the calculations +will be based on the difference between UTC time and localtime. +If both are specified, UTC offset overrides longitude. +.It Fl W Ar num +Print lines from today and the next +.Ar num +days (forward, future). +Ignore weekends when calculating the number of days. +.El +.Sh FILE FORMAT +To handle calendars in your national code table you can specify +.Dq LANG= +in the calendar file as early as possible. +.Pp +To handle the local name of sequences, you can specify them as: +.Dq SEQUENCE= +in the calendar file as early as possible. +.Pp +The names of the following special days are recognized: +.Bl -tag -width 123456789012345 -compact +.It Easter +Catholic Easter. +.It Paskha +Orthodox Easter. +.It NewMoon +The lunar New Moon. +.It FullMoon +The lunar Full Moon. +.It MarEquinox +The solar equinox in March. +.It JunSolstice +The solar solstice in June. +.It SepEquinox +The solar equinox in September. +.It DecSolstice +The solar solstice in December. +.It ChineseNewYear +The first day of the Chinese year. +.El +These names may be reassigned to their local names via an assignment +like +.Dq Easter=Pasen +in the calendar file. +.Pp +Other lines should begin with a month and day. +They may be entered in almost any format, either numeric or as character +strings. +If the proper locale is set, national month and weekday +names can be used. +A single asterisk (``*'') matches every month. +A day without a month matches that day of every week. +A month without a day matches the first of that month. +Two numbers default to the month followed by the day. +Lines with leading tabs default to the last entered date, allowing +multiple line specifications for a single date. +.Pp +The names of the recognized special days may be followed by a +positive or negative integer, like: +.Dq Easter+3 +or +.Dq Paskha-4 . +.Pp +Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for +last, first, second, third, fourth) for moving events like +``the last Monday in April''. +.Pp +By convention, dates followed by an asterisk are not fixed, i.e., change +from year to year. +.Pp +Day descriptions start after the first character in the line; +if the line does not contain a character, it is not displayed. +If the first character in the line is a character, it is treated as +a continuation of the previous line. +.Pp +The +.Nm +file is preprocessed by a limited subset of +.Xr cpp 1 +internally, allowing the inclusion of shared files such as +lists of company holidays or meetings. +This limited subset consists of \fB#include #ifndef #endif\fR and \fB#define\fR. +If the shared file is not referenced by a full pathname, +.Xr calendar 1 +searches in the current (or home) directory first, and then in the +directory +.Pa /usr/share/calendar . +Empty lines and lines protected by the C commenting syntax +.Pq Li /* ... */ +are ignored. +.Pp +Some possible calendar entries ( characters highlighted by +\fB\et\fR sequence) +.Bd -unfilled -offset indent +LANG=C +Easter=Ostern + +#include +#include + +6/15\fB\et\fRJune 15 (if ambiguous, will default to month/day). +Jun. 15\fB\et\fRJune 15. +15 June\fB\et\fRJune 15. +Thursday\fB\et\fREvery Thursday. +June\fB\et\fREvery June 1st. +15 *\fB\et\fR15th of every month. +2010/4/15\fB\et\fR15 April 2010 + +May Sun+2\fB\et\fRsecond Sunday in May (Muttertag) +04/SunLast\fB\et\fRlast Sunday in April, +\fB\et\fRsummer time in Europe +Easter\fB\et\fREaster +Ostern-2\fB\et\fRGood Friday (2 days before Easter) +Paskha\fB\et\fROrthodox Easter + +.Ed +.Sh FILES +.Bl -tag -width calendar.christian -compact +.It Pa calendar +file in current directory. +.It Pa ~/.calendar +.Pa calendar +HOME directory. +A chdir is done into this directory if it exists. +.It Pa ~/.calendar/calendar +calendar file to use if no calendar file exists in the current directory. +.It Pa ~/.calendar/nomail +do not send mail if this file exists. +.El +.Pp +The following default calendar files are provided in +.Pa /usr/share/calendar: +.Pp +.Bl -tag -width calendar.southafrica -compact +.It Pa calendar.all +File which includes all the default files. +.It Pa calendar.australia +Calendar of events in Australia. +.It Pa calendar.birthday +Births and deaths of famous (and not-so-famous) people. +.It Pa calendar.christian +Christian holidays. +This calendar should be updated yearly by the local system administrator +so that roving holidays are set correctly for the current year. +.It Pa calendar.computer +Days of special significance to computer people. +.It Pa calendar.croatian +Calendar of events in Croatia. +.It Pa calendar.dutch +Calendar of events in the Netherlands. +.It Pa calendar.freebsd +Birthdays of +.Fx +committers. +.It Pa calendar.french +Calendar of events in France. +.It Pa calendar.german +Calendar of events in Germany. +.It Pa calendar.history +Everything else, mostly U.S.\& historical events. +.It Pa calendar.holiday +Other holidays, including the not-well-known, obscure, and +.Em really +obscure. +.It Pa calendar.judaic +Jewish holidays. +The entries for this calendar have been obtained from the port +deskutils/hebcal. +.It Pa calendar.music +Musical events, births, and deaths. +Strongly oriented toward rock 'n' roll. +.It Pa calendar.newzealand +Calendar of events in New Zealand. +.It Pa calendar.russian +Russian calendar. +.It Pa calendar.southafrica +Calendar of events in South Africa. +.It Pa calendar.usholiday +U.S.\& holidays. +This calendar should be updated yearly by the local system administrator +so that roving holidays are set correctly for the current year. +.It Pa calendar.world +Includes all calendar files except for national files. +.El +.Sh COMPATIBILITY +The +.Nm +program previously selected lines which had the correct date anywhere +in the line. +This is no longer true, the date is only recognized when it occurs +at the beginning of a line. +.Sh SEE ALSO +.Xr at 1 , +.Xr mail 1 , +.Xr cron 8 +.Sh HISTORY +A +.Nm +command appeared in +.At v7 . +.Sh NOTES +Chinese New Year is calculated at 120 degrees east of Greenwich, +which roughly corresponds with the east coast of China. +For people west of China, this might result that the start of Chinese +New Year and the day of the related new moon might differ. +.Pp +The phases of the moon and the longitude of the sun are calculated +against the local position which corresponds with 30 degrees times +the time-difference towards Greenwich. +.Pp +The new and full moons are happening on the day indicated: They +might happen in the time period in the early night or in the late +evening. +It does not indicate that they are starting in the night on that date. +.Pp +Because of minor differences between the output of the formulas +used and other sources on the Internet, Druids and Werewolves should +double-check the start and end time of solar and lunar events. +.Sh BUGS +The +.Nm +internal cpp does not correctly do #ifndef and will discard the rest +of the file if a #ifndef is triggered. +It also has a maximum of 50 include file and/or 100 #defines +and only recognises #include, #define and +#ifndef. +.Pp +There is no possibility to properly specify the local position +needed for solar and lunar calculations. Copied: head/usr.bin/calendar/calendar.c (from r358560, head/usr.bin/calendar/calendar.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendar.c Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/usr.bin/calendar/calendar.c) @@ -0,0 +1,258 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1989, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef lint +static const char copyright[] = +"@(#) Copyright (c) 1989, 1993\n\ + The Regents of the University of California. All rights reserved.\n"; +#endif + +#if 0 +#ifndef lint +static char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94"; +#endif +#endif + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "calendar.h" + +#define UTCOFFSET_NOTSET 100 /* Expected between -24 and +24 */ +#define LONGITUDE_NOTSET 1000 /* Expected between -360 and +360 */ + +struct passwd *pw; +int doall = 0; +int debug = 0; +static char *DEBUG = NULL; +static time_t f_time = 0; +double UTCOffset = UTCOFFSET_NOTSET; +int EastLongitude = LONGITUDE_NOTSET; +#ifdef WITH_ICONV +const char *outputEncoding = NULL; +#endif + +static void usage(void) __dead2; + +int +main(int argc, char *argv[]) +{ + int f_dayAfter = 0; /* days after current date */ + int f_dayBefore = 0; /* days before current date */ + int Friday = 5; /* day before weekend */ + + int ch; + struct tm tp1, tp2; + + (void)setlocale(LC_ALL, ""); + + while ((ch = getopt(argc, argv, "-A:aB:D:dF:f:l:t:U:W:?")) != -1) + switch (ch) { + case '-': /* backward contemptible */ + case 'a': + if (getuid()) { + errno = EPERM; + err(1, NULL); + } + doall = 1; + break; + + case 'W': /* we don't need no steenking Fridays */ + Friday = -1; + /* FALLTHROUGH */ + + case 'A': /* days after current date */ + f_dayAfter = atoi(optarg); + if (f_dayAfter < 0) + errx(1, "number of days must be positive"); + break; + + case 'B': /* days before current date */ + f_dayBefore = atoi(optarg); + if (f_dayBefore < 0) + errx(1, "number of days must be positive"); + break; + + case 'D': /* debug output of sun and moon info */ + DEBUG = optarg; + break; + + case 'd': /* debug output of current date */ + debug = 1; + break; + + case 'F': /* Change the time: When does weekend start? */ + Friday = atoi(optarg); + break; + + case 'f': /* other calendar file */ + calendarFile = optarg; + break; + + case 'l': /* Change longitudal position */ + EastLongitude = strtol(optarg, NULL, 10); + break; + + case 't': /* other date, for tests */ + f_time = Mktime(optarg); + break; + + case 'U': /* Change UTC offset */ + UTCOffset = strtod(optarg, NULL); + break; + + case '?': + default: + usage(); + } + + argc -= optind; + argv += optind; + + if (argc) + usage(); + + /* use current time */ + if (f_time <= 0) + (void)time(&f_time); + + /* if not set, determine where I could be */ + { + if (UTCOffset == UTCOFFSET_NOTSET && + EastLongitude == LONGITUDE_NOTSET) { + /* Calculate on difference between here and UTC */ + time_t t; + struct tm tm; + long utcoffset, hh, mm, ss; + double uo; + + time(&t); + localtime_r(&t, &tm); + utcoffset = tm.tm_gmtoff; + /* seconds -> hh:mm:ss */ + hh = utcoffset / SECSPERHOUR; + utcoffset %= SECSPERHOUR; + mm = utcoffset / SECSPERMINUTE; + utcoffset %= SECSPERMINUTE; + ss = utcoffset; + + /* hh:mm:ss -> hh.mmss */ + uo = mm + (100.0 * (ss / 60.0)); + uo /= 60.0 / 100.0; + uo = hh + uo / 100; + + UTCOffset = uo; + EastLongitude = UTCOffset * 15; + } else if (UTCOffset == UTCOFFSET_NOTSET) { + /* Base on information given */ + UTCOffset = EastLongitude / 15; + } else if (EastLongitude == LONGITUDE_NOTSET) { + /* Base on information given */ + EastLongitude = UTCOffset * 15; + } + } + + settimes(f_time, f_dayBefore, f_dayAfter, Friday, &tp1, &tp2); + generatedates(&tp1, &tp2); + + /* + * FROM now on, we are working in UTC. + * This will only affect moon and sun related events anyway. + */ + if (setenv("TZ", "UTC", 1) != 0) + errx(1, "setenv: %s", strerror(errno)); + tzset(); + + if (debug) + dumpdates(); + + if (DEBUG != NULL) { + dodebug(DEBUG); + exit(0); + } + + if (doall) + while ((pw = getpwent()) != NULL) { + pid_t pid; + + if (chdir(pw->pw_dir) == -1) + continue; + pid = fork(); + if (pid < 0) + err(1, "fork"); + if (pid == 0) { + login_cap_t *lc; + + lc = login_getpwclass(pw); + if (setusercontext(lc, pw, pw->pw_uid, + LOGIN_SETALL) != 0) + errx(1, "setusercontext"); + cal(); + exit(0); + } + } + else { +#ifdef WITH_ICONV + /* Save the information about the encoding used in the terminal. */ + outputEncoding = strdup(nl_langinfo(CODESET)); + if (outputEncoding == NULL) + errx(1, "cannot allocate memory"); +#endif + cal(); + } + exit(0); +} + + +static void __dead2 +usage(void) +{ + + fprintf(stderr, "%s\n%s\n%s\n", + "usage: calendar [-A days] [-a] [-B days] [-D sun|moon] [-d]", + " [-F friday] [-f calendarfile] [-l longitude]", + " [-t dd[.mm[.year]]] [-U utcoffset] [-W days]" + ); + exit(1); +} Copied: head/usr.bin/calendar/calendar.h (from r358560, head/usr.bin/calendar/calendar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendar.h Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/usr.bin/calendar/calendar.h) @@ -0,0 +1,206 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1989, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include + +#define SECSPERDAY (24 * 60 * 60) +#define SECSPERHOUR (60 * 60) +#define SECSPERMINUTE (60) +#define MINSPERHOUR (60) +#define HOURSPERDAY (24) +#define FSECSPERDAY (24.0 * 60.0 * 60.0) +#define FSECSPERHOUR (60.0 * 60.0) +#define FSECSPERMINUTE (60.0) +#define FMINSPERHOUR (60.0) +#define FHOURSPERDAY (24.0) + +#define DAYSPERYEAR 365 +#define DAYSPERLEAPYEAR 366 + +/* Not yet categorized */ + +extern struct passwd *pw; +extern int doall; +extern time_t t1, t2; +extern const char *calendarFile; +extern int yrdays; +extern struct fixs neaster, npaskha, ncny, nfullmoon, nnewmoon; +extern struct fixs nmarequinox, nsepequinox, njunsolstice, ndecsolstice; +extern double UTCOffset; +extern int EastLongitude; +#ifdef WITH_ICONV +extern const char *outputEncoding; +#endif + +#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) + +/* Flags to determine the returned values by determinestyle() in parsedata.c */ +#define F_NONE 0x00000 +#define F_MONTH 0x00001 +#define F_DAYOFWEEK 0x00002 +#define F_DAYOFMONTH 0x00004 +#define F_MODIFIERINDEX 0x00008 +#define F_MODIFIEROFFSET 0x00010 +#define F_SPECIALDAY 0x00020 +#define F_ALLMONTH 0x00040 +#define F_ALLDAY 0x00080 +#define F_VARIABLE 0x00100 +#define F_EASTER 0x00200 +#define F_CNY 0x00400 +#define F_PASKHA 0x00800 +#define F_NEWMOON 0x01000 +#define F_FULLMOON 0x02000 +#define F_MAREQUINOX 0x04000 +#define F_SEPEQUINOX 0x08000 +#define F_JUNSOLSTICE 0x10000 +#define F_DECSOLSTICE 0x20000 +#define F_YEAR 0x40000 + +#define STRING_EASTER "Easter" +#define STRING_PASKHA "Paskha" +#define STRING_CNY "ChineseNewYear" +#define STRING_NEWMOON "NewMoon" +#define STRING_FULLMOON "FullMoon" +#define STRING_MAREQUINOX "MarEquinox" +#define STRING_SEPEQUINOX "SepEquinox" +#define STRING_JUNSOLSTICE "JunSolstice" +#define STRING_DECSOLSTICE "DecSolstice" + +#define MAXCOUNT 125 /* Random number of maximum number of + * repeats of an event. Should be 52 + * (number of weeks per year), if you + * want to show two years then it + * should be 104. If you are seeing + * more than this you are using this + * program wrong. + */ + +/* + * All the astronomical calculations are carried out for the meridian 120 + * degrees east of Greenwich. + */ +#define UTCOFFSET_CNY 8.0 + +extern int debug; /* show parsing of the input */ +extern int year1, year2; + +/* events.c */ +/* + * Event sorting related functions: + * - Use event_add() to create a new event + * - Use event_continue() to add more text to the last added event + * - Use event_print_all() to display them in time chronological order + */ +struct event *event_add(int, int, int, char *, int, char *, char *); +void event_continue(struct event *events, char *txt); +void event_print_all(FILE *fp); +struct event { + int year; + int month; + int day; + int var; + char *date; + char *text; + char *extra; + struct event *next; +}; + +/* locale.c */ + +struct fixs { + char *name; + size_t len; +}; + +extern const char *days[]; +extern const char *fdays[]; +extern const char *fmonths[]; +extern const char *months[]; +extern const char *sequences[]; +extern struct fixs fndays[8]; /* full national days names */ +extern struct fixs fnmonths[13]; /* full national months names */ +extern struct fixs ndays[8]; /* short national days names */ +extern struct fixs nmonths[13]; /* short national month names */ +extern struct fixs nsequences[10]; + +void setnnames(void); +void setnsequences(char *); + +/* day.c */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Mar 3 00:28:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A436A25FF94; Tue, 3 Mar 2020 00:28:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WdCp3qJlz4Rn7; Tue, 3 Mar 2020 00:28:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3077B24A12; Tue, 3 Mar 2020 00:28:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0230SbGt008455; Tue, 3 Mar 2020 00:28:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0230Sb5X008454; Tue, 3 Mar 2020 00:28:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003030028.0230Sb5X008454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 3 Mar 2020 00:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358563 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 00:28:39 -0000 Author: markj Date: Tue Mar 3 00:28:37 2020 New Revision: 358563 URL: https://svnweb.freebsd.org/changeset/base/358563 Log: Fix the malloc type used in sys_shm_unlink() after r354808. PR: 244563 Reported by: swills Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Tue Mar 3 00:20:08 2020 (r358562) +++ head/sys/kern/uipc_shm.c Tue Mar 3 00:28:37 2020 (r358563) @@ -961,7 +961,7 @@ sys_shm_unlink(struct thread *td, struct shm_unlink_ar sx_xlock(&shm_dict_lock); error = shm_remove(path, fnv, td->td_ucred); sx_xunlock(&shm_dict_lock); - free(path, M_TEMP); + free(path, M_SHMFD); return (error); } From owner-svn-src-head@freebsd.org Tue Mar 3 00:41:00 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FEFD2607B5; Tue, 3 Mar 2020 00:41:00 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48WdV416W4z3xNx; Tue, 3 Mar 2020 00:40:59 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 8DF2616054; Tue, 3 Mar 2020 01:40:52 +0100 (CET) Date: Tue, 03 Mar 2020 01:40:51 +0100 From: Steffen Nurpmeso To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358562 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... Message-ID: <20200303004051.AtRkN%steffen@sdaoden.eu> In-Reply-To: <202003030020.0230K9h2002380@repo.freebsd.org> References: <202003030020.0230K9h2002380@repo.freebsd.org> Mail-Followup-To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.17-52-g56288e6a OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 48WdV416W4z3xNx X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.86 / 15.00]; NEURAL_HAM_MEDIUM(-0.86)[-0.862,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 00:41:00 -0000 Conrad Meyer wrote in <202003030020.0230K9h2002380@repo.freebsd.org>: |Author: cem |Date: Tue Mar 3 00:20:08 2020 |New Revision: 358562 |URL: https://svnweb.freebsd.org/changeset/base/358562 | |Log: | Add extremely useful calendar(1) application to FreeBSD | | It does extremely useful things like execute sendmail and spew dubiously | accurate factoids. | | From the feedback, it seems like it is an essential utility in a \ | modern unix | and not at all a useless bikeshed. How do those Linux people live \ | without it? They install the portable version as a package. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Tue Mar 3 01:46:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44CC426262A; Tue, 3 Mar 2020 01:46:37 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wfxm6jvgz4421; Tue, 3 Mar 2020 01:46:36 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1216258DC; Tue, 3 Mar 2020 01:46:36 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0231kaC7055916; Tue, 3 Mar 2020 01:46:36 GMT (envelope-from csjp@FreeBSD.org) Received: (from csjp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0231kaod055915; Tue, 3 Mar 2020 01:46:36 GMT (envelope-from csjp@FreeBSD.org) Message-Id: <202003030146.0231kaod055915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: csjp set sender to csjp@FreeBSD.org using -f From: "Christian S.J. Peron" Date: Tue, 3 Mar 2020 01:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358564 - head/sys/security/audit X-SVN-Group: head X-SVN-Commit-Author: csjp X-SVN-Commit-Paths: head/sys/security/audit X-SVN-Commit-Revision: 358564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 01:46:37 -0000 Author: csjp Date: Tue Mar 3 01:46:35 2020 New Revision: 358564 URL: https://svnweb.freebsd.org/changeset/base/358564 Log: In r358471, we interrupted the case block that would eventually lead to the path related tokens not being processed. Restore this behavior and and move AUE_JAIL_SET in this block, as it may conditionally contain a path token. Discovered by: kevans PR: 244537 Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D23929 Modified: head/sys/security/audit/audit_bsm.c Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Tue Mar 3 00:28:37 2020 (r358563) +++ head/sys/security/audit/audit_bsm.c Tue Mar 3 01:46:35 2020 (r358564) @@ -803,25 +803,26 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_rec UPATH1_VNODE1_TOKENS; break; - case AUE_CHDIR: - case AUE_CHROOT: - case AUE_FSTATAT: - case AUE_FUTIMESAT: - case AUE_GETATTRLIST: - case AUE_JAIL: - break; - /* * NB: We may want to verify that the appropriate * audit args are being processed here, but I think * a bit analysis is required. + * + * Process AUE_JAIL_SET in the next block so we can pickup any path + * related tokens that might exist. */ case AUE_JAIL_GET: - case AUE_JAIL_SET: case AUE_JAIL_ATTACH: case AUE_JAIL_REMOVE: break; + case AUE_JAIL_SET: + case AUE_CHDIR: + case AUE_CHROOT: + case AUE_FSTATAT: + case AUE_FUTIMESAT: + case AUE_GETATTRLIST: + case AUE_JAIL: case AUE_LUTIMES: case AUE_NFS_GETFH: case AUE_LGETFH: From owner-svn-src-head@freebsd.org Tue Mar 3 03:22:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBDB6263CBA; Tue, 3 Mar 2020 03:22:01 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wj3s3d6gz4ZG0; Tue, 3 Mar 2020 03:22:01 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EE6B26B45; Tue, 3 Mar 2020 03:22:01 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0233M1mW013442; Tue, 3 Mar 2020 03:22:01 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0233M1uZ013441; Tue, 3 Mar 2020 03:22:01 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003030322.0233M1uZ013441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 3 Mar 2020 03:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358565 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 358565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 03:22:02 -0000 Author: jhibbits Date: Tue Mar 3 03:22:00 2020 New Revision: 358565 URL: https://svnweb.freebsd.org/changeset/base/358565 Log: powerpc/powernv: powernv_node_numa_domain() fix non-NUMA case If NUMA is not enabled in the kernel config, or is disabled at boot, this function should just return domain 0 regardless of what's in the device tree. Fixes a panic in iflib with NUMA disabled. Reported by: luporl Modified: head/sys/powerpc/powernv/platform_powernv.c Modified: head/sys/powerpc/powernv/platform_powernv.c ============================================================================== --- head/sys/powerpc/powernv/platform_powernv.c Tue Mar 3 01:46:35 2020 (r358564) +++ head/sys/powerpc/powernv/platform_powernv.c Tue Mar 3 03:22:00 2020 (r358565) @@ -517,6 +517,12 @@ powernv_node_numa_domain(platform_t platform, phandle_ cell_t associativity[5]; int i, res; +#ifndef NUMA + return (0); +#endif + if (vm_ndomains == 1) + return (0); + res = OF_getencprop(node, "ibm,associativity", associativity, sizeof(associativity)); From owner-svn-src-head@freebsd.org Tue Mar 3 03:38:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45680264069; Tue, 3 Mar 2020 03:38:39 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WjR2723Pz43PM; Tue, 3 Mar 2020 03:38:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.3] (unknown [181.52.72.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id 5055C222F; Tue, 3 Mar 2020 03:38:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003022337.022NblgD078080@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: <2f8d3ed6-4290-36fe-26b2-a34ebcb87d56@FreeBSD.org> Date: Mon, 2 Mar 2020 22:38:39 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003022337.022NblgD078080@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 03:38:39 -0000 On 02/03/2020 18:37, Conrad Meyer wrote: > Author: cem > Date: Mon Mar 2 23:37:47 2020 > New Revision: 358561 > URL: https://svnweb.freebsd.org/changeset/base/358561 > > Log: > Fix typo in r278616 > > FreeBSD isn't an encyclopedia. Wow, that was weird ... thank you for reverting. Pedro. > Deleted: > head/tools/build/options/WITHOUT_CALENDAR > head/usr.bin/calendar/Makefile > head/usr.bin/calendar/Makefile.depend > head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/calendar.c > head/usr.bin/calendar/calendar.h > head/usr.bin/calendar/calendars/calendar.all > head/usr.bin/calendar/calendars/calendar.australia > head/usr.bin/calendar/calendars/calendar.birthday > head/usr.bin/calendar/calendars/calendar.brazilian > head/usr.bin/calendar/calendars/calendar.christian > head/usr.bin/calendar/calendars/calendar.computer > head/usr.bin/calendar/calendars/calendar.croatian > head/usr.bin/calendar/calendars/calendar.dutch > head/usr.bin/calendar/calendars/calendar.french > head/usr.bin/calendar/calendars/calendar.german > head/usr.bin/calendar/calendars/calendar.history > head/usr.bin/calendar/calendars/calendar.holiday > head/usr.bin/calendar/calendars/calendar.hungarian > head/usr.bin/calendar/calendars/calendar.judaic > head/usr.bin/calendar/calendars/calendar.lotr > head/usr.bin/calendar/calendars/calendar.music > head/usr.bin/calendar/calendars/calendar.newzealand > head/usr.bin/calendar/calendars/calendar.russian > head/usr.bin/calendar/calendars/calendar.southafrica > head/usr.bin/calendar/calendars/calendar.ukrainian > head/usr.bin/calendar/calendars/calendar.usholiday > head/usr.bin/calendar/calendars/calendar.world > head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > head/usr.bin/calendar/dates.c > head/usr.bin/calendar/day.c > head/usr.bin/calendar/events.c > head/usr.bin/calendar/io.c > head/usr.bin/calendar/locale.c > head/usr.bin/calendar/ostern.c > head/usr.bin/calendar/parsedata.c > head/usr.bin/calendar/paskha.c > head/usr.bin/calendar/pathnames.h > head/usr.bin/calendar/pom.c > head/usr.bin/calendar/sunpos.c > head/usr.bin/calendar/tests/ > head/usr.sbin/periodic/etc/daily/300.calendar > Modified: > head/ObsoleteFiles.inc > head/share/man/man5/periodic.conf.5 > head/share/man/man5/src.conf.5 > head/share/man/man7/hier.7 > head/tools/tools/nanobsd/dhcpd/common > head/tools/tools/nanobsd/embedded/common > head/usr.bin/Makefile > head/usr.bin/leave/leave.1 > head/usr.sbin/periodic/etc/daily/Makefile > head/usr.sbin/periodic/periodic.conf > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Mon Mar 2 23:25:02 2020 (r358560) > +++ head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) > @@ -36,6 +36,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20200302: calendar(1) removed > +OLD_DIRS+=usr/share/calendar > +OLD_FILES+=usr/bin/calendar > +OLD_FILES+=usr/share/man/man1/calendar.1.gz > + > # 20200301: bktr removed > OLD_DIRS+=usr/include/dev/bktr > OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h > > Modified: head/share/man/man5/periodic.conf.5 > ============================================================================== > --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 (r358561) > @@ -273,13 +273,6 @@ Set to > if you want the > .Pa /etc/mail/aliases > file backed up and modifications to be displayed in your daily output. > -.It Va daily_calendar_enable > -.Pq Vt bool > -Set to > -.Dq Li YES > -if you want to run > -.Nm calendar Fl a > -daily. > .It Va daily_accounting_enable > .Pq Vt bool > Set to > @@ -970,7 +963,6 @@ is shared or distributed. > .El > .Sh SEE ALSO > .Xr apropos 1 , > -.Xr calendar 1 , > .Xr df 1 , > .Xr diff 1 , > .Xr gzip 1 , > > Modified: head/share/man/man5/src.conf.5 > ============================================================================== > --- head/share/man/man5/src.conf.5 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 (r358561) > @@ -271,9 +271,6 @@ is set explicitly) > .El > .It Va WITHOUT_BZIP2_SUPPORT > Set to build some programs without optional bzip2 support. > -.It Va WITHOUT_CALENDAR > -Set to not build > -.Xr calendar 1 . > .It Va WITHOUT_CAPSICUM > Set to not build Capsicum support into system programs. > When set, it enforces these options: > > Modified: head/share/man/man7/hier.7 > ============================================================================== > --- head/share/man/man7/hier.7 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) > @@ -442,10 +442,6 @@ system daemons & system utilities (executed by users) > architecture-independent files > .Pp > .Bl -tag -width Fl -compact > -.It Pa calendar/ > -a variety of pre-fab calendar files; > -see > -.Xr calendar 1 > .It Pa dict/ > word lists; > see > > Modified: head/tools/tools/nanobsd/dhcpd/common > ============================================================================== > --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:25:02 2020 (r358560) > +++ head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 (r358561) > @@ -104,7 +104,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/tools/tools/nanobsd/embedded/common > ============================================================================== > --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:25:02 2020 (r358560) > +++ head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 (r358561) > @@ -135,7 +135,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/usr.bin/Makefile > ============================================================================== > --- head/usr.bin/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -195,7 +195,6 @@ SUBDIR.${MK_AT}+= at > SUBDIR.${MK_ATM}+= atm > SUBDIR.${MK_BLUETOOTH}+= bluetooth > SUBDIR.${MK_BSD_CPIO}+= cpio > -SUBDIR.${MK_CALENDAR}+= calendar > SUBDIR.${MK_CLANG}+= clang > SUBDIR.${MK_DIALOG}+= dpv > SUBDIR.${MK_EE}+= ee > > Modified: head/usr.bin/leave/leave.1 > ============================================================================== > --- head/usr.bin/leave/leave.1 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/leave/leave.1 Mon Mar 2 23:37:47 2020 (r358561) > @@ -87,8 +87,6 @@ To get rid of > you should either log off or use > .Ql kill \-s KILL > giving its process id. > -.Sh SEE ALSO > -.Xr calendar 1 > .Sh HISTORY > The > .Nm > > Modified: head/usr.sbin/periodic/etc/daily/Makefile > ============================================================================== > --- head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -33,10 +33,6 @@ ACCTMODE= ${BINMODE} > ACCTPACKAGE= acct > .endif > > -.if ${MK_CALENDAR} != "no" > -CONFS+= 300.calendar > -.endif > - > .if ${MK_MAIL} != "no" > CONFS+= 130.clean-msgs > .endif > > Modified: head/usr.sbin/periodic/periodic.conf > ============================================================================== > --- head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:37:47 2020 (r358561) > @@ -77,9 +77,6 @@ daily_backup_passwd_enable="YES" # Backup passwd & g > # 210.backup-aliases > daily_backup_aliases_enable="YES" # Backup mail aliases > > -# 300.calendar > -daily_calendar_enable="NO" # Run calendar -a > - > # 310.accounting > daily_accounting_enable="YES" # Rotate acct files > daily_accounting_compress="NO" # Gzip rotated files From owner-svn-src-head@freebsd.org Tue Mar 3 08:28:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E3882682C6; Tue, 3 Mar 2020 08:28:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WqsF608Xz3Fnm; Tue, 3 Mar 2020 08:28:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94B0922A4; Tue, 3 Mar 2020 08:28:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0238SHJM094067; Tue, 3 Mar 2020 08:28:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0238SGwR094063; Tue, 3 Mar 2020 08:28:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003030828.0238SGwR094063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 3 Mar 2020 08:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358567 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358567 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 08:28:18 -0000 Author: andrew Date: Tue Mar 3 08:28:16 2020 New Revision: 358567 URL: https://svnweb.freebsd.org/changeset/base/358567 Log: Store the boot exception level on arm64 so it can be queried later A hypervisor, e.g. bhyve, will need to know what exception levelthe kernel was in when it started booting. If it was EL2 we can then enable said hypervisor. Store the boot exception level and allow the kernel to later query it. Obtained from: https://github.com/FreeBSD-UPB/freebsd (earlier version) Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/genassym.c head/sys/arm64/arm64/locore.S head/sys/arm64/arm64/machdep.c head/sys/arm64/include/machdep.h Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Tue Mar 3 08:24:09 2020 (r358566) +++ head/sys/arm64/arm64/genassym.c Tue Mar 3 08:28:16 2020 (r358567) @@ -45,6 +45,7 @@ ASSYM(BP_KERN_L1PT, offsetof(struct arm64_bootparams, ASSYM(BP_KERN_DELTA, offsetof(struct arm64_bootparams, kern_delta)); ASSYM(BP_KERN_STACK, offsetof(struct arm64_bootparams, kern_stack)); ASSYM(BP_KERN_L0PT, offsetof(struct arm64_bootparams, kern_l0pt)); +ASSYM(BP_BOOT_EL, offsetof(struct arm64_bootparams, boot_el)); ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Tue Mar 3 08:24:09 2020 (r358566) +++ head/sys/arm64/arm64/locore.S Tue Mar 3 08:28:16 2020 (r358567) @@ -165,6 +165,7 @@ virtdone: adr x25, initstack str x25, [x0, #BP_KERN_STACK] str x24, [x0, #BP_KERN_L0PT] + str x23, [x0, #BP_BOOT_EL] /* trace back starts here */ mov fp, #0 @@ -227,9 +228,9 @@ END(mpentry) * registers and drop to EL1. */ drop_to_el1: - mrs x1, CurrentEL - lsr x1, x1, #2 - cmp x1, #0x2 + mrs x23, CurrentEL + lsr x23, x23, #2 + cmp x23, #0x2 b.eq 1f ret 1: Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Tue Mar 3 08:24:09 2020 (r358566) +++ head/sys/arm64/arm64/machdep.c Tue Mar 3 08:28:16 2020 (r358567) @@ -109,6 +109,7 @@ static struct trapframe proc0_tf; int early_boot = 1; int cold = 1; +static int boot_el; struct kva_md_info kmi; @@ -162,6 +163,13 @@ pan_enable(void) } } +bool +has_hyp(void) +{ + + return (boot_el == 2); +} + static void cpu_startup(void *dummy) { @@ -1089,6 +1097,8 @@ initarm(struct arm64_bootparams *abp) vm_offset_t lastaddr; caddr_t kmdp; bool valid; + + boot_el = abp->boot_el; /* Parse loader or FDT boot parametes. Determine last used address. */ lastaddr = parse_boot_param(abp); Modified: head/sys/arm64/include/machdep.h ============================================================================== --- head/sys/arm64/include/machdep.h Tue Mar 3 08:24:09 2020 (r358566) +++ head/sys/arm64/include/machdep.h Tue Mar 3 08:28:16 2020 (r358567) @@ -35,6 +35,8 @@ struct arm64_bootparams { uint64_t kern_delta; vm_offset_t kern_stack; vm_offset_t kern_l0pt; /* L1 page table for the kernel */ + int boot_el; /* EL the kernel booted from */ + int pad; }; enum arm64_bus { @@ -46,6 +48,7 @@ enum arm64_bus { extern enum arm64_bus arm64_bus_method; void dbg_init(void); +bool has_hyp(void); void initarm(struct arm64_bootparams *); vm_offset_t parse_boot_param(struct arm64_bootparams *abp); #ifdef FDT From owner-svn-src-head@freebsd.org Tue Mar 3 09:07:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8215C268EF0 for ; Tue, 3 Mar 2020 09:07:15 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wrk95nJtz43F4; Tue, 3 Mar 2020 09:07:13 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 023976mF060772 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 3 Mar 2020 09:07:07 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: hrs@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 023971Hq026546 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 3 Mar 2020 16:07:01 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Hiroki Sato , jkim@FreeBSD.org References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> Date: Tue, 3 Mar 2020 16:06:57 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20200303.075047.1159550404273266246.hrs@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48Wrk95nJtz43F4 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.95 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.85)[ip: (-5.12), ipnet: 2a01:4f8::/29(-2.54), asn: 24940(-1.56), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 09:07:15 -0000 03.03.2020 5:50, Hiroki Sato wrote: > b) If you have security/openssl, sendmail in the base system does not > support SMTP AUTH because of incompatibility with the newer > versions of OpenSSL. Use mail/sendmail from ports. > > I still feel that b) is sub-optimal, but it would be too complex to > make them coexist with each other. It should be not a problem to merge "our sendmail OpenSSL 1.1.x patch" to stable/11 and I'm willing to test it before merge. It would fix compatibility with cyrus-sasl2 linked with new openssl, too. From owner-svn-src-head@freebsd.org Tue Mar 3 09:45:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AAB79269D9E; Tue, 3 Mar 2020 09:45:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WsZ51YKzz4J5y; Tue, 3 Mar 2020 09:45:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB0B13140; Tue, 3 Mar 2020 09:45:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0239jGTe041835; Tue, 3 Mar 2020 09:45:16 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0239jG1A041833; Tue, 3 Mar 2020 09:45:16 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003030945.0239jG1A041833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 09:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358568 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358568 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 09:45:17 -0000 Author: bz Date: Tue Mar 3 09:45:16 2020 New Revision: 358568 URL: https://svnweb.freebsd.org/changeset/base/358568 Log: fib6_rte_to_nh_*: return a link-local gw address with scope embedded In fib6_rte_to_nh_* when returning a link-local gateway address currently we do clear the scope. That could be recovered using the ifp returned as well, but the code in general seems to expect a link-local address with scope embeedded as otherwise the "dst" (gw) passed to the output routines will not include scope and not send the packet out (the right interface). Do not clear the scope when returning a link-local address and allow packets to go out (the right interface). Remove the (now) extra scope recovery in the IPv6 fast-fwd code. Sponsored by: Netflix Reviewed by: melifaro, ae MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23872 Modified: head/sys/netinet6/in6_fib.c head/sys/netinet6/ip6_fastfwd.c Modified: head/sys/netinet6/in6_fib.c ============================================================================== --- head/sys/netinet6/in6_fib.c Tue Mar 3 08:28:16 2020 (r358567) +++ head/sys/netinet6/in6_fib.c Tue Mar 3 09:45:16 2020 (r358568) @@ -115,9 +115,9 @@ fib6_rte_to_nh_basic(struct rtentry *rte, const struct pnh6->nh_mtu = min(rte->rt_mtu, IN6_LINKMTU(rte->rt_ifp)); if (rte->rt_flags & RTF_GATEWAY) { + /* Return address with embedded scope. */ gw = (struct sockaddr_in6 *)rte->rt_gateway; pnh6->nh_addr = gw->sin6_addr; - in6_clearscope(&pnh6->nh_addr); } else pnh6->nh_addr = *dst; /* Set flags */ @@ -143,9 +143,9 @@ fib6_rte_to_nh_extended(struct rtentry *rte, const str pnh6->nh_mtu = min(rte->rt_mtu, IN6_LINKMTU(rte->rt_ifp)); if (rte->rt_flags & RTF_GATEWAY) { + /* Return address with embedded scope. */ gw = (struct sockaddr_in6 *)rte->rt_gateway; pnh6->nh_addr = gw->sin6_addr; - in6_clearscope(&pnh6->nh_addr); } else pnh6->nh_addr = *dst; /* Set flags */ Modified: head/sys/netinet6/ip6_fastfwd.c ============================================================================== --- head/sys/netinet6/ip6_fastfwd.c Tue Mar 3 08:28:16 2020 (r358567) +++ head/sys/netinet6/ip6_fastfwd.c Tue Mar 3 09:45:16 2020 (r358568) @@ -274,14 +274,7 @@ passout: m_clrprotoflags(m); /* Avoid confusing lower layers. */ IP_PROBE(send, NULL, NULL, ip6, nh.nh_ifp, NULL, ip6); - /* - * XXX: we need to use destination address with embedded scope - * zone id, because LLTABLE uses such form of addresses for lookup. - */ dst.sin6_addr = nh.nh_addr; - if (IN6_IS_SCOPE_LINKLOCAL(&dst.sin6_addr)) - dst.sin6_addr.s6_addr16[1] = htons(nh.nh_ifp->if_index & 0xffff); - error = (*nh.nh_ifp->if_output)(nh.nh_ifp, m, (struct sockaddr *)&dst, NULL); if (error != 0) { From owner-svn-src-head@freebsd.org Tue Mar 3 09:50:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F38626A05A; Tue, 3 Mar 2020 09:50:34 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WshB2vsjz4X3Z; Tue, 3 Mar 2020 09:50:34 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44DF6327D; Tue, 3 Mar 2020 09:50:34 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0239oYek042140; Tue, 3 Mar 2020 09:50:34 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0239oXBU042139; Tue, 3 Mar 2020 09:50:33 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003030950.0239oXBU042139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 09:50:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358569 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 09:50:34 -0000 Author: bz Date: Tue Mar 3 09:50:33 2020 New Revision: 358569 URL: https://svnweb.freebsd.org/changeset/base/358569 Log: in6_fib: return nh_ia in the ext interface as we do for IPv4 Like for IPv4 add nh_ia to the ext interface and return rt_ifa in order to be used for, e.g., packet/octets accounting purposes. Reviewed by: melifaro MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D23873 Modified: head/sys/netinet6/in6_fib.c head/sys/netinet6/in6_fib.h Modified: head/sys/netinet6/in6_fib.c ============================================================================== --- head/sys/netinet6/in6_fib.c Tue Mar 3 09:45:16 2020 (r358568) +++ head/sys/netinet6/in6_fib.c Tue Mar 3 09:50:33 2020 (r358569) @@ -75,6 +75,8 @@ static void fib6_rte_to_nh_basic(struct rtentry *rte, static struct ifnet *fib6_get_ifaifp(struct rtentry *rte); #define RNTORT(p) ((struct rtentry *)(p)) +#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa)) + CHK_STRUCT_ROUTE_COMPAT(struct route_in6, ro_dst); /* @@ -153,6 +155,7 @@ fib6_rte_to_nh_extended(struct rtentry *rte, const str gw = (struct sockaddr_in6 *)rt_key(rte); if (IN6_IS_ADDR_UNSPECIFIED(&gw->sin6_addr)) pnh6->nh_flags |= NHF_DEFAULT; + pnh6->nh_ia = ifatoia6(rte->rt_ifa); } /* Modified: head/sys/netinet6/in6_fib.h ============================================================================== --- head/sys/netinet6/in6_fib.h Tue Mar 3 09:45:16 2020 (r358568) +++ head/sys/netinet6/in6_fib.h Tue Mar 3 09:50:33 2020 (r358569) @@ -41,14 +41,15 @@ struct nhop6_basic { struct in6_addr nh_addr; /* GW/DST IPv4 address */ }; -/* Does not differ from nhop6_basic */ +/* Extended nexthop info used for control protocols. */ struct nhop6_extended { struct ifnet *nh_ifp; /* Logical egress interface */ + struct in6_ifaddr *nh_ia; /* Associated address. */ uint16_t nh_mtu; /* nexthop mtu */ uint16_t nh_flags; /* nhop flags */ uint8_t spare[4]; struct in6_addr nh_addr; /* GW/DST IPv6 address */ - uint64_t spare2[2]; + uint64_t spare2[1]; }; int fib6_lookup_nh_basic(uint32_t fibnum, const struct in6_addr *dst, From owner-svn-src-head@freebsd.org Tue Mar 3 09:51:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7298226A244; Tue, 3 Mar 2020 09:51:54 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wsjk1z2nz4Ztb; Tue, 3 Mar 2020 09:51:54 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CDA032FB; Tue, 3 Mar 2020 09:51:54 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0239ps2k045940; Tue, 3 Mar 2020 09:51:54 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0239pssc045939; Tue, 3 Mar 2020 09:51:54 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003030951.0239pssc045939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 3 Mar 2020 09:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358570 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 358570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 09:51:54 -0000 Author: 0mp (doc,ports committer) Date: Tue Mar 3 09:51:53 2020 New Revision: 358570 URL: https://svnweb.freebsd.org/changeset/base/358570 Log: thr_self.2: Fix some typos in the thread identifier range Reported by: kaktus Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D23936 Modified: head/lib/libc/sys/thr_self.2 Modified: head/lib/libc/sys/thr_self.2 ============================================================================== --- head/lib/libc/sys/thr_self.2 Tue Mar 3 09:50:33 2020 (r358569) +++ head/lib/libc/sys/thr_self.2 Tue Mar 3 09:51:53 2020 (r358570) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 1, 2016 +.Dd March 3, 2020 .Dt THR_SELF 2 .Os .Sh NAME @@ -49,7 +49,7 @@ kernel-scheduled thread in the variable pointed by the .Pp The thread identifier is an integer in the range from .Dv PID_MAX + 2 -(10002) to +(100001) to .Dv INT_MAX . The thread identifier is guaranteed to be unique at any given time, for each running thread in the system. From owner-svn-src-head@freebsd.org Tue Mar 3 11:32:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85A2A26C6F9; Tue, 3 Mar 2020 11:32:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wvy82S0kz4L9D; Tue, 3 Mar 2020 11:32:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0063482B; Tue, 3 Mar 2020 11:32:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023BWlhq007910; Tue, 3 Mar 2020 11:32:47 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023BWlik007909; Tue, 3 Mar 2020 11:32:47 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003031132.023BWlik007909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 11:32:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358572 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 11:32:48 -0000 Author: bz Date: Tue Mar 3 11:32:47 2020 New Revision: 358572 URL: https://svnweb.freebsd.org/changeset/base/358572 Log: ip6_output: use new routing KPI when not passed a cached route Implement the equivalent of r347375 (IPv4) for the IPv6 output path. In IPv6 we get passed a cached route (and inp) by udp6_output() depending on whether we acquired a write lock on the INP. In case we neither bind nor connect a first UDP packet would come in with a cached route (wlocked) and all further packets would not. In case we bind and do not connect we never write-lock the inp. When we do not pass in a cached route, rather than providing the storage for a route locally and pass it over the old lookup code and down the stack, use the new route lookup KPI and acquire all details we need to send the packet. Compared to the IPv4 code the IPv6 code has a couple of possible complications: given an option with a routing hdr/caching route there, and path mtu (ro_pmtu) case which now equally has to deal with the possibility of having a route which is NULL passed in, and the fwd_tag in case a firewall changes the next hop (something to factor out in the future). Sponsored by: Netflix Reviewed by: glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23886 Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Tue Mar 3 10:02:58 2020 (r358571) +++ head/sys/netinet6/ip6_output.c Tue Mar 3 11:32:47 2020 (r358572) @@ -424,12 +424,12 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ifnet *ifp, *origifp; struct mbuf *m = m0; struct mbuf *mprev; - int tlen, len; - struct route_in6 ip6route; - struct rtentry *rt = NULL; - struct sockaddr_in6 *dst, src_sa, dst_sa; + struct route_in6 *ro_pmtu; + struct rtentry *rt; + struct sockaddr_in6 *dst, sin6, src_sa, dst_sa; struct in6_addr odst; u_char *nexthdrp; + int tlen, len; int error = 0; struct in6_ifaddr *ia = NULL; u_long mtu; @@ -438,7 +438,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ip6_exthdrs exthdrs; struct in6_addr src0, dst0; u_int32_t zone; - struct route_in6 *ro_pmtu = NULL; bool hdrsplit; int sw_csum, tso; int needfiblookup; @@ -631,15 +630,15 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, IP6STAT_INC(ip6s_localout); /* Route packet. */ - if (ro == NULL) { - ro = &ip6route; - bzero((caddr_t)ro, sizeof(*ro)); - } ro_pmtu = ro; if (opt && opt->ip6po_rthdr) ro = &opt->ip6po_route; - dst = (struct sockaddr_in6 *)&ro->ro_dst; + if (ro != NULL) + dst = (struct sockaddr_in6 *)&ro->ro_dst; + else + dst = &sin6; fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m); + again: /* * If specified, try to fill in the traffic class field. @@ -666,55 +665,127 @@ again: else ip6->ip6_hlim = V_ip6_defmcasthlim; } + + if (ro == NULL || ro->ro_rt == NULL) { + bzero(dst, sizeof(*dst)); + dst->sin6_family = AF_INET6; + dst->sin6_len = sizeof(*dst); + dst->sin6_addr = ip6->ip6_dst; + } /* - * Validate route against routing table additions; - * a better/more specific route might have been added. + * Validate route against routing table changes. * Make sure that the address family is set in route. */ - if (inp) { - ro->ro_dst.sin6_family = AF_INET6; - RT_VALIDATE((struct route *)ro, &inp->inp_rt_cookie, fibnum); - } - if (ro->ro_rt && fwd_tag == NULL && (ro->ro_rt->rt_flags & RTF_UP) && - ro->ro_dst.sin6_family == AF_INET6 && - IN6_ARE_ADDR_EQUAL(&ro->ro_dst.sin6_addr, &ip6->ip6_dst)) { - rt = ro->ro_rt; - ifp = ro->ro_rt->rt_ifp; + rt = NULL; + ifp = NULL; + mtu = 0; + if (ro != NULL) { + if (ro->ro_rt != NULL && inp != NULL) { + ro->ro_dst.sin6_family = AF_INET6; /* XXX KASSERT? */ + RT_VALIDATE((struct route *)ro, &inp->inp_rt_cookie, + fibnum); + } + if (ro->ro_rt != NULL && fwd_tag == NULL && + ((ro->ro_rt->rt_flags & RTF_UP) == 0 || + ro->ro_rt->rt_ifp == NULL || + !RT_LINK_IS_UP(ro->ro_rt->rt_ifp) || + ro->ro_dst.sin6_family != AF_INET6 || + !IN6_ARE_ADDR_EQUAL(&ro->ro_dst.sin6_addr, &ip6->ip6_dst))) + RO_INVALIDATE_CACHE(ro); + + if (ro->ro_rt != NULL && fwd_tag == NULL && + (ro->ro_rt->rt_flags & RTF_UP) && + ro->ro_dst.sin6_family == AF_INET6 && + IN6_ARE_ADDR_EQUAL(&ro->ro_dst.sin6_addr, &ip6->ip6_dst)) { + rt = ro->ro_rt; + ifp = ro->ro_rt->rt_ifp; + } else { + if (ro->ro_lle) + LLE_FREE(ro->ro_lle); /* zeros ro_lle */ + ro->ro_lle = NULL; + if (fwd_tag == NULL) { + bzero(&dst_sa, sizeof(dst_sa)); + dst_sa.sin6_family = AF_INET6; + dst_sa.sin6_len = sizeof(dst_sa); + dst_sa.sin6_addr = ip6->ip6_dst; + } + error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, &ifp, + &rt, fibnum); + if (error != 0) { + IP6STAT_INC(ip6s_noroute); + if (ifp != NULL) + in6_ifstat_inc(ifp, ifs6_out_discard); + goto bad; + } + if (ifp != NULL) + mtu = ifp->if_mtu; + } + if (rt == NULL) { + /* + * If in6_selectroute() does not return a route entry + * dst may not have been updated. + */ + *dst = dst_sa; /* XXX */ + } else { + if (rt->rt_flags & RTF_HOST) + mtu = rt->rt_mtu; + ia = (struct in6_ifaddr *)(rt->rt_ifa); + counter_u64_add(rt->rt_pksent, 1); + } } else { - if (ro->ro_lle) - LLE_FREE(ro->ro_lle); /* zeros ro_lle */ - ro->ro_lle = NULL; + struct nhop6_extended nh6; + struct in6_addr kdst; + uint32_t scopeid; + if (fwd_tag == NULL) { bzero(&dst_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); dst_sa.sin6_addr = ip6->ip6_dst; } - error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, &ifp, - &rt, fibnum); + + if (IN6_IS_ADDR_MULTICAST(&dst_sa.sin6_addr) && + im6o != NULL && + (ifp = im6o->im6o_multicast_ifp) != NULL) { + /* We do not need a route lookup. */ + *dst = dst_sa; /* XXX */ + goto nonh6lookup; + } + + in6_splitscope(&dst_sa.sin6_addr, &kdst, &scopeid); + + if (IN6_IS_ADDR_MC_LINKLOCAL(&dst_sa.sin6_addr) || + IN6_IS_ADDR_MC_NODELOCAL(&dst_sa.sin6_addr)) { + if (scopeid > 0) { + ifp = in6_getlinkifnet(scopeid); + *dst = dst_sa; /* XXX */ + goto nonh6lookup; + } + } + + error = fib6_lookup_nh_ext(fibnum, &kdst, scopeid, NHR_REF, 0, + &nh6); if (error != 0) { - if (ifp != NULL) - in6_ifstat_inc(ifp, ifs6_out_discard); + IP6STAT_INC(ip6s_noroute); + /* No ifp in6_ifstat_inc(ifp, ifs6_out_discard); */ + error = EHOSTUNREACH;; goto bad; } + + ifp = nh6.nh_ifp; + mtu = nh6.nh_mtu; + dst->sin6_addr = nh6.nh_addr; + ia = nh6.nh_ia; + fib6_free_nh_ext(fibnum, &nh6); +nonh6lookup: + ; } - if (rt == NULL) { - /* - * If in6_selectroute() does not return a route entry - * dst may not have been updated. - */ - *dst = dst_sa; /* XXX */ - } /* Then rt (for unicast) and ifp must be non-NULL valid values. */ if ((flags & IPV6_FORWARDING) == 0) { /* XXX: the FORWARDING flag can be set for mrouting. */ in6_ifstat_inc(ifp, ifs6_out_request); } - if (rt != NULL) { - ia = (struct in6_ifaddr *)(rt->rt_ifa); - counter_u64_add(rt->rt_pksent, 1); - } /* Setup data structures for scope ID checks. */ src0 = ip6->ip6_src; @@ -869,6 +940,9 @@ again: if ((error = ip6_getpmtu(ro_pmtu, ro != ro_pmtu, ifp, &ip6->ip6_dst, &mtu, &alwaysfrag, fibnum, *nexthdrp)) != 0) goto bad; + KASSERT(mtu > 0, ("%s:%d: mtu %ld, ro_pmtu %p ro %p ifp %p " + "alwaysfrag %d fibnum %u\n", __func__, __LINE__, mtu, ro_pmtu, ro, + ifp, alwaysfrag, fibnum)); /* * The caller of this function may specify to use the minimum MTU @@ -972,7 +1046,8 @@ again: error = netisr_queue(NETISR_IPV6, m); goto done; } else { - RO_INVALIDATE_CACHE(ro); + if (ro != NULL) + RO_INVALIDATE_CACHE(ro); needfiblookup = 1; /* Redo the routing table lookup. */ } } @@ -980,7 +1055,8 @@ again: if (fibnum != M_GETFIB(m)) { m->m_flags |= M_SKIP_FIREWALL; fibnum = M_GETFIB(m); - RO_INVALIDATE_CACHE(ro); + if (ro != NULL) + RO_INVALIDATE_CACHE(ro); needfiblookup = 1; } if (needfiblookup) @@ -1005,7 +1081,10 @@ again: /* Or forward to some other address? */ if ((m->m_flags & M_IP6_NEXTHOP) && (fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL)) != NULL) { - dst = (struct sockaddr_in6 *)&ro->ro_dst; + if (ro != NULL) + dst = (struct sockaddr_in6 *)&ro->ro_dst; + else + dst = &sin6; bcopy((fwd_tag+1), &dst_sa, sizeof(struct sockaddr_in6)); m->m_flags |= M_SKIP_FIREWALL; m->m_flags &= ~M_IP6_NEXTHOP; @@ -1188,8 +1267,6 @@ sendorfree: IP6STAT_INC(ip6s_fragmented); done: - if (ro == &ip6route) - RO_RTFREE(ro); return (error); freehdrs: @@ -1405,22 +1482,25 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, int do_lookup, struct nhop6_basic nh6; struct in6_addr kdst; uint32_t scopeid; - struct sockaddr_in6 *sa6_dst; + struct sockaddr_in6 *sa6_dst, sin6; u_long mtu; mtu = 0; - if (do_lookup) { + if (ro_pmtu == NULL || do_lookup) { /* * Here ro_pmtu has final destination address, while * ro might represent immediate destination. * Use ro_pmtu destination since mtu might differ. */ - sa6_dst = (struct sockaddr_in6 *)&ro_pmtu->ro_dst; - if (!IN6_ARE_ADDR_EQUAL(&sa6_dst->sin6_addr, dst)) - ro_pmtu->ro_mtu = 0; + if (ro_pmtu != NULL) { + sa6_dst = (struct sockaddr_in6 *)&ro_pmtu->ro_dst; + if (!IN6_ARE_ADDR_EQUAL(&sa6_dst->sin6_addr, dst)) + ro_pmtu->ro_mtu = 0; + } else + sa6_dst = &sin6; - if (ro_pmtu->ro_mtu == 0) { + if (ro_pmtu == NULL || ro_pmtu->ro_mtu == 0) { bzero(sa6_dst, sizeof(*sa6_dst)); sa6_dst->sin6_family = AF_INET6; sa6_dst->sin6_len = sizeof(struct sockaddr_in6); @@ -1428,14 +1508,16 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, int do_lookup, in6_splitscope(dst, &kdst, &scopeid); if (fib6_lookup_nh_basic(fibnum, &kdst, scopeid, 0, 0, - &nh6) == 0) - ro_pmtu->ro_mtu = nh6.nh_mtu; - } - - mtu = ro_pmtu->ro_mtu; + &nh6) == 0) { + mtu = nh6.nh_mtu; + if (ro_pmtu != NULL) + ro_pmtu->ro_mtu = mtu; + } + } else + mtu = ro_pmtu->ro_mtu; } - if (ro_pmtu->ro_rt) + if (ro_pmtu != NULL && ro_pmtu->ro_rt != NULL) mtu = ro_pmtu->ro_rt->rt_mtu; return (ip6_calcmtu(ifp, dst, mtu, mtup, alwaysfragp, proto)); From owner-svn-src-head@freebsd.org Tue Mar 3 12:50:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5ACC226E97B; Tue, 3 Mar 2020 12:50:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wxh65R4vz4TMT; Tue, 3 Mar 2020 12:50:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 560955635; Tue, 3 Mar 2020 12:50:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023Cok4c049786; Tue, 3 Mar 2020 12:50:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023CojOv049785; Tue, 3 Mar 2020 12:50:45 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003031250.023CojOv049785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 3 Mar 2020 12:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358573 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 12:50:47 -0000 Author: andrew Date: Tue Mar 3 12:50:45 2020 New Revision: 358573 URL: https://svnweb.freebsd.org/changeset/base/358573 Log: Fix the spelling of the VIPT cache type field Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/include/armreg.h Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Tue Mar 3 11:32:47 2020 (r358572) +++ head/sys/arm64/arm64/identcpu.c Tue Mar 3 12:50:45 2020 (r358573) @@ -1105,8 +1105,8 @@ print_ctr_fields(struct sbuf *sb, uint64_t reg, void * case CTR_L1IP_AIVIVT: sbuf_printf(sb, "AIVIVT"); break; - case CTR_L1IP_VIVT: - sbuf_printf(sb, "VIVT"); + case CTR_L1IP_VIPT: + sbuf_printf(sb, "VIPT"); break; case CTR_L1IP_PIPT: sbuf_printf(sb, "PIPT"); Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Tue Mar 3 11:32:47 2020 (r358572) +++ head/sys/arm64/include/armreg.h Tue Mar 3 12:50:45 2020 (r358573) @@ -109,7 +109,7 @@ #define CTR_L1IP_VAL(reg) ((reg) & CTR_L1IP_MASK) #define CTR_L1IP_VPIPT (0 << CTR_L1IP_SHIFT) #define CTR_L1IP_AIVIVT (1 << CTR_L1IP_SHIFT) -#define CTR_L1IP_VIVT (2 << CTR_L1IP_SHIFT) +#define CTR_L1IP_VIPT (2 << CTR_L1IP_SHIFT) #define CTR_L1IP_PIPT (3 << CTR_L1IP_SHIFT) #define CTR_ILINE_SHIFT 0 #define CTR_ILINE_MASK (0xf << CTR_ILINE_SHIFT) From owner-svn-src-head@freebsd.org Tue Mar 3 13:25:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2309F26FC0D; Tue, 3 Mar 2020 13:25:10 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WyRn2Fr6z4Y1Q; Tue, 3 Mar 2020 13:25:09 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 179F75C84; Tue, 3 Mar 2020 13:25:09 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023DP8gm074267; Tue, 3 Mar 2020 13:25:08 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023DP8YN074266; Tue, 3 Mar 2020 13:25:08 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003031325.023DP8YN074266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 3 Mar 2020 13:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358574 - head/usr.sbin/powerd X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.sbin/powerd X-SVN-Commit-Revision: 358574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 13:25:10 -0000 Author: 0mp (doc,ports committer) Date: Tue Mar 3 13:25:08 2020 New Revision: 358574 URL: https://svnweb.freebsd.org/changeset/base/358574 Log: powerd.8: Improve style & fix typos - Sort options. - Do not use macros (like .Ar) to specify width for Bl (macros within that string are not expanded). - Use Cm instead of Ar for mode names. - Fix some typos reported by mandoc. - Move the documentation of the PID file from the -P flag description to the FILES section. Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D23941 Modified: head/usr.sbin/powerd/powerd.8 Modified: head/usr.sbin/powerd/powerd.8 ============================================================================== --- head/usr.sbin/powerd/powerd.8 Tue Mar 3 12:50:45 2020 (r358573) +++ head/usr.sbin/powerd/powerd.8 Tue Mar 3 13:25:08 2020 (r358574) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2019 +.Dd March 3, 2020 .Dt POWERD 8 .Os .Sh NAME @@ -35,12 +35,12 @@ .Op Fl a Ar mode .Op Fl b Ar mode .Op Fl i Ar percent -.Op Fl m Ar freq .Op Fl M Ar freq +.Op Fl m Ar freq .Op Fl N .Op Fl n Ar mode -.Op Fl p Ar ival .Op Fl P Ar pidfile +.Op Fl p Ar ival .Op Fl r Ar percent .Op Fl s Ar source .Op Fl v @@ -51,42 +51,42 @@ utility monitors the system state and sets various pow accordingly. It offers power-saving modes that can be individually selected for operation on AC power or batteries. -.Bl -tag -width ".Ar hiadaptive" -.It Ar maximum +.Bl -tag -width "hiadaptive" +.It Cm maximum Choose the highest performance values. May be abbreviated as -.Ar max . -.It Ar minimum +.Cm max . +.It Cm minimum Choose the lowest performance values to get the most power savings. May be abbreviated as -.Ar min . -.It Ar adaptive +.Cm min . +.It Cm adaptive Attempt to strike a balance by degrading performance when the system appears idle and increasing it when the system is busy. It offers a good balance between a small performance loss for greatly increased power savings. May be abbreviated as -.Ar adp . -.It Ar hiadaptive +.Cm adp . +.It Cm hiadaptive Like -.Ar adaptive +.Cm adaptive mode, but tuned for systems where performance and interactivity are more important than power consumption. It increases frequency faster, reduces frequency less aggressively, and will maintain full frequency for longer. May be abbreviated as -.Ar hadp . +.Cm hadp . .El .Pp The default mode is -.Ar adaptive +.Cm adaptive for battery power and -.Ar hiadaptive +.Cm hiadaptive for the rest. .Pp .Nm recognizes these runtime options: -.Bl -tag -width ".Fl r Ar percent" +.Bl -tag -width "-r percent" .It Fl a Ar mode Selects the .Ar mode @@ -99,26 +99,24 @@ to use while on battery power. Specifies the CPU load percent level when adaptive mode should begin to degrade performance to save power. The default is 50% or lower. -.It Fl m Ar freq -Specifies the minimum frequency to throttle down to. .It Fl M Ar freq Specifies the maximum frequency to throttle up to. +.It Fl m Ar freq +Specifies the minimum frequency to throttle down to. .It Fl N Treat "nice" time as idle for the purpose of load calculation; -i.e. do not increase the CPU frequency if the CPU is only busy +i.e., do not increase the CPU frequency if the CPU is only busy with "nice" processes. .It Fl n Ar mode Selects the .Ar mode to use normally when the AC line state is unknown. +.It Fl P Ar pidfile +Specifies an alternative file in which the process ID should be stored. .It Fl p Ar ival Specifies a different polling interval (in milliseconds) for AC line state and system idle levels. The default is 250 ms. -.It Fl P Ar pidfile -Specifies an alternative file in which the process ID should be stored. -The default is -.Pa /var/run/powerd.pid . .It Fl r Ar percent Specifies the CPU load percent level where adaptive mode should consider the CPU running and increase performance. @@ -136,6 +134,11 @@ Verbose mode. Messages about power changes will be printed to stdout and .Nm will operate in the foreground. +.El +.Sh FILES +.Bl -tag -width "/var/run/powerd.pid" +.It Pa /var/run/powerd.pid +The default PID file. .El .Sh SEE ALSO .Xr acpi 4 , From owner-svn-src-head@freebsd.org Tue Mar 3 13:48:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B14992502C1; Tue, 3 Mar 2020 13:48:13 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WyyP43Nqz4bwn; Tue, 3 Mar 2020 13:48:13 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 547F0604F; Tue, 3 Mar 2020 13:48:13 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023DmCIo086079; Tue, 3 Mar 2020 13:48:12 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023DmCWl086076; Tue, 3 Mar 2020 13:48:12 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003031348.023DmCWl086076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 13:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358575 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 13:48:13 -0000 Author: bz Date: Tue Mar 3 13:48:12 2020 New Revision: 358575 URL: https://svnweb.freebsd.org/changeset/base/358575 Log: ip6: retire in6_selectroute_fib() as promised 8 years ago In r231852 I added in6_selectroute_fib() as a compat function with the fibnum as an extra argument compared to in6_selectroute() to keep the KPI stable. Way too late retire this function again and add the fib to in6_selectroute() which also only has a single consumer now and was an orphan function before. Modified: head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_output.c head/sys/netinet6/ip6_var.h Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Tue Mar 3 13:25:08 2020 (r358574) +++ head/sys/netinet6/in6_src.c Tue Mar 3 13:48:12 2020 (r358575) @@ -640,10 +640,10 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_p if (dstsock->sin6_addr.s6_addr32[0] == 0 && dstsock->sin6_addr.s6_addr32[1] == 0 && !IN6_IS_ADDR_LOOPBACK(&dstsock->sin6_addr)) { - printf("in6_selectroute: strange destination %s\n", + printf("%s: strange destination %s\n", __func__, ip6_sprintf(ip6buf, &dstsock->sin6_addr)); } else { - printf("in6_selectroute: destination = %s%%%d\n", + printf("%s: destination = %s%%%d\n", __func__, ip6_sprintf(ip6buf, &dstsock->sin6_addr), dstsock->sin6_scope_id); /* for debug */ } @@ -895,33 +895,16 @@ in6_selectif(struct sockaddr_in6 *dstsock, struct ip6_ return (0); } -/* - * Public wrapper function to selectroute(). - * - * XXX-BZ in6_selectroute() should and will grow the FIB argument. The - * in6_selectroute_fib() function is only there for backward compat on stable. - */ +/* Public wrapper function to selectroute(). */ int in6_selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct route_in6 *ro, - struct ifnet **retifp, struct rtentry **retrt) -{ - - return (selectroute(dstsock, opts, mopts, ro, retifp, - retrt, 0, RT_DEFAULT_FIB)); -} - -#ifndef BURN_BRIDGES -int -in6_selectroute_fib(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, - struct ip6_moptions *mopts, struct route_in6 *ro, struct ifnet **retifp, struct rtentry **retrt, u_int fibnum) { return (selectroute(dstsock, opts, mopts, ro, retifp, retrt, 0, fibnum)); } -#endif /* * Default hop limit selection. The precedence is as follows: Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Tue Mar 3 13:25:08 2020 (r358574) +++ head/sys/netinet6/ip6_output.c Tue Mar 3 13:48:12 2020 (r358575) @@ -709,7 +709,7 @@ again: dst_sa.sin6_len = sizeof(dst_sa); dst_sa.sin6_addr = ip6->ip6_dst; } - error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, &ifp, + error = in6_selectroute(&dst_sa, opt, im6o, ro, &ifp, &rt, fibnum); if (error != 0) { IP6STAT_INC(ip6s_noroute); Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Tue Mar 3 13:25:08 2020 (r358574) +++ head/sys/netinet6/ip6_var.h Tue Mar 3 13:48:12 2020 (r358575) @@ -416,10 +416,7 @@ int in6_selectsrc_addr(uint32_t, const struct in6_addr uint32_t, struct ifnet *, struct in6_addr *, int *); int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **); -int in6_selectroute_fib(struct sockaddr_in6 *, struct ip6_pktopts *, - struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **, u_int); + struct rtentry **, u_int); u_int32_t ip6_randomid(void); u_int32_t ip6_randomflowlabel(void); void in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset); From owner-svn-src-head@freebsd.org Tue Mar 3 14:06:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63DD825095C for ; Tue, 3 Mar 2020 14:06:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WzMM1c1Pz3PfZ; Tue, 3 Mar 2020 14:06:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1EB9F6F67; Tue, 3 Mar 2020 14:06:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Eugene Grosbein , Hiroki Sato Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: Date: Tue, 3 Mar 2020 09:06:16 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 14:06:23 -0000 On 20. 3. 3., Eugene Grosbein wrote: > 03.03.2020 5:50, Hiroki Sato wrote: > >> b) If you have security/openssl, sendmail in the base system does not >> support SMTP AUTH because of incompatibility with the newer >> versions of OpenSSL. Use mail/sendmail from ports. >> >> I still feel that b) is sub-optimal, but it would be too complex to >> make them coexist with each other. > > It should be not a problem to merge "our sendmail OpenSSL 1.1.x patch" to stable/11 > and I'm willing to test it before merge. It would fix compatibility with cyrus-sasl2 linked with new openssl, too. I am sorry but merging the patch won't fix your case at all because it is a linking issue. What am I missing? Jung-uk Kim From owner-svn-src-head@freebsd.org Tue Mar 3 14:07:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8870250A5A; Tue, 3 Mar 2020 14:07:46 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WzNx6fmZz3R0n; Tue, 3 Mar 2020 14:07:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85D796409; Tue, 3 Mar 2020 14:07:44 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023E7iwO098045; Tue, 3 Mar 2020 14:07:44 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023E7iB9098044; Tue, 3 Mar 2020 14:07:44 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003031407.023E7iB9098044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 14:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358576 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 14:07:46 -0000 Author: bz Date: Tue Mar 3 14:07:44 2020 New Revision: 358576 URL: https://svnweb.freebsd.org/changeset/base/358576 Log: upic_ktrls: make RSS compile again here The results of ktls_get_cpu() are stored in u_int and NETISR_CPUID_NONE requires u_int. Adjust uint16_t to uint_t in order to make RSS kernels compile some more again. HPTS still has to be fixed, which is a bit more complicated. Reviewed by: jhb, gallatin, rrs Differential Revision: https://reviews.freebsd.org/D23726 Modified: head/sys/kern/uipc_ktls.c Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Tue Mar 3 13:48:12 2020 (r358575) +++ head/sys/kern/uipc_ktls.c Tue Mar 3 14:07:44 2020 (r358576) @@ -299,11 +299,11 @@ ktls_crypto_backend_deregister(struct ktls_crypto_back } #if defined(INET) || defined(INET6) -static uint16_t +static u_int ktls_get_cpu(struct socket *so) { struct inpcb *inp; - uint16_t cpuid; + u_int cpuid; inp = sotoinpcb(so); #ifdef RSS From owner-svn-src-head@freebsd.org Tue Mar 3 14:15:32 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3B812510EB; Tue, 3 Mar 2020 14:15:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WzYw27CYz43QR; Tue, 3 Mar 2020 14:15:31 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDF1A662F; Tue, 3 Mar 2020 14:15:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023EFUp5004157; Tue, 3 Mar 2020 14:15:30 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023EFUTE004156; Tue, 3 Mar 2020 14:15:30 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003031415.023EFUTE004156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 14:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358577 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 358577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 14:15:32 -0000 Author: bz Date: Tue Mar 3 14:15:30 2020 New Revision: 358577 URL: https://svnweb.freebsd.org/changeset/base/358577 Log: tcp_hpts: make RSS kernel compile again. Add proper #includes, and #ifdefs and some style fixes to make RSS kernels compile again. There are still possible issues with uin16_t vs. uint_t cpuid which I am not going near. Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D23726 Modified: head/sys/netinet/tcp_hpts.c Modified: head/sys/netinet/tcp_hpts.c ============================================================================== --- head/sys/netinet/tcp_hpts.c Tue Mar 3 14:07:44 2020 (r358576) +++ head/sys/netinet/tcp_hpts.c Tue Mar 3 14:15:30 2020 (r358577) @@ -28,7 +28,9 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "opt_tcpdebug.h" + /** * Some notes about usage. * @@ -151,6 +153,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef RSS +#include +#include +#endif + #define TCPSTATES /* for logging */ #include @@ -180,7 +187,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#include "opt_rss.h" MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts"); #ifdef RSS @@ -1151,9 +1157,10 @@ hpts_random_cpu(struct inpcb *inp){ } static uint16_t -hpts_cpuid(struct inpcb *inp){ +hpts_cpuid(struct inpcb *inp) +{ u_int cpuid; -#ifdef NUMA +#if !defined(RSS) && defined(NUMA) struct hpts_domain_info *di; #endif @@ -1167,7 +1174,7 @@ hpts_cpuid(struct inpcb *inp){ return (inp->inp_hpts_cpu); } /* If one is set the other must be the same */ -#ifdef RSS +#ifdef RSS cpuid = rss_hash2cpuid(inp->inp_flowid, inp->inp_flowtype); if (cpuid == NETISR_CPUID_NONE) return (hpts_random_cpu(inp)); From owner-svn-src-head@freebsd.org Tue Mar 3 14:36:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DAB82251BD2 for ; Tue, 3 Mar 2020 14:36:50 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X02S46Lsz3NH7; Tue, 3 Mar 2020 14:36:48 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 023EaY40064382 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 3 Mar 2020 14:36:37 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jkim@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 023EaWRu029254 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 3 Mar 2020 21:36:32 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Jung-uk Kim , Hiroki Sato References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> Date: Tue, 3 Mar 2020 21:36:28 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48X02S46Lsz3NH7 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.95 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.85)[ip: (-5.12), ipnet: 2a01:4f8::/29(-2.55), asn: 24940(-1.56), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 14:36:50 -0000 03.03.2020 21:06, Jung-uk Kim wrote: >>> b) If you have security/openssl, sendmail in the base system does not >>> support SMTP AUTH because of incompatibility with the newer >>> versions of OpenSSL. Use mail/sendmail from ports. >>> >>> I still feel that b) is sub-optimal, but it would be too complex to >>> make them coexist with each other. >> >> It should be not a problem to merge "our sendmail OpenSSL 1.1.x patch" to stable/11 >> and I'm willing to test it before merge. It would fix compatibility with cyrus-sasl2 linked with new openssl, too. > > I am sorry but merging the patch won't fix your case at all because it > is a linking issue. What am I missing? That would make it possible to link all parties with same library, wouldn't that? From owner-svn-src-head@freebsd.org Tue Mar 3 14:44:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 107DA251ECB for ; Tue, 3 Mar 2020 14:44:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X0CT4dC1z4F9y; Tue, 3 Mar 2020 14:44:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 5479D741C; Tue, 3 Mar 2020 14:44:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Eugene Grosbein , Hiroki Sato Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: Date: Tue, 3 Mar 2020 09:44:33 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 14:44:38 -0000 On 20. 3. 3., Eugene Grosbein wrote: > 03.03.2020 21:06, Jung-uk Kim wrote: > >>>> b) If you have security/openssl, sendmail in the base system does not >>>> support SMTP AUTH because of incompatibility with the newer >>>> versions of OpenSSL. Use mail/sendmail from ports. >>>> >>>> I still feel that b) is sub-optimal, but it would be too complex to >>>> make them coexist with each other. >>> >>> It should be not a problem to merge "our sendmail OpenSSL 1.1.x patch" to stable/11 >>> and I'm willing to test it before merge. It would fix compatibility with cyrus-sasl2 linked with new openssl, too. >> >> I am sorry but merging the patch won't fix your case at all because it >> is a linking issue. What am I missing? > > That would make it possible to link all parties with same library, wouldn't that? No, you'll have the same linker failure. Jung-uk Kim From owner-svn-src-head@freebsd.org Tue Mar 3 14:57:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DD4325216D for ; Tue, 3 Mar 2020 14:57:04 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X0Tp6gDrz3Krp; Tue, 3 Mar 2020 14:57:02 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 023Eus9T064612 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 3 Mar 2020 14:56:55 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jkim@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 023EunJt029380 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 3 Mar 2020 21:56:49 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Jung-uk Kim , Hiroki Sato References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: Date: Tue, 3 Mar 2020 21:56:44 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48X0Tp6gDrz3Krp X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.95 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.85)[ip: (-5.12), ipnet: 2a01:4f8::/29(-2.55), asn: 24940(-1.56), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 14:57:04 -0000 03.03.2020 21:44, Jung-uk Kim wrote: > No, you'll have the same linker failure. Then what's the reason of the failure? We have to fix it for stable/11 users, too. From owner-svn-src-head@freebsd.org Tue Mar 3 15:05:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A64E252549; Tue, 3 Mar 2020 15:05:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X0gG3DKdz41Bd; Tue, 3 Mar 2020 15:05:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6845B6FC4; Tue, 3 Mar 2020 15:05:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023F5EBd034317; Tue, 3 Mar 2020 15:05:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023F5EMj034316; Tue, 3 Mar 2020 15:05:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003031505.023F5EMj034316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 3 Mar 2020 15:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358580 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 15:05:14 -0000 Author: mav Date: Tue Mar 3 15:05:13 2020 New Revision: 358580 URL: https://svnweb.freebsd.org/changeset/base/358580 Log: Increase number of write completion threads, matching ZoL. Our iSCSI benchmarks on a large 80-core system show that previous limit of 8 threads can be a bottleneck. At some points this change increases write IOPS by as much as 50%. I am still not sure that so many threads is really required, but we tested lower amounts and got no significant benefits, while latencies were a bit worse, so decided to not diverge. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Mar 3 15:02:07 2020 (r358579) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Mar 3 15:05:13 2020 (r358580) @@ -157,7 +157,7 @@ const zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ /* ISSUE ISSUE_HIGH INTR INTR_HIGH */ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* NULL */ { ZTI_N(8), ZTI_NULL, ZTI_P(12, 8), ZTI_NULL }, /* READ */ - { ZTI_BATCH, ZTI_N(5), ZTI_N(8), ZTI_N(5) }, /* WRITE */ + { ZTI_BATCH, ZTI_N(5), ZTI_P(12, 8), ZTI_N(5) }, /* WRITE */ { ZTI_P(12, 8), ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* FREE */ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* CLAIM */ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* IOCTL */ From owner-svn-src-head@freebsd.org Tue Mar 3 15:25:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BAB3253499; Tue, 3 Mar 2020 15:25:03 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X1663QvXz4Tvk; Tue, 3 Mar 2020 15:25:02 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24F2B73A3; Tue, 3 Mar 2020 15:25:02 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023FP2fx046603; Tue, 3 Mar 2020 15:25:02 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023FP1vu046599; Tue, 3 Mar 2020 15:25:01 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003031525.023FP1vu046599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 3 Mar 2020 15:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358583 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 15:25:03 -0000 Author: andrew Date: Tue Mar 3 15:25:01 2020 New Revision: 358583 URL: https://svnweb.freebsd.org/changeset/base/358583 Log: Move the arm64 cache identification to identcpu.c This allows us to call it on a per-CPU basis and to warn if the details are different across CPUs. While here read the L1 I-Cache type and store this for use later by pmap. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/arm64/machdep.c head/sys/arm64/include/cpu.h head/sys/arm64/include/cpufunc.h Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Tue Mar 3 15:12:00 2020 (r358582) +++ head/sys/arm64/arm64/identcpu.c Tue Mar 3 15:25:01 2020 (r358583) @@ -965,6 +965,13 @@ update_user_regs(u_int cpu) extern u_long elf_hwcap; bool __read_frequently lse_supported = false; +bool __read_frequently icache_alising = false; +bool __read_frequently icache_vmid = false; + +int64_t dcache_line_size; /* The minimum D cache line size */ +int64_t icache_line_size; /* The minimum I cache line size */ +int64_t idcache_line_size; /* The minimum cache line size */ + static void identify_cpu_sysinit(void *dummy __unused) { @@ -1309,6 +1316,46 @@ print_cpu_features(u_int cpu) } void +identify_cache(uint64_t ctr) +{ + + /* Identify the L1 cache type */ + switch (CTR_L1IP_VAL(ctr)) { + case CTR_L1IP_PIPT: + break; + case CTR_L1IP_VPIPT: + icache_vmid = true; + break; + default: + case CTR_L1IP_VIPT: + icache_alising = true; + break; + } + + if (dcache_line_size == 0) { + KASSERT(icache_line_size == 0, ("%s: i-cacheline size set: %ld", + __func__, icache_line_size)); + + /* Get the D cache line size */ + dcache_line_size = CTR_DLINE_SIZE(ctr); + /* And the same for the I cache */ + icache_line_size = CTR_ILINE_SIZE(ctr); + + idcache_line_size = MIN(dcache_line_size, icache_line_size); + } + + if (dcache_line_size != CTR_DLINE_SIZE(ctr)) { + printf("WARNING: D-cacheline size mismatch %ld != %d\n", + dcache_line_size, CTR_DLINE_SIZE(ctr)); + } + + if (icache_line_size != CTR_ILINE_SIZE(ctr)) { + printf("WARNING: I-cacheline size mismatch %ld != %d\n", + icache_line_size, CTR_ILINE_SIZE(ctr)); + } +} + +void identify_cpu(void) { u_int midr; @@ -1429,8 +1476,14 @@ identify_cpu(void) if (cpu_desc[cpu].id_aa64pfr1 != cpu_desc[0].id_aa64pfr1) cpu_print_regs |= PRINT_ID_AA64_PFR1; - if (cpu_desc[cpu].ctr != cpu_desc[0].ctr) + if (cpu_desc[cpu].ctr != cpu_desc[0].ctr) { + /* + * If the cache type register is different we may + * have a different l1 cache type. + */ + identify_cache(cpu_desc[cpu].ctr); cpu_print_regs |= PRINT_CTR_EL0; + } /* Wake up the other CPUs */ atomic_store_rel_int(&ident_lock, 0); Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Tue Mar 3 15:12:00 2020 (r358582) +++ head/sys/arm64/arm64/machdep.c Tue Mar 3 15:25:01 2020 (r358583) @@ -113,9 +113,6 @@ static int boot_el; struct kva_md_info kmi; -int64_t dcache_line_size; /* The minimum D cache line size */ -int64_t icache_line_size; /* The minimum I cache line size */ -int64_t idcache_line_size; /* The minimum cache line size */ int64_t dczva_line_size; /* The size of cache line the dc zva zeroes */ int has_pan; @@ -1056,17 +1053,9 @@ static void cache_setup(void) { int dczva_line_shift; - uint32_t ctr_el0; uint32_t dczid_el0; - ctr_el0 = READ_SPECIALREG(ctr_el0); - - /* Get the D cache line size */ - dcache_line_size = CTR_DLINE_SIZE(ctr_el0); - /* And the same for the I cache */ - icache_line_size = CTR_ILINE_SIZE(ctr_el0); - - idcache_line_size = MIN(dcache_line_size, icache_line_size); + identify_cache(READ_SPECIALREG(ctr_el0)); dczid_el0 = READ_SPECIALREG(dczid_el0); Modified: head/sys/arm64/include/cpu.h ============================================================================== --- head/sys/arm64/include/cpu.h Tue Mar 3 15:12:00 2020 (r358582) +++ head/sys/arm64/include/cpu.h Tue Mar 3 15:25:01 2020 (r358583) @@ -166,6 +166,7 @@ extern uint64_t __cpu_affinity[]; void cpu_halt(void) __dead2; void cpu_reset(void) __dead2; void fork_trampoline(void); +void identify_cache(uint64_t); void identify_cpu(void); void install_cpu_errata(void); void swi_vm(void *v); Modified: head/sys/arm64/include/cpufunc.h ============================================================================== --- head/sys/arm64/include/cpufunc.h Tue Mar 3 15:12:00 2020 (r358582) +++ head/sys/arm64/include/cpufunc.h Tue Mar 3 15:25:01 2020 (r358583) @@ -199,6 +199,9 @@ invalidate_local_icache(void) "isb \n"); } +extern bool icache_alising; +extern bool icache_vmid; + extern int64_t dcache_line_size; extern int64_t icache_line_size; extern int64_t idcache_line_size; From owner-svn-src-head@freebsd.org Tue Mar 3 15:31:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D47652536C7; Tue, 3 Mar 2020 15:31:41 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X1Fn38vCz3HtZ; Tue, 3 Mar 2020 15:31:41 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 347567527; Tue, 3 Mar 2020 15:31:41 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023FVfu7047605; Tue, 3 Mar 2020 15:31:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023FVeCT047604; Tue, 3 Mar 2020 15:31:40 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003031531.023FVeCT047604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 3 Mar 2020 15:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358584 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 15:31:42 -0000 Author: andrew Date: Tue Mar 3 15:31:40 2020 New Revision: 358584 URL: https://svnweb.freebsd.org/changeset/base/358584 Log: Fix the spelling of aliasing. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/include/cpufunc.h Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Tue Mar 3 15:25:01 2020 (r358583) +++ head/sys/arm64/arm64/identcpu.c Tue Mar 3 15:31:40 2020 (r358584) @@ -965,7 +965,7 @@ update_user_regs(u_int cpu) extern u_long elf_hwcap; bool __read_frequently lse_supported = false; -bool __read_frequently icache_alising = false; +bool __read_frequently icache_aliasing = false; bool __read_frequently icache_vmid = false; int64_t dcache_line_size; /* The minimum D cache line size */ @@ -1328,7 +1328,7 @@ identify_cache(uint64_t ctr) break; default: case CTR_L1IP_VIPT: - icache_alising = true; + icache_aliasing = true; break; } Modified: head/sys/arm64/include/cpufunc.h ============================================================================== --- head/sys/arm64/include/cpufunc.h Tue Mar 3 15:25:01 2020 (r358583) +++ head/sys/arm64/include/cpufunc.h Tue Mar 3 15:31:40 2020 (r358584) @@ -199,7 +199,7 @@ invalidate_local_icache(void) "isb \n"); } -extern bool icache_alising; +extern bool icache_aliasing; extern bool icache_vmid; extern int64_t dcache_line_size; From owner-svn-src-head@freebsd.org Tue Mar 3 15:33:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60E20253AB3; Tue, 3 Mar 2020 15:33:44 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X1J80P46z3MQm; Tue, 3 Mar 2020 15:33:44 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8BDB758B; Tue, 3 Mar 2020 15:33:43 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023FXh08052517; Tue, 3 Mar 2020 15:33:43 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023FXhKb052515; Tue, 3 Mar 2020 15:33:43 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202003031533.023FXhKb052515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 3 Mar 2020 15:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358585 - in head: sys/net tests/sys/netinet tests/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head: sys/net tests/sys/netinet tests/sys/netinet6 X-SVN-Commit-Revision: 358585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 15:33:44 -0000 Author: melifaro Date: Tue Mar 3 15:33:43 2020 New Revision: 358585 URL: https://svnweb.freebsd.org/changeset/base/358585 Log: Fix dynamic redrects by adding forgotten RTF_HOST flag. Improve tests to verify the generated route flags. Reported by: jtl MFC after: 2 weeks Modified: head/sys/net/route.c head/tests/sys/netinet/redirect.sh head/tests/sys/netinet6/redirect.sh Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Tue Mar 3 15:31:40 2020 (r358584) +++ head/sys/net/route.c Tue Mar 3 15:33:43 2020 (r358585) @@ -632,7 +632,7 @@ rib_add_redirect(u_int fibnum, struct sockaddr *dst, s info.rti_info[RTAX_GATEWAY] = gateway; info.rti_ifa = ifa; info.rti_ifp = ifp; - info.rti_flags = flags | RTF_DYNAMIC; + info.rti_flags = flags | RTF_HOST | RTF_DYNAMIC; /* Setup route metrics to define expire time. */ bzero(&rti_rmx, sizeof(rti_rmx)); Modified: head/tests/sys/netinet/redirect.sh ============================================================================== --- head/tests/sys/netinet/redirect.sh Tue Mar 3 15:31:40 2020 (r358584) +++ head/tests/sys/netinet/redirect.sh Tue Mar 3 15:33:43 2020 (r358585) @@ -92,9 +92,8 @@ valid_redirect_body() { --route ${dst_addr4} --gw ${new_rtr_ip} \ --iface ${epair}a - count=`jexec ${jname} route -n get -4 ${dst_addr4} | grep destination | grep -c ${dst_addr4}` - # Verify redirect got installed - atf_check_equal "1" "${count}" + atf_check -o match:"destination: ${dst_addr4}\$" jexec ${jname} route -n get -4 ${dst_addr4} + atf_check -o match:'flags: ' jexec ${jname} route -n get -4 ${dst_addr4} } valid_redirect_cleanup() { Modified: head/tests/sys/netinet6/redirect.sh ============================================================================== --- head/tests/sys/netinet6/redirect.sh Tue Mar 3 15:31:40 2020 (r358584) +++ head/tests/sys/netinet6/redirect.sh Tue Mar 3 15:33:43 2020 (r358585) @@ -94,9 +94,9 @@ valid_redirect_body() { --route ${dst_addr6} --gw ${new_rtr_ll_ip} \ --iface ${epair}a - count=`jexec ${jname} route -n get -6 ${dst_addr6} | grep destination | grep -c ${dst_addr6}` # Verify redirect got installed - atf_check_equal "1" "${count}" + atf_check -o match:"destination: ${dst_addr6}\$" jexec ${jname} route -n get -6 ${dst_addr6} + atf_check -o match:'flags: ' jexec ${jname} route -n get -6 ${dst_addr6} } valid_redirect_cleanup() { From owner-svn-src-head@freebsd.org Tue Mar 3 15:49:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA8EA254107; Tue, 3 Mar 2020 15:49:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X1fQ5xMhz4Xvl; Tue, 3 Mar 2020 15:49:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4A8A7797; Tue, 3 Mar 2020 15:49:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023FnY0Z059047; Tue, 3 Mar 2020 15:49:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023FnYCR059046; Tue, 3 Mar 2020 15:49:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003031549.023FnYCR059046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 3 Mar 2020 15:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358586 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 358586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 15:49:35 -0000 Author: hselasky Date: Tue Mar 3 15:49:34 2020 New Revision: 358586 URL: https://svnweb.freebsd.org/changeset/base/358586 Log: When closing a LinuxKPI file always use the real release function to avoid resource leakage when destroying a LinuxKPI character device. Submitted by: Andrew Boyer Reviewed by: kib@ PR: 244572 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 3 15:33:43 2020 (r358585) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 3 15:49:34 2020 (r358586) @@ -1490,6 +1490,7 @@ static int linux_file_close(struct file *file, struct thread *td) { struct linux_file *filp; + int (*release)(struct inode *, struct linux_file *); const struct file_operations *fop; struct linux_cdev *ldev; int error; @@ -1507,8 +1508,13 @@ linux_file_close(struct file *file, struct thread *td) linux_set_current(td); linux_poll_wait_dequeue(filp); linux_get_fop(filp, &fop, &ldev); - if (fop->release != NULL) - error = -OPW(file, td, fop->release(filp->f_vnode, filp)); + /* + * Always use the real release function, if any, to avoid + * leaking device resources: + */ + release = filp->f_op->release; + if (release != NULL) + error = -OPW(file, td, release(filp->f_vnode, filp)); funsetown(&filp->f_sigio); if (filp->f_vnode != NULL) vdrop(filp->f_vnode); From owner-svn-src-head@freebsd.org Tue Mar 3 16:02:30 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 049472546DA for ; Tue, 3 Mar 2020 16:02:30 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X1xK3c8jz421l; Tue, 3 Mar 2020 16:02:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 9A00jjcFc17ZD9A02jm9HV; Tue, 03 Mar 2020 09:02:27 -0700 X-Authority-Analysis: v=2.3 cv=ZsqT1OzG c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=SS2py6AdgQ4A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=7jdmSYDpkge7-4_8-yIA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from Resas-iPad.esitwifi.local (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id BBECC1FE; Tue, 3 Mar 2020 08:02:23 -0800 (PST) Date: Tue, 03 Mar 2020 06:48:43 -0800 User-Agent: K-9 Mail for Android In-Reply-To: <20200303.075047.1159550404273266246.hrs@FreeBSD.org> References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Hiroki Sato ,eugen@grosbein.net,jkim@FreeBSD.org CC: ume@FreeBSD.org,src-committers@freebsd.org,svn-src-head@freebsd.org From: Cy Schubert Message-ID: <0B5BF068-6E2E-48D5-BF68-1A007EBFE9D9@cschubert.com> X-CMAE-Envelope: MS4wfH+oynYUaFOv42n2qZj/jv4VVKKr6K8KeGgYWypZS617sUTaNrbTkAT/gd/6YwSxi4l3pR7pEBrXs6EnDpLfuAz7qh05u9tpwAiOEf1a7AU2R733DuGu ruDis5zd43ZREP0tMX7Ec3pMnkkMnBuHvUEWu7+H8PeoylZtJP0FDhNjR9wmj4bm2Gj7QY0bRDp09PjnnKsO9Nrp38NNEBoRcnXqgqnCrZ6uR+eULZ4d4i8T w/bNx9NqtWR0HhzxHzQyW4h08AZTRoRqUCycg2FgeO4+xbSOTDNaSdkkija5M4nPGosDlxlid4VgqNpU9BJRvgLhh58QZ3Vo7VG0JeoyDR0= X-Rspamd-Queue-Id: 48X1xK3c8jz421l X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.97 / 15.00]; NEURAL_HAM_MEDIUM(-0.97)[-0.971,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 16:02:30 -0000 On March 2, 2020 2:50:47 PM PST, Hiroki Sato wrote: >Jung-uk Kim wrote > in <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD=2Eorg>: > >jk> > I merely try to understand how to unbreak upgrade path for >11=2E2-STABLE workstations >jk> > with stock sendmail and SSL support that also has many ports >installed including >jk> > ports requiring new openssl API=2E Because buildworld fails and >upgrade is broken=2E >jk> I am also trying to understand your problem=2E Which port is >specifically >jk> requiring new OpenSSL API for you? > > The problem eugen@ is trying to explain is (correct me if this is > wrong): > > 1=2E One needs to install OpenSSL from ports if she wants to install > software which depends on it=2E deskutils/nextcloudclient, for > example=2E Setting DEFAILT_VERSION+=3Dssl=3Dopenssl is strongly > recommended in this case for consistency=2E > >2=2E Handbook says enabling SMTP AUTH requires the following in >make=2Econf: > > SENDMAIL_CFLAGS=3D-I/usr/local/include/sasl -DSASL > SENDMAIL_LDFLAGS=3D-L/usr/local/lib > SENDMAIL_LDADD=3D-lsasl2 > > However, this variables make the buildworld target to pick up > OpenSSL from ports if installed, not from base, in the middle of > building sendmail=2E "make buildworld" will always fail=2E There is > no way to avoid OpenSSL from ports if she wants software such as > deskutils/nextcloudclient=2E > > This build breakage occurs with sendmail + openssl from ports, not > related to cyrus-sasl2=2E A shlib mismatch between sendmail and > cyrus-sasl2 in terms of OpenSSL library is another issue=2E > > I think there are several workaround, but the primary problem is that > people can get confused with instructions in the handbook=2E I suggest > to update the handbook: > > a) If you do not have security/openssl on your system, set the > following in make=2Econf and rebuilt the world: > > SENDMAIL_CFLAGS=3D-I/usr/local/include/sasl -DSASL > SENDMAIL_LDFLAGS=3D-L/usr/local/lib > SENDMAIL_LDADD=3D-lsasl2 > > b) If you have security/openssl, sendmail in the base system does not > support SMTP AUTH because of incompatibility with the newer > versions of OpenSSL=2E Use mail/sendmail from ports=2E > > I still feel that b) is sub-optimal, but it would be too complex to > make them coexist with each other=2E The attached patch and putting > SASLBASEDIR=3D/usr/local into /etc/make=2Econf instead of the SENDMAIL_* > variables should mitigate the first problem but if > security/cyrus-sasl2 was built with OpenSSL from ports, the shlib > mismatch still occurs=2E > >-- Hiroki Buildworld should only use libraries in /usr/obj=2E I've found and fixed t= hese in ntp, Heimdal and amd=2E Base sendmail build shouldn't use installed= libraries or headers=2E The implications are obvious=2E=20 --=20 Pardon the typos and autocorrect, small keyboard in use=2E=20 Cy Schubert FreeBSD UNIX: Web: https://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E From owner-svn-src-head@freebsd.org Tue Mar 3 17:08:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD3F3255C6F for ; Tue, 3 Mar 2020 17:08:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X3Pb26P7z4HhY; Tue, 3 Mar 2020 17:08:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 34FB684F6; Tue, 3 Mar 2020 17:08:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Cy Schubert , Hiroki Sato , eugen@grosbein.net, jkim@FreeBSD.org Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <0B5BF068-6E2E-48D5-BF68-1A007EBFE9D9@cschubert.com> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Tue, 3 Mar 2020 09:08:33 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <0B5BF068-6E2E-48D5-BF68-1A007EBFE9D9@cschubert.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 17:08:35 -0000 On 3/3/20 6:48 AM, Cy Schubert wrote: > On March 2, 2020 2:50:47 PM PST, Hiroki Sato wrote: >> Jung-uk Kim wrote >> in <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org>: >> >> jk> > I merely try to understand how to unbreak upgrade path for >> 11.2-STABLE workstations >> jk> > with stock sendmail and SSL support that also has many ports >> installed including >> jk> > ports requiring new openssl API. Because buildworld fails and >> upgrade is broken. >> jk> I am also trying to understand your problem. Which port is >> specifically >> jk> requiring new OpenSSL API for you? >> >> The problem eugen@ is trying to explain is (correct me if this is >> wrong): >> >> 1. One needs to install OpenSSL from ports if she wants to install >> software which depends on it. deskutils/nextcloudclient, for >> example. Setting DEFAILT_VERSION+=ssl=openssl is strongly >> recommended in this case for consistency. >> >> 2. Handbook says enabling SMTP AUTH requires the following in >> make.conf: >> >> SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL >> SENDMAIL_LDFLAGS=-L/usr/local/lib >> SENDMAIL_LDADD=-lsasl2 >> >> However, this variables make the buildworld target to pick up >> OpenSSL from ports if installed, not from base, in the middle of >> building sendmail. "make buildworld" will always fail. There is >> no way to avoid OpenSSL from ports if she wants software such as >> deskutils/nextcloudclient. >> >> This build breakage occurs with sendmail + openssl from ports, not >> related to cyrus-sasl2. A shlib mismatch between sendmail and >> cyrus-sasl2 in terms of OpenSSL library is another issue. >> >> I think there are several workaround, but the primary problem is that >> people can get confused with instructions in the handbook. I suggest >> to update the handbook: >> >> a) If you do not have security/openssl on your system, set the >> following in make.conf and rebuilt the world: >> >> SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL >> SENDMAIL_LDFLAGS=-L/usr/local/lib >> SENDMAIL_LDADD=-lsasl2 >> >> b) If you have security/openssl, sendmail in the base system does not >> support SMTP AUTH because of incompatibility with the newer >> versions of OpenSSL. Use mail/sendmail from ports. >> >> I still feel that b) is sub-optimal, but it would be too complex to >> make them coexist with each other. The attached patch and putting >> SASLBASEDIR=/usr/local into /etc/make.conf instead of the SENDMAIL_* >> variables should mitigate the first problem but if >> security/cyrus-sasl2 was built with OpenSSL from ports, the shlib >> mismatch still occurs. >> >> -- Hiroki > > Buildworld should only use libraries in /usr/obj. I've found and fixed these in ntp, Heimdal and amd. Base sendmail build shouldn't use installed libraries or headers. > > The implications are obvious. While that rule is true in general, the SMTP AUTH bits for base sendmail have always been a special case like this. I switched to postfix several years ago, but prior to that I was doing the same thing on my mail server. I think hrs' new text for the handbook is probably the right answer. -- John Baldwin From owner-svn-src-head@freebsd.org Tue Mar 3 17:10:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3743255D3B for ; Tue, 3 Mar 2020 17:10:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X3SH3FTfz4P8x; Tue, 3 Mar 2020 17:10:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 446F68601; Tue, 3 Mar 2020 17:10:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: Eugene Grosbein , Jung-uk Kim , Hiroki Sato Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <489d09c9-f0b4-f7b1-6255-51bdeb19b740@FreeBSD.org> Date: Tue, 3 Mar 2020 09:10:53 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 17:10:55 -0000 On 3/3/20 6:56 AM, Eugene Grosbein wrote: > 03.03.2020 21:44, Jung-uk Kim wrote: > >> No, you'll have the same linker failure. > > Then what's the reason of the failure? We have to fix it for stable/11 users, too. It can't be fixed, and even if you are on stable/12, it would be a problem if you had openssl 3.0 installed as '/usr/local/lib/libssl.so'. The sendmail SASL thing for base is a bit of a hack, and it can only ever work in certain cases. When the handbook text was first written we didn't have an OpenSSL in ports that would conflict, so it didn't document the caveat we now have. -- John Baldwin From owner-svn-src-head@freebsd.org Tue Mar 3 17:35:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C32DC256AC0; Tue, 3 Mar 2020 17:35:18 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X40P0P2Mz4KVN; Tue, 3 Mar 2020 17:35:16 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4583F8CA3; Tue, 3 Mar 2020 17:35:16 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023HZF2E025264; Tue, 3 Mar 2020 17:35:15 GMT (envelope-from olivier@FreeBSD.org) Received: (from olivier@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023HZFcW025263; Tue, 3 Mar 2020 17:35:15 GMT (envelope-from olivier@FreeBSD.org) Message-Id: <202003031735.023HZFcW025263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: olivier set sender to olivier@FreeBSD.org using -f From: Olivier Cochard Date: Tue, 3 Mar 2020 17:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358589 - head/tests/sys/net X-SVN-Group: head X-SVN-Commit-Author: olivier X-SVN-Commit-Paths: head/tests/sys/net X-SVN-Commit-Revision: 358589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 17:35:18 -0000 Author: olivier (ports committer) Date: Tue Mar 3 17:35:15 2020 New Revision: 358589 URL: https://svnweb.freebsd.org/changeset/base/358589 Log: Skip if_epair regression test if module doesn't exist Approved by: kp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D23876 Modified: head/tests/sys/net/Makefile head/tests/sys/net/if_epair.c Modified: head/tests/sys/net/Makefile ============================================================================== --- head/tests/sys/net/Makefile Tue Mar 3 17:30:13 2020 (r358588) +++ head/tests/sys/net/Makefile Tue Mar 3 17:35:15 2020 (r358589) @@ -22,6 +22,8 @@ TEST_METADATA+= is_exclusive=true MAN= PROGS+= randsleep +CFLAGS+= -I${.CURDIR:H:H} + WARNS?= 6 .include Modified: head/tests/sys/net/if_epair.c ============================================================================== --- head/tests/sys/net/if_epair.c Tue Mar 3 17:30:13 2020 (r358588) +++ head/tests/sys/net/if_epair.c Tue Mar 3 17:35:15 2020 (r358589) @@ -40,6 +40,7 @@ #include #include +#include "freebsd_test_suite/macros.h" ATF_TC(params); ATF_TC_HEAD(params, tc) @@ -52,9 +53,8 @@ ATF_TC_BODY(params, tc) struct ifreq ifr; int s; - s = kldload("if_epair"); - if (s == -1 && errno != EEXIST) - atf_tc_fail("Failed to load if_epair"); + kldload("if_epair"); + ATF_REQUIRE_KERNEL_MODULE("if_epair"); s = socket(AF_INET, SOCK_DGRAM, 0); if (s < 0) From owner-svn-src-head@freebsd.org Tue Mar 3 17:40:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CFB2256EB2; Tue, 3 Mar 2020 17:40:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X46Q3dwxz4Qmm; Tue, 3 Mar 2020 17:40:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BE5A8CC1; Tue, 3 Mar 2020 17:40:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023HeUIJ025566; Tue, 3 Mar 2020 17:40:30 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023HeUbL025565; Tue, 3 Mar 2020 17:40:30 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003031740.023HeUbL025565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 3 Mar 2020 17:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358590 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 17:40:31 -0000 Author: imp Date: Tue Mar 3 17:40:29 2020 New Revision: 358590 URL: https://svnweb.freebsd.org/changeset/base/358590 Log: Get rid of silly /* FALLTHROUGH */ lines Consistently omit /* FALLTHROUGH */ when we have a case statement that does nothing. Since compilers don't warn about stacked case statements, and we were inconsistent, resolve by removing extras. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Mar 3 17:35:15 2020 (r358589) +++ head/sys/cam/cam_xpt.c Tue Mar 3 17:40:29 2020 (r358590) @@ -2686,11 +2686,8 @@ xpt_action_default(union ccb *start_ccb) start_ccb->ataio.resid = 0; /* FALLTHROUGH */ case XPT_NVME_IO: - /* FALLTHROUGH */ case XPT_NVME_ADMIN: - /* FALLTHROUGH */ case XPT_MMC_IO: - /* FALLTHROUGH */ case XPT_RESET_DEV: case XPT_ENG_EXEC: case XPT_SMP_IO: From owner-svn-src-head@freebsd.org Tue Mar 3 18:05:12 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F0F8257A56; Tue, 3 Mar 2020 18:05:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X4fw1R5pz4KYw; Tue, 3 Mar 2020 18:05:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A9839247; Tue, 3 Mar 2020 18:05:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023I5C4S042977; Tue, 3 Mar 2020 18:05:12 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023I5BIP042976; Tue, 3 Mar 2020 18:05:11 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003031805.023I5BIP042976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 3 Mar 2020 18:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358592 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 358592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 18:05:12 -0000 Author: brooks Date: Tue Mar 3 18:05:11 2020 New Revision: 358592 URL: https://svnweb.freebsd.org/changeset/base/358592 Log: Expose ifr_buffer_get_(buffer|length) outside if.c. This is a preparatory commit for D23933. Reviewed by: jhb Modified: head/sys/net/if.c head/sys/net/if_var.h Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Mar 3 18:01:03 2020 (r358591) +++ head/sys/net/if.c Tue Mar 3 18:05:11 2020 (r358592) @@ -2414,7 +2414,7 @@ ifunit(const char *name) return (ifp); } -static void * +void * ifr_buffer_get_buffer(void *data) { union ifreq_union *ifrup; @@ -2442,7 +2442,7 @@ ifr_buffer_set_buffer_null(void *data) ifrup->ifr.ifr_ifru.ifru_buffer.buffer = NULL; } -static size_t +size_t ifr_buffer_get_length(void *data) { union ifreq_union *ifrup; Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Mar 3 18:01:03 2020 (r358591) +++ head/sys/net/if_var.h Tue Mar 3 18:05:11 2020 (r358592) @@ -784,6 +784,8 @@ int if_hw_tsomax_update(if_t ifp, struct ifnet_hw_tsom /* accessors for struct ifreq */ void *ifr_data_get_ptr(void *ifrp); +void *ifr_buffer_get_buffer(void *data); +size_t ifr_buffer_get_length(void *data); int ifhwioctl(u_long, struct ifnet *, caddr_t, struct thread *); From owner-svn-src-head@freebsd.org Tue Mar 3 18:58:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AFF025949C; Tue, 3 Mar 2020 18:58:44 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X5rg70Pmz3x18; Tue, 3 Mar 2020 18:58:43 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D28449C86; Tue, 3 Mar 2020 18:58:43 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023Iwhek078309; Tue, 3 Mar 2020 18:58:43 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023IwhVT078308; Tue, 3 Mar 2020 18:58:43 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003031858.023IwhVT078308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 3 Mar 2020 18:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358593 - head/sys/dev/mxge X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/dev/mxge X-SVN-Commit-Revision: 358593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 18:58:44 -0000 Author: brooks Date: Tue Mar 3 18:58:43 2020 New Revision: 358593 URL: https://svnweb.freebsd.org/changeset/base/358593 Log: Use ifr_data_get_ptr() consistently. Modified: head/sys/dev/mxge/if_mxge.c Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Tue Mar 3 18:05:11 2020 (r358592) +++ head/sys/dev/mxge/if_mxge.c Tue Mar 3 18:58:43 2020 (r358593) @@ -4326,7 +4326,7 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t err = mxge_fetch_i2c(sc, &i2c); mtx_unlock(&sc->driver_mtx); if (err == 0) - err = copyout(&i2c, ifr->ifr_ifru.ifru_data, + err = copyout(&i2c, ifr_data_get_ptr(ifr), sizeof(i2c)); break; default: From owner-svn-src-head@freebsd.org Tue Mar 3 22:14:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40EC925D19F; Tue, 3 Mar 2020 22:14:25 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XBBS6S2bz45cR; Tue, 3 Mar 2020 22:14:24 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97636C2AC; Tue, 3 Mar 2020 22:14:24 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023MEOPY096909; Tue, 3 Mar 2020 22:14:24 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023MEOc4096908; Tue, 3 Mar 2020 22:14:24 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <202003032214.023MEOc4096908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 3 Mar 2020 22:14:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358594 - head/sbin/dumpon X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sbin/dumpon X-SVN-Commit-Revision: 358594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 22:14:25 -0000 Author: vangyzen Date: Tue Mar 3 22:14:23 2020 New Revision: 358594 URL: https://svnweb.freebsd.org/changeset/base/358594 Log: dumpon: skip size check if using zstd As with gzip, let the dump device be smaller than physical memory when using zstd and full dumps. Also print the error message if the size check fails, even if -v is not specified. Failing silently is not friendly. Reviewed by: cem markj MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D23923 Modified: head/sbin/dumpon/dumpon.c Modified: head/sbin/dumpon/dumpon.c ============================================================================== --- head/sbin/dumpon/dumpon.c Tue Mar 3 18:58:43 2020 (r358593) +++ head/sbin/dumpon/dumpon.c Tue Mar 3 22:14:23 2020 (r358594) @@ -203,11 +203,8 @@ check_size(int fd, const char *fn) err(EX_OSERR, "can't get memory size"); if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) != 0) err(EX_OSERR, "%s: can't get size", fn); - if ((uintmax_t)mediasize < (uintmax_t)physmem) { - if (verbose) - printf("%s is smaller than physical memory\n", fn); - exit(EX_IOERR); - } + if ((uintmax_t)mediasize < (uintmax_t)physmem) + errx(EX_IOERR, "%s is smaller than physical memory", fn); } #ifdef HAVE_CRYPTO @@ -495,7 +492,7 @@ main(int argc, char *argv[]) usage(); fd = opendumpdev(dev, dumpdev); - if (!netdump && !gzip && !rflag) + if (!netdump && !gzip && !zstd && !rflag) check_size(fd, dumpdev); kdap = &ndconf; From owner-svn-src-head@freebsd.org Tue Mar 3 22:23:57 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84FB125D6AC; Tue, 3 Mar 2020 22:23:57 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XBPT12Q6z4JG9; Tue, 3 Mar 2020 22:23:57 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B098C49D; Tue, 3 Mar 2020 22:23:57 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023MNuQP002959; Tue, 3 Mar 2020 22:23:56 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023MNuvX002958; Tue, 3 Mar 2020 22:23:56 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003032223.023MNuvX002958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 3 Mar 2020 22:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358595 - head/sys/dev/ismt X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/ismt X-SVN-Commit-Revision: 358595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 22:23:57 -0000 Author: jhibbits Date: Tue Mar 3 22:23:56 2020 New Revision: 358595 URL: https://svnweb.freebsd.org/changeset/base/358595 Log: Add Atom C3000 (Denverton) SMT PCI ID MFC after: 3 days Sponsored by: Juniper Networks, Inc Modified: head/sys/dev/ismt/ismt.c Modified: head/sys/dev/ismt/ismt.c ============================================================================== --- head/sys/dev/ismt/ismt.c Tue Mar 3 22:14:23 2020 (r358594) +++ head/sys/dev/ismt/ismt.c Tue Mar 3 22:23:56 2020 (r358595) @@ -717,6 +717,7 @@ fail: #define ID_INTEL_S1200_SMT0 0x0c598086 #define ID_INTEL_S1200_SMT1 0x0c5a8086 #define ID_INTEL_C2000_SMT 0x1f158086 +#define ID_INTEL_C3000_SMT 0x19ac8086 static int ismt_probe(device_t dev) @@ -732,6 +733,9 @@ ismt_probe(device_t dev) break; case ID_INTEL_C2000_SMT: desc = "Atom Processor C2000 SMBus 2.0"; + break; + case ID_INTEL_C3000_SMT: + desc = "Atom Processor C3000 SMBus 2.0"; break; default: return (ENXIO); From owner-svn-src-head@freebsd.org Tue Mar 3 23:15:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7D5B25E27A; Tue, 3 Mar 2020 23:15:31 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XCXz2ZSLz40vY; Tue, 3 Mar 2020 23:15:31 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F3D4CDB2; Tue, 3 Mar 2020 23:15:31 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023NFUOM033017; Tue, 3 Mar 2020 23:15:30 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023NFUIP033016; Tue, 3 Mar 2020 23:15:30 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202003032315.023NFUIP033016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 3 Mar 2020 23:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358596 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 23:15:31 -0000 Author: cem Date: Tue Mar 3 23:15:30 2020 New Revision: 358596 URL: https://svnweb.freebsd.org/changeset/base/358596 Log: sys/signalvar.h: Fix opposite boolean sense in comment Correct the sense of the comment describing sigsetmasked() to match the code. It was exactly backwards. While here, convert the type/values of the predicate from pre-C99 int/1/0 to bool/true/false. No functional change. Modified: head/sys/sys/signalvar.h Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Tue Mar 3 22:23:56 2020 (r358595) +++ head/sys/sys/signalvar.h Tue Mar 3 23:15:30 2020 (r358596) @@ -282,20 +282,20 @@ extern bool sigfastblock_fetch_always; (!SIGISEMPTY((td)->td_proc->p_siglist) && \ !sigsetmasked(&(td)->td_proc->p_siglist, &(td)->td_sigmask))) /* - * Return the value of the pseudo-expression ((*set & ~*mask) != 0). This + * Return the value of the pseudo-expression ((*set & ~*mask) == 0). This * is an optimized version of SIGISEMPTY() on a temporary variable * containing SIGSETNAND(*set, *mask). */ -static __inline int +static __inline bool sigsetmasked(sigset_t *set, sigset_t *mask) { int i; for (i = 0; i < _SIG_WORDS; i++) { if (set->__bits[i] & ~mask->__bits[i]) - return (0); + return (false); } - return (1); + return (true); } #define ksiginfo_init(ksi) \ From owner-svn-src-head@freebsd.org Wed Mar 4 00:22:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F27B925F6E1; Wed, 4 Mar 2020 00:22:51 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XF2g3yBFz3ytv; Wed, 4 Mar 2020 00:22:51 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50A23DA98; Wed, 4 Mar 2020 00:22:51 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0240Mp5G074187; Wed, 4 Mar 2020 00:22:51 GMT (envelope-from chs@FreeBSD.org) Received: (from chs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0240Mpm6074186; Wed, 4 Mar 2020 00:22:51 GMT (envelope-from chs@FreeBSD.org) Message-Id: <202003040022.0240Mpm6074186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chs set sender to chs@FreeBSD.org using -f From: Chuck Silvers Date: Wed, 4 Mar 2020 00:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358597 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: chs X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 00:22:52 -0000 Author: chs Date: Wed Mar 4 00:22:50 2020 New Revision: 358597 URL: https://svnweb.freebsd.org/changeset/base/358597 Log: if vm_pager_get_pages_async() returns an error, release the sfio->nios refcount that we took earlier that represents the I/O that ended up not being started. Reviewed by: glebius Approved by: imp (mentor) Sponsored by: Netflix Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Tue Mar 3 23:15:30 2020 (r358596) +++ head/sys/kern/kern_sendfile.c Wed Mar 4 00:22:50 2020 (r358597) @@ -454,6 +454,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i __func__, pa, j)); vm_page_unwire(pa[j], PQ_INACTIVE); } + refcount_release(&sfio->nios); return (EIO); } From owner-svn-src-head@freebsd.org Wed Mar 4 01:56:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B0CA2616C2 for ; Wed, 4 Mar 2020 01:56:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XH6R5PKfz3PYP for ; Wed, 4 Mar 2020 01:56:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2a.google.com with SMTP id m2so101352qvu.13 for ; Tue, 03 Mar 2020 17:56:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Hf6gsG4xjkVc4NP/m/dsrcvp0SifAiHYNnXcICVRTko=; b=EsyOVZYZ8GHlu07edYt47RnwSNftIANMy8kw5gITz87xkC3/haxOArf7OOUxTP0c1y lPuWGMCvwkfjJdR+AwxkEFD0rzwDbeKaiauvEKyHntCmKXyyaprZNqyFvkWgwgtu/joD CMmm43v202UtehJ1l33JYLENM6paKJjgQaY0t38AY1GOdgA2OnzTc/s2uuz2VgW9UydL WzOyKT/RzY9TcjkAYPn/z5SY5741weV6DiKHZhuJ2Bg1MEGz8d3AnDLnmRDBSgr4626X GVQt0OeChy6oCftwyWVVQzNLBXFf2GRERdnVt1WDHoCvys80soxSsGjIUCPduYdBqSvN asVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Hf6gsG4xjkVc4NP/m/dsrcvp0SifAiHYNnXcICVRTko=; b=ZXgOZQhnBOs98/EoICpoJzxEwOnpy2MIpJBaZvKh39jboAXknGI64GaTFwuRU15mt/ xIXJ3aJ3QfEx+1h9PXgvqDUtBVzotRKVMctXIb1qx6f1CmI2uFVmeyrsK8QKEzll19c/ 0sxAhy7Lh6j3A/LPse8s1kcnmvKYnAf2cHrFgJiR4I4Jy5rKOHwSQyPQLcPnfGs4ceA3 Kb+LbP14bkHltrUFcx+108TI8LNMECJ9V17oZZa0uAHQ49cZfdfrhSGLsx8N7TvKjndA g7kmem+rGbHLPqyYw2cTMYAN9XOGZkxvT07wwxRQkjUBH+hyBbTfbuXzrw3aLAlEQL+0 JGqg== X-Gm-Message-State: ANhLgQ3o+tvyPyeHt1oRBvm1Mc0Nql0k+9wgsNKhWSCn6VlUUTc0XnN9 BIMxTldNTcLfLFhQsuaEgS8zj0dNzamVHP08sF3gGw== X-Google-Smtp-Source: ADFU+vvJZDTqE/1m7gj2Cofddfoiaf15eWAUB1rk9SFLAi/a+EH15jJcFQf5pNn0/HYkjR3Lie9Cg8k/z+eBCHcDEyk= X-Received: by 2002:ad4:4e88:: with SMTP id dy8mr343652qvb.118.1583286974349; Tue, 03 Mar 2020 17:56:14 -0800 (PST) MIME-Version: 1.0 References: <202003011727.021HRU5G076569@repo.freebsd.org> <81a089ea-d8a4-9f4b-dc24-3a7bd7e4cbba@FreeBSD.org> In-Reply-To: <81a089ea-d8a4-9f4b-dc24-3a7bd7e4cbba@FreeBSD.org> From: Warner Losh Date: Tue, 3 Mar 2020 18:56:03 -0700 Message-ID: Subject: Re: svn commit: r358486 - head/sys/dev/bce To: John Baldwin Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48XH6R5PKfz3PYP X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=EsyOVZYZ; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2a) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.66 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[a.2.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-1.67)[ip: (-4.77), ipnet: 2607:f8b0::/32(-1.86), asn: 15169(-1.66), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 01:56:18 -0000 On Mon, Mar 2, 2020 at 3:06 PM John Baldwin wrote: > On 3/1/20 9:27 AM, Warner Losh wrote: > > Author: imp > > Date: Sun Mar 1 17:27:30 2020 > > New Revision: 358486 > > URL: https://svnweb.freebsd.org/changeset/base/358486 > > > > Log: > > Remove all the compatibility hacks for systems that predate FreeBSD 8. > Some of > > these look to be cut and pasted from other drivers since this driver > was > > committed to FreeBSD 7-current and MFC'd to FreeBSD 6. The ones for > FreeBSD 4 > > and 5 likely never were working... > > You'd be surprised. I had to backport this to 4.x for Y!BSD, so I do > suspect > the 4.x bits worked fine. Good to clean out the cruft regardless. > The more you know... the more you think a good stiff drink is in order :) Warner From owner-svn-src-head@freebsd.org Wed Mar 4 09:08:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2924F269883; Wed, 4 Mar 2020 09:08:39 +0000 (UTC) (envelope-from gbergling@gmail.com) Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XSjF62p9z4Yx1; Wed, 4 Mar 2020 09:08:32 +0000 (UTC) (envelope-from gbergling@gmail.com) Received: by mail-wm1-x330.google.com with SMTP id i9so1049374wml.4; Wed, 04 Mar 2020 01:08:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=KbhrU8NwVdY6XeMpYwt5Tuk/RTW9DAth3K7KtOkb53Y=; b=EvOkz6omIIWil0eUFVpqu/2cKarAeAPrHAC6JfM0KnFHaU41A7g8T1jYjlW2Iue3M3 gbalFjPIybrsgg8l/ohU4YiHDQbyXcQnFB+JcJQS9u6WjugZBbXu5Vr7kf25dpXL1u7G IMIQ8rS5+bwqKdd68FtkHpK9oIOAfkMrEmmrUcv3c9F+vDaNGx+dV8Pjjvv7+L/0o9Hy Ef4aE9PhOiCHmqx52gUaYp34jvdQerOowh+HmOp9dyZMHSYpxBW7cXpodj1ndkiwtEJJ 6PhxY2KKVvXexYfcPn6wMWPvqIb4XcqmL8w80XxRA2/AMsHc4bTWqzNFpsEioIWkMUc7 yVVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=KbhrU8NwVdY6XeMpYwt5Tuk/RTW9DAth3K7KtOkb53Y=; b=Xf1hqfhZ2pjYlRUO7ghSgYZp9dKR20zeBojXi3w7RZ+NFyUuYF6XeRy9LkEPnrALFz D3rn27DpCMoN/J966tRfBSW5WljaVDdEvg2jw0tuv9ww6nBM/w7GVR0u0tlrk3Czqm9i zyP7Tv3vkYy+rCIU03aCOdB6q/I4viZVx6U6j6NXpPQX066XhesVjZoS9MDwLEnzjNN6 eGLZIv9i9w2bmS7SS6XZ/Wbk1KjkoXltxPvI6tPzSOZYg1tufH2z2yJ0HQ5y1a11t6a3 zy+ko+8U6QDDkciWp03fDeVQpwVsOBfEzxFCkzjFPXEenDtRMak7i1y1WWiy2XlU7u3I tWqQ== X-Gm-Message-State: ANhLgQ2Sz4j2WCihZWLy5cymGB5sRAaktC44pDEV68bUWMUYAzpkAP1e W296KJLP9/6Ctlv+ADzBN5vYJn8tRh4= X-Google-Smtp-Source: ADFU+vswZLgItXPMNQ3DJ0bcrcUbtu7e01eRed3AVUbDsmm+k8ZILvzzcnCVK/rDBVp+ITD5qimBCA== X-Received: by 2002:a1c:4e03:: with SMTP id g3mr2624325wmh.22.1583312909011; Wed, 04 Mar 2020 01:08:29 -0800 (PST) Received: from [10.0.1.111] (p4FD3AF8F.dip0.t-ipconnect.de. [79.211.175.143]) by smtp.gmail.com with ESMTPSA id n13sm3127002wmd.21.2020.03.04.01.08.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2020 01:08:27 -0800 (PST) From: Gordon Bergling Message-Id: Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358562 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... Date: Wed, 4 Mar 2020 10:08:25 +0100 In-Reply-To: <202003030020.0230K9h2002380@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Conrad Meyer References: <202003030020.0230K9h2002380@repo.freebsd.org> X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48XSjF62p9z4Yx1 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=EvOkz6om; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gbergling@gmail.com designates 2a00:1450:4864:20::330 as permitted sender) smtp.mailfrom=gbergling@gmail.com X-Spamd-Result: default: False [-1.49 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; URI_COUNT_ODD(1.00)[19]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.11), ipnet: 2a00:1450::/32(-2.40), asn: 15169(-1.66), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[0.3.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 09:08:39 -0000 Thanks for the revert. I handcrafted https://reviews.freebsd.org/D23581 = a while ago, and this took me two = days. Gordon > Am 03.03.2020 um 01:20 schrieb Conrad Meyer : >=20 > Author: cem > Date: Tue Mar 3 00:20:08 2020 > New Revision: 358562 > URL: https://svnweb.freebsd.org/changeset/base/358562 >=20 > Log: > Add extremely useful calendar(1) application to FreeBSD >=20 > It does extremely useful things like execute sendmail and spew = dubiously > accurate factoids. >=20 > =46rom the feedback, it seems like it is an essential utility in a = modern unix > and not at all a useless bikeshed. How do those Linux people live = without it? > Reverts r358561. >=20 > Added: > head/tools/build/options/WITHOUT_CALENDAR > - copied unchanged from r358560, = head/tools/build/options/WITHOUT_CALENDAR > head/usr.bin/calendar/Makefile > - copied unchanged from r358560, head/usr.bin/calendar/Makefile > head/usr.bin/calendar/Makefile.depend > - copied unchanged from r358560, = head/usr.bin/calendar/Makefile.depend > head/usr.bin/calendar/calendar.1 > - copied unchanged from r358560, head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/calendar.c > - copied unchanged from r358560, head/usr.bin/calendar/calendar.c > head/usr.bin/calendar/calendar.h > - copied unchanged from r358560, head/usr.bin/calendar/calendar.h > head/usr.bin/calendar/calendars/calendar.all > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.all > head/usr.bin/calendar/calendars/calendar.australia > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.australia > head/usr.bin/calendar/calendars/calendar.birthday > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.birthday > head/usr.bin/calendar/calendars/calendar.brazilian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.brazilian > head/usr.bin/calendar/calendars/calendar.christian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.christian > head/usr.bin/calendar/calendars/calendar.computer > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.computer > head/usr.bin/calendar/calendars/calendar.croatian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.croatian > head/usr.bin/calendar/calendars/calendar.dutch > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.dutch > head/usr.bin/calendar/calendars/calendar.french > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.french > head/usr.bin/calendar/calendars/calendar.german > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.german > head/usr.bin/calendar/calendars/calendar.history > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.history > head/usr.bin/calendar/calendars/calendar.holiday > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.holiday > head/usr.bin/calendar/calendars/calendar.hungarian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.hungarian > head/usr.bin/calendar/calendars/calendar.judaic > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.judaic > head/usr.bin/calendar/calendars/calendar.lotr > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.lotr > head/usr.bin/calendar/calendars/calendar.music > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.music > head/usr.bin/calendar/calendars/calendar.newzealand > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.newzealand > head/usr.bin/calendar/calendars/calendar.russian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.russian > head/usr.bin/calendar/calendars/calendar.southafrica > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.southafrica > head/usr.bin/calendar/calendars/calendar.ukrainian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.ukrainian > head/usr.bin/calendar/calendars/calendar.usholiday > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.usholiday > head/usr.bin/calendar/calendars/calendar.world > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.world > head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > - copied from r358560, = head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > - copied from r358560, = head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > - copied from r358560, = head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > - copied from r358560, = head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > - copied from r358560, = head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > - copied from r358560, = head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > - copied from r358560, = head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > - copied from r358560, = head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > - copied from r358560, = head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > - copied from r358560, = head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > head/usr.bin/calendar/dates.c > - copied unchanged from r358560, head/usr.bin/calendar/dates.c > head/usr.bin/calendar/day.c > - copied unchanged from r358560, head/usr.bin/calendar/day.c > head/usr.bin/calendar/events.c > - copied unchanged from r358560, head/usr.bin/calendar/events.c > head/usr.bin/calendar/io.c > - copied unchanged from r358560, head/usr.bin/calendar/io.c > head/usr.bin/calendar/locale.c > - copied unchanged from r358560, head/usr.bin/calendar/locale.c > head/usr.bin/calendar/ostern.c > - copied unchanged from r358560, head/usr.bin/calendar/ostern.c > head/usr.bin/calendar/parsedata.c > - copied unchanged from r358560, head/usr.bin/calendar/parsedata.c > head/usr.bin/calendar/paskha.c > - copied unchanged from r358560, head/usr.bin/calendar/paskha.c > head/usr.bin/calendar/pathnames.h > - copied unchanged from r358560, head/usr.bin/calendar/pathnames.h > head/usr.bin/calendar/pom.c > - copied unchanged from r358560, head/usr.bin/calendar/pom.c > head/usr.bin/calendar/sunpos.c > - copied unchanged from r358560, head/usr.bin/calendar/sunpos.c > head/usr.bin/calendar/tests/ > - copied from r358560, head/usr.bin/calendar/tests/ > head/usr.sbin/periodic/etc/daily/300.calendar > - copied unchanged from r358560, = head/usr.sbin/periodic/etc/daily/300.calendar > Modified: > head/ObsoleteFiles.inc > head/share/man/man5/periodic.conf.5 > head/share/man/man5/src.conf.5 > head/share/man/man7/hier.7 > head/tools/tools/nanobsd/dhcpd/common > head/tools/tools/nanobsd/embedded/common > head/usr.bin/Makefile > head/usr.bin/leave/leave.1 > head/usr.sbin/periodic/etc/daily/Makefile > head/usr.sbin/periodic/periodic.conf >=20 > Modified: head/ObsoleteFiles.inc > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/ObsoleteFiles.inc Tue Mar 3 00:20:08 2020 = (r358562) > @@ -36,11 +36,6 @@ > # xargs -n1 | sort | uniq -d; > # done >=20 > -# 20200302: calendar(1) removed > -OLD_DIRS+=3Dusr/share/calendar > -OLD_FILES+=3Dusr/bin/calendar > -OLD_FILES+=3Dusr/share/man/man1/calendar.1.gz > - > # 20200301: bktr removed > OLD_DIRS+=3Dusr/include/dev/bktr > OLD_FILES+=3Dusr/include/dev/bktr/ioctl_bktr.h >=20 > Modified: head/share/man/man5/periodic.conf.5 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/share/man/man5/periodic.conf.5 Tue Mar 3 00:20:08 2020 = (r358562) > @@ -273,6 +273,13 @@ Set to > if you want the > .Pa /etc/mail/aliases > file backed up and modifications to be displayed in your daily output. > +.It Va daily_calendar_enable > +.Pq Vt bool > +Set to > +.Dq Li YES > +if you want to run > +.Nm calendar Fl a > +daily. > .It Va daily_accounting_enable > .Pq Vt bool > Set to > @@ -963,6 +970,7 @@ is shared or distributed. > .El > .Sh SEE ALSO > .Xr apropos 1 , > +.Xr calendar 1 , > .Xr df 1 , > .Xr diff 1 , > .Xr gzip 1 , >=20 > Modified: head/share/man/man5/src.conf.5 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/share/man/man5/src.conf.5 Tue Mar 3 00:20:08 2020 = (r358562) > @@ -271,6 +271,9 @@ is set explicitly) > .El > .It Va WITHOUT_BZIP2_SUPPORT > Set to build some programs without optional bzip2 support. > +.It Va WITHOUT_CALENDAR > +Set to not build > +.Xr calendar 1 . > .It Va WITHOUT_CAPSICUM > Set to not build Capsicum support into system programs. > When set, it enforces these options: >=20 > Modified: head/share/man/man7/hier.7 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/share/man/man7/hier.7 Tue Mar 3 00:20:08 2020 = (r358562) > @@ -442,6 +442,10 @@ system daemons & system utilities (executed by = users) > architecture-independent files > .Pp > .Bl -tag -width Fl -compact > +.It Pa calendar/ > +a variety of pre-fab calendar files; > +see > +.Xr calendar 1 > .It Pa dict/ > word lists; > see >=20 > Copied: head/tools/build/options/WITHOUT_CALENDAR (from r358560, = head/tools/build/options/WITHOUT_CALENDAR) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/build/options/WITHOUT_CALENDAR Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/tools/build/options/WITHOUT_CALENDAR) > @@ -0,0 +1,3 @@ > +.\" $FreeBSD$ > +Set to not build > +.Xr calendar 1 . >=20 > Modified: head/tools/tools/nanobsd/dhcpd/common > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/tools/tools/nanobsd/dhcpd/common Tue Mar 3 00:20:08 2020 = (r358562) > @@ -104,6 +104,7 @@ WITHOUT_ACPI=3Dtrue > WITHOUT_ATM=3Dtrue > WITHOUT_AUDIT=3Dtrue > WITHOUT_BLUETOOTH=3Dtrue > +WITHOUT_CALENDAR=3Dtrue > WITHOUT_DICT=3Dtrue > WITHOUT_EXAMPLES=3Dtrue > WITHOUT_GAMES=3Dtrue >=20 > Modified: head/tools/tools/nanobsd/embedded/common > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/tools/tools/nanobsd/embedded/common Tue Mar 3 00:20:08 2020 = (r358562) > @@ -135,6 +135,7 @@ WITHOUT_ACPI=3Dtrue > WITHOUT_ATM=3Dtrue > WITHOUT_AUDIT=3Dtrue > WITHOUT_BLUETOOTH=3Dtrue > +WITHOUT_CALENDAR=3Dtrue > WITHOUT_DICT=3Dtrue > WITHOUT_EXAMPLES=3Dtrue > WITHOUT_GAMES=3Dtrue >=20 > Modified: head/usr.bin/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/usr.bin/Makefile Tue Mar 3 00:20:08 2020 = (r358562) > @@ -195,6 +195,7 @@ SUBDIR.${MK_AT}+=3D at > SUBDIR.${MK_ATM}+=3D atm > SUBDIR.${MK_BLUETOOTH}+=3D bluetooth > SUBDIR.${MK_BSD_CPIO}+=3D cpio > +SUBDIR.${MK_CALENDAR}+=3D calendar > SUBDIR.${MK_CLANG}+=3D clang > SUBDIR.${MK_DIALOG}+=3D dpv > SUBDIR.${MK_EE}+=3D ee >=20 > Copied: head/usr.bin/calendar/Makefile (from r358560, = head/usr.bin/calendar/Makefile) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/calendar/Makefile Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/usr.bin/calendar/Makefile) > @@ -0,0 +1,117 @@ > +# @(#)Makefile 8.1 (Berkeley) 6/6/93 > +# $FreeBSD$ > + > +.include > + > +PROG=3D calendar > +SRCS=3D calendar.c locale.c events.c dates.c parsedata.c io.c = day.c \ > + ostern.c paskha.c pom.c sunpos.c > +LIBADD=3D m util > +INTER=3D de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ > + hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \ > + pt_BR.UTF-8 ru_RU.KOI8-R ru_RU.UTF-8 uk_UA.KOI8-U > +DE_LINKS=3D de_DE.ISO8859-15 > +FR_LINKS=3D fr_FR.ISO8859-15 > + > +.if ${MK_ICONV} =3D=3D "yes" > +CFLAGS+=3D -DWITH_ICONV > +.endif > + > +FILESGROUPS+=3D CALS > +CALS=3D calendars/calendar.all \ > + calendars/calendar.australia \ > + calendars/calendar.birthday \ > + calendars/calendar.brazilian \ > + calendars/calendar.christian \ > + calendars/calendar.computer \ > + calendars/calendar.croatian \ > + calendars/calendar.dutch \ > + calendars/calendar.freebsd \ > + calendars/calendar.french \ > + calendars/calendar.german \ > + calendars/calendar.history \ > + calendars/calendar.holiday \ > + calendars/calendar.hungarian \ > + calendars/calendar.judaic \ > + calendars/calendar.lotr \ > + calendars/calendar.music \ > + calendars/calendar.newzealand \ > + calendars/calendar.russian \ > + calendars/calendar.southafrica \ > + calendars/calendar.ukrainian \ > + calendars/calendar.usholiday \ > + calendars/calendar.world > +CALSDIR=3D ${SHAREDIR}/calendar > + > +CAL_de_AT.ISO_8859-15=3D calendar.feiertag > + > +CAL_de_DE.ISO8859-1=3D calendar.all \ > + calendar.feiertag \ > + calendar.geschichte \ > + calendar.kirche \ > + calendar.literatur \ > + calendar.musik \ > + calendar.wissenschaft > + > +CAL_fr_FR.ISO8859-1=3D calendar.all \ > + calendar.fetes \ > + calendar.french \ > + calendar.jferies \ > + calendar.proverbes > + > +CAL_hr_HR.ISO8859-2=3D calendar.all \ > + calendar.praznici > + > +CAL_hu_HU.ISO8859-2=3D calendar.all \ > + calendar.nevnapok \ > + calendar.unnepek > + > +CAL_pt_BR.ISO8859-1=3D calendar.all \ > + calendar.commemorative \ > + calendar.holidays \ > + calendar.mcommemorative > + > +CAL_pt_BR.UTF-8=3D calendar.all \ > + calendar.commemorative \ > + calendar.holidays \ > + calendar.mcommemorative > + > +CAL_ru_RU.KOI8-R=3D calendar.all \ > + calendar.common \ > + calendar.holiday \ > + calendar.military \ > + calendar.orthodox \ > + calendar.pagan > + > +CAL_ru_RU.UTF-8=3D calendar.all \ > + calendar.common \ > + calendar.holiday \ > + calendar.military \ > + calendar.orthodox \ > + calendar.pagan > + > +CAL_uk_UA.KOI8-U=3D calendar.all \ > + calendar.holiday \ > + calendar.misc \ > + calendar.orthodox > + > +.for lang in ${INTER} > +FILESGROUPS+=3D CALS_${lang} > +CALS_${lang}DIR=3D ${SHAREDIR}/calendar/${lang} > +.for file in ${CAL_${lang}} > +CALS_${lang}+=3D ${file:S@^@calendars/${lang}/@} > +.endfor > +.endfor > + > + > +.for link in ${DE_LINKS} > +SYMLINKS+=3D de_DE.ISO8859-1 ${SHAREDIR}/calendar/${link} > +.endfor > +.for link in ${FR_LINKS} > +SYMLINKS+=3D fr_FR.ISO8859-1 ${SHAREDIR}/calendar/${link} > +.endfor > + > +HAS_TESTS=3D > +SUBDIR.${MK_TESTS}+=3D tests > + > +.include >=20 > Copied: head/usr.bin/calendar/Makefile.depend (from r358560, = head/usr.bin/calendar/Makefile.depend) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/calendar/Makefile.depend Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/usr.bin/calendar/Makefile.depend) > @@ -0,0 +1,18 @@ > +# $FreeBSD$ > +# Autogenerated - do NOT edit! > + > +DIRDEPS =3D \ > + gnu/lib/csu \ > + include \ > + include/xlocale \ > + lib/${CSU_DIR} \ > + lib/libc \ > + lib/libcompiler_rt \ > + lib/msun \ > + > + > +.include > + > +.if ${DEP_RELDIR} =3D=3D ${_DEP_RELDIR} > +# local dependencies - needed for -jN in clean tree > +.endif >=20 > Copied: head/usr.bin/calendar/calendar.1 (from r358560, = head/usr.bin/calendar/calendar.1) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/calendar/calendar.1 Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/usr.bin/calendar/calendar.1) > @@ -0,0 +1,333 @@ > +.\" Copyright (c) 1989, 1990, 1993 > +.\" The Regents of the University of California. All rights = reserved. > +.\" > +.\" Redistribution and use in source and binary forms, with or = without > +.\" modification, are permitted provided that the following = conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above = copyright > +.\" notice, this list of conditions and the following disclaimer = in the > +.\" documentation and/or other materials provided with the = distribution. > +.\" 3. Neither the name of the University nor the names of its = contributors > +.\" may be used to endorse or promote products derived from this = software > +.\" without specific prior written permission. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS = IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A = PARTICULAR PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE = LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 > +.\" $FreeBSD$ > +.\" > +.Dd July 24, 2016 > +.Dt CALENDAR 1 > +.Os > +.Sh NAME > +.Nm calendar > +.Nd reminder service > +.Sh SYNOPSIS > +.Nm > +.Op Fl A Ar num > +.Op Fl a > +.Op Fl B Ar num > +.Op Fl D Ar moon|sun > +.Op Fl d > +.Op Fl F Ar friday > +.Op Fl f Ar calendarfile > +.Op Fl l Ar longitude > +.Oo > +.Bk -words > +.Fl t Ar dd Ns > +.Sm off > +.Op . Ar mm Op . Ar year > +.Sm on > +.Ek > +.Oc > +.Op Fl U Ar UTC-offset > +.Op Fl W Ar num > +.Sh DESCRIPTION > +The > +.Nm > +utility checks the current directory for a file named > +.Pa calendar > +and displays lines that fall into the specified date range. > +On the day before a weekend (normally Friday), events for the next > +three days are displayed. > +.Pp > +The following options are available: > +.Bl -tag -width Ds > +.It Fl A Ar num > +Print lines from today and the next > +.Ar num > +days (forward, future). > +.It Fl a > +Process the ``calendar'' files of all users and mail the results > +to them. > +This requires super-user privileges. > +.It Fl B Ar num > +Print lines from today and the previous > +.Ar num > +days (backward, past). > +.It Fl D Ar moon|sun > +Print UTC offset, longitude and moon or sun information. > +.It Fl d > +Debug option: print current date information. > +.It Fl F Ar friday > +Specify which day of the week is ``Friday'' (the day before the > +weekend begins). > +Default is 5. > +.It Fl f Pa calendarfile > +Use > +.Pa calendarfile > +as the default calendar file. > +.It Fl l Ar longitude > +Perform lunar and solar calculations from this longitude. > +If neither longitude nor UTC offset is specified, the calculations = will > +be based on the difference between UTC time and localtime. > +If both are specified, UTC offset overrides longitude. > +.It Xo Fl t > +.Sm off > +.Ar dd > +.Op . Ar mm Op . Ar year > +.Sm on > +.Xc > +For test purposes only: set date directly to argument values. > +.It Fl U Ar UTC-offset > +Perform lunar and solar calculations from this UTC offset. > +If neither UTC offset nor longitude is specified, the calculations > +will be based on the difference between UTC time and localtime. > +If both are specified, UTC offset overrides longitude. > +.It Fl W Ar num > +Print lines from today and the next > +.Ar num > +days (forward, future). > +Ignore weekends when calculating the number of days. > +.El > +.Sh FILE FORMAT > +To handle calendars in your national code table you can specify > +.Dq LANG=3D > +in the calendar file as early as possible. > +.Pp > +To handle the local name of sequences, you can specify them as: > +.Dq SEQUENCE=3D > +in the calendar file as early as possible. > +.Pp > +The names of the following special days are recognized: > +.Bl -tag -width 123456789012345 -compact > +.It Easter > +Catholic Easter. > +.It Paskha > +Orthodox Easter. > +.It NewMoon > +The lunar New Moon. > +.It FullMoon > +The lunar Full Moon. > +.It MarEquinox > +The solar equinox in March. > +.It JunSolstice > +The solar solstice in June. > +.It SepEquinox > +The solar equinox in September. > +.It DecSolstice > +The solar solstice in December. > +.It ChineseNewYear > +The first day of the Chinese year. > +.El > +These names may be reassigned to their local names via an assignment > +like > +.Dq Easter=3DPasen > +in the calendar file. > +.Pp > +Other lines should begin with a month and day. > +They may be entered in almost any format, either numeric or as = character > +strings. > +If the proper locale is set, national month and weekday > +names can be used. > +A single asterisk (``*'') matches every month. > +A day without a month matches that day of every week. > +A month without a day matches the first of that month. > +Two numbers default to the month followed by the day. > +Lines with leading tabs default to the last entered date, allowing > +multiple line specifications for a single date. > +.Pp > +The names of the recognized special days may be followed by a > +positive or negative integer, like: > +.Dq Easter+3 > +or > +.Dq Paskha-4 . > +.Pp > +Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for > +last, first, second, third, fourth) for moving events like > +``the last Monday in April''. > +.Pp > +By convention, dates followed by an asterisk are not fixed, i.e., = change > +from year to year. > +.Pp > +Day descriptions start after the first character in the line; > +if the line does not contain a character, it is not displayed. > +If the first character in the line is a character, it is = treated as > +a continuation of the previous line. > +.Pp > +The > +.Nm > +file is preprocessed by a limited subset of > +.Xr cpp 1 > +internally, allowing the inclusion of shared files such as > +lists of company holidays or meetings. > +This limited subset consists of \fB#include #ifndef #endif\fR and = \fB#define\fR. > +If the shared file is not referenced by a full pathname, > +.Xr calendar 1 > +searches in the current (or home) directory first, and then in the > +directory > +.Pa /usr/share/calendar . > +Empty lines and lines protected by the C commenting syntax > +.Pq Li /* ... */ > +are ignored. > +.Pp > +Some possible calendar entries ( characters highlighted by > +\fB\et\fR sequence) > +.Bd -unfilled -offset indent > +LANG=3DC > +Easter=3DOstern > + > +#include > +#include > + > +6/15\fB\et\fRJune 15 (if ambiguous, will default to month/day). > +Jun. 15\fB\et\fRJune 15. > +15 June\fB\et\fRJune 15. > +Thursday\fB\et\fREvery Thursday. > +June\fB\et\fREvery June 1st. > +15 *\fB\et\fR15th of every month. > +2010/4/15\fB\et\fR15 April 2010 > + > +May Sun+2\fB\et\fRsecond Sunday in May (Muttertag) > +04/SunLast\fB\et\fRlast Sunday in April, > +\fB\et\fRsummer time in Europe > +Easter\fB\et\fREaster > +Ostern-2\fB\et\fRGood Friday (2 days before Easter) > +Paskha\fB\et\fROrthodox Easter > + > +.Ed > +.Sh FILES > +.Bl -tag -width calendar.christian -compact > +.It Pa calendar > +file in current directory. > +.It Pa ~/.calendar > +.Pa calendar > +HOME directory. > +A chdir is done into this directory if it exists. > +.It Pa ~/.calendar/calendar > +calendar file to use if no calendar file exists in the current = directory. > +.It Pa ~/.calendar/nomail > +do not send mail if this file exists. > +.El > +.Pp > +The following default calendar files are provided in > +.Pa /usr/share/calendar: > +.Pp > +.Bl -tag -width calendar.southafrica -compact > +.It Pa calendar.all > +File which includes all the default files. > +.It Pa calendar.australia > +Calendar of events in Australia. > +.It Pa calendar.birthday > +Births and deaths of famous (and not-so-famous) people. > +.It Pa calendar.christian > +Christian holidays. > +This calendar should be updated yearly by the local system = administrator > +so that roving holidays are set correctly for the current year. > +.It Pa calendar.computer > +Days of special significance to computer people. > +.It Pa calendar.croatian > +Calendar of events in Croatia. > +.It Pa calendar.dutch > +Calendar of events in the Netherlands. > +.It Pa calendar.freebsd > +Birthdays of > +.Fx > +committers. > +.It Pa calendar.french > +Calendar of events in France. > +.It Pa calendar.german > +Calendar of events in Germany. > +.It Pa calendar.history > +Everything else, mostly U.S.\& historical events. > +.It Pa calendar.holiday > +Other holidays, including the not-well-known, obscure, and > +.Em really > +obscure. > +.It Pa calendar.judaic > +Jewish holidays. > +The entries for this calendar have been obtained from the port > +deskutils/hebcal. > +.It Pa calendar.music > +Musical events, births, and deaths. > +Strongly oriented toward rock 'n' roll. > +.It Pa calendar.newzealand > +Calendar of events in New Zealand. > +.It Pa calendar.russian > +Russian calendar. > +.It Pa calendar.southafrica > +Calendar of events in South Africa. > +.It Pa calendar.usholiday > +U.S.\& holidays. > +This calendar should be updated yearly by the local system = administrator > +so that roving holidays are set correctly for the current year. > +.It Pa calendar.world > +Includes all calendar files except for national files. > +.El > +.Sh COMPATIBILITY > +The > +.Nm > +program previously selected lines which had the correct date anywhere > +in the line. > +This is no longer true, the date is only recognized when it occurs > +at the beginning of a line. > +.Sh SEE ALSO > +.Xr at 1 , > +.Xr mail 1 , > +.Xr cron 8 > +.Sh HISTORY > +A > +.Nm > +command appeared in > +.At v7 . > +.Sh NOTES > +Chinese New Year is calculated at 120 degrees east of Greenwich, > +which roughly corresponds with the east coast of China. > +For people west of China, this might result that the start of Chinese > +New Year and the day of the related new moon might differ. > +.Pp > +The phases of the moon and the longitude of the sun are calculated > +against the local position which corresponds with 30 degrees times > +the time-difference towards Greenwich. > +.Pp > +The new and full moons are happening on the day indicated: They > +might happen in the time period in the early night or in the late > +evening. > +It does not indicate that they are starting in the night on that = date. > +.Pp > +Because of minor differences between the output of the formulas > +used and other sources on the Internet, Druids and Werewolves should > +double-check the start and end time of solar and lunar events. > +.Sh BUGS > +The > +.Nm > +internal cpp does not correctly do #ifndef and will discard the rest > +of the file if a #ifndef is triggered. > +It also has a maximum of 50 include file and/or 100 #defines > +and only recognises #include, #define and > +#ifndef. > +.Pp > +There is no possibility to properly specify the local position > +needed for solar and lunar calculations. >=20 > Copied: head/usr.bin/calendar/calendar.c (from r358560, = head/usr.bin/calendar/calendar.c) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/calendar/calendar.c Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/usr.bin/calendar/calendar.c) > @@ -0,0 +1,258 @@ > +/*- > + * SPDX-License-Identifier: BSD-3-Clause > + * > + * Copyright (c) 1989, 1993, 1994 > + * The Regents of the University of California. All rights = reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above = copyright > + * notice, this list of conditions and the following disclaimer in = the > + * documentation and/or other materials provided with the = distribution. > + * 3. Neither the name of the University nor the names of its = contributors > + * may be used to endorse or promote products derived from this = software > + * without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS = IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE = LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#ifndef lint > +static const char copyright[] =3D > +"@(#) Copyright (c) 1989, 1993\n\ > + The Regents of the University of California. All rights = reserved.\n"; > +#endif > + > +#if 0 > +#ifndef lint > +static char sccsid[] =3D "@(#)calendar.c 8.3 (Berkeley) 3/25/94"; > +#endif > +#endif > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "calendar.h" > + > +#define UTCOFFSET_NOTSET 100 /* Expected between -24 = and +24 */ > +#define LONGITUDE_NOTSET 1000 /* Expected between -360 = and +360 */ > + > +struct passwd *pw; > +int doall =3D 0; > +int debug =3D 0; > +static char *DEBUG =3D NULL; > +static time_t f_time =3D 0; > +double UTCOffset =3D UTCOFFSET_NOTSET; > +int EastLongitude =3D LONGITUDE_NOTSET; > +#ifdef WITH_ICONV > +const char *outputEncoding =3D NULL; > +#endif > + > +static void usage(void) __dead2; > + > +int > +main(int argc, char *argv[]) > +{ > + int f_dayAfter =3D 0; /* days after current = date */ > + int f_dayBefore =3D 0; /* days before current date */ > + int Friday =3D 5; /* day before weekend */ > + > + int ch; > + struct tm tp1, tp2; > + > + (void)setlocale(LC_ALL, ""); > + > + while ((ch =3D getopt(argc, argv, "-A:aB:D:dF:f:l:t:U:W:?")) !=3D = -1) > + switch (ch) { > + case '-': /* backward contemptible */ > + case 'a': > + if (getuid()) { > + errno =3D EPERM; > + err(1, NULL); > + } > + doall =3D 1; > + break; > + > + case 'W': /* we don't need no steenking Fridays */ > + Friday =3D -1; > + /* FALLTHROUGH */ > + > + case 'A': /* days after current date */ > + f_dayAfter =3D atoi(optarg); > + if (f_dayAfter < 0) > + errx(1, "number of days must be = positive"); > + break; > + > + case 'B': /* days before current date */ > + f_dayBefore =3D atoi(optarg); > + if (f_dayBefore < 0) > + errx(1, "number of days must be = positive"); > + break; > + > + case 'D': /* debug output of sun and moon info */ > + DEBUG =3D optarg; > + break; > + > + case 'd': /* debug output of current date */ > + debug =3D 1; > + break; > + > + case 'F': /* Change the time: When does weekend start? = */ > + Friday =3D atoi(optarg); > + break; > + > + case 'f': /* other calendar file */ > + calendarFile =3D optarg; > + break; > + > + case 'l': /* Change longitudal position */ > + EastLongitude =3D strtol(optarg, NULL, 10); > + break; > + > + case 't': /* other date, for tests */ > + f_time =3D Mktime(optarg); > + break; > + > + case 'U': /* Change UTC offset */ > + UTCOffset =3D strtod(optarg, NULL); > + break; > + > + case '?': > + default: > + usage(); > + } > + > + argc -=3D optind; > + argv +=3D optind; > + > + if (argc) > + usage(); > + > + /* use current time */ > + if (f_time <=3D 0) > + (void)time(&f_time); > + > + /* if not set, determine where I could be */ > + { > + if (UTCOffset =3D=3D UTCOFFSET_NOTSET && > + EastLongitude =3D=3D LONGITUDE_NOTSET) { > + /* Calculate on difference between here and UTC = */ > + time_t t; > + struct tm tm; > + long utcoffset, hh, mm, ss; > + double uo; > + > + time(&t); > + localtime_r(&t, &tm); > + utcoffset =3D tm.tm_gmtoff; > + /* seconds -> hh:mm:ss */ > + hh =3D utcoffset / SECSPERHOUR; > + utcoffset %=3D SECSPERHOUR; > + mm =3D utcoffset / SECSPERMINUTE; > + utcoffset %=3D SECSPERMINUTE; > + ss =3D utcoffset; > + > + /* hh:mm:ss -> hh.mmss */ > + uo =3D mm + (100.0 * (ss / 60.0)); > + uo /=3D 60.0 / 100.0; > + uo =3D hh + uo / 100; > + > + UTCOffset =3D uo; > + EastLongitude =3D UTCOffset * 15; > + } else if (UTCOffset =3D=3D UTCOFFSET_NOTSET) { > + /* Base on information given */ > + UTCOffset =3D EastLongitude / 15; > + } else if (EastLongitude =3D=3D LONGITUDE_NOTSET) { > + /* Base on information given */ > + EastLongitude =3D UTCOffset * 15; > + } > + } > + > + settimes(f_time, f_dayBefore, f_dayAfter, Friday, &tp1, &tp2); > + generatedates(&tp1, &tp2); > + > + /* > + * FROM now on, we are working in UTC. > + * This will only affect moon and sun related events anyway. > + */ > + if (setenv("TZ", "UTC", 1) !=3D 0) > + errx(1, "setenv: %s", strerror(errno)); > + tzset(); > + > + if (debug) > + dumpdates(); > + > + if (DEBUG !=3D NULL) { > + dodebug(DEBUG); > + exit(0); > + } > + > + if (doall) > + while ((pw =3D getpwent()) !=3D NULL) { > + pid_t pid; > + > + if (chdir(pw->pw_dir) =3D=3D -1) > + continue; > + pid =3D fork(); > + if (pid < 0) > + err(1, "fork"); > + if (pid =3D=3D 0) { > + login_cap_t *lc; > + > + lc =3D login_getpwclass(pw); > + if (setusercontext(lc, pw, pw->pw_uid, > + LOGIN_SETALL) !=3D 0) > + errx(1, "setusercontext"); > + cal(); > + exit(0); > + } > + } > + else { > +#ifdef WITH_ICONV > + /* Save the information about the encoding used in the = terminal. */ > + outputEncoding =3D strdup(nl_langinfo(CODESET)); > + if (outputEncoding =3D=3D NULL) > + errx(1, "cannot allocate memory"); > +#endif > + cal(); > + } > + exit(0); > +} > + > + > +static void __dead2 > +usage(void) > +{ > + > + fprintf(stderr, "%s\n%s\n%s\n", > + "usage: calendar [-A days] [-a] [-B days] [-D sun|moon] = [-d]", > + " [-F friday] [-f calendarfile] [-l = longitude]", > + " [-t dd[.mm[.year]]] [-U utcoffset] [-W = days]" > + ); > + exit(1); > +} >=20 > Copied: head/usr.bin/calendar/calendar.h (from r358560, = head/usr.bin/calendar/calendar.h) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/calendar/calendar.h Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/usr.bin/calendar/calendar.h) > @@ -0,0 +1,206 @@ > +/*- > + * SPDX-License-Identifier: BSD-3-Clause > + * > + * Copyright (c) 1989, 1993, 1994 > + * The Regents of the University of California. All rights = reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above = copyright > + * notice, this list of conditions and the following disclaimer in = the > + * documentation and/or other materials provided with the = distribution. > + * 3. Neither the name of the University nor the names of its = contributors > + * may be used to endorse or promote products derived from this = software > + * without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS = IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE = LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#include > +#include > + > +#define SECSPERDAY (24 * 60 * 60) > +#define SECSPERHOUR (60 * 60) > +#define SECSPERMINUTE (60) > +#define MINSPERHOUR (60) > +#define HOURSPERDAY (24) > +#define FSECSPERDAY (24.0 * 60.0 * 60.0) > +#define FSECSPERHOUR (60.0 * 60.0) > +#define FSECSPERMINUTE (60.0) > +#define FMINSPERHOUR (60.0) > +#define FHOURSPERDAY (24.0) > + > +#define DAYSPERYEAR 365 > +#define DAYSPERLEAPYEAR 366 > + > +/* Not yet categorized */ > + > +extern struct passwd *pw; > +extern int doall; > +extern time_t t1, t2; > +extern const char *calendarFile; > +extern int yrdays; > +extern struct fixs neaster, npaskha, ncny, nfullmoon, nnewmoon; > +extern struct fixs nmarequinox, nsepequinox, njunsolstice, = ndecsolstice; > +extern double UTCOffset; > +extern int EastLongitude; > +#ifdef WITH_ICONV > +extern const char *outputEncoding; > +#endif > + > +#define isleap(y) ((((y) % 4) =3D=3D 0 && ((y) % 100) !=3D 0) || ((y) = % 400) =3D=3D 0) > + > +/* Flags to determine the returned values by determinestyle() in = parsedata.c */ > +#define F_NONE 0x00000 > +#define F_MONTH 0x00001 > +#define F_DAYOFWEEK 0x00002 > +#define F_DAYOFMONTH 0x00004 > +#define F_MODIFIERINDEX 0x00008 > +#define F_MODIFIEROFFSET 0x00010 > +#define F_SPECIALDAY 0x00020 > +#define F_ALLMONTH 0x00040 > +#define F_ALLDAY 0x00080 > +#define F_VARIABLE 0x00100 > +#define F_EASTER 0x00200 > +#define F_CNY 0x00400 > +#define F_PASKHA 0x00800 > +#define F_NEWMOON 0x01000 > +#define F_FULLMOON 0x02000 > +#define F_MAREQUINOX 0x04000 > +#define F_SEPEQUINOX 0x08000 > +#define F_JUNSOLSTICE 0x10000 > +#define F_DECSOLSTICE 0x20000 > +#define F_YEAR 0x40000 > + > +#define STRING_EASTER "Easter" > +#define STRING_PASKHA "Paskha" > +#define STRING_CNY "ChineseNewYear" > +#define STRING_NEWMOON "NewMoon" > +#define STRING_FULLMOON "FullMoon" > +#define STRING_MAREQUINOX "MarEquinox" > +#define STRING_SEPEQUINOX "SepEquinox" > +#define STRING_JUNSOLSTICE "JunSolstice" > +#define STRING_DECSOLSTICE "DecSolstice" > + > +#define MAXCOUNT 125 /* Random number of = maximum number of > + * repeats of an event. Should = be 52 > + * (number of weeks per year), = if you > + * want to show two years then = it > + * should be 104. If you are = seeing > + * more than this you are using = this > + * program wrong. > + */ > + > +/* > + * All the astronomical calculations are carried out for the meridian = 120 > + * degrees east of Greenwich. > + */ > +#define UTCOFFSET_CNY 8.0 > + > +extern int debug; /* show parsing of the input */ > +extern int year1, year2; > + > +/* events.c */ > +/* > + * Event sorting related functions: > + * - Use event_add() to create a new event > + * - Use event_continue() to add more text to the last added event > + * - Use event_print_all() to display them in time chronological = order > + */ > +struct event *event_add(int, int, int, char *, int, char *, char *); > +void event_continue(struct event *events, char *txt); > +void event_print_all(FILE *fp); > +struct event { > + int year; > + int month; > + int day; > + int var; > + char *date; > + char *text; > + char *extra; > + struct event *next; > +}; > + > +/* locale.c */ > + > +struct fixs { > + char *name; > + size_t len; > +}; > + > +extern const char *days[]; > +extern const char *fdays[]; > +extern const char *fmonths[]; > +extern const char *months[]; > +extern const char *sequences[]; > +extern struct fixs fndays[8]; /* full national days = names */ > +extern struct fixs fnmonths[13]; /* full national months names */ > +extern struct fixs ndays[8]; /* short national days names */ > +extern struct fixs nmonths[13]; /* short national month = names */ > +extern struct fixs nsequences[10]; > + > +void setnnames(void); > +void setnsequences(char *); > + > +/* day.c */ >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to = "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-head@freebsd.org Wed Mar 4 09:42:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5CEA26A2AE for ; Wed, 4 Mar 2020 09:42:40 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XTSZ23BKz4hTR; Wed, 4 Mar 2020 09:42:37 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 0249gMFM079917 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 4 Mar 2020 09:42:25 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jhb@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 0249gKIW036965 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 4 Mar 2020 16:42:20 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r358411 - head/contrib/sendmail/src To: John Baldwin , Jung-uk Kim , Hiroki Sato References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> <489d09c9-f0b4-f7b1-6255-51bdeb19b740@FreeBSD.org> Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: Date: Wed, 4 Mar 2020 16:42:14 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <489d09c9-f0b4-f7b1-6255-51bdeb19b740@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48XTSZ23BKz4hTR X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.85)[ip: (-5.12), ipnet: 2a01:4f8::/29(-2.55), asn: 24940(-1.56), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 09:42:40 -0000 04.03.2020 0:10, John Baldwin wrote: > On 3/3/20 6:56 AM, Eugene Grosbein wrote: >> 03.03.2020 21:44, Jung-uk Kim wrote: >> >>> No, you'll have the same linker failure. >> >> Then what's the reason of the failure? We have to fix it for stable/11 users, too. > > It can't be fixed, and even if you are on stable/12, it would be > a problem if you had openssl 3.0 installed as '/usr/local/lib/libssl.so'. > The sendmail SASL thing for base is a bit of a hack, and it can only > ever work in certain cases. When the handbook text was first written > we didn't have an OpenSSL in ports that would conflict, so it didn't > document the caveat we now have. I don't believe it cannot be fixed because we always can force including base .h files instead of ports version and force linking base libraries for both base sendmail and cyrus-sasl2 port as an option. From owner-svn-src-head@freebsd.org Wed Mar 4 09:46:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2906A26A311; Wed, 4 Mar 2020 09:46:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XTYH5drrz4sqP; Wed, 4 Mar 2020 09:46:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79BC21C167; Wed, 4 Mar 2020 09:46:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0249khWW010100; Wed, 4 Mar 2020 09:46:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0249khoT010099; Wed, 4 Mar 2020 09:46:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003040946.0249khoT010099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 4 Mar 2020 09:46:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358609 - head/sys/dev/usb/input X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/input X-SVN-Commit-Revision: 358609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 09:46:44 -0000 Author: hselasky Date: Wed Mar 4 09:46:42 2020 New Revision: 358609 URL: https://svnweb.freebsd.org/changeset/base/358609 Log: Restart the USB keyboard repeat timer at every valid key-press. This fixes a regression issue after r357861. Reported by: James Wright PR: 224592 PR: 233884 MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Wed Mar 4 04:44:33 2020 (r358608) +++ head/sys/dev/usb/input/ukbd.c Wed Mar 4 09:46:42 2020 (r358609) @@ -522,15 +522,9 @@ ukbd_interrupt(struct ukbd_softc *sc) if (ukbd_is_modifier_key(key)) continue; - /* - * Check for first new key and set - * initial delay and [re]start timer: - */ - if (sc->sc_repeat_key == 0) { - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - ukbd_start_timer(sc); - } + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); /* set repeat time for last key */ sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; From owner-svn-src-head@freebsd.org Wed Mar 4 11:27:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E161426C1B7; Wed, 4 Mar 2020 11:27:13 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XWnF1TFLz3NX3; Wed, 4 Mar 2020 11:27:13 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from marvin.madpilot.net (host146-240-dynamic.10-87-r.retail.telecomitalia.it [87.10.240.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 11BD110741; Wed, 4 Mar 2020 11:27:11 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Subject: Re: svn commit: r358439 - head/sys/amd64/include To: Ryan Libby , "Alexander V. Chernikov" Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@FreeBSD.org References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> From: Guido Falsi Message-ID: <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> Date: Wed, 4 Mar 2020 12:27:08 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 11:27:14 -0000 On 02/03/20 18:13, Ryan Libby wrote: > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: >> >> 28.02.2020, 18:32, "Ryan Libby" : >>> Author: rlibby >>> Date: Fri Feb 28 18:32:36 2020 >>> New Revision: 358439 >>> URL: https://svnweb.freebsd.org/changeset/base/358439 >>> >>> Log: >>> amd64 atomic.h: minor codegen optimization in flag access >>> >>> Previously the pattern to extract status flags from inline assembly >>> blocks was to use setcc in the block to write the flag to a register. >>> This was suboptimal in a few ways: >>> - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag >>> would just be loaded into a register and then reloaded to a flag. >>> - The setcc would force the block to use an additional register. >>> - If the client code didn't care for the flag value then the setcc >>> would be entirely pointless but could not be eliminated by the >>> optimizer. >>> >>> A more modern inline asm construct (since gcc 6 and clang 9) allows for >> This effectively restricts kernel builds by all older compilers. >> Is there any chance of making it conditional depending on the compiler version/features? > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > maintenance effort going forward. If building current with an old cross > compiler is an important scenario, we can either revert this and the > following revision or work up a patch to make it conditional. I'll see > what that might look like. > Actually this causes emulators/virtualbox-ose port to fail to build: In file included from /usr/src/sys/sys/systm.h:44: /usr/include/machine/atomic.h:230:1: error: invalid output constraint '=@cce' in asm ATOMIC_CMPSET(char); ^ /usr/include/machine/atomic.h:205:4: note: expanded from macro 'ATOMIC_CMPSET' : "=@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:230:1: error: invalid output constraint '=@cce' in asm (and so on) the virtualbox-ose port is forced to use an older clang version due to crashes when compiled with newer ones. Not sure whose responsibility is to fix this. Should I file a bug report on bugzilla? -- Guido Falsi From owner-svn-src-head@freebsd.org Wed Mar 4 12:21:40 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 269DB26D638; Wed, 4 Mar 2020 12:21:40 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XY026vmgz4P5V; Wed, 4 Mar 2020 12:21:38 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C91E21DD9A; Wed, 4 Mar 2020 12:21:38 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024CLcHd002099; Wed, 4 Mar 2020 12:21:38 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024CLcpb002035; Wed, 4 Mar 2020 12:21:38 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202003041221.024CLcpb002035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Wed, 4 Mar 2020 12:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358613 - head/sys/dev/aacraid X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/dev/aacraid X-SVN-Commit-Revision: 358613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 12:21:40 -0000 Author: luporl Date: Wed Mar 4 12:21:38 2020 New Revision: 358613 URL: https://svnweb.freebsd.org/changeset/base/358613 Log: [aacraid] Add missing unmap call for SYNC mode This issue was observed on a PowerPC64 machine with an Adaptec RAID Controller with PCI device ID 0x028d. After several read/write operations, the kernel was panic'ing in bus_dmamap_sync(). This was due to a missing aac_unmap_command() in the SYNC path. PR: 237463 Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D23668 Modified: head/sys/dev/aacraid/aacraid.c Modified: head/sys/dev/aacraid/aacraid.c ============================================================================== --- head/sys/dev/aacraid/aacraid.c Wed Mar 4 11:32:31 2020 (r358612) +++ head/sys/dev/aacraid/aacraid.c Wed Mar 4 12:21:38 2020 (r358613) @@ -903,6 +903,7 @@ aacraid_new_intr_type1(void *arg) if (mode & AAC_INT_MODE_SYNC) { if (sc->aac_sync_cm) { cm = sc->aac_sync_cm; + aac_unmap_command(cm); cm->cm_flags |= AAC_CMD_COMPLETED; /* is there a completion handler? */ if (cm->cm_complete != NULL) { From owner-svn-src-head@freebsd.org Wed Mar 4 12:22:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FAA226D815; Wed, 4 Mar 2020 12:22:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XY1T6dDTz4QcL; Wed, 4 Mar 2020 12:22:53 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D12F51DF12; Wed, 4 Mar 2020 12:22:53 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024CMr3a005135; Wed, 4 Mar 2020 12:22:53 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024CMrKK005134; Wed, 4 Mar 2020 12:22:53 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003041222.024CMrKK005134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 4 Mar 2020 12:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358614 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 358614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 12:22:54 -0000 Author: tuexen Date: Wed Mar 4 12:22:53 2020 New Revision: 358614 URL: https://svnweb.freebsd.org/changeset/base/358614 Log: Don't send an uninitilised traffic class in the IPv6 header, when sending a TCP segment from the TCP SYN cache (like a SYN-ACK). This fix initialises it to zero. This is correct for the ECN bits, but is does not honor the DSCP what an application might have set via the IPPROTO_IPV6 level socket options IPV6_TCLASS. That will be fixed separately. Reviewed by: Richard Scheffenegger MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D23900 Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Wed Mar 4 12:21:38 2020 (r358613) +++ head/sys/netinet/tcp_syncache.c Wed Mar 4 12:22:53 2020 (r358614) @@ -1794,7 +1794,8 @@ syncache_respond(struct syncache *sc, const struct mbu ip6->ip6_dst = sc->sc_inc.inc6_faddr; ip6->ip6_plen = htons(tlen - hlen); /* ip6_hlim is set after checksum */ - ip6->ip6_flow &= ~IPV6_FLOWLABEL_MASK; + /* Zero out traffic class and flow label. */ + ip6->ip6_flow &= ~IPV6_FLOWINFO_MASK; ip6->ip6_flow |= sc->sc_flowlabel; th = (struct tcphdr *)(ip6 + 1); From owner-svn-src-head@freebsd.org Wed Mar 4 14:07:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B25A26F727 for ; Wed, 4 Mar 2020 14:07:36 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XbLF4CfZz4cD4; Wed, 4 Mar 2020 14:07:33 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 024E7ODu083136 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 4 Mar 2020 14:07:26 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jhb@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 024E7GJ2025985 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 4 Mar 2020 21:07:16 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: [SOLUTION] Re: svn commit: r358411 - head/contrib/sendmail/src To: John Baldwin , Jung-uk Kim , Hiroki Sato References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> <489d09c9-f0b4-f7b1-6255-51bdeb19b740@FreeBSD.org> Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <4d974e29-f930-257c-5e0b-7528e745cea4@grosbein.net> Date: Wed, 4 Mar 2020 21:07:10 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <489d09c9-f0b4-f7b1-6255-51bdeb19b740@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48XbLF4CfZz4cD4 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.92 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.975,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.85)[ip: (-5.12), ipnet: 2a01:4f8::/29(-2.55), asn: 24940(-1.56), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 14:07:36 -0000 04.03.2020 0:10, John Baldwin wrote: > When the handbook text was first written we didn't have an OpenSSL in ports that would conflict Thank you very much for this key for solving the problem. This occured to be missing bit of information I was looking for. So, the fix is simple. We need only two things: first, base sendmail must be linked with base libcrypto and second, cyrus-sasl2 must be linked with base libcrypto too, despite of presence of openssl from ports, as an option. First goal is accomplished by replacing SENDMAIL_LDFLAGS=-L/usr/local/lib with SENDMAIL_LDADD=/usr/local/lib/libsasl2.so in /etc/make.conf and the Handbook needs this change. Second goal is accomplished with r515574 for ports that added new option (disabled by default). If enabled, it builds the port using base openssl and libcrypto: https://svnweb.freebsd.org/ports?view=revision&revision=515574 Unfortunately, it was back out by maintainer (ume) in r527347 as "wrong". It was not. Dear maintainer, please consider applying r515574 back. Feel free renaming port option and improving the description, if you wish because I cannot think up better version. New option for cyrus-sasl2 should be mentioned in the Handbook, too. With these two changes source upgrade path for such stable/11 system is unbroken. From owner-svn-src-head@freebsd.org Wed Mar 4 14:41:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9F762701BB for ; Wed, 4 Mar 2020 14:41:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xc5b4Nyfz3xBg; Wed, 4 Mar 2020 14:41:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 5185411DB5; Wed, 4 Mar 2020 14:41:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: [SOLUTION] Re: svn commit: r358411 - head/contrib/sendmail/src To: Eugene Grosbein , John Baldwin , Hiroki Sato Cc: ume@FreeBSD.org, src-committers@freebsd.org, svn-src-head@freebsd.org References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> <489d09c9-f0b4-f7b1-6255-51bdeb19b740@FreeBSD.org> <4d974e29-f930-257c-5e0b-7528e745cea4@grosbein.net> From: Jung-uk Kim Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= mQENBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lPE4hZWvZHoFIyunPTJWenybeV1xnxK7JkUdSvQR0 fA59RfTTECMwTrSEfYGUnxIDBraxJ7Ecs/0hGQ7sljIj8WBvlRDU5fU1xfF35aw56T8POQRq F4E6RVJW3YGuTpSwgtGZOTfygcLRhAiq3dFC3JNLaTVTpM8PjOinJyt9AU6RoITGOKwDABEB AAG0Hkp1bmctdWsgS2ltIDxqa2ltQEZyZWVCU0Qub3JnPokBPQQTAQoAJwUCUkHO1QIbAwUJ E0/POwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRB8n5Ym/NvxRqyzB/wL7QtsIpeGfGIA ZPMtgXMucM3NWzomyQMln2j2efUkDKthzh9jBxgF53TjOr7imwIt0PT2k1bqctPrq5IRqnu9 mGroqaCLE3LG2/E3jEaao4k9PO6efwlioyivUo5NrqIQOQ4k3EAXw7d2y0Dk1VpTgdMrnUAB hj7lGlLqS4ydcrf24DdbCRGdEQwqd9DBeBgbWynxAJMgbZBhYVEyIHuQKkJ8qY0ibIPXXuF0 KYDeH0qUHtWV2K3srNyPtymUkBQD84Pl1GWRYx05XdUHDmnX0JV3lg0BfYJZgZv0ehPQrMfY Fd9abTkf9FHQYz1JtsC8wUuRgqElRd6+YAGf8Tt9uQENBFJBztUBCADLtSrP44El2VoJmH14 OFrlOgxzZnbn+Y/Gf1k12mJBiR+A+pBeRLD50p7AiTrjHRxO3cHcl9Dh0uf1VSbXgp8Or0ye iP/86fZPd4k5HXNmDTLL0HecPE08SCqGZ0W8vllQrokB1QxxRUB+fFMPJyMCjDAZ7P9fFTOS dTw1bJSTtOD8Sx8MpZUa9ti06bXFlVYDlaqSdgk181SSx+ZbSKkQR8CIMARlHwiLsa3Z9q9O EJr20HPyxe0AlTvwvFndH61hg7ds63eRvglwRnNON28VXO/lvKXq7Br/CiiyhFdKfINIx2Z5 htYq22tgGTW7mBURbIKoECFBTX9Lv6BXz6w9ABEBAAGJASUEGAEKAA8FAlJBztUCGwwFCRNP zzsACgkQfJ+WJvzb8UZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <0e74f367-a4ff-e678-7c5a-0ca8ea6495ac@FreeBSD.org> Date: Wed, 4 Mar 2020 09:41:34 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <4d974e29-f930-257c-5e0b-7528e745cea4@grosbein.net> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 14:41:39 -0000 On 20. 3. 4., Eugene Grosbein wrote: > 04.03.2020 0:10, John Baldwin wrote: > >> When the handbook text was first written we didn't have an OpenSSL in ports that would conflict > > Thank you very much for this key for solving the problem. > This occured to be missing bit of information I was looking for. > > So, the fix is simple. We need only two things: first, base sendmail must be linked with base libcrypto > and second, cyrus-sasl2 must be linked with base libcrypto too, > despite of presence of openssl from ports, as an option. > > First goal is accomplished by replacing SENDMAIL_LDFLAGS=-L/usr/local/lib > with SENDMAIL_LDADD=/usr/local/lib/libsasl2.so in /etc/make.conf > and the Handbook needs this change. > > Second goal is accomplished with r515574 for ports that added new option (disabled by default). > If enabled, it builds the port using base openssl and libcrypto: > https://svnweb.freebsd.org/ports?view=revision&revision=515574 The canonical way of overriding ssl version is adding "DEFAULT_VERSIONS+=ssl=" to /etc/make.conf. Please see ports/Mk/Uses/ssl.mk. If you want to add a new method to override it per port, please write a patch for ssl.mk and submit it to portmgr (maintainer). There's no reason to hack every single port. > Unfortunately, it was back out by maintainer (ume) in r527347 as > "wrong". It was not. > > Dear maintainer, please consider applying r515574 back. > Feel free renaming port option and improving the description, if you > wish because I cannot think up better version. > > New option for cyrus-sasl2 should be mentioned in the Handbook, too. > > With these two changes source upgrade path for such stable/11 system > is unbroken. I am not the maintainer but why did you do it without maintainer's approval in the first place? :-( Jung-uk Kim From owner-svn-src-head@freebsd.org Wed Mar 4 14:43:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7DCD727020E for ; Wed, 4 Mar 2020 14:43:09 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xc7K1m4fz41Xx; Wed, 4 Mar 2020 14:43:09 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from vsuiko.mahoroba.org (vsuiko.mahoroba.org [IPv6:2001:2f0:104:8010:a00:27ff:feb0:c2e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: ume) by smtp.freebsd.org (Postfix) with ESMTPSA id D75FC11EF9; Wed, 4 Mar 2020 14:43:07 +0000 (UTC) (envelope-from ume@FreeBSD.org) Date: Wed, 04 Mar 2020 23:43:02 +0900 Message-ID: From: Hajimu UMEMOTO To: Eugene Grosbein Cc: John Baldwin , Jung-uk Kim , Hiroki Sato , src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: [SOLUTION] Re: svn commit: r358411 - head/contrib/sendmail/src In-Reply-To: <4d974e29-f930-257c-5e0b-7528e745cea4@grosbein.net> References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> <489d09c9-f0b4-f7b1-6255-51bdeb19b740@FreeBSD.org> <4d974e29-f930-257c-5e0b-7528e745cea4@grosbein.net> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/26.3 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 12.1-STABLE X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 14:43:09 -0000 Hi, >>>>> On Wed, 4 Mar 2020 21:07:10 +0700 >>>>> Eugene Grosbein said: eugen> Dear maintainer, please consider applying r515574 back. No, I never do r515574 back. The other ports depending upon cyrus-sasl2 must be linked same version of openssl. So, there is an option "DEFAULT_VERSIONS= ssl=base". Your hack breaks this premise and confuse people. Sincerely, -- Hajimu UMEMOTO ume@mahoroba.org ume@FreeBSD.org http://www.mahoroba.org/~ume/ From owner-svn-src-head@freebsd.org Wed Mar 4 14:56:34 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AC692706D6; Wed, 4 Mar 2020 14:56:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XcQp0km9z4Lhr; Wed, 4 Mar 2020 14:56:33 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4DDA1FAE4; Wed, 4 Mar 2020 14:56:32 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024EuW6w094172; Wed, 4 Mar 2020 14:56:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024EuWA6094171; Wed, 4 Mar 2020 14:56:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003041456.024EuWA6094171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 4 Mar 2020 14:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358619 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 358619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 14:56:34 -0000 Author: jhibbits Date: Wed Mar 4 14:56:32 2020 New Revision: 358619 URL: https://svnweb.freebsd.org/changeset/base/358619 Log: Update ismt(4) man page for r358595. Submitted by: Dmitry Luhtionov X-MFC-With: r358595 Sponsored by: Juniper Networks, Inc Modified: head/share/man/man4/ismt.4 Modified: head/share/man/man4/ismt.4 ============================================================================== --- head/share/man/man4/ismt.4 Wed Mar 4 14:03:59 2020 (r358618) +++ head/share/man/man4/ismt.4 Wed Mar 4 14:56:32 2020 (r358619) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2016 +.Dd March 4, 2020 .Dt ISMT 4 .Os .Sh NAME @@ -46,7 +46,7 @@ .Cd device ismt .Sh DESCRIPTION This driver provides access to the SMBus 2.0 controller device contained -in the Intel Atom S1200 and C2000 CPUs. +in the Intel Atom S1200, C2000 and C3000 CPUs. .Sh SEE ALSO .Xr ichsmb 4 , .Xr smb 4 , From owner-svn-src-head@freebsd.org Wed Mar 4 15:03:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE9CA270A55; Wed, 4 Mar 2020 15:03:11 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XcZR49NLz4RYT; Wed, 4 Mar 2020 15:03:11 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from marvin.madpilot.net (host146-240-dynamic.10-87-r.retail.telecomitalia.it [87.10.240.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id BCD1712147; Wed, 4 Mar 2020 15:03:10 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Subject: Re: svn commit: r358439 - head/sys/amd64/include From: Guido Falsi To: Ryan Libby , "Alexander V. Chernikov" Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@FreeBSD.org References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> Autocrypt: addr=madpilot@FreeBSD.org; keydata= mQENBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAG0Ikd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz6JATYEEwEIACACGwMCHgEC F4AFAlLvzwUFCwkIBwMFFQoJCAsEFgIDAQAKCRAa5oYOVsvSk6EzCAC4ovSo6XF4x0spuKmp RzVuZ5ywqCJAfRIrJHpW8HjSPkcUYwmXVOE3zjul9j2C2eHPPGobEDN5FqovAtzb7HdYGGcU aUdhDApUMMRVkzflwb23C/CI1RBcZxjC0noajSKgbIHx4+Afg6CFMgpngq+NJwEaaVrKlYzq G+KcfeVKAdwlWHJOgQJIEylUtwtBqXx/iJDrGwKO5A6a1uSEZrZfuwjSh8cBqoUfIwLZUIFE HBjHa8pUkp8mWx7JaZ19vBF6pDpPVZSoLSg8stWd1DPesn/qySYgtSGSY6hpWABVF98HRsBG +VXlHtqCaB0j0cGCDhCpHQUI10oGGc8k4zcvuQINBFMQe0EBEAChYaw3HqD3SvyBw0pqI+kk GIrLzO1XYXJXkuxPQ6BAFbe8jG3+h22zFU02OnJL8E1kLLMsCwVzVasYHOFiyY831IYHn/lh O+TN/lhWJTlUCxmWP8xFYJmta2mJzhzQDs3hyw5hF422T+rxgHg8gWxn0D6RO6hmGe7m3k91 8EDvj5JXAq7zj49mT3AMRjUtsVVPy8zjagqyaizCUiHAnbG4kj+BuT5wxR7TKJGk2OjhK/Dh EHzgHq4XB1Gv8+1LvGLZmqih/kBpBP1hIGkakok579CTkw/g8XoWqr6Cjz2fvtjaQmTBwdou gP8Yn5kMBIiIxF7XLngUc5DVEJMYamcktd0q4aHC/cnbWlTwc2WrQBI1AwxCZgDC1RbOOan8 oTIjWqRyaNp9zFvxOaJqgrxJA3Vl/3p9z+witk3pnmg4ITLIJDSmsf89MDaOVGQpDjzs9MaT YlIpTlW5Lns2WTYOue+NanntpX14UCGmeusk+4aYXPzf89zyALS3s3uLtVUdhFwLmdrFgHZS gjU5STLGlP8e9AVddVnf8qZ1czOvHX3UCCAI9YjBQA/5VxpRFJil4OTr9lUA5U57UKGpwmKw IPvArbT8468nYC2Rat4a7UJn3NLHucr9Vh0uvfgbFDhtPUb72sFA2cVI1tfZMnjfUx2jUYKM N5ErgK1Kes0piQARAQABiQEfBBgBCAAJBQJTEHtBAhsMAAoJEBrmhg5Wy9KTDecIAOGwpF/6 sBFQtOk6HkegtqbrZklkDIKQ2qq7+uR7m6PkBpoNj+HsE2EEOIOqGFktN6h8alVVoSs+xY36 1fnR/Kmwi30oCHL3QYWu2shmVa7IrjCyhm8N+n3JpGT6Ugznx3D9Fx/GfrvQlo9MVJE8QJWf +4uoGElKRtiVjbXZhP1/FVRMl7rAi8MtCtASOtAP+HUUyF9wuECqyd2W1F3oM+9Mp4x3/pUD GfSGSgEqETLkuRaMz0Iemm75sGRD3X+SPa4lBJc7x66ifAcdLdz7o3aLYfsjR6Zwca7TvC5E Ha0OfD9EsHGiF9909lPaRvG4buWFUfPBUPDkNHBLDwaQ53K5AQ0ET4b6XQEIALHepqzqtRkm cJc0bHDUGvVtlgf904+DjeDy9nvQfoXPZU/58tswd2oF7ucG7F088MYCaUE+4TR5AknJFvfI dx0YxX4WTzQoCJ7lBrI3DclYLkIfv+O3JIaYdLO1PugeMjbiIqkGZOJqPFoAjY9WCIoVZhlh LIAzsDGmo2w2GdK9f9xpCpWIzl3lLk/1oKLq60keaGSVTQP5OF9h+zNyVK9QUnN9i+wSbfDO wJ7bpepNeydC/BppLy701LUEzvqfg2EDJ2tp4A9z2wL0EXGxBp5IPQAa3RBdFqeBsfoBhlrM hSpR7z3TLYFgMtybEvq0GqRui6Ft8lCacKRKQPOinQcAEQEAAYkBHwQoAQgACQUCUxB9DQId AQAKCRAa5oYOVsvSkzGXCADErInRheCqYxnCs4ZDStLBKXr3HpUOg84E+5HF7qui0OmDq26H 9vyj4Bonvf06BWXyVx/MxORnn6pCrx2W2LLFopRb5CPdBfZ9d/JBttOTQf9s5WkG++P7/WTF yV3IqZyMfk9rTjAgYByVONSDCZgfjX0beQOgg8rSXYVsaqabBKOY48v+7STNTZ+OxvO7QFfK lTVLc20us3Z2xweFtgScAjm21b/HqS94bvy+Xn1do9rUm1U5sryvwpWDAanbVKN7j1++Rhfy rmAwjj9QUwOc85s6eDzFXfoJh3DIAmSmOpb3BLXYuRSyNMHtpHGPH3z7zNnejDYRbBi2lSPe SdKKiQEfBBgBAgAJBQJPhvpdAhsMAAoJEBrmhg5Wy9KTNfEH/R0zTYbvDdCEirZkfJYD4Sbr vPazhGvCihGra+H0O4C/oZmDhKmf8hy3D0LxsWwJS0exdEoXirwBJOAdWhcBlCz6NEs7jtHf 1rVTBGxmveSU5v+pn4spljJVn/FInw9TAys8z0ezptMm3qDzPEv0UE26FFNVi6cHeJoPaVSZ StMa+eRjkhzX+Ju0vj9ZL5d8YJhI9eM1TKvciQTVhZbECuXIon4e7BaX7sVnRFW7YCHcacyJ ii10iwNLzq6CgL8RUxgawat78VenlJmisneR221no5mn2NbmuXXJ3sPZcaVii3apAtu1bdAp Lvi7U2N99uVfgQoZ3MDXCSUuyDJgc+s= Message-ID: <6e71c270-0662-64dd-9591-4a8aef986c8c@FreeBSD.org> Date: Wed, 4 Mar 2020 16:03:08 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 15:03:11 -0000 On 04/03/20 12:27, Guido Falsi wrote: > > Actually this causes emulators/virtualbox-ose port to fail to build: > > In file included from /usr/src/sys/sys/systm.h:44: > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=@cce' in asm > ATOMIC_CMPSET(char); > ^ > /usr/include/machine/atomic.h:205:4: note: expanded from macro > 'ATOMIC_CMPSET' > : "=@cce" (res), /* 0 */ \ > ^ > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=@cce' in asm > > (and so on) > > > the virtualbox-ose port is forced to use an older clang version due to > crashes when compiled with newer ones. > > Not sure whose responsibility is to fix this. > > Should I file a bug report on bugzilla? > Adding: .if ${.CURDIR:M*emulators/virtualbox-ose} USE_GCC=9 .endif to make.conf seems to be a good workaround. Writing this here for the record. -- Guido Falsi From owner-svn-src-head@freebsd.org Wed Mar 4 15:26:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6BE5C27116C for ; Wed, 4 Mar 2020 15:26:53 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xd5l4rQkz4D1k; Wed, 4 Mar 2020 15:26:50 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 024FQf2v084049 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 4 Mar 2020 15:26:43 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: ume@FreeBSD.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 024FQcGr027479 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 4 Mar 2020 22:26:38 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: [SOLUTION] Re: svn commit: r358411 - head/contrib/sendmail/src To: Hajimu UMEMOTO References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> <489d09c9-f0b4-f7b1-6255-51bdeb19b740@FreeBSD.org> <4d974e29-f930-257c-5e0b-7528e745cea4@grosbein.net> Cc: John Baldwin , Jung-uk Kim , Hiroki Sato , src-committers@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: Date: Wed, 4 Mar 2020 22:26:32 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 48Xd5l4rQkz4D1k X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-3.94 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.85)[ip: (-5.12), ipnet: 2a01:4f8::/29(-2.55), asn: 24940(-1.56), country: DE(-0.02)]; R_SPF_PERMFAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 15:26:53 -0000 04.03.2020 21:43, Hajimu UMEMOTO wrote: > Hi, > >>>>>> On Wed, 4 Mar 2020 21:07:10 +0700 >>>>>> Eugene Grosbein said: > > eugen> Dear maintainer, please consider applying r515574 back. > > No, I never do r515574 back. The other ports depending upon > cyrus-sasl2 must be linked same version of openssl. So, there is an > option "DEFAULT_VERSIONS= ssl=base". Your hack breaks this premise and > confuse people. r515574 does not change default build for the port. It is "no-op" by default. It won't do any harm. "ssl=base" is not solution as I've showed before because FreeBSD ports tree cannot cope with some ports built with ports version of openssl and some with base version of openssl and this is exactly what needs to be done here. Why do you state "it confuses people"? When did we move from "tools, not policy" principle away? Such policy prevents us from supporting source upgrade for such stable/11 systems, so such policy should be discarded. Ports options are designed to cope with different setups and I cannot understand why you insist not using the option. I'm going to create duplicate of the port linking with base libcrypto to support upgrade if current port won't get the option. The upgrade path must be unbroken. From owner-svn-src-head@freebsd.org Wed Mar 4 16:21:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16466272915; Wed, 4 Mar 2020 16:21:01 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XfJD5zcwz44DQ; Wed, 4 Mar 2020 16:21:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 364E420A6E; Wed, 4 Mar 2020 16:21:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024GL0FW047496; Wed, 4 Mar 2020 16:21:00 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024GKx3w047490; Wed, 4 Mar 2020 16:20:59 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003041620.024GKx3w047490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 4 Mar 2020 16:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358620 - in head: sys/netinet usr.bin/netstat X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in head: sys/netinet usr.bin/netstat X-SVN-Commit-Revision: 358620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 16:21:01 -0000 Author: bz Date: Wed Mar 4 16:20:59 2020 New Revision: 358620 URL: https://svnweb.freebsd.org/changeset/base/358620 Log: Add new ICMPv6 counters for Anti-DoS limits. Add four new counters for ND6 related Anti-DoS measures. We split these out into a separate upfront commit so that we only change the struct size one time. Implementations using them will follow. PR: 157410 Reviewed by: melifaro MFC after: 2 weeks X-MFC: cannot really MFC this without breaking netstat Sponsored by: Netflix (initially) Differential Revision: https://reviews.freebsd.org/D22711 Modified: head/sys/netinet/icmp6.h head/usr.bin/netstat/inet6.c Modified: head/sys/netinet/icmp6.h ============================================================================== --- head/sys/netinet/icmp6.h Wed Mar 4 14:56:32 2020 (r358619) +++ head/sys/netinet/icmp6.h Wed Mar 4 16:20:59 2020 (r358620) @@ -635,6 +635,10 @@ struct icmp6stat { uint64_t icp6s_badrs; /* bad router solicitation */ uint64_t icp6s_badra; /* bad router advertisement */ uint64_t icp6s_badredirect; /* bad redirect message */ + uint64_t icp6s_overflowdefrtr; /* Too many default routers. */ + uint64_t icp6s_overflowprfx; /* Too many prefixes. */ + uint64_t icp6s_overflownndp; /* Too many neighbour entries. */ + uint64_t icp6s_overflowredirect;/* Too many redirects. */ }; #ifdef _KERNEL Modified: head/usr.bin/netstat/inet6.c ============================================================================== --- head/usr.bin/netstat/inet6.c Wed Mar 4 14:56:32 2020 (r358619) +++ head/usr.bin/netstat/inet6.c Wed Mar 4 16:20:59 2020 (r358620) @@ -1055,6 +1055,14 @@ icmp6_stats(u_long off, const char *name, int af1 __un "{N:/bad router advertisement message%s}\n"); p(icp6s_badredirect, "\t{:bad-redirect/%ju} " "{N:/bad redirect message%s}\n"); + p(icp6s_overflowdefrtr, "\t{:default-routers-overflows/%ju} " + "{N:/default routers overflow%s}\n"); + p(icp6s_overflowprfx, "\t{:prefixes-overflows/%ju} " + "{N:/prefix overflow%s}\n"); + p(icp6s_overflownndp, "\t{:neighbour-entries-overflows/%ju} " + "{N:/neighbour entries overflow%s}\n"); + p(icp6s_overflowredirect, "\t{:redirect-overflows/%ju} " + "{N:/redirect overflow%s}\n"); xo_close_container("errors"); p(icp6s_pmtuchg, "\t{:path-mtu-changes/%ju} {N:/path MTU change%s}\n"); #undef p From owner-svn-src-head@freebsd.org Wed Mar 4 16:41:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7F64272E74; Wed, 4 Mar 2020 16:41:26 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xfln6kdrz40k6; Wed, 4 Mar 2020 16:41:25 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B334120E8B; Wed, 4 Mar 2020 16:41:25 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024GfPB5058467; Wed, 4 Mar 2020 16:41:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024GfPhV058466; Wed, 4 Mar 2020 16:41:25 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003041641.024GfPhV058466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 4 Mar 2020 16:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358621 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 358621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 16:41:26 -0000 Author: tuexen Date: Wed Mar 4 16:41:25 2020 New Revision: 358621 URL: https://svnweb.freebsd.org/changeset/base/358621 Log: When using automatically generated flow labels and using TCP SYN cookies, use the same flow label for the segments sent during the handshake and after the handshake. This fixes a bug by making sure that sc_flowlabel is always stored in network byte order. Reviewed by: bz@ MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D23957 Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Wed Mar 4 16:20:59 2020 (r358620) +++ head/sys/netinet/tcp_syncache.c Wed Mar 4 16:41:25 2020 (r358621) @@ -2224,7 +2224,8 @@ syncookie_lookup(struct in_conninfo *inc, struct synca #ifdef INET6 case INC_ISIPV6: if (sotoinpcb(lso)->inp_flags & IN6P_AUTOFLOWLABEL) - sc->sc_flowlabel = sc->sc_iss & IPV6_FLOWLABEL_MASK; + sc->sc_flowlabel = + htonl(sc->sc_iss) & IPV6_FLOWLABEL_MASK; break; #endif } From owner-svn-src-head@freebsd.org Wed Mar 4 16:53:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64C77273325; Wed, 4 Mar 2020 16:53:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xg260xW3z4Yng; Wed, 4 Mar 2020 16:53:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D602B211EB; Wed, 4 Mar 2020 16:53:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024Grn3f069613; Wed, 4 Mar 2020 16:53:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024GrnN2069612; Wed, 4 Mar 2020 16:53:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003041653.024GrnN2069612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2020 16:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358622 - head/usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/elfctl X-SVN-Commit-Revision: 358622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 16:53:50 -0000 Author: emaste Date: Wed Mar 4 16:53:49 2020 New Revision: 358622 URL: https://svnweb.freebsd.org/changeset/base/358622 Log: elfctl: style(9): use C99 uintX_t types Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/elfctl/elfctl.c Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Wed Mar 4 16:41:25 2020 (r358621) +++ head/usr.bin/elfctl/elfctl.c Wed Mar 4 16:53:49 2020 (r358622) @@ -48,9 +48,9 @@ __FBSDID("$FreeBSD$"); -static bool convert_to_feature_val(char *, u_int32_t *); +static bool convert_to_feature_val(char *, uint32_t *); static bool edit_file_features(Elf *, int, int, char *); -static bool get_file_features(Elf *, int, int, u_int32_t *, u_int64_t *); +static bool get_file_features(Elf *, int, int, uint32_t *, uint64_t *); static void print_features(void); static bool print_file_features(Elf *, int, int, char *); static void usage(void); @@ -206,11 +206,11 @@ usage(void) } static bool -convert_to_feature_val(char *feature_str, u_int32_t *feature_val) +convert_to_feature_val(char *feature_str, uint32_t *feature_val) { char *feature; int i, len; - u_int32_t input; + uint32_t input; char operation; input = 0; @@ -247,8 +247,8 @@ convert_to_feature_val(char *feature_str, u_int32_t *f static bool edit_file_features(Elf *elf, int phcount, int fd, char *val) { - u_int32_t features; - u_int64_t off; + uint32_t features; + uint64_t off; if (!get_file_features(elf, phcount, fd, &features, &off)) { warnx("NT_FREEBSD_FEATURE_CTL note not found"); @@ -281,7 +281,7 @@ print_features(void) static bool print_file_features(Elf *elf, int phcount, int fd, char *filename) { - u_int32_t features; + uint32_t features; unsigned long i; if (!get_file_features(elf, phcount, fd, &features, NULL)) { @@ -302,8 +302,8 @@ print_file_features(Elf *elf, int phcount, int fd, cha } static bool -get_file_features(Elf *elf, int phcount, int fd, u_int32_t *features, - u_int64_t *off) +get_file_features(Elf *elf, int phcount, int fd, uint32_t *features, + uint64_t *off) { GElf_Phdr phdr; Elf_Note note; @@ -367,7 +367,7 @@ get_file_features(Elf *elf, int phcount, int fd, u_int continue; } - if (note.n_descsz < sizeof(u_int32_t)) { + if (note.n_descsz < sizeof(uint32_t)) { warnx("Feature descriptor can't " "be less than 4 bytes"); free(name); @@ -378,9 +378,9 @@ get_file_features(Elf *elf, int phcount, int fd, u_int * XXX: For now we look at only 4 bytes of the * descriptor. This should respect descsz. */ - if (note.n_descsz > sizeof(u_int32_t)) + if (note.n_descsz > sizeof(uint32_t)) warnx("Feature note is bigger than expected"); - read(fd, features, sizeof(u_int32_t)); + read(fd, features, sizeof(uint32_t)); if (off != NULL) *off = phdr.p_offset + read_total; free(name); From owner-svn-src-head@freebsd.org Wed Mar 4 16:57:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6235727345F; Wed, 4 Mar 2020 16:57:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xg6D18YFz3FVN; Wed, 4 Mar 2020 16:57:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D96DD211FF; Wed, 4 Mar 2020 16:57:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024GvNkf069987; Wed, 4 Mar 2020 16:57:23 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024GvNJh069986; Wed, 4 Mar 2020 16:57:23 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003041657.024GvNJh069986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2020 16:57:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358623 - head/usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/elfctl X-SVN-Commit-Revision: 358623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 16:57:24 -0000 Author: emaste Date: Wed Mar 4 16:57:23 2020 New Revision: 358623 URL: https://svnweb.freebsd.org/changeset/base/358623 Log: elfctl: check read return value CID: 1420212, 1420213 Reported by: Coverity Scan Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/elfctl/elfctl.c Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Wed Mar 4 16:53:49 2020 (r358622) +++ head/usr.bin/elfctl/elfctl.c Wed Mar 4 16:57:23 2020 (r358623) @@ -310,7 +310,6 @@ get_file_features(Elf *elf, int phcount, int fd, uint3 unsigned long read_total; int namesz, descsz, i; char *name; - ssize_t size; /* * Go through each program header to find one that is of type PT_NOTE @@ -332,9 +331,9 @@ get_file_features(Elf *elf, int phcount, int fd, uint3 read_total = 0; while (read_total < phdr.p_filesz) { - size = read(fd, ¬e, sizeof(note)); - if (size < (ssize_t)sizeof(note)) { - warn("read() failed:"); + if (read(fd, ¬e, sizeof(note)) < + (ssize_t)sizeof(note)) { + warnx("elf note header too short"); return (false); } read_total += sizeof(note); @@ -350,7 +349,10 @@ get_file_features(Elf *elf, int phcount, int fd, uint3 return (false); } descsz = roundup2(note.n_descsz, 4); - size = read(fd, name, namesz); + if (read(fd, name, namesz) < namesz) { + warnx("elf note name too short"); + return (false); + } read_total += namesz; if (note.n_namesz != 8 || @@ -380,7 +382,11 @@ get_file_features(Elf *elf, int phcount, int fd, uint3 */ if (note.n_descsz > sizeof(uint32_t)) warnx("Feature note is bigger than expected"); - read(fd, features, sizeof(uint32_t)); + if (read(fd, features, sizeof(uint32_t)) < + (ssize_t)sizeof(uint32_t)) { + warnx("feature note data too short"); + return (false); + } if (off != NULL) *off = phdr.p_offset + read_total; free(name); From owner-svn-src-head@freebsd.org Wed Mar 4 17:05:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1241F273716 for ; Wed, 4 Mar 2020 17:05:29 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XgHX6plcz3PZ5; Wed, 4 Mar 2020 17:05:28 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from vsuiko.mahoroba.org (vsuiko.mahoroba.org [IPv6:2001:2f0:104:8010:a00:27ff:feb0:c2e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: ume) by smtp.freebsd.org (Postfix) with ESMTPSA id B684812F9A; Wed, 4 Mar 2020 17:05:27 +0000 (UTC) (envelope-from ume@FreeBSD.org) Date: Thu, 05 Mar 2020 02:05:22 +0900 Message-ID: From: Hajimu UMEMOTO To: Eugene Grosbein Cc: John Baldwin , Jung-uk Kim , Hiroki Sato , src-committers@freebsd.org, svn-src-head@freebsd.org Subject: Re: [SOLUTION] Re: svn commit: r358411 - head/contrib/sendmail/src In-Reply-To: References: <34373b64-876b-c97c-e805-ffaf3a69dd8b@grosbein.net> <8e60a869-fe1e-9314-ffdc-76ed3e2dc081@FreeBSD.org> <20200303.075047.1159550404273266246.hrs@FreeBSD.org> <8c1adcb3-1537-e6ae-e446-f05aee1e3483@grosbein.net> <9ac02710-8029-18fc-9b2a-383c1a229cdd@grosbein.net> <489d09c9-f0b4-f7b1-6255-51bdeb19b740@FreeBSD.org> <4d974e29-f930-257c-5e0b-7528e745cea4@grosbein.net> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/26.3 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 12.1-STABLE X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 17:05:29 -0000 Hi, >>>>> On Wed, 4 Mar 2020 22:26:32 +0700 >>>>> Eugene Grosbein said: > No, I never do r515574 back. The other ports depending upon > cyrus-sasl2 must be linked same version of openssl. So, there is an > option "DEFAULT_VERSIONS= ssl=base". Your hack breaks this premise and > confuse people. eugen> r515574 does not change default build for the port. It is "no-op" by default. eugen> It won't do any harm. eugen> "ssl=base" is not solution as I've showed before because eugen> FreeBSD ports tree cannot cope with some ports built with ports version of openssl eugen> and some with base version of openssl and this is exactly what needs to be done here. eugen> Why do you state "it confuses people"? Because, as I said, the other ports depending upon cyrus-sasl2 must be linked same version of openssl. I don't recommend. But, perhaps this works for you: .if ! ${.CURDIR:M*/security/cyrus-sasl2*} DEFAULT_VERSIONS= ssl=openssl .endif Sincerely, -- Hajimu UMEMOTO ume@mahoroba.org ume@FreeBSD.org http://www.mahoroba.org/~ume/ From owner-svn-src-head@freebsd.org Wed Mar 4 17:13:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 87CE7273C55; Wed, 4 Mar 2020 17:13:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XgSw6dwGz44mk; Wed, 4 Mar 2020 17:13:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DFF1215CB; Wed, 4 Mar 2020 17:13:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024HDapm081587; Wed, 4 Mar 2020 17:13:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HDZs5081584; Wed, 4 Mar 2020 17:13:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003041713.024HDZs5081584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2020 17:13:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358624 - in head/sys/dev/mlx5: . mlx5_en mlx5_ib X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_en mlx5_ib X-SVN-Commit-Revision: 358624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 17:13:37 -0000 Author: kib Date: Wed Mar 4 17:13:35 2020 New Revision: 358624 URL: https://svnweb.freebsd.org/changeset/base/358624 Log: mlx5en: Support 50GBase-KR4 media type in mlx5en driver. Submitted by: Adam Peace Reviewed by: hselasky Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c head/sys/dev/mlx5/port.h Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Mar 4 16:57:23 2020 (r358623) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Mar 4 17:13:35 2020 (r358624) @@ -171,6 +171,10 @@ static const struct media mlx5e_mode_table[MLX5E_LINK_ .subtype = IFM_50G_KR2, .baudrate = IF_Gbps(50ULL), }, + [MLX5E_50GBASE_KR4][MLX5E_KR4] = { + .subtype = IFM_50G_KR4, + .baudrate = IF_Gbps(50ULL), + }, }; static const struct media mlx5e_ext_mode_table[MLX5E_EXT_LINK_SPEEDS_NUMBER][MLX5E_LINK_MODES_NUMBER] = { @@ -317,6 +321,10 @@ static const struct media mlx5e_ext_mode_table[MLX5E_E }, [MLX5E_50GAUI_2_LAUI_2_50GBASE_CR2_KR2][MLX5E_KR2] = { .subtype = IFM_50G_KR2, + .baudrate = IF_Gbps(50ULL), + }, + [MLX5E_50GAUI_2_LAUI_2_50GBASE_CR2_KR2][MLX5E_KR4] = { + .subtype = IFM_50G_KR4, .baudrate = IF_Gbps(50ULL), }, [MLX5E_50GAUI_2_LAUI_2_50GBASE_CR2_KR2][MLX5E_SR2] = { Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Mar 4 16:57:23 2020 (r358623) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Mar 4 17:13:35 2020 (r358624) @@ -199,6 +199,7 @@ static int translate_eth_proto_oper(u32 eth_proto_oper break; case MLX5E_PROT_MASK(MLX5E_50GBASE_CR2): case MLX5E_PROT_MASK(MLX5E_50GBASE_KR2): + case MLX5E_PROT_MASK(MLX5E_50GBASE_KR4): case MLX5E_PROT_MASK(MLX5E_50GBASE_SR2): *active_width = IB_WIDTH_1X; *active_speed = IB_SPEED_HDR; Modified: head/sys/dev/mlx5/port.h ============================================================================== --- head/sys/dev/mlx5/port.h Wed Mar 4 16:57:23 2020 (r358623) +++ head/sys/dev/mlx5/port.h Wed Mar 4 17:13:35 2020 (r358624) @@ -95,6 +95,7 @@ enum mlx5e_link_speed { MLX5E_40GBASE_SR4 = 15, MLX5E_40GBASE_LR4_ER4 = 16, MLX5E_50GBASE_SR2 = 18, + MLX5E_50GBASE_KR4 = 19, MLX5E_100GBASE_CR4 = 20, MLX5E_100GBASE_SR4 = 21, MLX5E_100GBASE_KR4 = 22, From owner-svn-src-head@freebsd.org Wed Mar 4 17:17:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 468C0273F4B; Wed, 4 Mar 2020 17:17:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XgXv06cWz4BmR; Wed, 4 Mar 2020 17:17:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFDF8215D0; Wed, 4 Mar 2020 17:17:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024HH2g6081811; Wed, 4 Mar 2020 17:17:02 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HH2eC081810; Wed, 4 Mar 2020 17:17:02 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003041717.024HH2eC081810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 4 Mar 2020 17:17:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358625 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 358625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 17:17:03 -0000 Author: bz Date: Wed Mar 4 17:17:02 2020 New Revision: 358625 URL: https://svnweb.freebsd.org/changeset/base/358625 Log: Implement optional table entry limits for if_llatbl. Implement counting of table entries linked on a per-table base with an optional (if set > 0) limit of the maximum number of table entries. For that the public lltable_link_entry() and lltable_unlink_entry() functions as well as the internal function pointers change from void to having an int return type. Given no consumer currently sets the new llt_maxentries this can be committed on its own. The moment we make use of the table limits, the callers of the link function must check the return value as it can change and entries might not be added. Adjustments for IPv6 (and possibly IPv4) will follow. Sponsored by: Netflix (originally) Reviewed by: melifaro MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D22713 Modified: head/sys/net/if_llatbl.c head/sys/net/if_llatbl.h Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Wed Mar 4 17:13:35 2020 (r358624) +++ head/sys/net/if_llatbl.c Wed Mar 4 17:17:02 2020 (r358625) @@ -153,17 +153,29 @@ htable_foreach_lle(struct lltable *llt, llt_foreach_cb return (error); } -static void +/* + * The htable_[un]link_entry() functions return: + * 0 if the entry was (un)linked already and nothing changed, + * 1 if the entry was added/removed to/from the table, and + * -1 on error (e.g., not being able to add the entry due to limits reached). + * While the "unlink" operation should never error, callers of + * lltable_link_entry() need to check for errors and handle them. + */ +static int htable_link_entry(struct lltable *llt, struct llentry *lle) { struct llentries *lleh; uint32_t hashidx; if ((lle->la_flags & LLE_LINKED) != 0) - return; + return (0); IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp); + if (llt->llt_maxentries > 0 && + llt->llt_entries >= llt->llt_maxentries) + return (-1); + hashidx = llt->llt_hash(lle, llt->llt_hsize); lleh = &llt->lle_head[hashidx]; @@ -171,22 +183,33 @@ htable_link_entry(struct lltable *llt, struct llentry lle->lle_head = lleh; lle->la_flags |= LLE_LINKED; CK_LIST_INSERT_HEAD(lleh, lle, lle_next); + llt->llt_entries++; + + return (1); } -static void +static int htable_unlink_entry(struct llentry *lle) { + struct lltable *llt; if ((lle->la_flags & LLE_LINKED) == 0) - return; + return (0); - IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp); + llt = lle->lle_tbl; + IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp); + KASSERT(llt->llt_entries > 0, ("%s: lltable %p (%s) entries %d <= 0", + __func__, llt, if_name(llt->llt_ifp), llt->llt_entries)); + CK_LIST_REMOVE(lle, lle_next); lle->la_flags &= ~(LLE_VALID | LLE_LINKED); #if 0 lle->lle_tbl = NULL; lle->lle_head = NULL; #endif + llt->llt_entries--; + + return (1); } struct prefix_match_data { @@ -483,6 +506,9 @@ lltable_free(struct lltable *llt) llentry_free(lle); } + KASSERT(llt->llt_entries == 0, ("%s: lltable %p (%s) entires not 0: %d", + __func__, llt, llt->llt_ifp->if_xname, llt->llt_entries)); + llt->llt_free_tbl(llt); } @@ -608,18 +634,18 @@ lltable_free_entry(struct lltable *llt, struct llentry llt->llt_free_entry(llt, lle); } -void +int lltable_link_entry(struct lltable *llt, struct llentry *lle) { - llt->llt_link_entry(llt, lle); + return (llt->llt_link_entry(llt, lle)); } -void +int lltable_unlink_entry(struct lltable *llt, struct llentry *lle) { - llt->llt_unlink_entry(lle); + return (llt->llt_unlink_entry(lle)); } void Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Wed Mar 4 17:13:35 2020 (r358624) +++ head/sys/net/if_llatbl.h Wed Mar 4 17:17:02 2020 (r358625) @@ -151,8 +151,8 @@ typedef int (llt_match_prefix_t)(const struct sockaddr typedef void (llt_free_entry_t)(struct lltable *, struct llentry *); typedef void (llt_fill_sa_entry_t)(const struct llentry *, struct sockaddr *); typedef void (llt_free_tbl_t)(struct lltable *); -typedef void (llt_link_entry_t)(struct lltable *, struct llentry *); -typedef void (llt_unlink_entry_t)(struct llentry *); +typedef int (llt_link_entry_t)(struct lltable *, struct llentry *); +typedef int (llt_unlink_entry_t)(struct llentry *); typedef void (llt_mark_used_t)(struct llentry *); typedef int (llt_foreach_cb_t)(struct lltable *, struct llentry *, void *); @@ -162,6 +162,8 @@ struct lltable { SLIST_ENTRY(lltable) llt_link; int llt_af; int llt_hsize; + int llt_entries; + int llt_maxentries; struct llentries *lle_head; struct ifnet *llt_ifp; @@ -230,8 +232,8 @@ struct llentry *lltable_alloc_entry(struct lltable *ll void lltable_free_entry(struct lltable *llt, struct llentry *lle); int lltable_delete_addr(struct lltable *llt, u_int flags, const struct sockaddr *l3addr); -void lltable_link_entry(struct lltable *llt, struct llentry *lle); -void lltable_unlink_entry(struct lltable *llt, struct llentry *lle); +int lltable_link_entry(struct lltable *llt, struct llentry *lle); +int lltable_unlink_entry(struct lltable *llt, struct llentry *lle); void lltable_fill_sa_entry(const struct llentry *lle, struct sockaddr *sa); struct ifnet *lltable_get_ifp(const struct lltable *llt); int lltable_get_af(const struct lltable *llt); From owner-svn-src-head@freebsd.org Wed Mar 4 17:23:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABB2A274324; Wed, 4 Mar 2020 17:23:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XghB2jlxz4SSL; Wed, 4 Mar 2020 17:23:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1A47217D1; Wed, 4 Mar 2020 17:23:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024HNLaw088178; Wed, 4 Mar 2020 17:23:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HNLtZ088171; Wed, 4 Mar 2020 17:23:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003041723.024HNLtZ088171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 4 Mar 2020 17:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358629 - head/sys/dev/sound/pcm X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/pcm X-SVN-Commit-Revision: 358629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 17:23:22 -0000 Author: hselasky Date: Wed Mar 4 17:23:20 2020 New Revision: 358629 URL: https://svnweb.freebsd.org/changeset/base/358629 Log: Implement a detaching flag for the sound(4) subsystem to take appropriate actions when we are trying to detach an audio device, but cannot because someone is using it. This avoids applications having to wait for the DSP read data timeout before they receive any error indication. Tested with virtual_oss(8). Remove some unused definitions while at it. PR: 194727 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/pcm/dsp.c head/sys/dev/sound/pcm/mixer.c head/sys/dev/sound/pcm/sound.c head/sys/dev/sound/pcm/sound.h Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Wed Mar 4 17:21:49 2020 (r358628) +++ head/sys/dev/sound/pcm/dsp.c Wed Mar 4 17:23:20 2020 (r358629) @@ -460,7 +460,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, stru return (ENODEV); d = dsp_get_info(i_dev); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EBADF); PCM_GIANT_ENTER(d); @@ -830,7 +830,7 @@ dsp_io_ops(struct cdev *i_dev, struct uio *buf) ("%s(): io train wreck!", __func__)); d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) return (EBADF); PCM_GIANT_ENTER(d); @@ -1075,7 +1075,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int *arg_i, ret, tmp; d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) return (EBADF); PCM_GIANT_ENTER(d); @@ -2170,9 +2170,11 @@ dsp_poll(struct cdev *i_dev, int events, struct thread int ret, e; d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) - return (EBADF); - + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) { + /* XXX many clients don't understand POLLNVAL */ + return (events & (POLLHUP | POLLPRI | POLLIN | + POLLRDNORM | POLLOUT | POLLWRNORM)); + } PCM_GIANT_ENTER(d); wrch = NULL; @@ -2246,7 +2248,7 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offs return (EINVAL); d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) return (EINVAL); PCM_GIANT_ENTER(d); Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Wed Mar 4 17:21:49 2020 (r358628) +++ head/sys/dev/sound/pcm/mixer.c Wed Mar 4 17:23:20 2020 (r358629) @@ -153,7 +153,7 @@ mixer_set_softpcmvol(struct snd_mixer *m, struct sndde struct pcm_channel *c; int dropmtx, acquiremtx; - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EINVAL); if (mtx_owned(m->lock)) @@ -206,7 +206,7 @@ mixer_set_eq(struct snd_mixer *m, struct snddev_info * else return (EINVAL); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EINVAL); if (mtx_owned(m->lock)) @@ -1046,7 +1046,7 @@ mixer_open(struct cdev *i_dev, int flags, int mode, st m = i_dev->si_drv1; d = device_get_softc(m->dev); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EBADF); /* XXX Need Giant magic entry ??? */ @@ -1202,7 +1202,7 @@ mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t ar return (EBADF); d = device_get_softc(((struct snd_mixer *)i_dev->si_drv1)->dev); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EBADF); PCM_GIANT_ENTER(d); @@ -1411,7 +1411,7 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) continue; /* XXX Need Giant magic entry */ Modified: head/sys/dev/sound/pcm/sound.c ============================================================================== --- head/sys/dev/sound/pcm/sound.c Wed Mar 4 17:21:49 2020 (r358628) +++ head/sys/dev/sound/pcm/sound.c Wed Mar 4 17:23:20 2020 (r358629) @@ -1162,6 +1162,8 @@ pcm_unregister(device_t dev) PCM_LOCK(d); PCM_WAIT(d); + d->flags |= SD_F_DETACHING; + if (d->inprog != 0) { device_printf(dev, "unregister: operation in progress\n"); PCM_UNLOCK(d); Modified: head/sys/dev/sound/pcm/sound.h ============================================================================== --- head/sys/dev/sound/pcm/sound.h Wed Mar 4 17:21:49 2020 (r358628) +++ head/sys/dev/sound/pcm/sound.h Wed Mar 4 17:23:20 2020 (r358629) @@ -131,15 +131,8 @@ struct snd_mixer; #define SD_F_SIMPLEX 0x00000001 #define SD_F_AUTOVCHAN 0x00000002 #define SD_F_SOFTPCMVOL 0x00000004 -/* - * Obsolete due to better matrixing - */ -#if 0 -#define SD_F_PSWAPLR 0x00000008 -#define SD_F_RSWAPLR 0x00000010 -#endif #define SD_F_DYING 0x00000008 -#define SD_F_SUICIDE 0x00000010 +#define SD_F_DETACHING 0x00000010 #define SD_F_BUSY 0x00000020 #define SD_F_MPSAFE 0x00000040 #define SD_F_REGISTERED 0x00000080 @@ -165,7 +158,7 @@ struct snd_mixer; "\002AUTOVCHAN" \ "\003SOFTPCMVOL" \ "\004DYING" \ - "\005SUICIDE" \ + "\005DETACHING" \ "\006BUSY" \ "\007MPSAFE" \ "\010REGISTERED" \ @@ -183,6 +176,8 @@ struct snd_mixer; !((x)->flags & SD_F_DYING)) #define PCM_REGISTERED(x) (PCM_ALIVE(x) && \ ((x)->flags & SD_F_REGISTERED)) + +#define PCM_DETACHING(x) ((x)->flags & SD_F_DETACHING) /* many variables should be reduced to a range. Here define a macro */ #define RANGE(var, low, high) (var) = \ From owner-svn-src-head@freebsd.org Wed Mar 4 17:27:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50B3E274444; Wed, 4 Mar 2020 17:27:11 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XgmZ5B9hz4dKb; Wed, 4 Mar 2020 17:27:10 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f193.google.com with SMTP id h16so1945043qtr.11; Wed, 04 Mar 2020 09:27:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+JhsfjFtzvfhY2IQ+wD7u7y8Uft+M34GGxsIluYbpIc=; b=E4wEVN6WahmrF5q7E7bJ/M3g3ZAa85hvP8tJZayRcwvX0CBRARV8owMnQChwJ4SnuL odVi6k5uRGcOP7WhwYsFGWQmybpIcrXd+jY68FG9W/4JniyBhaIWbcywZ9X1uER9Sx+Z +/9waqfiwj5/jEkLdRl+Pn5SS1V6TZ8pVZOu5ku45tPEX6F9rI/CnR1SV72M5Rx43mAq 1uccQ4H0zYeBEsKoK44zpG5NmEE9c+sbvIjOr6sk+pkUBfjg9nEzI9o/+XW3dootHcHl XZFjS2gs89Ide9hMosg29WSWPTWyIYqZyiWJ7pyeRi/Ik8St3gYEYncEMyxuYDQ3wVmv dhAA== X-Gm-Message-State: ANhLgQ0TQcw5avg57Jht22nxYJoW9VnuhfWfj7Ua4HqaaFLFrCR4tl9z P4WiyBaq9mNMfOuQTb6OCJnPULDQSnU= X-Google-Smtp-Source: ADFU+vsDb96ClaaawpkgS9S4UiiYub/+qEilSCqSjBhpC0EoP3AGkg/0At1X5crZV4Fp8mNJIlpuzg== X-Received: by 2002:ac8:6899:: with SMTP id m25mr3215818qtq.93.1583342828479; Wed, 04 Mar 2020 09:27:08 -0800 (PST) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com. [209.85.222.176]) by smtp.gmail.com with ESMTPSA id a187sm14376346qkc.61.2020.03.04.09.27.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2020 09:27:08 -0800 (PST) Received: by mail-qk1-f176.google.com with SMTP id b5so2407142qkh.8; Wed, 04 Mar 2020 09:27:08 -0800 (PST) X-Received: by 2002:a37:b984:: with SMTP id j126mr3770242qkf.3.1583342827765; Wed, 04 Mar 2020 09:27:07 -0800 (PST) MIME-Version: 1.0 References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> In-Reply-To: <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> From: Ryan Libby Date: Wed, 4 Mar 2020 09:26:56 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358439 - head/sys/amd64/include To: Guido Falsi Cc: "Alexander V. Chernikov" , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48XgmZ5B9hz4dKb X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.71 / 15.00]; NEURAL_HAM_MEDIUM(-0.71)[-0.715,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 17:27:11 -0000 On Wed, Mar 4, 2020 at 3:27 AM Guido Falsi wrote: > > On 02/03/20 18:13, Ryan Libby wrote: > > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > >> > >> 28.02.2020, 18:32, "Ryan Libby" : > >>> Author: rlibby > >>> Date: Fri Feb 28 18:32:36 2020 > >>> New Revision: 358439 > >>> URL: https://svnweb.freebsd.org/changeset/base/358439 > >>> > >>> Log: > >>> amd64 atomic.h: minor codegen optimization in flag access > >>> > >>> Previously the pattern to extract status flags from inline assembly > >>> blocks was to use setcc in the block to write the flag to a register. > >>> This was suboptimal in a few ways: > >>> - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > >>> would just be loaded into a register and then reloaded to a flag. > >>> - The setcc would force the block to use an additional register. > >>> - If the client code didn't care for the flag value then the setcc > >>> would be entirely pointless but could not be eliminated by the > >>> optimizer. > >>> > >>> A more modern inline asm construct (since gcc 6 and clang 9) allows for > >> This effectively restricts kernel builds by all older compilers. > >> Is there any chance of making it conditional depending on the compiler version/features? > > > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > > maintenance effort going forward. If building current with an old cross > > compiler is an important scenario, we can either revert this and the > > following revision or work up a patch to make it conditional. I'll see > > what that might look like. > > > > Actually this causes emulators/virtualbox-ose port to fail to build: > > In file included from /usr/src/sys/sys/systm.h:44: > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=@cce' in asm > ATOMIC_CMPSET(char); > ^ > /usr/include/machine/atomic.h:205:4: note: expanded from macro > 'ATOMIC_CMPSET' > : "=@cce" (res), /* 0 */ \ > ^ > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=@cce' in asm > > (and so on) > > > the virtualbox-ose port is forced to use an older clang version due to > crashes when compiled with newer ones. > > Not sure whose responsibility is to fix this. > > Should I file a bug report on bugzilla? > > -- > Guido Falsi We've discussed whether to provide compatibility code for older compilers here: https://reviews.freebsd.org/D23937 There's a bug tracking virtualbox-ose being pinned to an old compiler here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236616 I see you have commented on that bug. From owner-svn-src-head@freebsd.org Wed Mar 4 17:43:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF032274901; Wed, 4 Mar 2020 17:43:09 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xh701BRdz4MxN; Wed, 4 Mar 2020 17:43:08 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 81FDC16054; Wed, 4 Mar 2020 18:43:00 +0100 (CET) Date: Wed, 04 Mar 2020 18:43:00 +0100 From: Steffen Nurpmeso To: Gordon Bergling Cc: Conrad Meyer , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r358562 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... Message-ID: <20200304174300.oD1Or%steffen@sdaoden.eu> In-Reply-To: References: <202003030020.0230K9h2002380@repo.freebsd.org> Mail-Followup-To: Gordon Bergling , Conrad Meyer , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org User-Agent: s-nail v14.9.17-52-g56288e6a OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 48Xh701BRdz4MxN X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu X-Spamd-Result: default: False [0.27 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.27)[-0.272,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-0.47)[-0.467,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sdaoden.eu]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; IP_SCORE(0.31)[asn: 15987(1.56), country: DE(-0.02)] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 17:43:09 -0000 Hello Gordon. Gordon Bergling wrote in : |Thanks for the revert. I handcrafted https://reviews.freebsd.org/D23581 \ | a while ago, and this took me \ |two days. This is tremendous! Your work is exactly what i planned to do somewhen in the near future! The calendar port is a bit out of date and will get some love soon. (I want to merge all calendars from FreeBSD, NetBSD and OpenBSD plus some more, but that needs some time.) (2020-02-14) Thanks a lot for that, i will steal it!! Ciao, --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-head@freebsd.org Wed Mar 4 17:55:58 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9DC3274B6E; Wed, 4 Mar 2020 17:55:58 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XhPn6D9Rz3xy5; Wed, 4 Mar 2020 17:55:57 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3A9921DBF; Wed, 4 Mar 2020 17:55:57 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024Htv2S006307; Wed, 4 Mar 2020 17:55:57 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024Htvv5006306; Wed, 4 Mar 2020 17:55:57 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003041755.024Htvv5006306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 4 Mar 2020 17:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358630 - head/sys/dev/bnxt X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/dev/bnxt X-SVN-Commit-Revision: 358630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 17:55:59 -0000 Author: brooks Date: Wed Mar 4 17:55:57 2020 New Revision: 358630 URL: https://svnweb.freebsd.org/changeset/base/358630 Log: bnxt(4): Fix ioctls when user addresses are inaccessable. Check copyin's error code (differ adding copyout checks at this time). Don't directly access user memory in the switch statement. Since bnxt_ioctl_data isn't all that big, use a stack allocation. Reviewed by: jhb MFC after: 3 days Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23933 Modified: head/sys/dev/bnxt/if_bnxt.c Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Wed Mar 4 17:23:20 2020 (r358629) +++ head/sys/dev/bnxt/if_bnxt.c Wed Mar 4 17:55:57 2020 (r358630) @@ -1650,25 +1650,26 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t { struct bnxt_softc *softc = iflib_get_softc(ctx); struct ifreq *ifr = (struct ifreq *)data; - struct ifreq_buffer *ifbuf = &ifr->ifr_ifru.ifru_buffer; - struct bnxt_ioctl_header *ioh = - (struct bnxt_ioctl_header *)(ifbuf->buffer); + struct bnxt_ioctl_header *ioh; + size_t iol; int rc = ENOTSUP; - struct bnxt_ioctl_data *iod = NULL; + struct bnxt_ioctl_data iod_storage, *iod = &iod_storage; + switch (command) { case SIOCGPRIVATE_0: if ((rc = priv_check(curthread, PRIV_DRIVER)) != 0) goto exit; - iod = malloc(ifbuf->length, M_DEVBUF, M_NOWAIT | M_ZERO); - if (!iod) { - rc = ENOMEM; + ioh = ifr_buffer_get_buffer(ifr); + iol = ifr_buffer_get_length(ifr); + if (iol > sizeof(iod_storage)) + return (EINVAL); + + if ((rc = copyin(ioh, iod, iol)) != 0) goto exit; - } - copyin(ioh, iod, ifbuf->length); - switch (ioh->type) { + switch (iod->hdr.type) { case BNXT_HWRM_NVM_FIND_DIR_ENTRY: { struct bnxt_ioctl_hwrm_nvm_find_dir_entry *find = @@ -1686,7 +1687,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1726,7 +1727,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t remain -= csize; } if (iod->hdr.rc == 0) - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); iflib_dma_free(&dma_data); rc = 0; @@ -1746,7 +1747,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1766,7 +1767,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1788,7 +1789,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1807,7 +1808,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1827,7 +1828,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1854,7 +1855,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t copyout(dma_data.idi_vaddr, get->data, get->entry_length * get->entries); iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } iflib_dma_free(&dma_data); @@ -1875,7 +1876,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1897,7 +1898,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1916,7 +1917,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1937,7 +1938,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1958,7 +1959,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1969,8 +1970,6 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } exit: - if (iod) - free(iod, M_DEVBUF); return rc; } From owner-svn-src-head@freebsd.org Wed Mar 4 18:21:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20BD82754D4; Wed, 4 Mar 2020 18:21:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XhzK3jlrz3Gbk; Wed, 4 Mar 2020 18:21:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFE042225C; Wed, 4 Mar 2020 18:21:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024ILV8x021462; Wed, 4 Mar 2020 18:21:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024ILVPO021459; Wed, 4 Mar 2020 18:21:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003041821.024ILVPO021459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2020 18:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358631 - in head: contrib/elftoolchain/readelf sys/sys usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: contrib/elftoolchain/readelf sys/sys usr.bin/elfctl X-SVN-Commit-Revision: 358631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 18:21:35 -0000 Author: emaste Date: Wed Mar 4 18:21:30 2020 New Revision: 358631 URL: https://svnweb.freebsd.org/changeset/base/358631 Log: Reserve WXNEEDED ELF feature control flag This will be used to tag binaries that require W+X mappings, in advance of the ability to prevent W^X in mmap/mprotect. There is still some discussion about the flag's name, but the ABI won't change even if the name does (as kib pointed out in the review). Reviewed by: csjp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23909 Modified: head/contrib/elftoolchain/readelf/readelf.c head/sys/sys/elf_common.h head/usr.bin/elfctl/elfctl.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 17:55:57 2020 (r358630) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 18:21:30 2020 (r358631) @@ -3671,6 +3671,7 @@ static struct flag_desc note_feature_ctl_flags[] = { { NT_FREEBSD_FCTL_ASLR_DISABLE, "ASLR_DISABLE" }, { NT_FREEBSD_FCTL_PROTMAX_DISABLE, "PROTMAX_DISABLE" }, { NT_FREEBSD_FCTL_STKGAP_DISABLE, "STKGAP_DISABLE" }, + { NT_FREEBSD_FCTL_WXNEEDED, "WXNEEDED" }, { 0, NULL } }; Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Wed Mar 4 17:55:57 2020 (r358630) +++ head/sys/sys/elf_common.h Wed Mar 4 18:21:30 2020 (r358631) @@ -790,6 +790,7 @@ typedef struct { #define NT_FREEBSD_FCTL_ASLR_DISABLE 0x00000001 #define NT_FREEBSD_FCTL_PROTMAX_DISABLE 0x00000002 #define NT_FREEBSD_FCTL_STKGAP_DISABLE 0x00000004 +#define NT_FREEBSD_FCTL_WXNEEDED 0x00000008 /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Wed Mar 4 17:55:57 2020 (r358630) +++ head/usr.bin/elfctl/elfctl.c Wed Mar 4 18:21:30 2020 (r358631) @@ -66,6 +66,7 @@ static struct ControlFeatures featurelist[] = { { "protmax", NT_FREEBSD_FCTL_PROTMAX_DISABLE, "Disable implicit PROT_MAX" }, { "stackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" }, + { "wxneeded", NT_FREEBSD_FCTL_WXNEEDED, "Requires W+X mappings" }, }; static struct option long_opts[] = { From owner-svn-src-head@freebsd.org Wed Mar 4 18:28:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFE6127566D; Wed, 4 Mar 2020 18:28:05 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xj6r1G7Bz3Nb2; Wed, 4 Mar 2020 18:28:04 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id A25F53C0199; Wed, 4 Mar 2020 18:28:01 +0000 (UTC) Date: Wed, 4 Mar 2020 18:28:01 +0000 From: Brooks Davis To: Guido Falsi Cc: Ryan Libby , "Alexander V. Chernikov" , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@FreeBSD.org Subject: Re: svn commit: r358439 - head/sys/amd64/include Message-ID: <20200304182801.GA95422@spindle.one-eyed-alien.net> References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 48Xj6r1G7Bz3Nb2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.49 / 15.00]; REPLY(-4.00)[]; NEURAL_SPAM_MEDIUM(0.51)[0.510,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 18:28:05 -0000 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 04, 2020 at 12:27:08PM +0100, Guido Falsi wrote: > On 02/03/20 18:13, Ryan Libby wrote: > > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > >> > >> 28.02.2020, 18:32, "Ryan Libby" : > >>> Author: rlibby > >>> Date: Fri Feb 28 18:32:36 2020 > >>> New Revision: 358439 > >>> URL: https://svnweb.freebsd.org/changeset/base/358439 > >>> > >>> Log: > >>> amd64 atomic.h: minor codegen optimization in flag access > >>> > >>> Previously the pattern to extract status flags from inline assembly > >>> blocks was to use setcc in the block to write the flag to a registe= r. > >>> This was suboptimal in a few ways: > >>> - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > >>> would just be loaded into a register and then reloaded to a flag. > >>> - The setcc would force the block to use an additional register. > >>> - If the client code didn't care for the flag value then the setcc > >>> would be entirely pointless but could not be eliminated by the > >>> optimizer. > >>> > >>> A more modern inline asm construct (since gcc 6 and clang 9) allows= for > >> This effectively restricts kernel builds by all older compilers. > >> Is there any chance of making it conditional depending on the compiler= version/features? > >=20 > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > > maintenance effort going forward. If building current with an old cross > > compiler is an important scenario, we can either revert this and the > > following revision or work up a patch to make it conditional. I'll see > > what that might look like. > >=20 >=20 > Actually this causes emulators/virtualbox-ose port to fail to build: >=20 > In file included from /usr/src/sys/sys/systm.h:44: > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=3D@cce' in asm > ATOMIC_CMPSET(char); > ^ > /usr/include/machine/atomic.h:205:4: note: expanded from macro > 'ATOMIC_CMPSET' > : "=3D@cce" (res), /* 0 */ \ > ^ > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=3D@cce' in asm >=20 > (and so on) >=20 >=20 > the virtualbox-ose port is forced to use an older clang version due to > crashes when compiled with newer ones. >=20 > Not sure whose responsibility is to fix this. I suspect that now that we don't care about gcc 4.2.1, we should restructure machine/atomic.h to use __atomic compiler builtins in nearly all cases. We could then conditionalize small sets of mircooptimized assembly versions based on the availability of compiler features if they add any value. On CheriBSD we've switched the RISC-V to use the C versions and are overdue to do the same to MIPS. Reworking things to make this the default would decrease our maintenance burden and it seems unlikely that most of our platforms would benefit from handcode assembly (given the general level of optimization in our lower-tier platforms). -- Brooks --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeX/MwAAoJEKzQXbSebgfANZEH/2FpA8Ft7xKiaPRT6Bol7o9x l9TMA1FppM58LEHjDF1VySrWvJfkFJTqsx3X6xdByjabTV51KqrPfjupBCV+9T/3 pN7goV9AC43Y8ZhqkIlgz/nGGy547gEEtTV36wRzMRFLx8MhiehlYisUoi87DYZh wQ/XYep8/XKc0Z7HnaxgRWE8mnoUCvyHG52bMMmnCPa/gjLf/klj5nL+XEKucONi QFxedNSBp4CiyR4KjBodMR5WXsWsvFLb4WuZeMdW75A+mE1rN+6/a+vIVg7xQVOr VTUHhPov6Giv11oUIHlWOk12uTh0Wky8cbyvNFPfVPvAnS6HJ8ScQhWkSqG0qvY= =2Yo5 -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl-- From owner-svn-src-head@freebsd.org Wed Mar 4 18:38:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47E662759B3; Wed, 4 Mar 2020 18:38:11 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XjLV3xx4z43W4; Wed, 4 Mar 2020 18:38:10 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E0862259B; Wed, 4 Mar 2020 18:38:10 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024IcADw030872; Wed, 4 Mar 2020 18:38:10 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024Ic9fA030868; Wed, 4 Mar 2020 18:38:09 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202003041838.024Ic9fA030868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 4 Mar 2020 18:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358632 - in head/stand/i386: gptboot isoboot X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/stand/i386: gptboot isoboot X-SVN-Commit-Revision: 358632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 18:38:11 -0000 Author: tsoome Date: Wed Mar 4 18:38:09 2020 New Revision: 358632 URL: https://svnweb.freebsd.org/changeset/base/358632 Log: loader: crc32 is provided by libsa Seems like leftover from moving crc32.c to libsa. Modified: head/stand/i386/gptboot/Makefile head/stand/i386/isoboot/Makefile Modified: head/stand/i386/gptboot/Makefile ============================================================================== --- head/stand/i386/gptboot/Makefile Wed Mar 4 18:21:30 2020 (r358631) +++ head/stand/i386/gptboot/Makefile Wed Mar 4 18:38:09 2020 (r358632) @@ -53,13 +53,13 @@ gptldr.bin: gptldr.out gptldr.out: gptldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o -CLEANFILES+= gptboot.bin gptboot.out gptboot.o sio.o crc32.o drv.o \ +CLEANFILES+= gptboot.bin gptboot.out gptboot.o sio.o drv.o \ cons.o ${OPENCRYPTO_XTS} gptboot.bin: gptboot.out ${OBJCOPY} -S -O binary gptboot.out ${.TARGET} -gptboot.out: ${BTXCRT} gptboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS} +gptboot.out: ${BTXCRT} gptboot.o sio.o drv.o cons.o ${OPENCRYPTO_XTS} ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include Modified: head/stand/i386/isoboot/Makefile ============================================================================== --- head/stand/i386/isoboot/Makefile Wed Mar 4 18:21:30 2020 (r358631) +++ head/stand/i386/isoboot/Makefile Wed Mar 4 18:38:09 2020 (r358632) @@ -55,13 +55,13 @@ gptldr.bin: gptldr.out gptldr.out: gptldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o -CLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o crc32.o drv.o \ +CLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o drv.o \ cons.o ${OPENCRYPTO_XTS} isoboot.bin: isoboot.out ${OBJCOPY} -S -O binary isoboot.out ${.TARGET} -isoboot.out: ${BTXCRT} isoboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS} +isoboot.out: ${BTXCRT} isoboot.o sio.o drv.o cons.o ${OPENCRYPTO_XTS} ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include From owner-svn-src-head@freebsd.org Wed Mar 4 18:49:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01D07275C59; Wed, 4 Mar 2020 18:49:13 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XjbF28bzz4Sg1; Wed, 4 Mar 2020 18:49:13 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f193.google.com with SMTP id j7so2449536qkd.5; Wed, 04 Mar 2020 10:49:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7/JKXD33FfO7O2i4fd06ltBtMN47rKz8oO0ClBGerbA=; b=Qq1xtd1IhHE85+JBYjiMCiwIXXviTQhRIxVBXokmvzpsrDgHyb3eg6eP1+cJLTr912 yVK7zmHnERTx+tngocfMFKsGbS0olDLzyQWMrGMCeXHKrnFMC1LhKvXvlt0P7piMnStL e4vmQrme9zjXCSkFbtCZtnXLVOViA27a/z0OiCGK9hok38/DbNOI2+G3GkRnBVMnywGr icyW3UD9G23vYElHzC5/jjeMAlK9V2ZGBwbbHYwFn+u9KFvzCNZCZCcQ2l9rruWOiiO/ pFdEGW0SZZOihvLx97aVGbaEd523jJ7/aUBowiZarbbfzVULwncCVAtJ7X+guOy54MPJ +Z4g== X-Gm-Message-State: ANhLgQ0ZO67sb7QTZ+3/wJIMm9tpH1lWaoTDXV4roAlzHaJJxBUX/x9r hxGcaBXxfkBzyHrQ2mP+QuOKl9WsbCM= X-Google-Smtp-Source: ADFU+vtX38GQD2oGx8aUhOHmNa1kvl3SFqkQdWNoHG7oHGSuQB801JY5JgxiC2QSqEo+soKTbbD1Kg== X-Received: by 2002:a05:620a:4f7:: with SMTP id b23mr4476794qkh.258.1583347751338; Wed, 04 Mar 2020 10:49:11 -0800 (PST) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com. [209.85.219.51]) by smtp.gmail.com with ESMTPSA id h9sm14526890qtq.61.2020.03.04.10.49.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2020 10:49:11 -0800 (PST) Received: by mail-qv1-f51.google.com with SMTP id u10so1268675qvi.2; Wed, 04 Mar 2020 10:49:11 -0800 (PST) X-Received: by 2002:a05:6214:8b:: with SMTP id n11mr3309011qvr.72.1583347750710; Wed, 04 Mar 2020 10:49:10 -0800 (PST) MIME-Version: 1.0 References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> <20200304182801.GA95422@spindle.one-eyed-alien.net> In-Reply-To: <20200304182801.GA95422@spindle.one-eyed-alien.net> From: Ryan Libby Date: Wed, 4 Mar 2020 10:48:59 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358439 - head/sys/amd64/include To: Brooks Davis Cc: Guido Falsi , "Alexander V. Chernikov" , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48XjbF28bzz4Sg1 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.72 / 15.00]; NEURAL_HAM_MEDIUM(-0.72)[-0.723,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 18:49:14 -0000 On Wed, Mar 4, 2020 at 10:28 AM Brooks Davis wrote: > > On Wed, Mar 04, 2020 at 12:27:08PM +0100, Guido Falsi wrote: > > On 02/03/20 18:13, Ryan Libby wrote: > > > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > > >> > > >> 28.02.2020, 18:32, "Ryan Libby" : > > >>> Author: rlibby > > >>> Date: Fri Feb 28 18:32:36 2020 > > >>> New Revision: 358439 > > >>> URL: https://svnweb.freebsd.org/changeset/base/358439 > > >>> > > >>> Log: > > >>> amd64 atomic.h: minor codegen optimization in flag access > > >>> > > >>> Previously the pattern to extract status flags from inline assembly > > >>> blocks was to use setcc in the block to write the flag to a register. > > >>> This was suboptimal in a few ways: > > >>> - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > > >>> would just be loaded into a register and then reloaded to a flag. > > >>> - The setcc would force the block to use an additional register. > > >>> - If the client code didn't care for the flag value then the setcc > > >>> would be entirely pointless but could not be eliminated by the > > >>> optimizer. > > >>> > > >>> A more modern inline asm construct (since gcc 6 and clang 9) allows for > > >> This effectively restricts kernel builds by all older compilers. > > >> Is there any chance of making it conditional depending on the compiler version/features? > > > > > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > > > maintenance effort going forward. If building current with an old cross > > > compiler is an important scenario, we can either revert this and the > > > following revision or work up a patch to make it conditional. I'll see > > > what that might look like. > > > > > > > Actually this causes emulators/virtualbox-ose port to fail to build: > > > > In file included from /usr/src/sys/sys/systm.h:44: > > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > > '=@cce' in asm > > ATOMIC_CMPSET(char); > > ^ > > /usr/include/machine/atomic.h:205:4: note: expanded from macro > > 'ATOMIC_CMPSET' > > : "=@cce" (res), /* 0 */ \ > > ^ > > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > > '=@cce' in asm > > > > (and so on) > > > > > > the virtualbox-ose port is forced to use an older clang version due to > > crashes when compiled with newer ones. > > > > Not sure whose responsibility is to fix this. > > I suspect that now that we don't care about gcc 4.2.1, we should > restructure machine/atomic.h to use __atomic compiler builtins in nearly > all cases. We could then conditionalize small sets of mircooptimized > assembly versions based on the availability of compiler features if they > add any value. > > On CheriBSD we've switched the RISC-V to use the C versions and are > overdue to do the same to MIPS. Reworking things to make this the > default would decrease our maintenance burden and it seems unlikely that > most of our platforms would benefit from handcode assembly (given the > general level of optimization in our lower-tier platforms). > > -- Brooks There's further discussion on that topic in the original review (D23869) and in D23661. From owner-svn-src-head@freebsd.org Wed Mar 4 19:52:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7F472771AA; Wed, 4 Mar 2020 19:52:01 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xkzh74BDz4R3w; Wed, 4 Mar 2020 19:52:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B202623479; Wed, 4 Mar 2020 19:52:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024Jq0aG081252; Wed, 4 Mar 2020 19:52:00 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024Jq0Zq081251; Wed, 4 Mar 2020 19:52:00 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003041952.024Jq0Zq081251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 4 Mar 2020 19:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358633 - head/sys/fs/nullfs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/fs/nullfs X-SVN-Commit-Revision: 358633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 19:52:02 -0000 Author: mjg Date: Wed Mar 4 19:52:00 2020 New Revision: 358633 URL: https://svnweb.freebsd.org/changeset/base/358633 Log: nullfs: don't pre lock exclusive in nullfs_root Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23955 Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Wed Mar 4 18:38:09 2020 (r358632) +++ head/sys/fs/nullfs/null_vfsops.c Wed Mar 4 19:52:00 2020 (r358633) @@ -281,13 +281,10 @@ nullfs_root(mp, flags, vpp) NULLFSDEBUG("nullfs_root(mp = %p, vp = %p)\n", mp, mntdata->nullm_lowerrootvp); - error = vget(mntdata->nullm_lowerrootvp, (flags & ~LK_TYPE_MASK) | - LK_EXCLUSIVE, curthread); + error = vget(mntdata->nullm_lowerrootvp, flags, curthread); if (error == 0) { error = null_nodeget(mp, mntdata->nullm_lowerrootvp, &vp); if (error == 0) { - if ((flags & LK_TYPE_MASK) == LK_SHARED) - vn_lock(vp, LK_DOWNGRADE | LK_RETRY); *vpp = vp; } } From owner-svn-src-head@freebsd.org Wed Mar 4 19:52:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C990F277253; Wed, 4 Mar 2020 19:52:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xl0M3ZbYz4SLV; Wed, 4 Mar 2020 19:52:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49CE8234B2; Wed, 4 Mar 2020 19:52:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024JqZp6081318; Wed, 4 Mar 2020 19:52:35 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024JqZb4081317; Wed, 4 Mar 2020 19:52:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003041952.024JqZb4081317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 4 Mar 2020 19:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358634 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 19:52:35 -0000 Author: mjg Date: Wed Mar 4 19:52:34 2020 New Revision: 358634 URL: https://svnweb.freebsd.org/changeset/base/358634 Log: execve: use LOCKSHARED when looking up the interpreter Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23956 Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Wed Mar 4 19:52:00 2020 (r358633) +++ head/sys/kern/kern_exec.c Wed Mar 4 19:52:34 2020 (r358634) @@ -648,8 +648,8 @@ interpret: free(imgp->freepath, M_TEMP); imgp->freepath = NULL; /* set new name to that of the interpreter */ - NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME, - UIO_SYSSPACE, imgp->interpreter_name, td); + NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | LOCKSHARED | FOLLOW | + SAVENAME, UIO_SYSSPACE, imgp->interpreter_name, td); args->fname = imgp->interpreter_name; goto interpret; } From owner-svn-src-head@freebsd.org Wed Mar 4 20:01:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C88B2774B7; Wed, 4 Mar 2020 20:01:04 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XlB82KY7z3KQ5; Wed, 4 Mar 2020 20:01:04 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B15A23502; Wed, 4 Mar 2020 20:01:04 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024K14IT083300; Wed, 4 Mar 2020 20:01:04 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024K13cB083298; Wed, 4 Mar 2020 20:01:03 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042001.024K13cB083298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358635 - head/sys/dev/mmc/host X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/mmc/host X-SVN-Commit-Revision: 358635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 20:01:04 -0000 Author: manu Date: Wed Mar 4 20:01:03 2020 New Revision: 358635 URL: https://svnweb.freebsd.org/changeset/base/358635 Log: dwmmc: Rework the DMA engine Each segment can be up to 4096 bytes in chain structure according to the RK3399 TRM Part 2. Set the buffers in full ring where the last one point to the first one. Correctly reports the MMC_IVAR_MAX_DATA. Use CACHE_LINE_SIZE for bus_dma alignment. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D23894 Modified: head/sys/dev/mmc/host/dwmmc.c head/sys/dev/mmc/host/dwmmc_hisi.c head/sys/dev/mmc/host/dwmmc_var.h Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Wed Mar 4 19:52:34 2020 (r358634) +++ head/sys/dev/mmc/host/dwmmc.c Wed Mar 4 20:01:03 2020 (r358635) @@ -99,16 +99,15 @@ __FBSDID("$FreeBSD$"); #define DWMMC_ERR_FLAGS (DWMMC_DATA_ERR_FLAGS | DWMMC_CMD_ERR_FLAGS \ |SDMMC_INTMASK_HLE) -#define DES0_DIC (1 << 1) -#define DES0_LD (1 << 2) -#define DES0_FS (1 << 3) -#define DES0_CH (1 << 4) -#define DES0_ER (1 << 5) -#define DES0_CES (1 << 30) -#define DES0_OWN (1 << 31) +#define DES0_DIC (1 << 1) /* Disable Interrupt on Completion */ +#define DES0_LD (1 << 2) /* Last Descriptor */ +#define DES0_FS (1 << 3) /* First Descriptor */ +#define DES0_CH (1 << 4) /* second address CHained */ +#define DES0_ER (1 << 5) /* End of Ring */ +#define DES0_CES (1 << 30) /* Card Error Summary */ +#define DES0_OWN (1 << 31) /* OWN */ -#define DES1_BS1_MASK 0xfff -#define DES1_BS1_SHIFT 0 +#define DES1_BS1_MASK 0x1fff struct idmac_desc { uint32_t des0; /* control */ @@ -117,9 +116,10 @@ struct idmac_desc { uint32_t des3; /* buf2 phys addr or next descr */ }; -#define DESC_MAX 256 -#define DESC_SIZE (sizeof(struct idmac_desc) * DESC_MAX) +#define IDMAC_DESC_SEGS (PAGE_SIZE / (sizeof(struct idmac_desc))) +#define IDMAC_DESC_SIZE (sizeof(struct idmac_desc) * IDMAC_DESC_SEGS) #define DEF_MSIZE 0x2 /* Burst size of multiple transaction */ +#define IDMAC_MAX_SIZE 4096 static void dwmmc_next_operation(struct dwmmc_softc *); static int dwmmc_setup_bus(struct dwmmc_softc *, int); @@ -162,7 +162,7 @@ dwmmc_ring_setup(void *arg, bus_dma_segment_t *segs, i for (idx = 0; idx < nsegs; idx++) { sc->desc_ring[idx].des0 = (DES0_OWN | DES0_DIC | DES0_CH); - sc->desc_ring[idx].des1 = segs[idx].ds_len; + sc->desc_ring[idx].des1 = segs[idx].ds_len & DES1_BS1_MASK; sc->desc_ring[idx].des2 = segs[idx].ds_addr; if (idx == 0) @@ -213,8 +213,8 @@ dma_setup(struct dwmmc_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - DESC_SIZE, 1, /* maxsize, nsegments */ - DESC_SIZE, /* maxsegsize */ + IDMAC_DESC_SIZE, 1, /* maxsize, nsegments */ + IDMAC_DESC_SIZE, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->desc_tag); @@ -234,7 +234,7 @@ dma_setup(struct dwmmc_softc *sc) } error = bus_dmamap_load(sc->desc_tag, sc->desc_map, - sc->desc_ring, DESC_SIZE, dwmmc_get1paddr, + sc->desc_ring, IDMAC_DESC_SIZE, dwmmc_get1paddr, &sc->desc_ring_paddr, 0); if (error != 0) { device_printf(sc->dev, @@ -242,23 +242,25 @@ dma_setup(struct dwmmc_softc *sc) return (1); } - for (idx = 0; idx < sc->desc_count; idx++) { + for (idx = 0; idx < IDMAC_DESC_SEGS; idx++) { sc->desc_ring[idx].des0 = DES0_CH; sc->desc_ring[idx].des1 = 0; - nidx = (idx + 1) % sc->desc_count; + nidx = (idx + 1) % IDMAC_DESC_SEGS; sc->desc_ring[idx].des3 = sc->desc_ring_paddr + \ (nidx * sizeof(struct idmac_desc)); } + sc->desc_ring[idx - 1].des3 = sc->desc_ring_paddr; + sc->desc_ring[idx - 1].des0 |= DES0_ER; error = bus_dma_tag_create( bus_get_dma_tag(sc->dev), /* Parent tag. */ - 4096, 0, /* alignment, boundary */ + CACHE_LINE_SIZE, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - sc->desc_count * MMC_SECTOR_SIZE, /* maxsize */ - sc->desc_count, /* nsegments */ - MMC_SECTOR_SIZE, /* maxsegsize */ + IDMAC_MAX_SIZE * IDMAC_DESC_SEGS, /* maxsize */ + IDMAC_DESC_SEGS, /* nsegments */ + IDMAC_MAX_SIZE, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->buf_tag); @@ -664,9 +666,6 @@ dwmmc_attach(device_t dev) device_printf(dev, "Hardware version ID is %04x\n", READ4(sc, SDMMC_VERID) & 0xffff); - if (sc->desc_count == 0) - sc->desc_count = DESC_MAX; - /* XXX: we support operation for slot index 0 only */ slot = 0; if (sc->pwren_inverted) { @@ -1278,7 +1277,7 @@ dwmmc_read_ivar(device_t bus, device_t child, int whic *(int *)result = sc->host.caps; break; case MMCBR_IVAR_MAX_DATA: - *(int *)result = sc->desc_count - 1; + *(int *)result = (IDMAC_MAX_SIZE * IDMAC_DESC_SEGS) / MMC_SECTOR_SIZE; break; case MMCBR_IVAR_TIMING: *(int *)result = sc->host.ios.timing; Modified: head/sys/dev/mmc/host/dwmmc_hisi.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc_hisi.c Wed Mar 4 19:52:34 2020 (r358634) +++ head/sys/dev/mmc/host/dwmmc_hisi.c Wed Mar 4 20:01:03 2020 (r358635) @@ -79,7 +79,6 @@ hisi_dwmmc_attach(device_t dev) * DMA when the controller is not cache-coherent on arm64. */ sc->use_pio = 1; - sc->desc_count = 1; return (dwmmc_attach(dev)); } Modified: head/sys/dev/mmc/host/dwmmc_var.h ============================================================================== --- head/sys/dev/mmc/host/dwmmc_var.h Wed Mar 4 19:52:34 2020 (r358634) +++ head/sys/dev/mmc/host/dwmmc_var.h Wed Mar 4 20:01:03 2020 (r358635) @@ -60,7 +60,6 @@ struct dwmmc_softc { uint32_t use_auto_stop; uint32_t use_pio; uint32_t pwren_inverted; - u_int desc_count; device_t child; struct task card_task; /* Card presence check task */ struct timeout_task card_delayed_task;/* Card insert delayed task */ From owner-svn-src-head@freebsd.org Wed Mar 4 20:29:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D18D277F7B; Wed, 4 Mar 2020 20:29:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XlqL23t7z3P4M; Wed, 4 Mar 2020 20:29:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0171C23A83; Wed, 4 Mar 2020 20:29:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024KTnlT099758; Wed, 4 Mar 2020 20:29:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KTnYZ099757; Wed, 4 Mar 2020 20:29:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003042029.024KTnYZ099757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2020 20:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358637 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358637 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 20:29:50 -0000 Author: emaste Date: Wed Mar 4 20:29:49 2020 New Revision: 358637 URL: https://svnweb.freebsd.org/changeset/base/358637 Log: readelf: check note namesz and descsz Previously corrupt note namesz or descsz (perhaps caused by readelf's current lack of endian support for notes) resulted in a crash. Check that namesz and descsz do not extend beyond the end of the buffer before trying to access name and desc data. Reported by: jhb MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 20:22:02 2020 (r358636) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 20:29:49 2020 (r358637) @@ -3740,6 +3740,10 @@ dump_notes_content(struct readelf *re, const char *buf } note = (Elf_Note *)(uintptr_t) buf; buf += sizeof(Elf_Note); + if (buf + roundup2(note->n_namesz, 4) > end) { + warnx("invalid note header name"); + return; + } name = buf; buf += roundup2(note->n_namesz, 4); /* @@ -3759,6 +3763,10 @@ dump_notes_content(struct readelf *re, const char *buf printf(" %-13s %#010jx", name, (uintmax_t) note->n_descsz); printf(" %s\n", note_type(name, re->ehdr.e_type, note->n_type)); + if (buf + roundup2(note->n_descsz, 4) > end) { + warnx("invalid note header desc"); + return; + } dump_notes_data(re, name, note->n_type, buf, note->n_descsz); buf += roundup2(note->n_descsz, 4); } From owner-svn-src-head@freebsd.org Wed Mar 4 20:41:46 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99C9D2507F9; Wed, 4 Mar 2020 20:41:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xm561XM5z4J52; Wed, 4 Mar 2020 20:41:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 234D323CF4; Wed, 4 Mar 2020 20:41:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024KfjHN010689; Wed, 4 Mar 2020 20:41:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KfjNw010688; Wed, 4 Mar 2020 20:41:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003042041.024KfjNw010688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2020 20:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358639 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358639 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 20:41:46 -0000 Author: emaste Date: Wed Mar 4 20:41:45 2020 New Revision: 358639 URL: https://svnweb.freebsd.org/changeset/base/358639 Log: readelf: simplify namesz / descsz checks MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 20:30:11 2020 (r358638) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 20:41:45 2020 (r358639) @@ -3728,6 +3728,7 @@ dump_notes_content(struct readelf *re, const char *buf { Elf_Note *note; const char *end, *name; + uint32_t namesz, descsz; printf("\nNotes at offset %#010jx with length %#010jx:\n", (uintmax_t) off, (uintmax_t) sz); @@ -3739,13 +3740,16 @@ dump_notes_content(struct readelf *re, const char *buf return; } note = (Elf_Note *)(uintptr_t) buf; - buf += sizeof(Elf_Note); - if (buf + roundup2(note->n_namesz, 4) > end) { - warnx("invalid note header name"); + namesz = roundup2(note->n_namesz, 4); + descsz = roundup2(note->n_descsz, 4); + if (namesz < note->n_namesz || descsz < note->n_descsz || + buf + namesz + descsz > end) { + warnx("invalid note header"); return; } + buf += sizeof(Elf_Note); name = buf; - buf += roundup2(note->n_namesz, 4); + buf += namesz; /* * The name field is required to be nul-terminated, and * n_namesz includes the terminating nul in observed @@ -3763,12 +3767,8 @@ dump_notes_content(struct readelf *re, const char *buf printf(" %-13s %#010jx", name, (uintmax_t) note->n_descsz); printf(" %s\n", note_type(name, re->ehdr.e_type, note->n_type)); - if (buf + roundup2(note->n_descsz, 4) > end) { - warnx("invalid note header desc"); - return; - } dump_notes_data(re, name, note->n_type, buf, note->n_descsz); - buf += roundup2(note->n_descsz, 4); + buf += descsz; } } From owner-svn-src-head@freebsd.org Wed Mar 4 21:01:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A48302510BD; Wed, 4 Mar 2020 21:01:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XmWm3wj0z3Pnq; Wed, 4 Mar 2020 21:01:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8201E241EA; Wed, 4 Mar 2020 21:01:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024L1Os7019805; Wed, 4 Mar 2020 21:01:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024L1Mxd019795; Wed, 4 Mar 2020 21:01:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003042101.024L1Mxd019795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 4 Mar 2020 21:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358643 - in head/stand/i386: . boot2 gptboot gptzfsboot isoboot loader zfsboot X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/stand/i386: . boot2 gptboot gptzfsboot isoboot loader zfsboot X-SVN-Commit-Revision: 358643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 21:01:24 -0000 Author: dim Date: Wed Mar 4 21:01:22 2020 New Revision: 358643 URL: https://svnweb.freebsd.org/changeset/base/358643 Log: Link stand/i386 components using a linker script LLD 10.0.0 changed the behavior of the -Ttext option, so that using -Ttext=0x0 now causes linking of the loaders to fail with: ld: error: output file too large: 18446744073707016908 bytes I reported this in https://bugs.llvm.org/show_bug.cgi?id=44715, and initially reverted the upstream change in r357259 to work around it. However, after some discussion with Fangrui Song in the upstream ticket, I think we can classify this as an unfortunate interaction between using -Ttext=0 in combination with --no-rosegment. (We added the latter in r332090, because btxld does not correctly handle input with more than 2 PT_LOAD segments.) Fangrui suggested to use a linker script instead, and Warner was already attempting this in r305353, but had to revert it due to "crypto-using boot problems" (not sure what those were :). This review updates the stand/i386/boot.ldscript to handle more sections, inserts some symbols like _edata and such that we use in libsa, and also discards any .interp section. It uses ORG which is defined on the linker command line using --defsym ORG=value to set the start of all the sections. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23952 Modified: head/stand/i386/Makefile.inc head/stand/i386/boot.ldscript head/stand/i386/boot2/Makefile head/stand/i386/gptboot/Makefile head/stand/i386/gptzfsboot/Makefile head/stand/i386/isoboot/Makefile head/stand/i386/loader/Makefile head/stand/i386/zfsboot/Makefile Modified: head/stand/i386/Makefile.inc ============================================================================== --- head/stand/i386/Makefile.inc Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/Makefile.inc Wed Mar 4 21:01:22 2020 (r358643) @@ -22,13 +22,12 @@ CFLAGS+= -I${BTXLIB} # compact binary with no padding between text, data, bss LDSCRIPT= ${BOOTSRC}/i386/boot.ldscript -# LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-T,${LDSCRIPT},-S,--oformat,binary -# LD_FLAGS_BIN=-static -T ${LDSCRIPT} --gc-sections -LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary +LDFLAGS_ORG= -Wl,--defsym,ORG=${ORG},-T,${LDSCRIPT} +LDFLAGS_BIN= -e start ${LDFLAGS_ORG} -Wl,-N,-S,--oformat,binary .if ${LINKER_FEATURES:Mbuild-id} != "" -LDFLAGS_BIN+=-Wl,--build-id=none +LDFLAGS_BIN+= -Wl,--build-id=none .endif -LD_FLAGS_BIN=-static -N --gc-sections +LD_FLAGS_BIN= -static -N --gc-sections .if ${MACHINE_CPUARCH} == "amd64" DO32=1 Modified: head/stand/i386/boot.ldscript ============================================================================== --- head/stand/i386/boot.ldscript Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/boot.ldscript Wed Mar 4 21:01:22 2020 (r358643) @@ -1,11 +1,17 @@ /* $FreeBSD$ */ -/* Merge text, data and bss together almost no padding */ +/* Simplified linker script for the boot loaders. */ OUTPUT_FORMAT("elf32-i386-freebsd") OUTPUT_ARCH(i386) ENTRY(_start) SECTIONS { - . = 0x08048000 + SIZEOF_HEADERS; - .text : { *(.text) } =0x90909090 /* Pad with nops, if needed */ - .data : { *(.data) } _edata = .; - .bss : { *(.bss) } _end = .; + . = ORG; + .text : { *(.text .text.*) } =0xcccccccc /* Pad with int3, if needed */ + .rodata : { *(.rodata .rodata.*) } + .got : { *(.got) *(.igot) } + .got.plt : { *(.got.plt) *(.igot.plt) } + .data : { *(.data .data.*) } + _edata = .; PROVIDE (edata = .); + .bss : { *(.bss .bss.*) } + _end = .; PROVIDE (end = .); + /DISCARD/ : { *(.interp) } } Modified: head/stand/i386/boot2/Makefile ============================================================================== --- head/stand/i386/boot2/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/boot2/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -56,7 +56,7 @@ boot1: boot1.out ${OBJCOPY} -S -O binary boot1.out ${.TARGET} boot1.out: boot1.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} boot1.o CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ boot2.h sio.o @@ -84,7 +84,7 @@ CFLAGS.ashldi3.c= -Wno-missing-prototypes -Wno-missing CLEANFILES+= ashldi3.o boot2.out: ${BTXCRT} boot2.o sio.o ashldi3.o - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} SRCS= boot2.c boot2.h Modified: head/stand/i386/gptboot/Makefile ============================================================================== --- head/stand/i386/gptboot/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/gptboot/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -51,7 +51,7 @@ gptldr.bin: gptldr.out ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} gptldr.o CLEANFILES+= gptboot.bin gptboot.out gptboot.o sio.o drv.o \ cons.o ${OPENCRYPTO_XTS} @@ -60,6 +60,6 @@ gptboot.bin: gptboot.out ${OBJCOPY} -S -O binary gptboot.out ${.TARGET} gptboot.out: ${BTXCRT} gptboot.o sio.o drv.o cons.o ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include Modified: head/stand/i386/gptzfsboot/Makefile ============================================================================== --- head/stand/i386/gptzfsboot/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/gptzfsboot/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -57,7 +57,7 @@ gptldr.bin: gptldr.out ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} gptldr.o CLEANFILES+= gptzfsboot.bin gptzfsboot.out zfsboot.o sio.o cons.o \ drv.o gpt.o ${OPENCRYPTO_XTS} @@ -67,7 +67,7 @@ gptzfsboot.bin: gptzfsboot.out gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o \ ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} zfsboot.o: ${ZFSSRC}/zfsimpl.c Modified: head/stand/i386/isoboot/Makefile ============================================================================== --- head/stand/i386/isoboot/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/isoboot/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -53,7 +53,7 @@ gptldr.bin: gptldr.out ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} gptldr.o CLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o drv.o \ cons.o ${OPENCRYPTO_XTS} @@ -62,6 +62,6 @@ isoboot.bin: isoboot.out ${OBJCOPY} -S -O binary isoboot.out ${.TARGET} isoboot.out: ${BTXCRT} isoboot.o sio.o drv.o cons.o ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include Modified: head/stand/i386/loader/Makefile ============================================================================== --- head/stand/i386/loader/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/loader/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -46,8 +46,10 @@ HELP_FILES= ${.CURDIR}/help.i386 CLEANFILES+= ${LOADER} ${LOADER}.bin +ORG= 0x0 + CFLAGS+= -Wall -LDFLAGS+= -static -Ttext 0x0 -Wl,--gc-sections +LDFLAGS+= -static ${LDFLAGS_ORG} -Wl,--gc-sections # i386 standalone support library LIBI386= ${BOOTOBJ}/i386/libi386/libi386.a Modified: head/stand/i386/zfsboot/Makefile ============================================================================== --- head/stand/i386/zfsboot/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/zfsboot/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -49,7 +49,7 @@ zfsboot1: zfsldr.out ${OBJCOPY} -S -O binary zfsldr.out ${.TARGET} zfsldr.out: zfsldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} zfsldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} zfsldr.o CLEANFILES+= zfsboot2 zfsboot.ld zfsboot.ldr zfsboot.bin zfsboot.out \ zfsboot.o zfsboot.s zfsboot.s.tmp sio.o cons.o drv.o @@ -75,7 +75,7 @@ zfsboot.bin: zfsboot.out ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} SRCS= zfsboot.c From owner-svn-src-head@freebsd.org Wed Mar 4 21:16:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7463251B31 for ; Wed, 4 Mar 2020 21:16:15 +0000 (UTC) (envelope-from erj@erj.cc) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xmrs2Mn2z4NH0 for ; Wed, 4 Mar 2020 21:16:13 +0000 (UTC) (envelope-from erj@erj.cc) Received: by mail-lf1-x12a.google.com with SMTP id c20so2734744lfb.0 for ; Wed, 04 Mar 2020 13:16:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=erj.cc; s=ericroxx; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+t20QXt4GMxgdz6YkBuYHay4Tw5sqwCXfrblnHKKy8U=; b=h/fOPh96W0tT6d99OGLrhk7qa0x57t6pTzkW/Mtirapj78cpWVj1kbrELJh3y2cMWe Yypf4RBVqngEEX+uBjGCu0jEr8uGenwlx9g/OKituPaSmAIajMwGk+bE0zTz2MawV3qk qIMLW9IalMsifN8P0acYmnhwau+q6sQzVCNuQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+t20QXt4GMxgdz6YkBuYHay4Tw5sqwCXfrblnHKKy8U=; b=HuNFeVV99gf/q6EtHIeVts1yjTgMZEJQo6DSTDD59jtdUohHFn4/2yHBDyQUBMGjfE Chz6cmndiw5htBPNTiAo7Py0znM/g4GNW8b9Qtm7pJ3oXT6Y1wAJiyYyMF4bKiFuyOBw ecXpn3dd6hcCHrZnskcXsCla1uMW3u8Z+0wKSk7eIgbtj+llEf1b+6WVszOdN2ThQwPb LNPsJIP2zFzcXAcfwUs0ejNOGvGNJ3RSQorAKHhFkoVjmcrRZPXdxHLIuZt/QsjDZ23K SZpmSvct33e/e1yyq6tsR5cTfYWUzy+Kjfz3yMn/PVyWFRICoqbmtzAmXYVK3Thpb3yd gMEw== X-Gm-Message-State: ANhLgQ1j64iA1+nqC1M5+GKcLxiCLj5gy69jw/p0+m3ZgWkWmvlfrTzu XATJ2iUHb+V6RpHYyVM9TJgO6K8ri+SZPyy6XOQh0Q== X-Google-Smtp-Source: ADFU+vsgj/q2j8NUe/BZgHVgIUgeyjp+quIWcKNpaMpPGtNCn3r1FjyX24HvQuomomhFGw5Ust4cnJFslBj1detiN04= X-Received: by 2002:a05:6512:304c:: with SMTP id b12mr3112980lfb.196.1583356571132; Wed, 04 Mar 2020 13:16:11 -0800 (PST) MIME-Version: 1.0 References: <202002281605.01SG5Iox077824@repo.freebsd.org> In-Reply-To: <202002281605.01SG5Iox077824@repo.freebsd.org> From: Eric Joyner Date: Wed, 4 Mar 2020 13:15:59 -0800 Message-ID: Subject: Re: svn commit: r358432 - in head/sys: kern sys vm To: Mark Johnston Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48Xmrs2Mn2z4NH0 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=erj.cc header.s=ericroxx header.b=h/fOPh96; dmarc=none; spf=pass (mx1.freebsd.org: domain of erj@erj.cc designates 2a00:1450:4864:20::12a as permitted sender) smtp.mailfrom=erj@erj.cc X-Spamd-Result: default: False [-5.19 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[erj.cc:s=ericroxx]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[erj.cc]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[erj.cc:+]; RCVD_IN_DNSWL_NONE(0.00)[a.2.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.69)[ip: (-9.34), ipnet: 2a00:1450::/32(-2.40), asn: 15169(-1.66), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 21:16:15 -0000 Hi Mark, Is the addition of #include in sys/sys/refcount.h actually necessary? I don't see anything in there used in refcount.h, and the kernel appears to compile without it, at least on amd64. - Eric On Fri, Feb 28, 2020 at 8:05 AM Mark Johnston wrote: > Author: markj > Date: Fri Feb 28 16:05:18 2020 > New Revision: 358432 > URL: https://svnweb.freebsd.org/changeset/base/358432 > > Log: > Add a blocking counter KPI. > > refcount(9) was recently extended to support waiting on a refcount to > drop to zero, as this was needed for a lockless VM object > paging-in-progress counter. However, this adds overhead to all uses of > refcount(9) and doesn't really match traditional refcounting semantics: > once a counter has dropped to zero, the protected object may be freed at > any point and it is not safe to dereference the counter. > > This change removes that extension and instead adds a new set of KPIs, > blockcount_*, for use by VM object PIP and busy. > > Reviewed by: jeff, kib, mjg > Tested by: pho > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D23723 > > Added: > head/sys/sys/_blockcount.h (contents, props changed) > head/sys/sys/blockcount.h (contents, props changed) > Modified: > head/sys/kern/kern_synch.c > head/sys/kern/vfs_bio.c > head/sys/sys/refcount.h > head/sys/vm/vm_fault.c > head/sys/vm/vm_object.c > head/sys/vm/vm_object.h > head/sys/vm/vm_pager.h > head/sys/vm/vm_swapout.c > > Modified: head/sys/kern/kern_synch.c > > ============================================================================== > --- head/sys/kern/kern_synch.c Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/kern/kern_synch.c Fri Feb 28 16:05:18 2020 (r358432) > @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > #include > @@ -52,7 +53,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #include > #include > @@ -337,81 +337,6 @@ pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_ > } > > /* > - * Potentially release the last reference for refcount. Check for > - * unlikely conditions and signal the caller as to whether it was > - * the final ref. > - */ > -bool > -refcount_release_last(volatile u_int *count, u_int n, u_int old) > -{ > - u_int waiter; > - > - waiter = old & REFCOUNT_WAITER; > - old = REFCOUNT_COUNT(old); > - if (__predict_false(n > old || REFCOUNT_SATURATED(old))) { > - /* > - * Avoid multiple destructor invocations if underflow > occurred. > - * This is not perfect since the memory backing the > containing > - * object may already have been reallocated. > - */ > - _refcount_update_saturated(count); > - return (false); > - } > - > - /* > - * Attempt to atomically clear the waiter bit. Wakeup waiters > - * if we are successful. > - */ > - if (waiter != 0 && atomic_cmpset_int(count, REFCOUNT_WAITER, 0)) > - wakeup(__DEVOLATILE(u_int *, count)); > - > - /* > - * Last reference. Signal the user to call the destructor. > - * > - * Ensure that the destructor sees all updates. This synchronizes > - * with release fences from all routines which drop the count. > - */ > - atomic_thread_fence_acq(); > - return (true); > -} > - > -/* > - * Wait for a refcount wakeup. This does not guarantee that the ref is > still > - * zero on return and may be subject to transient wakeups. Callers > wanting > - * a precise answer should use refcount_wait(). > - */ > -void > -_refcount_sleep(volatile u_int *count, struct lock_object *lock, > - const char *wmesg, int pri) > -{ > - void *wchan; > - u_int old; > - > - if (REFCOUNT_COUNT(*count) == 0) { > - if (lock != NULL) > - LOCK_CLASS(lock)->lc_unlock(lock); > - return; > - } > - wchan = __DEVOLATILE(void *, count); > - sleepq_lock(wchan); > - if (lock != NULL) > - LOCK_CLASS(lock)->lc_unlock(lock); > - old = *count; > - for (;;) { > - if (REFCOUNT_COUNT(old) == 0) { > - sleepq_release(wchan); > - return; > - } > - if (old & REFCOUNT_WAITER) > - break; > - if (atomic_fcmpset_int(count, &old, old | REFCOUNT_WAITER)) > - break; > - } > - sleepq_add(wchan, NULL, wmesg, 0, 0); > - sleepq_wait(wchan, pri); > -} > - > -/* > * Make all threads sleeping on the specified identifier runnable. > */ > void > @@ -457,6 +382,82 @@ wakeup_any(const void *ident) > sleepq_release(ident); > if (wakeup_swapper) > kick_proc0(); > +} > + > +/* > + * Signal sleeping waiters after the counter has reached zero. > + */ > +void > +_blockcount_wakeup(blockcount_t *bc, u_int old) > +{ > + > + KASSERT(_BLOCKCOUNT_WAITERS(old), > + ("%s: no waiters on %p", __func__, bc)); > + > + if (atomic_cmpset_int(&bc->__count, _BLOCKCOUNT_WAITERS_FLAG, 0)) > + wakeup(bc); > +} > + > +/* > + * Wait for a wakeup. This does not guarantee that the count is still > zero on > + * return and may be subject to transient wakeups. Callers wanting a > precise > + * answer should use blockcount_wait() with an interlock. > + * > + * Return 0 if there is no work to wait for, and 1 if we slept waiting > for work > + * to complete. In the latter case the counter value must be re-read. > + */ > +int > +_blockcount_sleep(blockcount_t *bc, struct lock_object *lock, const char > *wmesg, > + int prio) > +{ > + void *wchan; > + uintptr_t lock_state; > + u_int old; > + int ret; > + > + KASSERT(lock != &Giant.lock_object, > + ("%s: cannot use Giant as the interlock", __func__)); > + > + /* > + * Synchronize with the fence in blockcount_release(). If we end > up > + * waiting, the sleepqueue lock acquisition will provide the > required > + * side effects. > + * > + * If there is no work to wait for, but waiters are present, try > to put > + * ourselves to sleep to avoid jumping ahead. > + */ > + if (atomic_load_acq_int(&bc->__count) == 0) { > + if (lock != NULL && (prio & PDROP) != 0) > + LOCK_CLASS(lock)->lc_unlock(lock); > + return (0); > + } > + lock_state = 0; > + wchan = bc; > + sleepq_lock(wchan); > + DROP_GIANT(); > + if (lock != NULL) > + lock_state = LOCK_CLASS(lock)->lc_unlock(lock); > + old = blockcount_read(bc); > + do { > + if (_BLOCKCOUNT_COUNT(old) == 0) { > + sleepq_release(wchan); > + ret = 0; > + goto out; > + } > + if (_BLOCKCOUNT_WAITERS(old)) > + break; > + } while (!atomic_fcmpset_int(&bc->__count, &old, > + old | _BLOCKCOUNT_WAITERS_FLAG)); > + sleepq_add(wchan, NULL, wmesg, 0, 0); > + sleepq_wait(wchan, prio); > + ret = 1; > + > +out: > + PICKUP_GIANT(); > + if (lock != NULL && (prio & PDROP) == 0) > + LOCK_CLASS(lock)->lc_lock(lock, lock_state); > + > + return (ret); > } > > static void > > Modified: head/sys/kern/vfs_bio.c > > ============================================================================== > --- head/sys/kern/vfs_bio.c Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/kern/vfs_bio.c Fri Feb 28 16:05:18 2020 (r358432) > @@ -2854,9 +2854,9 @@ vfs_vmio_iodone(struct buf *bp) > bool bogus; > > obj = bp->b_bufobj->bo_object; > - KASSERT(REFCOUNT_COUNT(obj->paging_in_progress) >= bp->b_npages, > + KASSERT(blockcount_read(&obj->paging_in_progress) >= bp->b_npages, > ("vfs_vmio_iodone: paging in progress(%d) < b_npages(%d)", > - REFCOUNT_COUNT(obj->paging_in_progress), bp->b_npages)); > + blockcount_read(&obj->paging_in_progress), bp->b_npages)); > > vp = bp->b_vp; > VNPASS(vp->v_holdcnt > 0, vp); > > Added: head/sys/sys/_blockcount.h > > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/sys/_blockcount.h Fri Feb 28 16:05:18 2020 (r358432) > @@ -0,0 +1,52 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2020 The FreeBSD Foundation > + * > + * This software was developed by Mark Johnston under sponsorship from > + * the FreeBSD Foundation. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions are > + * met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in > + * the documentation and/or other materials provided with the > distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY > WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef __SYS__BLOCKCOUNT_H__ > +#define __SYS__BLOCKCOUNT_H__ > + > +#include > + > +typedef struct _blockcount { > + unsigned int __count; > +} blockcount_t; > + > +#define _BLOCKCOUNT_WAITERS_FLAG (1U << 31) > +#define _BLOCKCOUNT_COUNT(c) ((c) & > ~_BLOCKCOUNT_WAITERS_FLAG) > +#define _BLOCKCOUNT_WAITERS(c) (((c) & > _BLOCKCOUNT_WAITERS_FLAG) != 0) > + > +static inline unsigned int > +blockcount_read(blockcount_t *count) > +{ > + return (_BLOCKCOUNT_COUNT(atomic_load_int(&count->__count))); > +} > + > +#endif /* !__SYS__BLOCKCOUNT_H__ */ > > Added: head/sys/sys/blockcount.h > > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/sys/blockcount.h Fri Feb 28 16:05:18 2020 (r358432) > @@ -0,0 +1,95 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2005 John Baldwin > + * Copyright (c) 2020 The FreeBSD Foundation > + * > + * Portions of this software were developed by Mark Johnston under > + * sponsorship from the FreeBSD Foundation. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY > WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef __SYS_BLOCKCOUNT_H__ > +#define __SYS_BLOCKCOUNT_H__ > + > +#ifdef _KERNEL > + > +#include > +#include > + > +struct lock_object; > + > +int _blockcount_sleep(blockcount_t *bc, struct lock_object *, const char > *wmesg, > + int prio); > +void _blockcount_wakeup(blockcount_t *bc, u_int old); > + > +static __inline void > +blockcount_init(blockcount_t *bc) > +{ > + atomic_store_int(&bc->__count, 0); > +} > + > +static __inline void > +blockcount_acquire(blockcount_t *bc, u_int n) > +{ > +#ifdef INVARIANTS > + u_int old; > + > + old = atomic_fetchadd_int(&bc->__count, n); > + KASSERT(old + n > old, ("%s: counter overflow %p", __func__, bc)); > +#else > + atomic_add_int(&bc->__count, n); > +#endif > +} > + > +static __inline void > +blockcount_release(blockcount_t *bc, u_int n) > +{ > + u_int old; > + > + atomic_thread_fence_rel(); > + old = atomic_fetchadd_int(&bc->__count, -n); > + KASSERT(old >= n, ("%s: counter underflow %p", __func__, bc)); > + if (_BLOCKCOUNT_COUNT(old) == n && _BLOCKCOUNT_WAITERS(old)) > + _blockcount_wakeup(bc, old); > +} > + > +static __inline void > +_blockcount_wait(blockcount_t *bc, struct lock_object *lo, const char > *wmesg, > + int prio) > +{ > + KASSERT((prio & PDROP) == 0, ("%s: invalid prio %x", __func__, > prio)); > + > + while (_blockcount_sleep(bc, lo, wmesg, prio) != 0) > + ; > +} > + > +#define blockcount_sleep(bc, lo, wmesg, prio) \ > + _blockcount_sleep((bc), (struct lock_object *)(lo), (wmesg), > (prio)) > +#define blockcount_wait(bc, lo, wmesg, prio) \ > + _blockcount_wait((bc), (struct lock_object *)(lo), (wmesg), (prio)) > + > +#endif /* _KERNEL */ > +#endif /* !__SYS_BLOCKCOUNT_H__ */ > > Modified: head/sys/sys/refcount.h > > ============================================================================== > --- head/sys/sys/refcount.h Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/sys/refcount.h Fri Feb 28 16:05:18 2020 (r358432) > @@ -34,19 +34,15 @@ > > #ifdef _KERNEL > #include > +#include > #else > #include > #define KASSERT(exp, msg) /* */ > #endif > > -#define REFCOUNT_WAITER (1U << 31) /* Refcount has > waiter. */ > -#define REFCOUNT_SATURATION_VALUE (3U << 29) > +#define REFCOUNT_SATURATED(val) (((val) & (1U << 31)) != 0) > +#define REFCOUNT_SATURATION_VALUE (3U << 30) > > -#define REFCOUNT_SATURATED(val) (((val) & (1U << 30)) != 0) > -#define REFCOUNT_COUNT(x) ((x) & ~REFCOUNT_WAITER) > - > -bool refcount_release_last(volatile u_int *count, u_int n, u_int old); > - > /* > * Attempt to handle reference count overflow and underflow. Force the > counter > * to stay at the saturation value so that a counter overflow cannot > trigger > @@ -111,56 +107,6 @@ refcount_acquire_checked(volatile u_int *count) > } > } > > -static __inline bool > -refcount_releasen(volatile u_int *count, u_int n) > -{ > - u_int old; > - > - KASSERT(n < REFCOUNT_SATURATION_VALUE / 2, > - ("refcount_releasen: n=%u too large", n)); > - > - /* > - * Paired with acquire fence in refcount_release_last. > - */ > - atomic_thread_fence_rel(); > - old = atomic_fetchadd_int(count, -n); > - if (__predict_false(n >= REFCOUNT_COUNT(old) || > - REFCOUNT_SATURATED(old))) > - return (refcount_release_last(count, n, old)); > - return (false); > -} > - > -static __inline bool > -refcount_release(volatile u_int *count) > -{ > - > - return (refcount_releasen(count, 1)); > -} > - > -#ifdef _KERNEL > -struct lock_object; > -void _refcount_sleep(volatile u_int *count, struct lock_object *, > - const char *wmesg, int prio); > - > -static __inline void > -refcount_sleep(volatile u_int *count, const char *wmesg, int prio) > -{ > - > - _refcount_sleep(count, NULL, wmesg, prio); > -} > - > -#define refcount_sleep_interlock(count, lock, wmesg, prio) > \ > - _refcount_sleep((count), (struct lock_object *)(lock), (wmesg), > (prio)) > - > -static __inline void > -refcount_wait(volatile u_int *count, const char *wmesg, int prio) > -{ > - > - while (*count != 0) > - refcount_sleep(count, wmesg, prio); > -} > -#endif > - > /* > * This functions returns non-zero if the refcount was > * incremented. Else zero is returned. > @@ -172,7 +118,7 @@ refcount_acquire_if_gt(volatile u_int *count, u_int n) > > old = *count; > for (;;) { > - if (REFCOUNT_COUNT(old) <= n) > + if (old <= n) > return (false); > if (__predict_false(REFCOUNT_SATURATED(old))) > return (true); > @@ -185,9 +131,43 @@ static __inline __result_use_check bool > refcount_acquire_if_not_zero(volatile u_int *count) > { > > - return refcount_acquire_if_gt(count, 0); > + return (refcount_acquire_if_gt(count, 0)); > } > > +static __inline bool > +refcount_releasen(volatile u_int *count, u_int n) > +{ > + u_int old; > + > + KASSERT(n < REFCOUNT_SATURATION_VALUE / 2, > + ("refcount_releasen: n=%u too large", n)); > + > + atomic_thread_fence_rel(); > + old = atomic_fetchadd_int(count, -n); > + if (__predict_false(old < n || REFCOUNT_SATURATED(old))) { > + _refcount_update_saturated(count); > + return (false); > + } > + if (old > n) > + return (false); > + > + /* > + * Last reference. Signal the user to call the destructor. > + * > + * Ensure that the destructor sees all updates. This synchronizes > with > + * release fences from all routines which drop the count. > + */ > + atomic_thread_fence_acq(); > + return (true); > +} > + > +static __inline bool > +refcount_release(volatile u_int *count) > +{ > + > + return (refcount_releasen(count, 1)); > +} > + > static __inline __result_use_check bool > refcount_release_if_gt(volatile u_int *count, u_int n) > { > @@ -197,12 +177,12 @@ refcount_release_if_gt(volatile u_int *count, u_int > n) > ("refcount_release_if_gt: Use refcount_release for final > ref")); > old = *count; > for (;;) { > - if (REFCOUNT_COUNT(old) <= n) > + if (old <= n) > return (false); > if (__predict_false(REFCOUNT_SATURATED(old))) > return (true); > /* > - * Paired with acquire fence in refcount_release_last. > + * Paired with acquire fence in refcount_releasen(). > */ > if (atomic_fcmpset_rel_int(count, &old, old - 1)) > return (true); > @@ -213,6 +193,7 @@ static __inline __result_use_check bool > refcount_release_if_not_last(volatile u_int *count) > { > > - return refcount_release_if_gt(count, 1); > + return (refcount_release_if_gt(count, 1)); > } > -#endif /* ! __SYS_REFCOUNT_H__ */ > + > +#endif /* !__SYS_REFCOUNT_H__ */ > > Modified: head/sys/vm/vm_fault.c > > ============================================================================== > --- head/sys/vm/vm_fault.c Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/vm/vm_fault.c Fri Feb 28 16:05:18 2020 (r358432) > @@ -377,7 +377,7 @@ vm_fault_restore_map_lock(struct faultstate *fs) > { > > VM_OBJECT_ASSERT_WLOCKED(fs->first_object); > - MPASS(REFCOUNT_COUNT(fs->first_object->paging_in_progress) > 0); > + MPASS(blockcount_read(&fs->first_object->paging_in_progress) > 0); > > if (!vm_map_trylock_read(fs->map)) { > VM_OBJECT_WUNLOCK(fs->first_object); > @@ -428,7 +428,7 @@ vm_fault_populate(struct faultstate *fs) > > MPASS(fs->object == fs->first_object); > VM_OBJECT_ASSERT_WLOCKED(fs->first_object); > - MPASS(REFCOUNT_COUNT(fs->first_object->paging_in_progress) > 0); > + MPASS(blockcount_read(&fs->first_object->paging_in_progress) > 0); > MPASS(fs->first_object->backing_object == NULL); > MPASS(fs->lookup_still_valid); > > > Modified: head/sys/vm/vm_object.c > > ============================================================================== > --- head/sys/vm/vm_object.c Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/vm/vm_object.c Fri Feb 28 16:05:18 2020 (r358432) > @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > #include > @@ -201,12 +202,11 @@ vm_object_zdtor(void *mem, int size, void *arg) > ("object %p has reservations", > object)); > #endif > - KASSERT(REFCOUNT_COUNT(object->paging_in_progress) == 0, > + KASSERT(blockcount_read(&object->paging_in_progress) == 0, > ("object %p paging_in_progress = %d", > - object, REFCOUNT_COUNT(object->paging_in_progress))); > - KASSERT(object->busy == 0, > - ("object %p busy = %d", > - object, object->busy)); > + object, blockcount_read(&object->paging_in_progress))); > + KASSERT(!vm_object_busied(object), > + ("object %p busy = %d", object, > blockcount_read(&object->busy))); > KASSERT(object->resident_page_count == 0, > ("object %p resident_page_count = %d", > object, object->resident_page_count)); > @@ -231,8 +231,8 @@ vm_object_zinit(void *mem, int size, int flags) > object->type = OBJT_DEAD; > vm_radix_init(&object->rtree); > refcount_init(&object->ref_count, 0); > - refcount_init(&object->paging_in_progress, 0); > - refcount_init(&object->busy, 0); > + blockcount_init(&object->paging_in_progress); > + blockcount_init(&object->busy); > object->resident_page_count = 0; > object->shadow_count = 0; > object->flags = OBJ_DEAD; > @@ -363,34 +363,36 @@ void > vm_object_pip_add(vm_object_t object, short i) > { > > - refcount_acquiren(&object->paging_in_progress, i); > + if (i > 0) > + blockcount_acquire(&object->paging_in_progress, i); > } > > void > vm_object_pip_wakeup(vm_object_t object) > { > > - refcount_release(&object->paging_in_progress); > + vm_object_pip_wakeupn(object, 1); > } > > void > vm_object_pip_wakeupn(vm_object_t object, short i) > { > > - refcount_releasen(&object->paging_in_progress, i); > + if (i > 0) > + blockcount_release(&object->paging_in_progress, i); > } > > /* > - * Atomically drop the interlock and wait for pip to drain. This protects > - * from sleep/wakeup races due to identity changes. The lock is not > - * re-acquired on return. > + * Atomically drop the object lock and wait for pip to drain. This > protects > + * from sleep/wakeup races due to identity changes. The lock is not > re-acquired > + * on return. > */ > static void > vm_object_pip_sleep(vm_object_t object, const char *waitid) > { > > - refcount_sleep_interlock(&object->paging_in_progress, > - &object->lock, waitid, PVM); > + (void)blockcount_sleep(&object->paging_in_progress, &object->lock, > + waitid, PVM | PDROP); > } > > void > @@ -399,10 +401,8 @@ vm_object_pip_wait(vm_object_t object, const char *wai > > VM_OBJECT_ASSERT_WLOCKED(object); > > - while (REFCOUNT_COUNT(object->paging_in_progress) > 0) { > - vm_object_pip_sleep(object, waitid); > - VM_OBJECT_WLOCK(object); > - } > + blockcount_wait(&object->paging_in_progress, &object->lock, waitid, > + PVM); > } > > void > @@ -411,8 +411,7 @@ vm_object_pip_wait_unlocked(vm_object_t object, const > > VM_OBJECT_ASSERT_UNLOCKED(object); > > - while (REFCOUNT_COUNT(object->paging_in_progress) > 0) > - refcount_wait(&object->paging_in_progress, waitid, PVM); > + blockcount_wait(&object->paging_in_progress, NULL, waitid, PVM); > } > > /* > @@ -955,7 +954,7 @@ vm_object_terminate(vm_object_t object) > */ > vm_object_pip_wait(object, "objtrm"); > > - KASSERT(!REFCOUNT_COUNT(object->paging_in_progress), > + KASSERT(!blockcount_read(&object->paging_in_progress), > ("vm_object_terminate: pageout in progress")); > > KASSERT(object->ref_count == 0, > @@ -2458,7 +2457,7 @@ vm_object_busy(vm_object_t obj) > > VM_OBJECT_ASSERT_LOCKED(obj); > > - refcount_acquire(&obj->busy); > + blockcount_acquire(&obj->busy, 1); > /* The fence is required to order loads of page busy. */ > atomic_thread_fence_acq_rel(); > } > @@ -2467,8 +2466,7 @@ void > vm_object_unbusy(vm_object_t obj) > { > > - > - refcount_release(&obj->busy); > + blockcount_release(&obj->busy, 1); > } > > void > @@ -2477,8 +2475,7 @@ vm_object_busy_wait(vm_object_t obj, const char > *wmesg > > VM_OBJECT_ASSERT_UNLOCKED(obj); > > - if (obj->busy) > - refcount_sleep(&obj->busy, wmesg, PVM); > + (void)blockcount_sleep(&obj->busy, NULL, wmesg, PVM); > } > > /* > > Modified: head/sys/vm/vm_object.h > > ============================================================================== > --- head/sys/vm/vm_object.h Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/vm/vm_object.h Fri Feb 28 16:05:18 2020 (r358432) > @@ -70,6 +70,7 @@ > #define _VM_OBJECT_ > > #include > +#include > #include > #include > #include > @@ -113,8 +114,8 @@ struct vm_object { > objtype_t type; /* type of pager */ > u_short flags; /* see below */ > u_short pg_color; /* (c) color of first page in obj > */ > - volatile u_int paging_in_progress; /* Paging (in or out) so don't > collapse or destroy */ > - volatile u_int busy; /* (a) object is busy, disallow > page busy. */ > + blockcount_t paging_in_progress; /* (a) Paging (in or out) so > don't collapse or destroy */ > + blockcount_t busy; /* (a) object is busy, disallow > page busy. */ > int resident_page_count; /* number of resident pages */ > struct vm_object *backing_object; /* object that I'm a shadow of */ > vm_ooffset_t backing_object_offset;/* Offset in backing object */ > @@ -265,7 +266,7 @@ extern struct vm_object kernel_object_store; > lock_class_rw.lc_lock(&(object)->lock.lock_object, (state)) > > #define VM_OBJECT_ASSERT_PAGING(object) > \ > - KASSERT((object)->paging_in_progress != 0, \ > + KASSERT(blockcount_read(&(object)->paging_in_progress) != 0, \ > ("vm_object %p is not paging", object)) > #define VM_OBJECT_ASSERT_REFERENCE(object) > \ > KASSERT((object)->reference_count != 0, \ > @@ -348,7 +349,7 @@ static inline bool > vm_object_busied(vm_object_t object) > { > > - return (object->busy != 0); > + return (blockcount_read(&object->busy) != 0); > } > #define VM_OBJECT_ASSERT_BUSY(object) > MPASS(vm_object_busied((object))) > > > Modified: head/sys/vm/vm_pager.h > > ============================================================================== > --- head/sys/vm/vm_pager.h Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/vm/vm_pager.h Fri Feb 28 16:05:18 2020 (r358432) > @@ -168,7 +168,7 @@ vm_pager_populate(vm_object_t object, vm_pindex_t pidx > > MPASS((object->flags & OBJ_POPULATE) != 0); > MPASS(pidx < object->size); > - MPASS(object->paging_in_progress > 0); > + MPASS(blockcount_read(&object->paging_in_progress) > 0); > return ((*pagertab[object->type]->pgo_populate)(object, pidx, > fault_type, max_prot, first, last)); > } > > Modified: head/sys/vm/vm_swapout.c > > ============================================================================== > --- head/sys/vm/vm_swapout.c Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/vm/vm_swapout.c Fri Feb 28 16:05:18 2020 (r358432) > @@ -218,7 +218,7 @@ vm_swapout_object_deactivate(pmap_t pmap, vm_object_t > goto unlock_return; > VM_OBJECT_ASSERT_LOCKED(object); > if ((object->flags & OBJ_UNMANAGED) != 0 || > - REFCOUNT_COUNT(object->paging_in_progress) > 0) > + blockcount_read(&object->paging_in_progress) > 0) > goto unlock_return; > > unmap = true; > From owner-svn-src-head@freebsd.org Wed Mar 4 21:27:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4E7D252278; Wed, 4 Mar 2020 21:27:14 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xn5Y6R3cz3P8c; Wed, 4 Mar 2020 21:27:13 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 98E73246C3; Wed, 4 Mar 2020 21:27:13 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024LRDEm036747; Wed, 4 Mar 2020 21:27:13 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LRCBw036744; Wed, 4 Mar 2020 21:27:12 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003042127.024LRCBw036744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 4 Mar 2020 21:27:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358650 - in head/sys: compat/linux sys vm X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: compat/linux sys vm X-SVN-Commit-Revision: 358650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 21:27:14 -0000 Author: brooks Date: Wed Mar 4 21:27:12 2020 New Revision: 358650 URL: https://svnweb.freebsd.org/changeset/base/358650 Log: Introduce kern_mmap_req(). This presents an extensible interface to the generic mmap(2) implementation via a struct pointer intended to use a designated initializer or compount literal. We take advantage of the mandatory zeroing of fields not listed in the initializer. Remove kern_mmap_fpcheck() and use kern_mmap_req(). The motivation for this change is a desire to keep the core implementation from growing an ever-increasing number of arguments that must be specified in the correct order for the lowest-level implementations. In CheriBSD we have already added two more arguments. Reviewed by: kib Discussed with: kevans Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D23164 Modified: head/sys/compat/linux/linux_mmap.c head/sys/sys/syscallsubr.h head/sys/vm/vm_mmap.c Modified: head/sys/compat/linux/linux_mmap.c ============================================================================== --- head/sys/compat/linux/linux_mmap.c Wed Mar 4 21:25:48 2020 (r358649) +++ head/sys/compat/linux/linux_mmap.c Wed Mar 4 21:27:12 2020 (r358650) @@ -77,6 +77,7 @@ int linux_mmap_common(struct thread *td, uintptr_t addr, size_t len, int prot, int flags, int fd, off_t pos) { + struct mmap_req mr, mr_fixed; struct proc *p = td->td_proc; struct vmspace *vms = td->td_proc->p_vmspace; int bsd_flags, error; @@ -201,17 +202,25 @@ linux_mmap_common(struct thread *td, uintptr_t addr, s * address is not zero, try with MAP_FIXED and MAP_EXCL first, * and fall back to the normal behaviour if that fails. */ + mr = (struct mmap_req) { + .mr_hint = addr, + .mr_len = len, + .mr_prot = prot, + .mr_flags = bsd_flags, + .mr_fd = fd, + .mr_pos = pos, + .mr_check_fp_fn = linux_mmap_check_fp, + }; if (addr != 0 && (bsd_flags & MAP_FIXED) == 0 && (bsd_flags & MAP_EXCL) == 0) { - error = kern_mmap_fpcheck(td, addr, len, prot, - bsd_flags | MAP_FIXED | MAP_EXCL, fd, pos, - linux_mmap_check_fp); + mr_fixed = mr; + mr_fixed.mr_flags |= MAP_FIXED | MAP_EXCL; + error = kern_mmap_req(td, &mr_fixed); if (error == 0) goto out; } - error = kern_mmap_fpcheck(td, addr, len, prot, bsd_flags, fd, pos, - linux_mmap_check_fp); + error = kern_mmap_req(td, &mr); out: LINUX_CTR2(mmap2, "return: %d (%p)", error, td->td_retval[0]); Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Wed Mar 4 21:25:48 2020 (r358649) +++ head/sys/sys/syscallsubr.h Wed Mar 4 21:27:12 2020 (r358650) @@ -65,6 +65,18 @@ struct uio; typedef int (*mmap_check_fp_fn)(struct file *, int, int, int); +struct mmap_req { + vm_offset_t mr_hint; + vm_size_t mr_len; + int mr_prot; + int mr_flags; + int mr_fd; + off_t mr_pos; + mmap_check_fp_fn mr_check_fp_fn; +}; + +int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, + size_t buflen, size_t path_max); int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); int kern_accept4(struct thread *td, int s, struct sockaddr **name, @@ -182,9 +194,7 @@ int kern_mlock(struct proc *proc, struct ucred *cred, size_t len); int kern_mmap(struct thread *td, uintptr_t addr, size_t len, int prot, int flags, int fd, off_t pos); -int kern_mmap_fpcheck(struct thread *td, uintptr_t addr, size_t len, - int prot, int flags, int fd, off_t pos, - mmap_check_fp_fn check_fp_fn); +int kern_mmap_req(struct thread *td, const struct mmap_req *mrp); int kern_mmap_maxprot(struct proc *p, int prot); int kern_mprotect(struct thread *td, uintptr_t addr, size_t size, int prot); int kern_msgctl(struct thread *, int, int, struct msqid_ds *); Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Wed Mar 4 21:25:48 2020 (r358649) +++ head/sys/vm/vm_mmap.c Wed Mar 4 21:27:12 2020 (r358650) @@ -199,27 +199,40 @@ int kern_mmap(struct thread *td, uintptr_t addr0, size_t len, int prot, int flags, int fd, off_t pos) { + struct mmap_req mr = { + .mr_hint = addr0, + .mr_len = len, + .mr_prot = prot, + .mr_flags = flags, + .mr_fd = fd, + .mr_pos = pos + }; - return (kern_mmap_fpcheck(td, addr0, len, prot, flags, fd, pos, NULL)); + return (kern_mmap_req(td, &mr)); } -/* - * When mmap'ing a file, check_fp_fn may be used for the caller to do any - * last-minute validation based on the referenced file in a non-racy way. - */ int -kern_mmap_fpcheck(struct thread *td, uintptr_t addr0, size_t len, int prot, - int flags, int fd, off_t pos, mmap_check_fp_fn check_fp_fn) +kern_mmap_req(struct thread *td, const struct mmap_req *mrp) { struct vmspace *vms; struct file *fp; struct proc *p; + off_t pos; vm_offset_t addr; - vm_size_t pageoff, size; + vm_size_t len, pageoff, size; vm_prot_t cap_maxprot; - int align, error, max_prot; + int align, error, fd, flags, max_prot, prot; cap_rights_t rights; + mmap_check_fp_fn check_fp_fn; + addr = mrp->mr_hint; + len = mrp->mr_len; + prot = mrp->mr_prot; + flags = mrp->mr_flags; + fd = mrp->mr_fd; + pos = mrp->mr_pos; + check_fp_fn = mrp->mr_check_fp_fn; + if ((prot & ~(_PROT_ALL | PROT_MAX(_PROT_ALL))) != 0) return (EINVAL); max_prot = PROT_MAX_EXTRACT(prot); @@ -239,7 +252,6 @@ kern_mmap_fpcheck(struct thread *td, uintptr_t addr0, vms = p->p_vmspace; fp = NULL; AUDIT_ARG_FD(fd); - addr = addr0; /* * Ignore old flags that used to be defined but did not do anything. From owner-svn-src-head@freebsd.org Wed Mar 4 21:47:38 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A758F252EE9; Wed, 4 Mar 2020 21:47:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XnY61jFKz3Fqy; Wed, 4 Mar 2020 21:47:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAC6B24A89; Wed, 4 Mar 2020 21:47:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024LlbFe048576; Wed, 4 Mar 2020 21:47:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LjDMp048460; Wed, 4 Mar 2020 21:45:13 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003042145.024LjDMp048460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 4 Mar 2020 21:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358652 - in head: contrib/ntp contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/libntp contrib/ntp/libparse contrib/ntp/ntpd contrib/ntp/ntpdate contrib/ntp/ntp... X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: contrib/ntp contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/libntp contrib/ntp/libparse contrib/ntp/ntpd contrib/ntp/ntpdate contrib/ntp/ntpdc contrib/ntp/ntpq contr... X-SVN-Commit-Revision: 358652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 21:47:38 -0000 Author: cy Date: Wed Mar 4 21:45:12 2020 New Revision: 358652 URL: https://svnweb.freebsd.org/changeset/base/358652 Log: MFV r358616: Update ntp-4.2.8p13 --> 4.2.8p14. The advisory can be found at: http://support.ntp.org/bin/view/Main/SecurityNotice#\ March_2020_ntp_4_2_8p14_NTP_Rele No CVEs have been documented yet. MFC after: now Security: http://support.ntp.org/bin/view/Main/NtpBug3610 http://support.ntp.org/bin/view/Main/NtpBug3596 http://support.ntp.org/bin/view/Main/NtpBug3592 Added: head/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358616, vendor/ntp/dist/include/ntp_calgps.h head/contrib/ntp/include/ntp_psl.h - copied unchanged from r358616, vendor/ntp/dist/include/ntp_psl.h head/contrib/ntp/include/timexsup.h - copied unchanged from r358616, vendor/ntp/dist/include/timexsup.h head/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358616, vendor/ntp/dist/libntp/ntp_calgps.c head/contrib/ntp/libntp/timespecops.c - copied unchanged from r358616, vendor/ntp/dist/libntp/timespecops.c head/contrib/ntp/libntp/timexsup.c - copied unchanged from r358616, vendor/ntp/dist/libntp/timexsup.c head/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358616, vendor/ntp/dist/ntpd/psl0.conf head/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358616, vendor/ntp/dist/ntpd/psl1.conf head/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358616, vendor/ntp/dist/ntpd/psl2.conf Modified: head/contrib/ntp/COPYRIGHT head/contrib/ntp/ChangeLog head/contrib/ntp/CommitLog head/contrib/ntp/NEWS head/contrib/ntp/config.h.in head/contrib/ntp/configure head/contrib/ntp/configure.ac head/contrib/ntp/html/accopt.html head/contrib/ntp/html/clockopt.html head/contrib/ntp/html/confopt.html head/contrib/ntp/html/copyright.html head/contrib/ntp/html/discipline.html head/contrib/ntp/html/drivers/driver20.html head/contrib/ntp/html/drivers/driver29.html head/contrib/ntp/html/miscopt.html head/contrib/ntp/include/Makefile.am head/contrib/ntp/include/Makefile.in head/contrib/ntp/include/ntp.h head/contrib/ntp/include/ntp_calendar.h head/contrib/ntp/include/ntp_config.h head/contrib/ntp/include/ntp_control.h head/contrib/ntp/include/ntp_fp.h head/contrib/ntp/include/ntp_io.h head/contrib/ntp/include/ntp_refclock.h head/contrib/ntp/include/ntp_request.h head/contrib/ntp/include/ntp_stdlib.h head/contrib/ntp/include/ntp_syslog.h head/contrib/ntp/include/ntpd.h head/contrib/ntp/include/timespecops.h head/contrib/ntp/libntp/Makefile.am head/contrib/ntp/libntp/Makefile.in head/contrib/ntp/libntp/decodenetnum.c head/contrib/ntp/libntp/dofptoa.c head/contrib/ntp/libntp/dolfptoa.c head/contrib/ntp/libntp/mstolfp.c head/contrib/ntp/libntp/msyslog.c head/contrib/ntp/libntp/ntp_calendar.c head/contrib/ntp/libntp/recvbuff.c head/contrib/ntp/libntp/statestr.c head/contrib/ntp/libntp/systime.c head/contrib/ntp/libparse/Makefile.am head/contrib/ntp/libparse/Makefile.in head/contrib/ntp/libparse/clk_rawdcf.c head/contrib/ntp/ntpd/Makefile.am head/contrib/ntp/ntpd/Makefile.in head/contrib/ntp/ntpd/cmd_args.c head/contrib/ntp/ntpd/complete.conf.in head/contrib/ntp/ntpd/invoke-ntp.conf.texi head/contrib/ntp/ntpd/invoke-ntp.keys.texi head/contrib/ntp/ntpd/invoke-ntpd.texi head/contrib/ntp/ntpd/keyword-gen-utd head/contrib/ntp/ntpd/keyword-gen.c head/contrib/ntp/ntpd/ntp.conf.5man head/contrib/ntp/ntpd/ntp.conf.5mdoc head/contrib/ntp/ntpd/ntp.conf.def head/contrib/ntp/ntpd/ntp.conf.html head/contrib/ntp/ntpd/ntp.conf.man.in head/contrib/ntp/ntpd/ntp.conf.mdoc.in head/contrib/ntp/ntpd/ntp.keys.5man head/contrib/ntp/ntpd/ntp.keys.5mdoc head/contrib/ntp/ntpd/ntp.keys.html head/contrib/ntp/ntpd/ntp.keys.man.in head/contrib/ntp/ntpd/ntp.keys.mdoc.in head/contrib/ntp/ntpd/ntp_config.c head/contrib/ntp/ntpd/ntp_control.c head/contrib/ntp/ntpd/ntp_io.c head/contrib/ntp/ntpd/ntp_keyword.h head/contrib/ntp/ntpd/ntp_leapsec.c head/contrib/ntp/ntpd/ntp_leapsec.h head/contrib/ntp/ntpd/ntp_loopfilter.c head/contrib/ntp/ntpd/ntp_parser.c head/contrib/ntp/ntpd/ntp_parser.h head/contrib/ntp/ntpd/ntp_peer.c head/contrib/ntp/ntpd/ntp_proto.c head/contrib/ntp/ntpd/ntp_refclock.c head/contrib/ntp/ntpd/ntp_request.c head/contrib/ntp/ntpd/ntp_restrict.c head/contrib/ntp/ntpd/ntp_scanner.c head/contrib/ntp/ntpd/ntp_util.c head/contrib/ntp/ntpd/ntpd-opts.c head/contrib/ntp/ntpd/ntpd-opts.h head/contrib/ntp/ntpd/ntpd.1ntpdman head/contrib/ntp/ntpd/ntpd.1ntpdmdoc head/contrib/ntp/ntpd/ntpd.c head/contrib/ntp/ntpd/ntpd.html head/contrib/ntp/ntpd/ntpd.man.in head/contrib/ntp/ntpd/ntpd.mdoc.in head/contrib/ntp/ntpd/refclock_gpsdjson.c head/contrib/ntp/ntpd/refclock_jupiter.c head/contrib/ntp/ntpd/refclock_nmea.c head/contrib/ntp/ntpd/refclock_oncore.c head/contrib/ntp/ntpd/refclock_palisade.c head/contrib/ntp/ntpd/refclock_palisade.h head/contrib/ntp/ntpd/refclock_parse.c head/contrib/ntp/ntpd/refclock_zyfer.c head/contrib/ntp/ntpdate/ntpdate.c head/contrib/ntp/ntpdc/invoke-ntpdc.texi head/contrib/ntp/ntpdc/layout.std head/contrib/ntp/ntpdc/ntpdc-opts.c head/contrib/ntp/ntpdc/ntpdc-opts.h head/contrib/ntp/ntpdc/ntpdc.1ntpdcman head/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc head/contrib/ntp/ntpdc/ntpdc.c head/contrib/ntp/ntpdc/ntpdc.html head/contrib/ntp/ntpdc/ntpdc.man.in head/contrib/ntp/ntpdc/ntpdc.mdoc.in head/contrib/ntp/ntpdc/ntpdc_ops.c head/contrib/ntp/ntpq/Makefile.am head/contrib/ntp/ntpq/Makefile.in head/contrib/ntp/ntpq/invoke-ntpq.texi head/contrib/ntp/ntpq/ntpq-opts.c head/contrib/ntp/ntpq/ntpq-opts.h head/contrib/ntp/ntpq/ntpq-subs.c head/contrib/ntp/ntpq/ntpq.1ntpqman head/contrib/ntp/ntpq/ntpq.1ntpqmdoc head/contrib/ntp/ntpq/ntpq.c head/contrib/ntp/ntpq/ntpq.h head/contrib/ntp/ntpq/ntpq.html head/contrib/ntp/ntpq/ntpq.man.in head/contrib/ntp/ntpq/ntpq.mdoc.in head/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc head/contrib/ntp/ntpsnmpd/ntpsnmpd.html head/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in head/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in head/contrib/ntp/packageinfo.sh head/contrib/ntp/parseutil/dcfd.c head/contrib/ntp/scripts/build/mkver.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in head/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi head/contrib/ntp/scripts/invoke-plot_summary.texi head/contrib/ntp/scripts/invoke-summary.texi head/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi head/contrib/ntp/scripts/ntp-wait/ntp-wait-opts head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc head/contrib/ntp/scripts/ntp-wait/ntp-wait.html head/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in head/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in head/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi head/contrib/ntp/scripts/ntpsweep/ntpsweep-opts head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc head/contrib/ntp/scripts/ntpsweep/ntpsweep.html head/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in head/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in head/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi head/contrib/ntp/scripts/ntptrace/ntptrace-opts head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc head/contrib/ntp/scripts/ntptrace/ntptrace.html head/contrib/ntp/scripts/ntptrace/ntptrace.man.in head/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in head/contrib/ntp/scripts/plot_summary-opts head/contrib/ntp/scripts/plot_summary.1plot_summaryman head/contrib/ntp/scripts/plot_summary.1plot_summarymdoc head/contrib/ntp/scripts/plot_summary.html head/contrib/ntp/scripts/plot_summary.man.in head/contrib/ntp/scripts/plot_summary.mdoc.in head/contrib/ntp/scripts/summary-opts head/contrib/ntp/scripts/summary.1summaryman head/contrib/ntp/scripts/summary.1summarymdoc head/contrib/ntp/scripts/summary.html head/contrib/ntp/scripts/summary.man.in head/contrib/ntp/scripts/summary.mdoc.in head/contrib/ntp/scripts/update-leap/invoke-update-leap.texi head/contrib/ntp/scripts/update-leap/update-leap-opts head/contrib/ntp/scripts/update-leap/update-leap.1update-leapman head/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc head/contrib/ntp/scripts/update-leap/update-leap.html head/contrib/ntp/scripts/update-leap/update-leap.man.in head/contrib/ntp/scripts/update-leap/update-leap.mdoc.in head/contrib/ntp/sntp/COPYRIGHT head/contrib/ntp/sntp/configure head/contrib/ntp/sntp/configure.ac head/contrib/ntp/sntp/crypto.c head/contrib/ntp/sntp/include/copyright.def head/contrib/ntp/sntp/include/version.def head/contrib/ntp/sntp/include/version.texi head/contrib/ntp/sntp/invoke-sntp.texi head/contrib/ntp/sntp/libevent/build-aux/ar-lib head/contrib/ntp/sntp/libevent/build-aux/compile head/contrib/ntp/sntp/libevent/build-aux/config.guess head/contrib/ntp/sntp/libevent/build-aux/config.sub head/contrib/ntp/sntp/libevent/build-aux/depcomp head/contrib/ntp/sntp/libevent/build-aux/install-sh head/contrib/ntp/sntp/libevent/build-aux/missing head/contrib/ntp/sntp/libevent/build-aux/test-driver head/contrib/ntp/sntp/libevent/build-aux/ylwrap head/contrib/ntp/sntp/libevent/test/regress.gen.c head/contrib/ntp/sntp/libevent/test/regress.gen.h head/contrib/ntp/sntp/libopts/m4/libopts.m4 head/contrib/ntp/sntp/m4/ntp_problemtests.m4 head/contrib/ntp/sntp/m4/version.m4 head/contrib/ntp/sntp/main.c head/contrib/ntp/sntp/networking.c head/contrib/ntp/sntp/scm-rev head/contrib/ntp/sntp/sntp-opts.c head/contrib/ntp/sntp/sntp-opts.h head/contrib/ntp/sntp/sntp.1sntpman head/contrib/ntp/sntp/sntp.1sntpmdoc head/contrib/ntp/sntp/sntp.html head/contrib/ntp/sntp/sntp.man.in head/contrib/ntp/sntp/sntp.mdoc.in head/contrib/ntp/sntp/tests/run-crypto.c head/contrib/ntp/sntp/tests/run-keyFile.c head/contrib/ntp/sntp/tests/run-kodDatabase.c head/contrib/ntp/sntp/tests/run-kodFile.c head/contrib/ntp/sntp/tests/run-networking.c head/contrib/ntp/sntp/tests/run-packetHandling.c head/contrib/ntp/sntp/tests/run-packetProcessing.c head/contrib/ntp/sntp/tests/run-t-log.c head/contrib/ntp/sntp/tests/run-utilities.c head/contrib/ntp/sntp/tests/testconf.yml head/contrib/ntp/sntp/version.c head/contrib/ntp/util/invoke-ntp-keygen.texi head/contrib/ntp/util/ntp-keygen-opts.c head/contrib/ntp/util/ntp-keygen-opts.h head/contrib/ntp/util/ntp-keygen.1ntp-keygenman head/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc head/contrib/ntp/util/ntp-keygen.html head/contrib/ntp/util/ntp-keygen.man.in head/contrib/ntp/util/ntp-keygen.mdoc.in head/contrib/ntp/util/ntptime.c head/usr.sbin/ntp/config.h head/usr.sbin/ntp/libntp/Makefile Directory Properties: head/contrib/ntp/ (props changed) Modified: head/contrib/ntp/COPYRIGHT ============================================================================== --- head/contrib/ntp/COPYRIGHT Wed Mar 4 21:30:55 2020 (r358651) +++ head/contrib/ntp/COPYRIGHT Wed Mar 4 21:45:12 2020 (r358652) @@ -3,7 +3,7 @@ This file is automatically generated from html/copyrig jpg "Clone me," says Dolly sheepishly. - Last update: 2-Jan-2017 11:58 UTC + Last update: 4-Feb-2020 23:47 UTC __________________________________________________________________ The following copyright notice applies to all files collectively called @@ -32,7 +32,7 @@ This file is automatically generated from html/copyrig Burnicki is: *********************************************************************** * * -* Copyright (c) Network Time Foundation 2011-2017 * +* Copyright (c) Network Time Foundation 2011-2020 * * * * All Rights Reserved * * * Modified: head/contrib/ntp/ChangeLog ============================================================================== --- head/contrib/ntp/ChangeLog Wed Mar 4 21:30:55 2020 (r358651) +++ head/contrib/ntp/ChangeLog Wed Mar 4 21:45:12 2020 (r358652) @@ -1,4 +1,100 @@ --- +(4.2.8p14) 2020/03/03 Released by Harlan Stenn + +* [Sec 3610] process_control() should bail earlier on short packets. stenn@ + - Reported by Philippe Antoine +* [Sec 3596] Highly predictable timestamp attack. + - Reported by Miroslav Lichvar +* [Sec 3592] DoS attack on client ntpd + - Reported by Miroslav Lichvar +* [Bug 3637] Emit the version of ntpd in saveconfig. stenn@ +* [Bug 3636] NMEA: combine time/date from multiple sentences +* [Bug 3635] Make leapsecond file hash check optional +* [Bug 3634] Typo in discipline.html, reported by Jason Harrison. stenn@ +* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence + - implement Zeller's congruence in libparse and libntp +* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap + - integrated patch by Cy Schubert +* [Bug 3620] memory leak in ntpq sysinfo + - applied patch by Gerry Garvey +* [Bug 3619] Honour drefid setting in cooked mode and sysinfo + - applied patch by Gerry Garvey +* [Bug 3617] Add support for ACE III and Copernicus II receivers + - integrated patch by Richard Steedman +* [Bug 3615] accelerate refclock startup +* [Bug 3613] Propagate noselect to mobilized pool servers + - Reported by Martin Burnicki +* [Bug 3612] Use-of-uninitialized-value in receive function + - Reported by Philippe Antoine +* [Bug 3611] NMEA time interpreted incorrectly + - officially document new "trust date" mode bit for NMEA driver + - restore the (previously undocumented) "trust date" feature lost with [bug 3577] +* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter + - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter' +* [Bug 3608] libparse fails to compile on S11.4SRU13 and later + - removed ffs() and fls() prototypes as per Brian Utterback +* [Bug 3604] Wrong param byte order passing into record_raw_stats() in + ntp_io.c + - fixed byte and paramter order as suggested by wei6410@sina.com +* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no +* [Bug 3599] Build fails on linux-m68k due to alignment issues + - added padding as suggested by John Paul Adrian Glaubitz +* [Bug 3594] ntpd discards messages coming through nmead +* [Bug 3593] ntpd discards silently nmea messages after the 5th string +* [Bug 3590] Update refclock_oncore.c to the new GPS date API +* [Bug 3585] Unity tests mix buffered and unbuffered output + - stdout+stderr are set to line buffered during test setup now +* [Bug 3583] synchronization error + - set clock to base date if system time is before that limit +* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled +* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) + - Reported by Paulo Neves +* [Bug 3577] Update refclock_zyfer.c to the new GPS date API + - also updates for refclock_nmea.c and refclock_jupiter.c +* [Bug 3576] New GPS date function API +* [Bug 3573] nptdate: missleading error message +* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo +* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' + - sidekick: service port resolution in 'ntpdate' +* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH + - applied patch by Douglas Royds +* [Bug 3542] ntpdc monlist parameters cannot be set +* [Bug 3533] ntpdc peer_info ipv6 issues + - applied patch by Gerry Garvey +* [Bug 3531] make check: test-decodenetnum fails + - try to harden 'decodenetnum()' against 'getaddrinfo()' errors + - fix wrong cond-compile tests in unit tests +* [Bug 3517] Reducing build noise +* [Bug 3516] Require tooling from this decade + - patch by Philipp Prindeville +* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code + - patch by Philipp Prindeville +* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings + - patch by Philipp Prindeville +* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() + - partial application of patch by Philipp Prindeville +* [Bug 3491] Signed values of LFP datatypes should always display a sign + - applied patch by Gerry Garvey & fixed unit tests +* [Bug 3490] Patch to support Trimble Resolution Receivers + - applied (modified) patch by Richard Steedman +* [Bug 3473] RefID of refclocks should always be text format + - applied patch by Gerry Garvey (with minor formatting changes) +* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails + - applied patch by Miroslav Lichvar +* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network + +* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user + is specified with -u + - monitor daemon child startup & propagate exit codes +* [Bug 1433] runtime check whether the kernel really supports capabilities + - (modified) patch by Kurt Roeckx +* Clean up sntp/networking.c:sendpkt() error message. +* Provide more detail on unrecognized config file parser tokens. +* Startup log improvements. +* Update the copyright year. +* html/confopt.html: cleanup. + +--- (4.2.8p13) 2019/03/07 Released by Harlan Stenn * [Sec 3565] Crafted null dereference attack in authenticated Modified: head/contrib/ntp/CommitLog ============================================================================== --- head/contrib/ntp/CommitLog Wed Mar 4 21:30:55 2020 (r358651) +++ head/contrib/ntp/CommitLog Wed Mar 4 21:45:12 2020 (r358652) @@ -1,10 +1,3065 @@ -ChangeSet@1.3849, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org +ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P14 + TAG: NTP_4_2_8P14 + + ChangeLog@1.1974 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.conf.texi@1.221 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.keys.texi@1.206 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntpd.texi@1.520 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5man@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5mdoc@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.html@1.203 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.man.in@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.mdoc.in@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.5man@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.5mdoc@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.html@1.201 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.man.in@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.mdoc.in@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd-opts.c@1.543 +7 -7 + NTP_4_2_8P14 + + ntpd/ntpd-opts.h@1.542 +3 -3 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdman@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdmdoc@1.349 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.man.in@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.mdoc.in@1.349 +1 -1 + NTP_4_2_8P14 + + ntpdc/invoke-ntpdc.texi@1.517 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.c@1.536 +7 -7 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.h@1.535 +3 -3 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpdc/ntpdc.html@1.363 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + ntpq/invoke-ntpq.texi@1.527 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq-opts.c@1.545 +7 -7 + NTP_4_2_8P14 + + ntpq/ntpq-opts.h@1.543 +3 -3 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqman@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqmdoc@1.355 +1 -1 + NTP_4_2_8P14 + + ntpq/ntpq.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.man.in@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.mdoc.in@1.355 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.519 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.c@1.538 +7 -7 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.html@1.187 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + packageinfo.sh@1.544 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.109 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.html@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.man.in@1.108 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.113 +1 -1 + NTP_4_2_8P14 + + scripts/invoke-plot_summary.texi@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/invoke-summary.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.341 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait-opts@1.77 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.html@1.359 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.man.in@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.116 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.html@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/invoke-ntptrace.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptraceman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.html@1.132 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.mdoc.in@1.118 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary-opts@1.80 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summaryman@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summarymdoc@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary.html@1.134 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.man.in@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.mdoc.in@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/summary-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summaryman@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summarymdoc@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/summary.html@1.133 +2 -2 + NTP_4_2_8P14 + + scripts/summary.man.in@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.mdoc.in@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/invoke-update-leap.texi@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap-opts@1.30 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapman@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapmdoc@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.html@1.30 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.man.in@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.mdoc.in@1.29 +1 -1 + NTP_4_2_8P14 + + sntp/invoke-sntp.texi@1.519 +2 -2 + NTP_4_2_8P14 + + sntp/sntp-opts.c@1.539 +7 -7 + NTP_4_2_8P14 + + sntp/sntp-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + sntp/sntp.1sntpman@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.1sntpmdoc@1.354 +1 -1 + NTP_4_2_8P14 + + sntp/sntp.html@1.535 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.man.in@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.mdoc.in@1.354 +1 -1 + NTP_4_2_8P14 + + util/invoke-ntp-keygen.texi@1.522 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen-opts.c@1.541 +7 -7 + NTP_4_2_8P14 + + util/ntp-keygen-opts.h@1.539 +3 -3 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenman@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenmdoc@1.350 +1 -1 + NTP_4_2_8P14 + + util/ntp-keygen.html@1.195 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.man.in@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.mdoc.in@1.350 +1 -1 + NTP_4_2_8P14 + +ChangeSet@1.3895, 2020-03-03 17:09:57-08:00, ntpreleng@ntp-build.tal1.ntfo.org + quiet some debug messages + + ntpd/ntp_config.c@1.375 +0 -2 + quiet some debug messages + + ntpd/ntp_peer.c@1.166 +2 -0 + quiet some debug messages + +ChangeSet@1.3894, 2020-03-03 16:49:54-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 + + ChangeLog@1.1973 +1 -0 + NTP_4_2_8P13 + + ntpd/invoke-ntp.conf.texi@1.220 +31 -7 + NTP_4_2_8P13 + + ntpd/invoke-ntp.keys.texi@1.205 +1 -1 + NTP_4_2_8P13 + + ntpd/invoke-ntpd.texi@1.519 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.conf.5man@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.5mdoc@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.conf.html@1.202 +33 -7 + NTP_4_2_8P13 + + ntpd/ntp.conf.man.in@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.mdoc.in@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.keys.5man@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.5mdoc@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.keys.man.in@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.mdoc.in@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.542 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.541 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdman@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdmdoc@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.man.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.mdoc.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpdc/invoke-ntpdc.texi@1.516 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.535 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.534 +3 -3 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.html@1.362 +408 -353 + NTP_4_2_8P13 + + ntpdc/ntpdc.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpq/invoke-ntpq.texi@1.526 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.544 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.542 +3 -3 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqman@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqmdoc@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.193 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.man.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.mdoc.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.518 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.537 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.108 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.html@1.109 +172 -128 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.man.in@1.107 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.112 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-plot_summary.texi@1.130 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-summary.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.340 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.76 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.html@1.358 +181 -152 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.man.in@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.html@1.130 +188 -152 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptraceman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.html@1.131 +179 -129 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.mdoc.in@1.117 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.79 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summaryman@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summarymdoc@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.html@1.133 +203 -161 + NTP_4_2_8P13 + + scripts/plot_summary.man.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.mdoc.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/summary-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summaryman@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summarymdoc@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.html@1.132 +184 -136 + NTP_4_2_8P13 + + scripts/summary.man.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.mdoc.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/invoke-update-leap.texi@1.28 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.29 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapman@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapmdoc@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.html@1.29 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.man.in@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.mdoc.in@1.28 +2 -2 + NTP_4_2_8P13 + + sntp/invoke-sntp.texi@1.518 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.538 +2 -2 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + sntp/sntp.1sntpman@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.1sntpmdoc@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.html@1.534 +472 -418 + NTP_4_2_8P13 + + sntp/sntp.man.in@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.mdoc.in@1.353 +2 -2 + NTP_4_2_8P13 + + util/invoke-ntp-keygen.texi@1.521 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.540 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.538 +3 -3 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenman@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenmdoc@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.194 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.man.in@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.mdoc.in@1.349 +2 -2 + NTP_4_2_8P13 + +ChangeSet@1.3893, 2020-03-03 16:25:14-08:00, ntpreleng@ntp-build.tal1.ntfo.org + Replace line with head -1 + + scripts/build/addChangeLogTag@1.6 +1 -1 + Replace line with head -1 + +ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng@ntp-build.tal1.ntfo.org + provide get_pollskew() for simulator + + ntpd/ntp_config.c@1.374 +2 -2 + provide get_pollskew() for simulator + +ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 (currently on 1.3894) + + BitKeeper/triggers/2mirrors@1.11 +6 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.538.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd.html@1.193 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.c@1.29 +372 -340 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.h@1.29 +44 -37 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.532.1.1 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.531.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.541.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.192 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.534.1.1 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj-opts@1.10 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.337.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.73.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.126.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.76.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/summary-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.26.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.537.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.193 +1 -1 + NTP_4_2_8P13 + +ChangeSet@1.3888, 2020-03-03 07:26:56+00:00, stenn@psp-deb1.ntp.org + cleanup + + NEWS@1.197.1.3 +3 -2 + cleanup + +ChangeSet@1.3887, 2020-02-18 05:11:26+00:00, stenn@psp-deb1.ntp.org + Cleanup distcheck psl* files + + ntpd/Makefile.am@1.138 +11 -0 + Cleanup distcheck psl* files + +ChangeSet@1.3886, 2020-02-18 05:10:35+00:00, stenn@psp-deb1.ntp.org + Distribute ntp_calgps.h + + include/Makefile.am@1.58 +1 -0 + Distribute ntp_calgps.h + +ChangeSet@1.3885, 2020-02-18 03:32:51+00:00, stenn@psp-deb1.ntp.org + Update the NEWS file for p14 + + NEWS@1.197.1.2 +107 -0 + Update the NEWS file for p14 + +ChangeSet@1.3884, 2020-02-17 11:05:46+00:00, stenn@psp-deb1.ntp.org + merge cleanup + + ntpd/ntp_proto.c@1.432 +1 -1 + merge cleanup + +ChangeSet@1.3881, 2020-02-17 08:50:00+00:00, stenn@psp-deb1.ntp.org + update + + ntpd/ntp_keyword.h@1.38 +545 -539 + update + +ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp-deb1.ntp.org + Startp logging improvements. + Bug3596. + + html/accopt.html@1.48 +7 -2 + cleanup. + bug3596: document 'serverresponse fuzz' + + html/confopt.html@1.64.1.1 +22 -9 + Cleanup. + + Bug 3596: document xmtnonce + + html/miscopt.html@1.93 +19 -1 + Cleanup. + + bug3596: document pollskewlist + + include/Makefile.am@1.57 +1 -0 + pollskew upodates + + include/ntp.h@1.232 +8 -2 + bug3596 chagnes: + - srvfuzrft patches + - pollskew updates + - xmtnonce + + include/ntp_config.h@1.89 +27 -20 + bug3596 updates: + - pollskewlist + - srvfuzrft patches + + include/ntp_psl.h@1.1 +17 -0 + BitKeeper file include/ntp_psl.h + --- + bug3596 + + include/ntp_psl.h@1.0 +0 -0 + + include/ntp_request.h@1.54 +2 -1 + srvfuzrft patches + + include/ntp_stdlib.h@1.88 +1 -1 + randomizepoll/server response fuzz reftime fixes + + include/ntpd.h@1.207 +1 -1 + bug3596 cleanup + + libntp/statestr.c@1.31 +12 -5 + bug3596 srvrspfuz fixes + + ntpd/Makefile.am@1.137 +37 -7 + bug3596 pollskewlist changes + + ntpd/complete.conf.in@1.37 +4 -2 + bug3596: randompoll, pollskew xmtnonce + + ntpd/keyword-gen-utd@1.35 +1 -1 + Keyword table updates + + ntpd/keyword-gen.c@1.42 +3 -3 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp.conf.def@1.34 +40 -4 + Cleanup. + bug3596: xmtnonce, serverresponse fuzz, pollskewlist, + + ntpd/ntp_config.c@1.373 +250 -26 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp_loopfilter.c@1.195 +1 -1 + pollskew upodates + + ntpd/ntp_parser.c@1.117 +1298 -1283 + bug3596 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Mar 4 22:22:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 633AA253C1C; Wed, 4 Mar 2020 22:22:01 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XpJm0kQkz3Hgn; Wed, 4 Mar 2020 22:21:59 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qv1-xf44.google.com with SMTP id r15so1558078qve.3; Wed, 04 Mar 2020 14:21:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LccLuqP9Qtee+rC3EDJMYP7apsF9sTWKY5BOEUG1IvQ=; b=FB9lWCXqpf7w4+KozCUZ5unNl/nLiSQ0a3sfFARAgjU3qQdSUEfuvIwodoYgN2Fr+d 8jiEutHK/m+0lzmIXq1FN7EHpknpIsNVRgqrvtzCyoA6v6MTHjhXwXMl4coecQE+uOi1 VyVc1VELrSkpcm7wrgdaWJtTugMss2ojOdJXgNNvy7wdNynVLSG8ESvJ2zNSIty8RHhj 0XrXpWG7ZCHn+AtC5DnHGe08cC88A8kTG1nRewKXC3KmCE9v7ey0xmXawK3fyYHtq/MW RqDsQv7V9D0uMI+/GboTEiwi/7x/3zfoC7bY5pBnbiDhbI41NrdQXt8EH87wEqsPteWi XzIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=LccLuqP9Qtee+rC3EDJMYP7apsF9sTWKY5BOEUG1IvQ=; b=Y94FBJNJ/8MmlvS4qD7DhyFG9DocpuZAyFutneFkAtximFfcb+f0D6Kk7X+OY4L5BT 8XnxiJ1IKLBjPfDYKwf+/pRqtYf2evaFBWNAsyAFzvsFwnXKHJV9W//F0XLwBnxzEU2f p3qHkRni/drQFlnbOJSOqSYBXZY5Nd5q4Te5plB7ePPDbirwlRz2vuqMK8lkG7vNfjAl nBZC5NaKFgMDZLSW2BkR2Y0vq9SxPMQGxbERAqiKgPP7Xx6DemPFfFvatwo8nLoufNYi uRMNloXnFoygsSlLWb1Ve9PQW092LHTlK3hJyxraJRrPchiW/J6VTTEPg7eRcF1styTV y7ug== X-Gm-Message-State: ANhLgQ0YSvPe8TtFyY7Eq0ffXBobfQGUzCB5W6/ify6xnvmZLUg8fiOj u6bPwP/2Jycz5vEOkjXdLwTWOxef X-Google-Smtp-Source: ADFU+vsMGTi8kCukC9TmkaKkxcnS3mMvBJpOBVQsjVJkPzHjruUJ+Nw7RLUknHuwmEsJrExvj+hR2A== X-Received: by 2002:a0c:fc46:: with SMTP id w6mr3825507qvp.46.1583360518737; Wed, 04 Mar 2020 14:21:58 -0800 (PST) Received: from raichu (toroon0560w-lp130-11-70-50-21-248.dsl.bell.ca. [70.50.21.248]) by smtp.gmail.com with ESMTPSA id h9sm14813575qtq.61.2020.03.04.14.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 14:21:57 -0800 (PST) Sender: Mark Johnston Date: Wed, 4 Mar 2020 17:21:53 -0500 From: Mark Johnston To: Eric Joyner Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r358432 - in head/sys: kern sys vm Message-ID: <20200304222153.GA58468@raichu> References: <202002281605.01SG5Iox077824@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 48XpJm0kQkz3Hgn X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=FB9lWCXq; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::f44 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.28 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[4.4.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.59)[ip: (0.60), ipnet: 2607:f8b0::/32(-1.86), asn: 15169(-1.66), country: US(-0.05)]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 22:22:01 -0000 On Wed, Mar 04, 2020 at 01:15:59PM -0800, Eric Joyner wrote: > Hi Mark, > > Is the addition of #include in sys/sys/refcount.h > actually necessary? I don't see anything in there used in refcount.h, and > the kernel appears to compile without it, at least on amd64. No, it is left over from an earlier iteration of the patch. I will remove it. Thanks. > On Fri, Feb 28, 2020 at 8:05 AM Mark Johnston wrote: > > > Author: markj > > Date: Fri Feb 28 16:05:18 2020 > > New Revision: 358432 > > URL: https://svnweb.freebsd.org/changeset/base/358432 > > > > Log: > > Add a blocking counter KPI. > > > > refcount(9) was recently extended to support waiting on a refcount to > > drop to zero, as this was needed for a lockless VM object > > paging-in-progress counter. However, this adds overhead to all uses of > > refcount(9) and doesn't really match traditional refcounting semantics: > > once a counter has dropped to zero, the protected object may be freed at > > any point and it is not safe to dereference the counter. > > > > This change removes that extension and instead adds a new set of KPIs, > > blockcount_*, for use by VM object PIP and busy. From owner-svn-src-head@freebsd.org Wed Mar 4 22:23:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 329C1253CCB; Wed, 4 Mar 2020 22:23:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XpLN6XrBz3M00; Wed, 4 Mar 2020 22:23:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF89D25205; Wed, 4 Mar 2020 22:23:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024MNOZB072220; Wed, 4 Mar 2020 22:23:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024MNOA2072219; Wed, 4 Mar 2020 22:23:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003042223.024MNOA2072219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 4 Mar 2020 22:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358654 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 22:23:25 -0000 Author: markj Date: Wed Mar 4 22:23:24 2020 New Revision: 358654 URL: https://svnweb.freebsd.org/changeset/base/358654 Log: Remove an #include erroneously added in r358432. Reported by: erj Modified: head/sys/sys/refcount.h Modified: head/sys/sys/refcount.h ============================================================================== --- head/sys/sys/refcount.h Wed Mar 4 21:53:54 2020 (r358653) +++ head/sys/sys/refcount.h Wed Mar 4 22:23:24 2020 (r358654) @@ -34,7 +34,6 @@ #ifdef _KERNEL #include -#include #else #include #define KASSERT(exp, msg) /* */ From owner-svn-src-head@freebsd.org Wed Mar 4 22:27:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3A76253DA3; Wed, 4 Mar 2020 22:27:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XpQs1rPnz41w0; Wed, 4 Mar 2020 22:27:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 17C0E2520D; Wed, 4 Mar 2020 22:27:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024MRGhm072614; Wed, 4 Mar 2020 22:27:16 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024MRGsW072613; Wed, 4 Mar 2020 22:27:16 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202003042227.024MRGsW072613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 4 Mar 2020 22:27:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358655 - head/sbin/mount_nfs X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sbin/mount_nfs X-SVN-Commit-Revision: 358655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 22:27:17 -0000 Author: glebius Date: Wed Mar 4 22:27:16 2020 New Revision: 358655 URL: https://svnweb.freebsd.org/changeset/base/358655 Log: When a machine boots the NFS mounting script is executed after interfaces are configured, but for many interfaces (e.g. all Intel) ifconfig causes link renegotiation, so the first attempt to mount NFS always fails. After that mount_nfs sleeps for 30 seconds, while only a couple seconds are actually required for interface to get up. Instead of sleeping, do select(2) on routing socket and check if some interface became UP and in this case retry immediately. Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D23934 Modified: head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Wed Mar 4 22:23:24 2020 (r358654) +++ head/sbin/mount_nfs/mount_nfs.c Wed Mar 4 22:27:16 2020 (r358655) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include @@ -505,6 +507,59 @@ sec_num_to_name(int flavor) return (NULL); } +/* + * Wait for RTM_IFINFO message with interface that is IFF_UP and with + * link on, or until timeout expires. Returns seconds left. + */ +static time_t +rtm_ifinfo_sleep(time_t sec) +{ + char buf[2048]; + fd_set rfds; + struct timeval tv, start; + ssize_t nread; + int n, s; + + s = socket(PF_ROUTE, SOCK_RAW, 0); + if (s < 0) + err(EX_OSERR, "socket"); + (void)gettimeofday(&start, NULL); + + for (tv.tv_sec = sec, tv.tv_usec = 0; + tv.tv_sec > 0; + (void)gettimeofday(&tv, NULL), + tv.tv_sec = sec - (tv.tv_sec - start.tv_sec)) { + FD_ZERO(&rfds); + FD_SET(s, &rfds); + n = select(s + 1, &rfds, NULL, NULL, &tv); + if (n == 0) + continue; + if (n == -1) { + if (errno == EINTR) + continue; + else + err(EX_SOFTWARE, "select"); + } + nread = read(s, buf, 2048); + if (nread < 0) + err(EX_OSERR, "read"); + if ((size_t)nread >= sizeof(struct if_msghdr)) { + struct if_msghdr *ifm; + + ifm = (struct if_msghdr *)buf; + if (ifm->ifm_version == RTM_VERSION && + ifm->ifm_type == RTM_IFINFO && + (ifm->ifm_flags & IFF_UP) && + ifm->ifm_data.ifi_link_state != LINK_STATE_DOWN) + break; + } + } + + close(s); + + return (tv.tv_sec); +} + static int getnfsargs(char *spec, struct iovec **iov, int *iovlen) { @@ -638,7 +693,12 @@ getnfsargs(char *spec, struct iovec **iov, int *iovlen if (daemon(0, 0) != 0) err(1, "daemon"); } - sleep(60); + /* + * If rtm_ifinfo_sleep() returns non-zero, don't count + * that as a retry attempt. + */ + if (rtm_ifinfo_sleep(60) && retrycnt != 0) + retrycnt++; } freeaddrinfo(ai_nfs); From owner-svn-src-head@freebsd.org Wed Mar 4 22:31:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA3F625405F; Wed, 4 Mar 2020 22:31:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XpWy3Ccdz4DBr; Wed, 4 Mar 2020 22:31:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D779E253CA; Wed, 4 Mar 2020 22:31:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024MVfuo077670; Wed, 4 Mar 2020 22:31:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024MVfga077668; Wed, 4 Mar 2020 22:31:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202003042231.024MVfga077668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 4 Mar 2020 22:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358656 - head/sys/dev/wtap X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/dev/wtap X-SVN-Commit-Revision: 358656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 22:31:42 -0000 Author: glebius Date: Wed Mar 4 22:31:41 2020 New Revision: 358656 URL: https://svnweb.freebsd.org/changeset/base/358656 Log: Remove unused function. Modified: head/sys/dev/wtap/if_wtap.c head/sys/dev/wtap/if_wtapvar.h Modified: head/sys/dev/wtap/if_wtap.c ============================================================================== --- head/sys/dev/wtap/if_wtap.c Wed Mar 4 22:27:16 2020 (r358655) +++ head/sys/dev/wtap/if_wtap.c Wed Mar 4 22:31:41 2020 (r358656) @@ -448,44 +448,6 @@ wtap_inject(struct wtap_softc *sc, struct mbuf *m) mtx_unlock(&sc->sc_mtx); } -void -wtap_rx_deliver(struct wtap_softc *sc, struct mbuf *m) -{ - struct epoch_tracker et; - struct ieee80211com *ic = &sc->sc_ic; - struct ieee80211_node *ni; - int type; -#if 0 - DWTAP_PRINTF("%s\n", __func__); -#endif - - DWTAP_PRINTF("[%d] receiving m=%p\n", sc->id, m); - if (m == NULL) { /* NB: shouldn't happen */ - ic_printf(ic, "%s: no mbuf!\n", __func__); - } - - ieee80211_dump_pkt(ic, mtod(m, caddr_t), 0,0,0); - - /* - * Locate the node for sender, track state, and then - * pass the (referenced) node up to the 802.11 layer - * for its use. - */ - ni = ieee80211_find_rxnode_withkey(ic, - mtod(m, const struct ieee80211_frame_min *),IEEE80211_KEYIX_NONE); - NET_EPOCH_ENTER(et); - if (ni != NULL) { - /* - * Sending station is known, dispatch directly. - */ - type = ieee80211_input(ni, m, 1<<7, 10); - ieee80211_free_node(ni); - } else { - type = ieee80211_input_all(ic, m, 1<<7, 10); - } - NET_EPOCH_EXIT(et); -} - static void wtap_rx_proc(void *arg, int npending) { Modified: head/sys/dev/wtap/if_wtapvar.h ============================================================================== --- head/sys/dev/wtap/if_wtapvar.h Wed Mar 4 22:27:16 2020 (r358655) +++ head/sys/dev/wtap/if_wtapvar.h Wed Mar 4 22:31:41 2020 (r358656) @@ -154,6 +154,5 @@ void wtap_suspend(struct wtap_softc *); void wtap_shutdown(struct wtap_softc *); void wtap_intr(struct wtap_softc *); void wtap_inject(struct wtap_softc *, struct mbuf *); -void wtap_rx_deliver(struct wtap_softc *, struct mbuf *); #endif From owner-svn-src-head@freebsd.org Wed Mar 4 22:32:41 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6352254151; Wed, 4 Mar 2020 22:32:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XpY54PXKz4GX2; Wed, 4 Mar 2020 22:32:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0CD4A2541B; Wed, 4 Mar 2020 22:32:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024MWeIA078432; Wed, 4 Mar 2020 22:32:40 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024MWeW6078429; Wed, 4 Mar 2020 22:32:40 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202003042232.024MWeW6078429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 4 Mar 2020 22:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358657 - in head: share/man/man4 sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head: share/man/man4 sys/netgraph X-SVN-Commit-Revision: 358657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 22:32:41 -0000 Author: glebius Date: Wed Mar 4 22:32:40 2020 New Revision: 358657 URL: https://svnweb.freebsd.org/changeset/base/358657 Log: Fix spelling of "dropped". Submitted by: Lutz Donnerhacke Differential Revision: https://reviews.freebsd.org/D23954 Modified: head/share/man/man4/ng_car.4 head/sys/netgraph/ng_car.c head/sys/netgraph/ng_car.h Modified: head/share/man/man4/ng_car.4 ============================================================================== --- head/share/man/man4/ng_car.4 Wed Mar 4 22:31:41 2020 (r358656) +++ head/share/man/man4/ng_car.4 Wed Mar 4 22:32:40 2020 (r358657) @@ -163,7 +163,7 @@ Return node statistics as .Bd -literal struct ng_car_hookstats { uint64_t passed_pkts; /* Counter for passed packets */ - uint64_t droped_pkts; /* Counter for dropped packets */ + uint64_t dropped_pkts; /* Counter for dropped packets */ uint64_t green_pkts; /* Counter for green packets */ uint64_t yellow_pkts; /* Counter for yellow packets */ uint64_t red_pkts; /* Counter for red packets */ Modified: head/sys/netgraph/ng_car.c ============================================================================== --- head/sys/netgraph/ng_car.c Wed Mar 4 22:31:41 2020 (r358656) +++ head/sys/netgraph/ng_car.c Wed Mar 4 22:32:40 2020 (r358657) @@ -286,7 +286,7 @@ ng_car_rcvdata(hook_p hook, item_p item ) default: \ /* Drop packet and return. */ \ NG_FREE_ITEM(item); \ - ++hinfo->stats.droped_pkts; \ + ++hinfo->stats.dropped_pkts; \ return (0); \ } \ } while (0) @@ -730,7 +730,7 @@ ng_car_enqueue(struct hookinfo *hinfo, item_p item) (hinfo->te + len >= NG_CAR_QUEUE_SIZE)) { /* Drop packet. */ ++hinfo->stats.red_pkts; - ++hinfo->stats.droped_pkts; + ++hinfo->stats.dropped_pkts; NG_FREE_M(m); hinfo->te = 0; Modified: head/sys/netgraph/ng_car.h ============================================================================== --- head/sys/netgraph/ng_car.h Wed Mar 4 22:31:41 2020 (r358656) +++ head/sys/netgraph/ng_car.h Wed Mar 4 22:32:40 2020 (r358657) @@ -42,7 +42,7 @@ /* Per hook statistics counters */ struct ng_car_hookstats { u_int64_t passed_pkts; /* Counter for passed packets */ - u_int64_t droped_pkts; /* Counter for droped packets */ + u_int64_t dropped_pkts; /* Counter for dropped packets */ u_int64_t green_pkts; /* Counter for green packets */ u_int64_t yellow_pkts; /* Counter for yellow packets */ u_int64_t red_pkts; /* Counter for red packets */ @@ -50,7 +50,7 @@ struct ng_car_hookstats { }; #define NG_CAR_HOOKSTATS { \ { "passed", &ng_parse_uint64_type }, \ - { "droped", &ng_parse_uint64_type }, \ + { "dropped", &ng_parse_uint64_type }, \ { "green", &ng_parse_uint64_type }, \ { "yellow", &ng_parse_uint64_type }, \ { "red", &ng_parse_uint64_type }, \ From owner-svn-src-head@freebsd.org Wed Mar 4 23:49:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD89E255837; Wed, 4 Mar 2020 23:49:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XrFY0PFXz4t8D; Wed, 4 Mar 2020 23:49:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F21AA2610A; Wed, 4 Mar 2020 23:49:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024NnKQv020437; Wed, 4 Mar 2020 23:49:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024NnKrS020436; Wed, 4 Mar 2020 23:49:20 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202003042349.024NnKrS020436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 4 Mar 2020 23:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358658 - head X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 358658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2020 23:49:22 -0000 Author: glebius Date: Wed Mar 4 23:49:20 2020 New Revision: 358658 URL: https://svnweb.freebsd.org/changeset/base/358658 Log: Add a missing bktr header. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Mar 4 22:32:40 2020 (r358657) +++ head/ObsoleteFiles.inc Wed Mar 4 23:49:20 2020 (r358658) @@ -39,6 +39,7 @@ # 20200301: bktr removed OLD_DIRS+=usr/include/dev/bktr OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h +OLD_FILES+=usr/include/dev/bktr/ioctl_bt848.h OLD_FILES+=usr/include/dev/bktr/ioctl_meteor.h .if ${TARGET_ARCH} == "i386" OLD_FILES+=usr/include/machine/ioctl_bktr.h From owner-svn-src-head@freebsd.org Thu Mar 5 00:36:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 995CE256D0A; Thu, 5 Mar 2020 00:36:39 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XsJ53MNmz44Cn; Thu, 5 Mar 2020 00:36:37 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 0250aSdk029387 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 4 Mar 2020 16:36:28 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 0250aSxs029386; Wed, 4 Mar 2020 16:36:28 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 4 Mar 2020 16:36:28 -0800 From: Gleb Smirnoff To: Jeff Roberson Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358451 - in head/sys: kern vm Message-ID: <20200305003628.GS5741@FreeBSD.org> References: <202002282142.01SLgmnN089938@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202002282142.01SLgmnN089938@repo.freebsd.org> X-Rspamd-Queue-Id: 48XsJ53MNmz44Cn X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.07 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(0.92)[0.922,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 00:36:39 -0000 Hi Jeff, may be I'm missing something, but from a quick review this change doesn't seem to be correct for sendfile with INVARIANTS on. sendfile_swapin does immediate vm_page_xunbusy() for all valid pages that are substituted to bogus one. With this change KASSERT in vm_page_relookup() would fire: KASSERT(m != NULL && vm_page_busied(m) && On Fri, Feb 28, 2020 at 09:42:48PM +0000, Jeff Roberson wrote: J> Author: jeff J> Date: Fri Feb 28 21:42:48 2020 J> New Revision: 358451 J> URL: https://svnweb.freebsd.org/changeset/base/358451 J> J> Log: J> Provide a lock free alternative to resolve bogus pages. This is not likely J> to be much of a perf win, just a nice code simplification. J> J> Reviewed by: markj, kib J> Differential Revision: https://reviews.freebsd.org/D23866 J> J> Modified: J> head/sys/kern/kern_sendfile.c J> head/sys/kern/vfs_bio.c J> head/sys/vm/vm_page.c J> head/sys/vm/vm_page.h J> J> Modified: head/sys/kern/kern_sendfile.c J> ============================================================================== J> --- head/sys/kern/kern_sendfile.c Fri Feb 28 21:31:40 2020 (r358450) J> +++ head/sys/kern/kern_sendfile.c Fri Feb 28 21:42:48 2020 (r358451) J> @@ -350,7 +350,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> { J> vm_page_t *pa = sfio->pa; J> int grabbed; J> - bool locked; J> J> *nios = 0; J> flags = (flags & SF_NODISKIO) ? VM_ALLOC_NOWAIT : 0; J> @@ -359,8 +358,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> * First grab all the pages and wire them. Note that we grab J> * only required pages. Readahead pages are dealt with later. J> */ J> - locked = false; J> - J> grabbed = vm_page_grab_pages_unlocked(obj, OFF_TO_IDX(off), J> VM_ALLOC_NORMAL | VM_ALLOC_WIRED | flags, pa, npages); J> if (grabbed < npages) { J> @@ -381,10 +378,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> i++; J> continue; J> } J> - if (!locked) { J> - VM_OBJECT_WLOCK(obj); J> - locked = true; J> - } J> J> /* J> * Next page is invalid. Check if it belongs to pager. It J> @@ -396,8 +389,10 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> * stored in 'a', about how many pages we can pagein after J> * this page in a single I/O. J> */ J> + VM_OBJECT_RLOCK(obj); J> if (!vm_pager_has_page(obj, OFF_TO_IDX(vmoff(i, off)), NULL, J> &a)) { J> + VM_OBJECT_RUNLOCK(obj); J> pmap_zero_page(pa[i]); J> vm_page_valid(pa[i]); J> MPASS(pa[i]->dirty == 0); J> @@ -405,6 +400,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> i++; J> continue; J> } J> + VM_OBJECT_RUNLOCK(obj); J> J> /* J> * We want to pagein as many pages as possible, limited only J> @@ -435,11 +431,9 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> } J> J> refcount_acquire(&sfio->nios); J> - VM_OBJECT_WUNLOCK(obj); J> rv = vm_pager_get_pages_async(obj, pa + i, count, NULL, J> i + count == npages ? &rhpages : NULL, J> &sendfile_iodone, sfio); J> - VM_OBJECT_WLOCK(obj); J> if (__predict_false(rv != VM_PAGER_OK)) { J> /* J> * Perform full pages recovery before returning EIO. J> @@ -451,7 +445,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> for (j = 0; j < npages; j++) { J> if (j > i && j < i + count - 1 && J> pa[j] == bogus_page) J> - pa[j] = vm_page_lookup(obj, J> + pa[j] = vm_page_relookup(obj, J> OFF_TO_IDX(vmoff(j, off))); J> else if (j >= i) J> vm_page_xunbusy(pa[j]); J> @@ -460,7 +454,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> __func__, pa, j)); J> vm_page_unwire(pa[j], PQ_INACTIVE); J> } J> - VM_OBJECT_WUNLOCK(obj); J> return (EIO); J> } J> J> @@ -475,7 +468,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> */ J> for (j = i + 1; j < i + count - 1; j++) J> if (pa[j] == bogus_page) { J> - pa[j] = vm_page_lookup(obj, J> + pa[j] = vm_page_relookup(obj, J> OFF_TO_IDX(vmoff(j, off))); J> KASSERT(pa[j], ("%s: page %p[%d] disappeared", J> __func__, pa, j)); J> @@ -484,9 +477,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> i += count; J> (*nios)++; J> } J> - J> - if (locked) J> - VM_OBJECT_WUNLOCK(obj); J> J> if (*nios == 0 && npages != 0) J> SFSTAT_INC(sf_noiocnt); J> J> Modified: head/sys/kern/vfs_bio.c J> ============================================================================== J> --- head/sys/kern/vfs_bio.c Fri Feb 28 21:31:40 2020 (r358450) J> +++ head/sys/kern/vfs_bio.c Fri Feb 28 21:42:48 2020 (r358451) J> @@ -2878,11 +2878,8 @@ vfs_vmio_iodone(struct buf *bp) J> */ J> m = bp->b_pages[i]; J> if (m == bogus_page) { J> - if (bogus == false) { J> - bogus = true; J> - VM_OBJECT_RLOCK(obj); J> - } J> - m = vm_page_lookup(obj, OFF_TO_IDX(foff)); J> + bogus = true; J> + m = vm_page_relookup(obj, OFF_TO_IDX(foff)); J> if (m == NULL) J> panic("biodone: page disappeared!"); J> bp->b_pages[i] = m; J> @@ -2905,8 +2902,6 @@ vfs_vmio_iodone(struct buf *bp) J> foff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK; J> iosize -= resid; J> } J> - if (bogus) J> - VM_OBJECT_RUNLOCK(obj); J> vm_object_pip_wakeupn(obj, bp->b_npages); J> if (bogus && buf_mapped(bp)) { J> BUF_CHECK_MAPPED(bp); J> @@ -4470,22 +4465,16 @@ vfs_unbusy_pages(struct buf *bp) J> int i; J> vm_object_t obj; J> vm_page_t m; J> - bool bogus; J> J> runningbufwakeup(bp); J> if (!(bp->b_flags & B_VMIO)) J> return; J> J> obj = bp->b_bufobj->bo_object; J> - bogus = false; J> for (i = 0; i < bp->b_npages; i++) { J> m = bp->b_pages[i]; J> if (m == bogus_page) { J> - if (bogus == false) { J> - bogus = true; J> - VM_OBJECT_RLOCK(obj); J> - } J> - m = vm_page_lookup(obj, OFF_TO_IDX(bp->b_offset) + i); J> + m = vm_page_relookup(obj, OFF_TO_IDX(bp->b_offset) + i); J> if (!m) J> panic("vfs_unbusy_pages: page missing\n"); J> bp->b_pages[i] = m; J> @@ -4498,8 +4487,6 @@ vfs_unbusy_pages(struct buf *bp) J> } J> vm_page_sunbusy(m); J> } J> - if (bogus) J> - VM_OBJECT_RUNLOCK(obj); J> vm_object_pip_wakeupn(obj, bp->b_npages); J> } J> J> J> Modified: head/sys/vm/vm_page.c J> ============================================================================== J> --- head/sys/vm/vm_page.c Fri Feb 28 21:31:40 2020 (r358450) J> +++ head/sys/vm/vm_page.c Fri Feb 28 21:42:48 2020 (r358451) J> @@ -1671,6 +1671,24 @@ vm_page_lookup(vm_object_t object, vm_pindex_t pindex) J> } J> J> /* J> + * vm_page_relookup: J> + * J> + * Returns a page that must already have been busied by J> + * the caller. Used for bogus page replacement. J> + */ J> +vm_page_t J> +vm_page_relookup(vm_object_t object, vm_pindex_t pindex) J> +{ J> + vm_page_t m; J> + J> + m = vm_radix_lookup_unlocked(&object->rtree, pindex); J> + KASSERT(m != NULL && vm_page_busied(m) && J> + m->object == object && m->pindex == pindex, J> + ("vm_page_relookup: Invalid page %p", m)); J> + return (m); J> +} J> + J> +/* J> * This should only be used by lockless functions for releasing transient J> * incorrect acquires. The page may have been freed after we acquired a J> * busy lock. In this case busy_lock == VPB_FREED and we have nothing J> J> Modified: head/sys/vm/vm_page.h J> ============================================================================== J> --- head/sys/vm/vm_page.h Fri Feb 28 21:31:40 2020 (r358450) J> +++ head/sys/vm/vm_page.h Fri Feb 28 21:42:48 2020 (r358451) J> @@ -653,6 +653,7 @@ void vm_page_reference(vm_page_t m); J> #define VPR_NOREUSE 0x02 J> void vm_page_release(vm_page_t m, int flags); J> void vm_page_release_locked(vm_page_t m, int flags); J> +vm_page_t vm_page_relookup(vm_object_t, vm_pindex_t); J> bool vm_page_remove(vm_page_t); J> bool vm_page_remove_xbusy(vm_page_t); J> int vm_page_rename(vm_page_t, vm_object_t, vm_pindex_t); J> _______________________________________________ J> svn-src-all@freebsd.org mailing list J> https://lists.freebsd.org/mailman/listinfo/svn-src-all J> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu Mar 5 01:40:08 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB68B25814B for ; Thu, 5 Mar 2020 01:40:08 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-25.consmr.mail.gq1.yahoo.com (sonic304-25.consmr.mail.gq1.yahoo.com [98.137.68.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48XtjK1Q0Bz48J1 for ; Thu, 5 Mar 2020 01:40:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 6UbS4kcVM1msOovIp9UXJ57G7Rn_CqCz6aDnCHu.U90jsveDlmch6lO7eBdrF8j auJT9lbzyvZXgjY0FmRWbtAKi6qNjAw0bHZ2GusQZRCOrgtdJrEH5AqyjL6gUV7lVMvEnw.TT1Wn epclnWOZFIHTYBsKZ5TN3crtv1igw7a0w4mmuS4fZpesqa1o.xdzOcb3V1k9X.ll6HKYhpDI04Jm Q3KS2PWTcB8VNnXiPcqiy_iRV0RkuFRAukuBYvn8_Mc_AG7I1edAD3tXDbpu.U.6QPY_Wip6913q skbLY56X.0U.WtoAucyNoU3Z2mmOEjV0hrdPWMQyGQsjD6Jr_IqauSwoe_61iPuRHjkS83rk_Qzb 0gOFLfBXZ2M_vMbynl_T4MFxrPvswgtVhT8plNIuKBpYMfDKsJVkFaepllEdZv6pnsQH6OLI9MMe AbktFt.HK.TprRSNgXelMO6coL8cSxRBdAR.8Lz15FSIaaEmLVD9OMtYrOVZByIqEcl5Trp2cvBl WkClITkYxgguoFKIUMt0G2Lx54xnHhg7xotHbwMF2Uakr0PPrHUwpCc26grs0Kt7lZ.1HNN6y3BU WgWU_1IBLiJNEeXNYj_GaKTiyrdxtLYwuw1PRdjn7kMq8DwmbrHFDJJnYg63L4HRKYE.4DzxuayN aE4NC0h7SjZe3qf6hX9UDYMGMFuU0z2h4UPRB_W_OlOZ1QdA1yK8bv5BC5XiP4ci1d7kUkOwxffM ACximp90UgZV4GBEp_aDsD_UD05.i8x4IX8d4_SFsIPJI4OShCwxzGh_vx.tcwg3iViKPC_8chuK 473Nv6ejVs1JhzhDRHfKq.Yfqq.bvRDeeTxUMg9vqR2qYvUdfoipIzpBxQB8abot1YcZC14lfrSi eWQ1WdFNtYoSpSngiyU7EBamy0eJJCrAdLUNu8BqlbdkRrXU4QZfGVxjl1PSsWs1ld31TNc9OUY0 ra3nSIwnVohI.gVNwl3sfcdbLMICYDxeEXPVYxVyH2DtnLRVWTF2tM0VAdPwMlRcD7lLVBlfbM0W FaiDjlLZ3_tavhCO73UV_cFXn1WwUxtYK6UDGRMqYpkTNPwBlfHSI72eWglAfh_ksCC7oCVMO5jJ DlLDwz4vHWiiQFqVXrzrMstGSE5DfHDWKQFo5Ts4UwQU8imdb1yvBtD1M0Jq_5n8EeltwG5aw6vm QQyb9n8Hrq.ZtqsPtm5Giyl1GuPubVkiLzE2IvVK76UiGxSFabh1G5bhfM6TddVPJI9zaaH_g6_J aB2.wF6nAsFXfCv66uHCMEUPLdYsPKZoi9Tr9mrkgNUriTHDu9.tGK6.URT4hnZPKEDX6B.sJlxS YWNs4UBMPck5_Yi5osizKiZuHdckFqM1ORl8de.Mnx353Gs59WHUDYM07N24w2l3n2kztSyHfcXP caoyADIq9JEt9Hi.f Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Thu, 5 Mar 2020 01:40:02 +0000 Received: by smtp408.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID eb34d144e86ff490d99d45f8e305617a; Thu, 05 Mar 2020 01:39:58 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358658 - head Message-Id: <9C5291FF-FDB4-44D5-BD08-CD797991DFA0@yahoo.com> Date: Wed, 4 Mar 2020 17:39:56 -0800 To: "glebius@freebsd.org" , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3608.60.0.2.5) References: <9C5291FF-FDB4-44D5-BD08-CD797991DFA0.ref@yahoo.com> X-Rspamd-Queue-Id: 48XtjK1Q0Bz48J1 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.22 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_SPAM_MEDIUM(0.28)[0.277,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[206.68.137.98.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (0.87), ipnet: 98.137.64.0/21(0.84), asn: 36647(0.67), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 01:40:08 -0000 Gleb Smirnoff glebius at FreeBSD.org wrote on Wed Mar 4 23:49:22 UTC 2020 : > author: glebius > Date: Wed Mar 4 23:49:20 2020 > New Revision: 358658 > URL:=20 > https://svnweb.freebsd.org/changeset/base/358658 >=20 >=20 > Log: > Add a missing bktr header. >=20 > Modified: > head/ObsoleteFiles.inc >=20 > Modified: head/ObsoleteFiles.inc > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/ObsoleteFiles.inc Wed Mar 4 22:32:40 2020 = (r358657) > +++ head/ObsoleteFiles.inc Wed Mar 4 23:49:20 2020 = (r358658) > @@ -39,6 +39,7 @@ > # 20200301: bktr removed > OLD_DIRS+=3Dusr/include/dev/bktr > OLD_FILES+=3Dusr/include/dev/bktr/ioctl_bktr.h > +OLD_FILES+=3Dusr/include/dev/bktr/ioctl_bt848.h > OLD_FILES+=3Dusr/include/dev/bktr/ioctl_meteor.h > .if ${TARGET_ARCH} =3D=3D "i386" > OLD_FILES+=3Dusr/include/machine/ioctl_bktr.h I also see an include of dev/bktr/ioctl_bt848.h that is still around: # grep -r ioctl_bt848 /usr/src/* | more /usr/src/usr.bin/setchannel/setchannel.c:#include = Other than a SPDX licensing ID tag addition in late 2017, the .c file has been unchanged since late 2010 ( head -r214886 ). /usr/src/usr.bin/setchannel/ has 3 other files as well: # ls -ldT /usr/src/usr.bin/setchannel/* -rw-r--r-- 1 root wheel 124 Dec 20 20:06:09 2019 = /usr/src/usr.bin/setchannel/Makefile -rw-r--r-- 1 root wheel 315 Dec 20 20:06:09 2019 = /usr/src/usr.bin/setchannel/Makefile.depend -rw-r--r-- 1 root wheel 3258 Dec 20 20:06:10 2019 = /usr/src/usr.bin/setchannel/setchannel.1 -rw-r--r-- 1 root wheel 6825 Dec 20 20:06:09 2019 = /usr/src/usr.bin/setchannel/setchannel.c =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu Mar 5 04:36:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1997925C6EB; Thu, 5 Mar 2020 04:36:15 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XycZ5VZxz4CGM; Thu, 5 Mar 2020 04:36:13 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-qk1-f195.google.com with SMTP id b5so4064072qkh.8; Wed, 04 Mar 2020 20:36:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QxTH7SoTW7Bxd/V+l+WqupzNN2yTXkA7EPQ2Im1yWZ0=; b=PgYqNZNHpMfLyo+yzFm6GGXeID1V4GPw1ZLXoG2tCJ3PjroRw/GIfVLLtIbTxwFwCy ufwpClp6+qNbz4624dOUgLlMfphOaoKWGbp+EfLlgQxwRkJU3CqKNlUsxj/WZ4At0toR T5wQJ/GNt9KZc8Zgyjd/7TgEVosPr5/nDpF+qrIhV9tb/Pdwkm8MZDV5AJ7rDs8NSuiX f4549C7yAok34CW3dWdTZQ5zoKXnZnk9IC5kJC71DN34gDH7liqU3xZkiBgYmhLwME+8 BUkJmL3gIeF4jfIrvUiQXRQed8dXbDKW30K1NpBGPSxVuCgX3jkYV/KrmrIpsfIz7kjN +GUw== X-Gm-Message-State: ANhLgQ0z92UQu0JvZohr98DwlkiKvwuyGW6AEYLb15j0U1s5hAKEEAiU uvC7qBXdKnZ+pl//xIJtOLI/qfic X-Google-Smtp-Source: ADFU+vsEeEAavYl2fRZV7Vwo+780kc2J+v4Xk8EEhEaFMQ5t45ShgkVJX12HLVIHY3jI+JN4aGlvIg== X-Received: by 2002:a05:620a:142b:: with SMTP id k11mr6123664qkj.322.1583382972702; Wed, 04 Mar 2020 20:36:12 -0800 (PST) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com. [209.85.160.169]) by smtp.gmail.com with ESMTPSA id y38sm15653351qth.18.2020.03.04.20.36.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2020 20:36:12 -0800 (PST) Received: by mail-qt1-f169.google.com with SMTP id 59so3231557qtb.1; Wed, 04 Mar 2020 20:36:12 -0800 (PST) X-Received: by 2002:ac8:6048:: with SMTP id k8mr5674292qtm.53.1583382971888; Wed, 04 Mar 2020 20:36:11 -0800 (PST) MIME-Version: 1.0 References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> In-Reply-To: From: Kyle Evans Date: Wed, 4 Mar 2020 22:36:00 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358439 - head/sys/amd64/include To: Ryan Libby Cc: Guido Falsi , "Alexander V. Chernikov" , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48XycZ5VZxz4CGM X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.78 / 15.00]; NEURAL_HAM_MEDIUM(-0.78)[-0.779,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 04:36:15 -0000 On Wed, Mar 4, 2020 at 11:27 AM Ryan Libby wrote: > > On Wed, Mar 4, 2020 at 3:27 AM Guido Falsi wrote: > > > > On 02/03/20 18:13, Ryan Libby wrote: > > > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > > >> > > >> 28.02.2020, 18:32, "Ryan Libby" : > > >>> Author: rlibby > > >>> Date: Fri Feb 28 18:32:36 2020 > > >>> New Revision: 358439 > > >>> URL: https://svnweb.freebsd.org/changeset/base/358439 > > >>> > > >>> Log: > > >>> amd64 atomic.h: minor codegen optimization in flag access > > >>> > > >>> Previously the pattern to extract status flags from inline assembly > > >>> blocks was to use setcc in the block to write the flag to a register. > > >>> This was suboptimal in a few ways: > > >>> - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > > >>> would just be loaded into a register and then reloaded to a flag. > > >>> - The setcc would force the block to use an additional register. > > >>> - If the client code didn't care for the flag value then the setcc > > >>> would be entirely pointless but could not be eliminated by the > > >>> optimizer. > > >>> > > >>> A more modern inline asm construct (since gcc 6 and clang 9) allows for > > >> This effectively restricts kernel builds by all older compilers. > > >> Is there any chance of making it conditional depending on the compiler version/features? > > > > > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > > > maintenance effort going forward. If building current with an old cross > > > compiler is an important scenario, we can either revert this and the > > > following revision or work up a patch to make it conditional. I'll see > > > what that might look like. > > > > > > > Actually this causes emulators/virtualbox-ose port to fail to build: > > > > In file included from /usr/src/sys/sys/systm.h:44: > > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > > '=@cce' in asm > > ATOMIC_CMPSET(char); > > ^ > > /usr/include/machine/atomic.h:205:4: note: expanded from macro > > 'ATOMIC_CMPSET' > > : "=@cce" (res), /* 0 */ \ > > ^ > > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > > '=@cce' in asm > > > > (and so on) > > > > > > the virtualbox-ose port is forced to use an older clang version due to > > crashes when compiled with newer ones. > > > > Not sure whose responsibility is to fix this. > > > > Should I file a bug report on bugzilla? > > > > -- > > Guido Falsi > > We've discussed whether to provide compatibility code for older compilers here: > https://reviews.freebsd.org/D23937 > > There's a bug tracking virtualbox-ose being pinned to an old compiler here: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236616 > > I see you have commented on that bug. I've opened https://reviews.freebsd.org/D23967 and PR 244603 specifically for coercing the port to use GCC9 instead, which does indeed fix the breakage. Once that lands, I'll investigate 236616 some more to see if newer llvm (including 10) is still broken here. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Thu Mar 5 05:27:21 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2C6F25D532; Thu, 5 Mar 2020 05:27:21 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XzlW5fcmz41yZ; Thu, 5 Mar 2020 05:27:19 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f181.google.com with SMTP id g6so4753393oiy.1; Wed, 04 Mar 2020 21:27:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cIWcTTCwsrGBXgoCxygzKbDWSySCEqGqvDGIo04qgCY=; b=jDWLjtI+zai3HfjI8Z3fHCUZ5xDrgFCOHpQf2aHCfZ0ZDjFqFkry8RcapoSdC9w3Za oXNnbK1rmXh8/HiE4icJhXJDbLDISpM/bHaE5KwcIMHxyKvsoqZ7WUZyoq2TPudLs75E DfE0sFkVXXDkiWNDdtDKqmfj5z3CH+LbvtDc07LybyUdzrOQxKl4pRnOytEOSpXTU+Ge OO25XxgzktnwsAnfv2JO3mCPFjboZvIC1FvLi+neX2VHsZsXg/FLjG20vucgJegnHRoe Ny/jJMs6fLZbsV8GkSamEbPZfUMC0DddaJFd2mZdSX5f+RS/t8thzvqeHIv8j+SGqEFc 6ZAg== X-Gm-Message-State: ANhLgQ0xP2oLsUo6Dstk23wuYBBjmKe8XIqlSApuMrjn3X1SJ2fDhUCX ZFxwzXWBZKuTYR+S28UbGYpgrsE0dGjMTvW0wKT9vjGp X-Google-Smtp-Source: ADFU+vuqJHBhNWwAPylfnMDX2lrJNFS1xOSYhyFPxfEkH4W8rfLEQUJCSKjV201yCYxygKFG+hKvQ0ypLZ24acCeyPc= X-Received: by 2002:aca:c256:: with SMTP id s83mr4524912oif.57.1583386037288; Wed, 04 Mar 2020 21:27:17 -0800 (PST) MIME-Version: 1.0 References: <201904071839.x37IduPO002007@repo.freebsd.org> In-Reply-To: <201904071839.x37IduPO002007@repo.freebsd.org> From: Alan Somers Date: Wed, 4 Mar 2020 22:27:06 -0700 Message-ID: Subject: Re: svn commit: r346018 - head/sys/conf To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48XzlW5fcmz41yZ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.181 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-3.04 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.04)[ip: (-0.51), ipnet: 209.85.128.0/17(-2.98), asn: 15169(-1.66), country: US(-0.05)]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[181.167.85.209.list.dnswl.org : 127.0.5.0]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[181.167.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 05:27:22 -0000 On Sun, Apr 7, 2019 at 12:40 PM Warner Losh wrote: > Author: imp > Date: Sun Apr 7 18:39:55 2019 > New Revision: 346018 > URL: https://svnweb.freebsd.org/changeset/base/346018 > > Log: > Use default shell assignment rather more complicated if then > construct. > > Discussed with: emaste@, allanjude@ (changes (or not) based on their > feedback) > Differential Revision: https://reviews.freebsd.org/D19797 > Can we MFC this to stable/12? Before this change, setting BRANCH_OVERRIDE during "make release" would have no effect. From owner-svn-src-head@freebsd.org Thu Mar 5 06:20:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBC1325E965; Thu, 5 Mar 2020 06:20:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Y0wf4Cq0z4ZGn; Thu, 5 Mar 2020 06:20:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14A7A2A73; Thu, 5 Mar 2020 06:20:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256KHc8053352; Thu, 5 Mar 2020 06:20:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256KHrR053351; Thu, 5 Mar 2020 06:20:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003050620.0256KHrR053351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Mar 2020 06:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358662 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 06:20:19 -0000 Author: imp Date: Thu Mar 5 06:20:17 2020 New Revision: 358662 URL: https://svnweb.freebsd.org/changeset/base/358662 Log: xpt_async is submitting a CCB, not finishing it up, so use xpt_action() instead of xpt_done(). Add the missing XPT_ASYNC case to xpt_action_default. xpt_async wants to use the side-effect of the xpt_done() routine to queue this to the camisr thread so it can be done in that context. However, this breaks the symmetry that you create a ccb and call xpt_action() for it to be dispatched. Restore that symmetry by having it go through that path. As far as I can tell, this is the only CCB that we create and call xpt_done() on directly. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Mar 5 06:19:21 2020 (r358661) +++ head/sys/cam/cam_xpt.c Thu Mar 5 06:20:17 2020 (r358662) @@ -3156,6 +3156,10 @@ call_sim: start_ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(start_ccb); break; + case XPT_ASYNC: + start_ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(start_ccb); + break; default: case XPT_SDEV_TYPE: case XPT_TERM_IO: @@ -4447,7 +4451,7 @@ xpt_async(u_int32_t async_code, struct cam_path *path, xpt_freeze_devq(path, 1); else xpt_freeze_simq(path->bus->sim, 1); - xpt_done(ccb); + xpt_action(ccb); } static void From owner-svn-src-head@freebsd.org Thu Mar 5 06:21:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6637925E9E7; Thu, 5 Mar 2020 06:21:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Y0xT1hmpz4bsT; Thu, 5 Mar 2020 06:21:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 153702A96; Thu, 5 Mar 2020 06:21:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256L0vE054166; Thu, 5 Mar 2020 06:21:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256L0av054165; Thu, 5 Mar 2020 06:21:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003050621.0256L0av054165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Mar 2020 06:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358663 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 06:21:01 -0000 Author: imp Date: Thu Mar 5 06:21:00 2020 New Revision: 358663 URL: https://svnweb.freebsd.org/changeset/base/358663 Log: All paths lead to xpt_done, so move it after the switch. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Mar 5 06:20:17 2020 (r358662) +++ head/sys/cam/cam_xpt.c Thu Mar 5 06:21:00 2020 (r358663) @@ -5326,14 +5326,13 @@ xptaction(struct cam_sim *sim, union ccb *work_ccb) cpi->transport = XPORT_UNSPECIFIED; cpi->transport_version = XPORT_VERSION_UNSPECIFIED; cpi->ccb_h.status = CAM_REQ_CMP; - xpt_done(work_ccb); break; } default: work_ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(work_ccb); break; } + xpt_done(work_ccb); } /* From owner-svn-src-head@freebsd.org Thu Mar 5 06:22:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1DDBC25EC46 for ; Thu, 5 Mar 2020 06:22:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Y0z25j1vz4g0y for ; Thu, 5 Mar 2020 06:22:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf35.google.com with SMTP id m2so1940214qvu.13 for ; Wed, 04 Mar 2020 22:22:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=prz+FsTWzjW2Rgv/cVl0SSuw13Q6XGThwggNKEcv9Jw=; b=gqPpHjtoL3SmvNHQeVWd6dbeFx5/Rdf/5UkbMLO7dgAd8YTfuBSNf+gKJm3/327vuq 3EOwqOsSFw2aNhWSepHvcyYffY2BWoNcxZ4uFM/NiC3iQrSDrdvTQyItut5+sGiJ4psP tGh1uLkFOp78it8RpS46p0HK8/jJAAHV1RP+OdZtCOZXVIFX8x87pbSOUJozpeNHCsne oEHHWFTbm+NiTHlidYUBOyvNXZVb8xS5sdSWtQwMytqzVjsNlLuRB5LDlRfSQUkJoOPb OoeGtQAzntnNX8TuYYB0jrqA2Pu9l2gzqrV7cP97A12hwD5i50eHkLkLKwNkJdi2mkfS GebQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=prz+FsTWzjW2Rgv/cVl0SSuw13Q6XGThwggNKEcv9Jw=; b=lzcVGPReEcFSCdrXt06ShQyEnqWopF9mk7lbWqCj9wqNoa8N6aGB4jFYakzaEAPO0h E02Os9+nWfqXfZ+T/MEMj5t5CzR3GB3Jhrtsu4mBFuPiKQzATplgJqiFo2iC99Lztv5h vJeYaxlwCDs53gPZeD9+oJ3qiEt4KZoS66Zm+lhjrSUhfev0txbTUZoxEBGKy80+pd3R 3GRtU7Sqogl9datVHVPKT4sZJ4Zs85LwFcV5ZnoA7Kjimts+XD4I7H+1bVm/qhPs+tYK xd9ZP9Ok0xOfyN5/f5WBQ3j0rhm7cYzgUDp5bwA31TYeIyUOu3529ZF7RvPg2XF+8aeT f2qw== X-Gm-Message-State: ANhLgQ0iqX/hqYjK9zfv6h58EviP/W7dtnqz8OTxh31hLQX5T4jzboV5 5teWooPG865Av1fS+t8aPg0/iKsf0HlbGwwFsmCHBg== X-Google-Smtp-Source: ADFU+vtpfob1gM0l8mFuZyBm+/CPVTPPXEVxu2UL3jvYqfn7H4BBXuJKKgyCYBovDADr6DIVwtZ2FkpKOVav6jaYZjs= X-Received: by 2002:a0c:e982:: with SMTP id z2mr5026603qvn.22.1583389340803; Wed, 04 Mar 2020 22:22:20 -0800 (PST) MIME-Version: 1.0 References: <201904071839.x37IduPO002007@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 4 Mar 2020 23:22:10 -0700 Message-ID: Subject: Re: svn commit: r346018 - head/sys/conf To: Alan Somers Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48Y0z25j1vz4g0y X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=gqPpHjto; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f35) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.03 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[5.3.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-1.03)[ip: (-1.57), ipnet: 2607:f8b0::/32(-1.86), asn: 15169(-1.66), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 06:22:25 -0000 On Wed, Mar 4, 2020 at 10:27 PM Alan Somers wrote: > On Sun, Apr 7, 2019 at 12:40 PM Warner Losh wrote: > >> Author: imp >> Date: Sun Apr 7 18:39:55 2019 >> New Revision: 346018 >> URL: https://svnweb.freebsd.org/changeset/base/346018 >> >> Log: >> Use default shell assignment rather more complicated if then >> construct. >> >> Discussed with: emaste@, allanjude@ (changes (or not) based on their >> feedback) >> Differential Revision: https://reviews.freebsd.org/D19797 >> > > Can we MFC this to stable/12? Before this change, setting BRANCH_OVERRIDE > during "make release" would have no effect. > Sure thing. There was a merge conflict, which makes sense, but I think I resolved it correctly. Warner From owner-svn-src-head@freebsd.org Thu Mar 5 10:52:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1658A2652F0; Thu, 5 Mar 2020 10:52:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Y6yT2gTdz3RD3; Thu, 5 Mar 2020 10:52:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 390CB6050; Thu, 5 Mar 2020 10:52:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025AqH0N018108; Thu, 5 Mar 2020 10:52:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025AqHt4018107; Thu, 5 Mar 2020 10:52:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003051052.025AqHt4018107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 5 Mar 2020 10:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358669 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 358669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 10:52:18 -0000 Author: andrew Date: Thu Mar 5 10:52:16 2020 New Revision: 358669 URL: https://svnweb.freebsd.org/changeset/base/358669 Log: Mark the arm64 machdep.h as kernel only None of this is useful for userspace. Sponsored by: Innovate UK Modified: head/sys/arm64/include/machdep.h Modified: head/sys/arm64/include/machdep.h ============================================================================== --- head/sys/arm64/include/machdep.h Thu Mar 5 09:20:32 2020 (r358668) +++ head/sys/arm64/include/machdep.h Thu Mar 5 10:52:16 2020 (r358669) @@ -29,6 +29,8 @@ #ifndef _MACHINE_MACHDEP_H_ #define _MACHINE_MACHDEP_H_ +#ifdef _KERNEL + struct arm64_bootparams { vm_offset_t modulep; vm_offset_t kern_l1pt; /* L1 page table for the kernel */ @@ -55,5 +57,7 @@ vm_offset_t parse_boot_param(struct arm64_bootparams * void parse_fdt_bootargs(void); #endif extern void (*pagezero)(void *); + +#endif /* _KERNEL */ #endif /* _MACHINE_MACHDEP_H_ */ From owner-svn-src-head@freebsd.org Thu Mar 5 12:24:49 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77C52267E1D; Thu, 5 Mar 2020 12:24:49 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Y91F212Zz40gH; Thu, 5 Mar 2020 12:24:49 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3F9471DA; Thu, 5 Mar 2020 12:24:48 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025COmDT074870; Thu, 5 Mar 2020 12:24:48 GMT (envelope-from alfredo@FreeBSD.org) Received: (from alfredo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025COmDv074869; Thu, 5 Mar 2020 12:24:48 GMT (envelope-from alfredo@FreeBSD.org) Message-Id: <202003051224.025COmDv074869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alfredo set sender to alfredo@FreeBSD.org using -f From: "Alfredo Dal'Ava Junior" Date: Thu, 5 Mar 2020 12:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358670 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: alfredo X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 358670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 12:24:49 -0000 Author: alfredo Date: Thu Mar 5 12:24:48 2020 New Revision: 358670 URL: https://svnweb.freebsd.org/changeset/base/358670 Log: [PowerPC64] fix uma_small_free panic Fix panic "Freeing UMA block at 0xn with no associated page". Also replaces pmap_remove call by pmap_kremove, for symmetry. Reviewed by: jhibbits Approved by: jhibbits (mentor) Differential Revision: https://reviews.freebsd.org/D23931 Modified: head/sys/powerpc/powerpc/uma_machdep.c Modified: head/sys/powerpc/powerpc/uma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/uma_machdep.c Thu Mar 5 10:52:16 2020 (r358669) +++ head/sys/powerpc/powerpc/uma_machdep.c Thu Mar 5 12:24:48 2020 (r358670) @@ -95,14 +95,13 @@ uma_small_free(void *mem, vm_size_t size, u_int8_t fla { vm_page_t m; - if (!hw_direct_map) - pmap_remove(kernel_pmap,(vm_offset_t)mem, - (vm_offset_t)mem + PAGE_SIZE); - if (hw_direct_map) m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)mem)); - else - m = PHYS_TO_VM_PAGE((vm_offset_t)mem); + else { + m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)mem)); + pmap_kremove((vm_offset_t)mem); + } + KASSERT(m != NULL, ("Freeing UMA block at %p with no associated page", mem)); #ifdef __powerpc64__ From owner-svn-src-head@freebsd.org Thu Mar 5 13:15:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E71C2269602; Thu, 5 Mar 2020 13:15:17 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YB7R2jyxz4dXx; Thu, 5 Mar 2020 13:15:15 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 73F307BD; Thu, 5 Mar 2020 08:15:13 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 05 Mar 2020 08:15:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=G 3RLCM3ca/b9Gzw2kTccvTnHdLVIKCm7YZZV/Ezbw0I=; b=xM6fYNga/pGicliWQ 9qMABz0QcmKSrUqH7JuKdC/lIwafGHO8ftXZ+HeKzczN9WP3meK80yzQjJA7xI6A pRunlo3w1CtiRwmLNQk6J7gq6eCagfiH8TQBMwcDFAZVqJZKb5Cy58fR38mbYeS7 QaFtoQWWACfcbLowgRxAjgjQbH3cljq9L0BB64WtqqHjKMQBcq6R5SqTymmOx5Gt 42pnfZYq/dAw2rshP+YYb+OZgVrtLkDFLecoIWYNo8VR9j0LPZQvfYT8zkI0JK+S QAIW+At/4JasUX+bwKo4rNKtuEHBEw5OIeUSaDtOqLY/LhhNc58038VzMlJV3FJQ YQ65g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=G3RLCM3ca/b9Gzw2kTccvTnHdLVIKCm7YZZV/Ezbw 0I=; b=sOrp2tBus6DIT7fbiyQ9Cg4jDoNqa6VnKK8tzn2hu+H1AP2KbPeD3Ahc3 q3jOfuC8VANTi+DeK+ALCStuIYaVdkmf8xMZUx5+YfeXXNJwRdb4Kz5TiJOIyAKZ vYMt4tzAEKy2NvWpTDSK8KJdET6uj5Ji8NZ0BP9yr2F6y0+WTZnsGu5YcjJOVne/ tpMbQBYc3ojZNwAKHxejRGqI4JF5czbEI1zRsky+GtyrW1EUnaLjpqEVVADqL7dH d0c4zlBNOZc3OtWZ0eSrwUCL+JtuC+DF4J3/TgYWSO1OzaRyCZ3YFFIz/H07cm4p wpvosP5PwSdVT9hRrk061jDoMlwfw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddutddghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomhepjghurhhi ucfrrghnkhhovhcuoeihphgrnhhkohhvsehfrghsthhmrghilhdrtghomheqnecuffhomh grihhnpehfrhgvvggsshgurdhorhhgpdhlihhnuhigrdhmrghpnecukfhppeehrddufeel rdduledtrddukeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhephihprghnkhhovhesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: from mercury.lan (unknown [5.139.190.186]) by mail.messagingengine.com (Postfix) with ESMTPA id 120DA30612AF; Thu, 5 Mar 2020 08:15:11 -0500 (EST) Subject: Re: svn commit: r358483 - head/sys/compat/linux To: Tijl Coosemans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003011312.021DC4vh022404@repo.freebsd.org> From: Yuri Pankov Message-ID: Date: Thu, 5 Mar 2020 16:15:10 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003011312.021DC4vh022404@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48YB7R2jyxz4dXx X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fastmail.com header.s=fm2 header.b=xM6fYNga; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=sOrp2tBu; dmarc=pass (policy=none) header.from=fastmail.com; spf=pass (mx1.freebsd.org: domain of ypankov@fastmail.com designates 64.147.123.27 as permitted sender) smtp.mailfrom=ypankov@fastmail.com X-Spamd-Result: default: False [-3.09 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[fastmail.com:s=fm2,messagingengine.com:s=fm2]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.27]; FREEMAIL_FROM(0.00)[fastmail.com]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[fastmail.com:+,messagingengine.com:+]; DMARC_POLICY_ALLOW(-0.50)[fastmail.com,none]; IP_SCORE(0.00)[ip: (-9.71), ipnet: 64.147.123.0/24(-4.92), asn: 11403(-2.69), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[27.123.147.64.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[fastmail.com]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[186.190.139.5.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 13:15:18 -0000 Tijl Coosemans wrote: > Author: tijl > Date: Sun Mar 1 13:12:04 2020 > New Revision: 358483 > URL: https://svnweb.freebsd.org/changeset/base/358483 > > Log: > linuxulator: Map scheduler priorities to Linux priorities. > > On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR > scheduling policies is [1,99]. For SCHED_OTHER the single valid priority is > 0. On FreeBSD it is [0,31] for all policies. Programs are supposed to > query the valid range using sched_get_priority_(min|max), but of course some > programs assume the Linux values are valid. > > This commit adds a tunable compat.linux.map_sched_prio. When enabled > sched_get_priority_(min|max) return the Linux values and sched_setscheduler > and sched_(get|set)param translate between FreeBSD and Linux values. > > Because there are more Linux levels than FreeBSD levels, multiple Linux > levels map to a single FreeBSD level, which means pre-emption might not > happen as it does on Linux, so the tunable allows to disable this behaviour. > It is enabled by default because I think it is unlikely that anyone runs > real-time software under Linux emulation on FreeBSD that critically relies > on correct pre-emption. > > This fixes FMOD, a commercial sound library used by several games. > > PR: 240043 > Tested by: Alex S > Reviewed by: dchagin > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D23790 > > Modified: > head/sys/compat/linux/linux_misc.c > head/sys/compat/linux/linux_misc.h > > Modified: head/sys/compat/linux/linux_misc.c > ============================================================================== > --- head/sys/compat/linux/linux_misc.c Sun Mar 1 12:34:27 2020 (r358482) > +++ head/sys/compat/linux/linux_misc.c Sun Mar 1 13:12:04 2020 (r358483) > @@ -144,6 +144,11 @@ struct l_pselect6arg { > l_size_t ss_len; > }; > > +static bool map_sched_prio = true; > +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, > + &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " > + "(not POSIX compliant)"); I'm seeing the following in the log: sysctl_warn_reuse: can't re-use a leaf (compat.linux.map_sched_prio)! Should this be done for both linux and linux32 (when one exists) or made to install one time only? From owner-svn-src-head@freebsd.org Thu Mar 5 14:13:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3E0526AC4E; Thu, 5 Mar 2020 14:13:22 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YCQV4GhCz4TbX; Thu, 5 Mar 2020 14:13:22 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 826658659; Thu, 5 Mar 2020 14:13:22 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025EDMjm040458; Thu, 5 Mar 2020 14:13:22 GMT (envelope-from alfredo@FreeBSD.org) Received: (from alfredo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025EDMC9040457; Thu, 5 Mar 2020 14:13:22 GMT (envelope-from alfredo@FreeBSD.org) Message-Id: <202003051413.025EDMC9040457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alfredo set sender to alfredo@FreeBSD.org using -f From: "Alfredo Dal'Ava Junior" Date: Thu, 5 Mar 2020 14:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358672 - head/lib/libc/powerpc64/string X-SVN-Group: head X-SVN-Commit-Author: alfredo X-SVN-Commit-Paths: head/lib/libc/powerpc64/string X-SVN-Commit-Revision: 358672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 14:13:23 -0000 Author: alfredo Date: Thu Mar 5 14:13:22 2020 New Revision: 358672 URL: https://svnweb.freebsd.org/changeset/base/358672 Log: [PowerPC64] restrict memcpy/bcopy optimization to POWER ISA >=V2.07 VSX instructions were added in POWER ISA V2.06 (POWER7), but it requires data to be word-aligned. Such requirement was removed in ISA V2.07B (POWER8). Since current memcpy/bcopy optimization relies on VSX instructions handling misalignment transparently, and kernel doesn't currently implement an alignment error handler, this optimzation should be restrict to ISA V2.07 onwards. SIGBUS on stxvd2x instruction was reproduced in POWER7+ CPU. Reviewed by: luporl, jhibbits, bdragon Approved by: jhibbits (mentor) Differential Revision: https://reviews.freebsd.org/D23958 Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c ============================================================================== --- head/lib/libc/powerpc64/string/bcopy_resolver.c Thu Mar 5 14:05:22 2020 (r358671) +++ head/lib/libc/powerpc64/string/bcopy_resolver.c Thu Mar 5 14:13:22 2020 (r358672) @@ -61,7 +61,12 @@ FN_RET FN_NAME_VSX FN_PARAMS; DEFINE_UIFUNC(, FN_RET, FN_NAME, FN_PARAMS) { - if (cpu_features & PPC_FEATURE_HAS_VSX) + /* VSX instructions were added in POWER ISA 2.06, + * however it requires data to be word-aligned. + * Since POWER ISA 2.07B this is solved transparently + * by the hardware + */ + if (cpu_features2 & PPC_FEATURE2_ARCH_2_07) return (FN_NAME_VSX); else return (FN_NAME_NOVSX); From owner-svn-src-head@freebsd.org Thu Mar 5 14:29:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7A3026B10E; Thu, 5 Mar 2020 14:29:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YCn22hjJz3ykZ; Thu, 5 Mar 2020 14:29:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 0489C1E96C; Thu, 5 Mar 2020 14:29:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58:0:6406:8b05:ca3a:6fd6] (unknown [IPv6:2001:470:7a58:0:6406:8b05:ca3a:6fd6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2979E2D03C; Thu, 5 Mar 2020 15:29:24 +0100 (CET) Subject: Re: svn commit: r358655 - head/sbin/mount_nfs To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003042227.024MRGsW072613@repo.freebsd.org> From: Dimitry Andric Message-ID: <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> Date: Thu, 5 Mar 2020 15:29:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003042227.024MRGsW072613@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 14:29:26 -0000 On 2020-03-04 23:27, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Mar 4 22:27:16 2020 > New Revision: 358655 > URL: https://svnweb.freebsd.org/changeset/base/358655 > > Log: > When a machine boots the NFS mounting script is executed after > interfaces are configured, but for many interfaces (e.g. all Intel) > ifconfig causes link renegotiation, so the first attempt to mount > NFS always fails. After that mount_nfs sleeps for 30 seconds, while > only a couple seconds are actually required for interface to get up. > > Instead of sleeping, do select(2) on routing socket and check if > some interface became UP and in this case retry immediately. At least on i386, this causes a -Werror warning: sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct if_msghdr *' increases required alignment from 1 to 4 [-Werror,-Wcast-align] ifm = (struct if_msghdr *)buf; ^~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. In practice I don't think the buffer can ever get misaligned, so can you please add a NO_WCAST_ALIGN= to the Makefile? -Dimitry From owner-svn-src-head@freebsd.org Thu Mar 5 14:41:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B76626B573; Thu, 5 Mar 2020 14:41:29 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YD2w5qCyz4WQX; Thu, 5 Mar 2020 14:41:28 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9D3F8A9A; Thu, 5 Mar 2020 14:41:28 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025EfSSd056216; Thu, 5 Mar 2020 14:41:28 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025EfSPn056214; Thu, 5 Mar 2020 14:41:28 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <202003051441.025EfSPn056214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Thu, 5 Mar 2020 14:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358673 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 358673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 14:41:29 -0000 Author: tijl Date: Thu Mar 5 14:41:27 2020 New Revision: 358673 URL: https://svnweb.freebsd.org/changeset/base/358673 Log: Move compat.linux.map_sched_prio sysctl definition to linux_mib.c so it is only defined by linux_common kernel module and not both linux and linux64 modules. Reported by: Yuri Pankov Modified: head/sys/compat/linux/linux_mib.c head/sys/compat/linux/linux_mib.h head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_mib.c ============================================================================== --- head/sys/compat/linux/linux_mib.c Thu Mar 5 14:13:22 2020 (r358672) +++ head/sys/compat/linux/linux_mib.c Thu Mar 5 14:41:27 2020 (r358673) @@ -71,6 +71,11 @@ int linux_preserve_vstatus = 0; SYSCTL_INT(_compat_linux, OID_AUTO, preserve_vstatus, CTLFLAG_RWTUN, &linux_preserve_vstatus, 0, "Preserve VSTATUS termios(4) flag"); +bool linux_map_sched_prio = true; +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, + &linux_map_sched_prio, 0, "Map scheduler priorities to Linux priorities " + "(not POSIX compliant)"); + static int linux_set_osname(struct thread *td, char *osname); static int linux_set_osrelease(struct thread *td, char *osrelease); static int linux_set_oss_version(struct thread *td, int oss_version); Modified: head/sys/compat/linux/linux_mib.h ============================================================================== --- head/sys/compat/linux/linux_mib.h Thu Mar 5 14:13:22 2020 (r358672) +++ head/sys/compat/linux/linux_mib.h Thu Mar 5 14:41:27 2020 (r358673) @@ -64,5 +64,6 @@ int linux_kernver(struct thread *td); extern int linux_ignore_ip_recverr; extern int linux_preserve_vstatus; +extern bool linux_map_sched_prio; #endif /* _LINUX_MIB_H_ */ Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Thu Mar 5 14:13:22 2020 (r358672) +++ head/sys/compat/linux/linux_misc.c Thu Mar 5 14:41:27 2020 (r358673) @@ -144,11 +144,6 @@ struct l_pselect6arg { l_size_t ss_len; }; -static bool map_sched_prio = true; -SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, - &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " - "(not POSIX compliant)"); - static int linux_utimensat_nsec_valid(l_long); @@ -1424,7 +1419,7 @@ linux_sched_setscheduler(struct thread *td, if (error) return (error); - if (map_sched_prio) { + if (linux_map_sched_prio) { switch (policy) { case SCHED_OTHER: if (sched_param.sched_priority != 0) @@ -1494,7 +1489,7 @@ linux_sched_get_priority_max(struct thread *td, { struct sched_get_priority_max_args bsd; - if (map_sched_prio) { + if (linux_map_sched_prio) { switch (args->policy) { case LINUX_SCHED_OTHER: td->td_retval[0] = 0; @@ -1530,7 +1525,7 @@ linux_sched_get_priority_min(struct thread *td, { struct sched_get_priority_min_args bsd; - if (map_sched_prio) { + if (linux_map_sched_prio) { switch (args->policy) { case LINUX_SCHED_OTHER: td->td_retval[0] = 0; @@ -1934,7 +1929,7 @@ linux_sched_setparam(struct thread *td, if (tdt == NULL) return (ESRCH); - if( map_sched_prio ) { + if (linux_map_sched_prio) { error = kern_sched_getscheduler(td, tdt, &policy); if (error) goto out; @@ -1990,7 +1985,7 @@ linux_sched_getparam(struct thread *td, return (error); } - if (map_sched_prio) { + if (linux_map_sched_prio) { error = kern_sched_getscheduler(td, tdt, &policy); PROC_UNLOCK(tdt->td_proc); if (error) From owner-svn-src-head@freebsd.org Thu Mar 5 14:45:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C1DC26B70A; Thu, 5 Mar 2020 14:45:37 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay103.isp.belgacom.be (mailrelay103.isp.belgacom.be [195.238.20.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign RSA OV SSL CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YD7h2HTZz3CjZ; Thu, 5 Mar 2020 14:45:36 +0000 (UTC) (envelope-from tijl@freebsd.org) IronPort-SDR: w7SpOBJDBGbdTO9EGjDn+FdBxolappx+dQd9AkqiXr0i46ntIBK3KKS9DVEc8h9ZqxbyOGb9Zh 2itXC97mYtVlC4ZSw1TLuIRxG/GwhPjIcuDMt6VkNItAcCLZHlccwIKV56KtxlxXv+4M+3ldrL g5ncYN4wva6KsVwtQXpRxmd2QwsMqmI6a0wsqN6JLLldiVBczccyWjA1JzjJ4uV/AryO5bglo6 bR9rmTFRHbpnUP2eACPkyHYSrsgaEEZH7gjwuOuTCi1U5XFI5FxA+X8Cxr4hVqQB4lm/Vi5sVd pbw= X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3ANRPBVRy5WKW1vHHXCy+O+j09IxM/srCxBDY+r6?= =?us-ascii?q?Qd2uIVIJqq85mqBkHD//Il1AaPAdyHrasd06GI4+jJYi8p39WoiDg6aptCVh?= =?us-ascii?q?sI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFR?= =?us-ascii?q?rhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagbr5+Ngi6oRjNusUZgIZvKbs6xw?= =?us-ascii?q?fUrHdPZ+lZymRkKE6JkR3h/Mmw5plj8ypRu/Il6cFNVLjxcro7Q7JFEjkoKn?= =?us-ascii?q?g568L3uxbNSwuP/WYcXX4NkhVUGQjF7Qr1UYn3vyDnq+dywiiaPcnxTbApRT?= =?us-ascii?q?Sv6rpgRRH0hCsbMTMy7XragdJsgq1FvB2hpgR/w4/Kb4GTKPp+Zb7WcdcDSW?= =?us-ascii?q?ZcQspdSylND4WhZIUNEuUBJ/5VoYf9qVUQsBWwBgujBO3gxTBUiXH7xrE63u?= =?us-ascii?q?Y7HA3awAAsA8wCvXLJp9v1LqcSVuW1wbHWwzfGa/NdxCnw6I/PchA6v/6MWK?= =?us-ascii?q?h/cczKyUIyEA7FklSQqY7hPz6O1uoNqXaU4PR9WOyyhWArsQZxoiKgxso1jI?= =?us-ascii?q?TCm4wbylfB9SpjwYY1I8W1SEBhYdG6DpRfrDqaOJZsTsMlWWFotz42yrkHuZ?= =?us-ascii?q?69YSgLx44rxxvFZPyfdYWD/xHtVP6JLDp7mX5pYqyzihm9/ES61OHxVNO43E?= =?us-ascii?q?tOoydHlNTHq2oD2AbJ6sedT/tw5kKh2TGS2A/N8uxEOkU0lbbDK54m374wio?= =?us-ascii?q?IfsUTdES/yn0X7lKyWeV8g+uip7uTofK/mppiGO49oiwH+MKAultajDuQ/NQ?= =?us-ascii?q?gORHaU+eGm273l5k31WrJKjuc5kqXBsZDaI9oUprKhDgJWz4ov8QizAjip3d?= =?us-ascii?q?gCg3UKLkhJdA+DgoXrI13OJer3Dfa7g1SiijdrwPXGM6X9ApXMLHjDlKzsfb?= =?us-ascii?q?hn60FC1gU81stf6I9OBrEGOvLzVVf9tMbEAR8hLwy03+HnBc1m1oMAX2KDG7?= =?us-ascii?q?SZMLnOvlOR5uIgPfODa5IOtTbzMfgq+eDhgmQimVAAZ6Wp2oEXaH+gFPR8P0?= =?us-ascii?q?qZeWbsgssGEWoSpQo+UurqhESZUT5Je3m+Rrgz5jU/CI+9A4fDXJ6ij6Ka0y?= =?us-ascii?q?egA5JafGdGCkqDEX3wbYWLR+8MaD6OIs9mijEETqKhRJM42R6ysw/6zr9nLu?= =?us-ascii?q?vI+i0Eq53jzsN16vbdlREo6zN7Ed+S03qQQG1umWMIXTA2j+hDphlM102CmZ?= =?us-ascii?q?Bxhf9fC5QH9utAVAQ9K7bSxvdmDtnzXkTKedLfG3i8RdDzPdY1Bvk2xMQDZk?= =?us-ascii?q?97AJ32khHB2wKEGbIYvYenQpsu/fSPjDDKO89hxiOeh+EahF48T54KbDX+iw?= =?us-ascii?q?=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BGAQBdD2Fe/8Ub9FFmHAEBAQEBBwE?= =?us-ascii?q?BEQEEBAEBgWkFAQELAQGBeyxZE1QBIBIqjRiFfwGCEIg9gSZ8jmSBewkBAQE?= =?us-ascii?q?BAQEBAQErDAQBAYFPgnQCggsnNgcOAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAE?= =?us-ascii?q?BBwoCAYROIQEDAQEFCgE3DEIBEAGBZykBgn8BBTocIxALDgYECSUPEjYGE4M?= =?us-ascii?q?ngkoDMguvGYQ1AQsBgQiCWg2BG38GgTgBjECCAIERgxQ+ghuCMIVvBJdgl31?= =?us-ascii?q?EgkaHUopehCoomzSER5MqgjCSIgMvgVhNMAiDJ1AYDY9EAQMEh1iFQkADMII?= =?us-ascii?q?kjGEBAQ?= X-IPAS-Result: =?us-ascii?q?A2BGAQBdD2Fe/8Ub9FFmHAEBAQEBBwEBEQEEBAEBgWkFA?= =?us-ascii?q?QELAQGBeyxZE1QBIBIqjRiFfwGCEIg9gSZ8jmSBewkBAQEBAQEBAQErDAQBA?= =?us-ascii?q?YFPgnQCggsnNgcOAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAEBBwoCAYROIQEDA?= =?us-ascii?q?QEFCgE3DEIBEAGBZykBgn8BBTocIxALDgYECSUPEjYGE4MngkoDMguvGYQ1A?= =?us-ascii?q?QsBgQiCWg2BG38GgTgBjECCAIERgxQ+ghuCMIVvBJdgl31EgkaHUopehCoom?= =?us-ascii?q?zSER5MqgjCSIgMvgVhNMAiDJ1AYDY9EAQMEh1iFQkADMIIkjGEBAQ?= Received: from 197.27-244-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.244.27.197]) by relay.skynet.be with ESMTP; 05 Mar 2020 15:45:33 +0100 Received: from localhost (localhost [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id 025EjWNM027963; Thu, 5 Mar 2020 15:45:32 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Thu, 5 Mar 2020 15:45:31 +0100 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Yuri Pankov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358483 - head/sys/compat/linux Message-ID: <20200305154531.35af1599@FreeBSD.org> In-Reply-To: References: <202003011312.021DC4vh022404@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48YD7h2HTZz3CjZ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.54 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(0.44)[0.437,0]; ASN(0.00)[asn:5432, ipnet:195.238.0.0/19, country:BE]; NEURAL_HAM_LONG(-0.97)[-0.973,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 14:45:37 -0000 On Thu, 5 Mar 2020 16:15:10 +0300 Yuri Pankov wrote: > Tijl Coosemans wrote: >> Author: tijl >> Date: Sun Mar 1 13:12:04 2020 >> New Revision: 358483 >> URL: https://svnweb.freebsd.org/changeset/base/358483 >> >> Log: >> linuxulator: Map scheduler priorities to Linux priorities. >> >> On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR >> scheduling policies is [1,99]. For SCHED_OTHER the single valid priority is >> 0. On FreeBSD it is [0,31] for all policies. Programs are supposed to >> query the valid range using sched_get_priority_(min|max), but of course some >> programs assume the Linux values are valid. >> >> This commit adds a tunable compat.linux.map_sched_prio. When enabled >> sched_get_priority_(min|max) return the Linux values and sched_setscheduler >> and sched_(get|set)param translate between FreeBSD and Linux values. >> >> Because there are more Linux levels than FreeBSD levels, multiple Linux >> levels map to a single FreeBSD level, which means pre-emption might not >> happen as it does on Linux, so the tunable allows to disable this behaviour. >> It is enabled by default because I think it is unlikely that anyone runs >> real-time software under Linux emulation on FreeBSD that critically relies >> on correct pre-emption. >> >> This fixes FMOD, a commercial sound library used by several games. >> >> PR: 240043 >> Tested by: Alex S >> Reviewed by: dchagin >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D23790 >> >> Modified: >> head/sys/compat/linux/linux_misc.c >> head/sys/compat/linux/linux_misc.h >> >> Modified: head/sys/compat/linux/linux_misc.c >> ============================================================================== >> --- head/sys/compat/linux/linux_misc.c Sun Mar 1 12:34:27 2020 (r358482) >> +++ head/sys/compat/linux/linux_misc.c Sun Mar 1 13:12:04 2020 (r358483) >> @@ -144,6 +144,11 @@ struct l_pselect6arg { >> l_size_t ss_len; >> }; >> >> +static bool map_sched_prio = true; >> +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, >> + &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " >> + "(not POSIX compliant)"); > > I'm seeing the following in the log: > > sysctl_warn_reuse: can't re-use a leaf (compat.linux.map_sched_prio)! > > Should this be done for both linux and linux32 (when one exists) or made > to install one time only? Ah, thanks for the report, I've moved it to linux_common in r358673. From owner-svn-src-head@freebsd.org Thu Mar 5 14:52:27 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A14D26BAF8; Thu, 5 Mar 2020 14:52:27 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YDHY1cXyz3PY6; Thu, 5 Mar 2020 14:52:25 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03E3F8DDF; Thu, 5 Mar 2020 14:52:25 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025EqO2p062363; Thu, 5 Mar 2020 14:52:24 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025EqOVb062362; Thu, 5 Mar 2020 14:52:24 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003051452.025EqOVb062362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu, 5 Mar 2020 14:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358674 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 358674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 14:52:27 -0000 Author: 0mp (doc,ports committer) Date: Thu Mar 5 14:52:24 2020 New Revision: 358674 URL: https://svnweb.freebsd.org/changeset/base/358674 Log: ftw.3: Add examples PR: 173448 [1] Submitted by: fernape@ (previous version) [1] Reviewed by: jilles Approved by: bcr (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21750 Modified: head/lib/libc/gen/ftw.3 Modified: head/lib/libc/gen/ftw.3 ============================================================================== --- head/lib/libc/gen/ftw.3 Thu Mar 5 14:41:27 2020 (r358673) +++ head/lib/libc/gen/ftw.3 Thu Mar 5 14:52:24 2020 (r358674) @@ -20,7 +20,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 5, 2004 +.Dd March 5, 2020 .Dt FTW 3 .Os .Sh NAME @@ -157,6 +157,65 @@ and will stop processing the tree and return the value from .Fa fn . Both functions return \-1 if an error is detected. +.Sh EXAMPLES +Following there is an example that shows how +.Nm nftw +can be used. +It traverses the file tree starting at the directory pointed +by the only program argument and shows the complete path and a brief +indicator about the file type. +.Bd -literal -offset 2n +#include +#include +#include + +int +nftw_callback(const char *path, const struct stat *sb, int typeflag, struct FTW *ftw) +{ + char type; + + switch(typeflag) { + case FTW_F: + type = 'F'; + break; + case FTW_D: + type = 'D'; + break; + case FTW_DNR: + type = '-'; + break; + case FTW_DP: + type = 'd'; + break; + case FTW_NS: + type = 'X'; + break; + case FTW_SL: + type = 'S'; + break; + case FTW_SLN: + type = 's'; + break; + default: + type = '?'; + break; + } + + printf("[%c] %s\\n", type, path); + + return (0); +} + +int +main(int argc, char **argv) +{ + if (argc != 2) { + printf("Usage %s \\n", argv[0]); + return (EX_USAGE); + } else + return (nftw(argv[1], nftw_callback, /* UNUSED */ 1, 0)); +} +.Ed .Sh ERRORS The .Fn ftw From owner-svn-src-head@freebsd.org Thu Mar 5 15:48:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD19A26CDB0; Thu, 5 Mar 2020 15:48:55 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YFXk1Nnfz3M4V; Thu, 5 Mar 2020 15:48:54 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f172.google.com with SMTP id p125so6390066oif.10; Thu, 05 Mar 2020 07:48:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WeVsfl2cjhoys8QVfINw25s0M3FVi9ynV5OJydpuFhs=; b=OYxCgWfakOkK1ObwBwwLxrdQwTendVwnITydXMaevKRhQc85/5U0BR8sJpyIXNVjWY zYgo4yWhpYsEOGVar/+nYW4DFFVNDIKWbECxR8JLT2yWAMmY3fgR+qvL59b3n2o2NN7R u40wJmNQV2jLE0P6L9N2Q558uWigdomqPBGEBxzIBndiXrefYf6VBaRQm8iLfruteWfZ C3l4Zs2Xy1U1tlXAXffDCTwSvZkfcpGZONyXdcG311PIprh5Sf0bMOFXHBGfokmtfQ1z XOvGVeSraftiB6S0f/qGjVagSDN4V2z8RADykeRFBsxYdL5RaokFQsAhOdxrdIUNusQ2 4wQw== X-Gm-Message-State: ANhLgQ3NIji/u9D3WjwV1NFO4Bq3AsIlOeUhkm3QPmooNJtOosf49imj Ss/aBkFPqOV9zypvO5zo3gJixe869JyWfqkhdMwz3f+4 X-Google-Smtp-Source: ADFU+vvKFY32iGADmmct0JjaafZHdQigVj9BsnNCqT1Z00oHBHtb9hn/Das23mpWIUPkRnFS5GMilBeOM2ihTLZbG84= X-Received: by 2002:aca:c40f:: with SMTP id u15mr5862443oif.55.1583423332828; Thu, 05 Mar 2020 07:48:52 -0800 (PST) MIME-Version: 1.0 References: <201904071839.x37IduPO002007@repo.freebsd.org> In-Reply-To: From: Alan Somers Date: Thu, 5 Mar 2020 08:48:41 -0700 Message-ID: Subject: Re: svn commit: r346018 - head/sys/conf To: Warner Losh Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48YFXk1Nnfz3M4V X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.172 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.99 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[172.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.99)[ip: (-0.25), ipnet: 209.85.128.0/17(-2.98), asn: 15169(-1.65), country: US(-0.05)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[172.167.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 15:48:56 -0000 Wow, what a speedy response, and so late at night! Thanks! On Wed, Mar 4, 2020 at 11:22 PM Warner Losh wrote: > > > On Wed, Mar 4, 2020 at 10:27 PM Alan Somers wrote: > >> On Sun, Apr 7, 2019 at 12:40 PM Warner Losh wrote: >> >>> Author: imp >>> Date: Sun Apr 7 18:39:55 2019 >>> New Revision: 346018 >>> URL: https://svnweb.freebsd.org/changeset/base/346018 >>> >>> Log: >>> Use default shell assignment rather more complicated if then >>> construct. >>> >>> Discussed with: emaste@, allanjude@ (changes (or not) based on their >>> feedback) >>> Differential Revision: https://reviews.freebsd.org/D19797 >>> >> >> Can we MFC this to stable/12? Before this change, setting >> BRANCH_OVERRIDE during "make release" would have no effect. >> > > Sure thing. There was a merge conflict, which makes sense, but I think I > resolved it correctly. > > Warner > From owner-svn-src-head@freebsd.org Thu Mar 5 15:51:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC20026D00B; Thu, 5 Mar 2020 15:51:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YFc0551Xz3yD8; Thu, 5 Mar 2020 15:51:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8474D97C1; Thu, 5 Mar 2020 15:51:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025FpikT098812; Thu, 5 Mar 2020 15:51:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025Fpin4098811; Thu, 5 Mar 2020 15:51:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003051551.025Fpin4098811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 5 Mar 2020 15:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358675 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 358675 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 15:51:45 -0000 Author: emaste Date: Thu Mar 5 15:51:44 2020 New Revision: 358675 URL: https://svnweb.freebsd.org/changeset/base/358675 Log: umtx_op.2: correct typo PR: 244611 Submitted by: John F. Carr MFC after: 3 days Modified: head/lib/libc/sys/_umtx_op.2 Modified: head/lib/libc/sys/_umtx_op.2 ============================================================================== --- head/lib/libc/sys/_umtx_op.2 Thu Mar 5 14:52:24 2020 (r358674) +++ head/lib/libc/sys/_umtx_op.2 Thu Mar 5 15:51:44 2020 (r358675) @@ -99,7 +99,7 @@ The constants are defined for special values: .It Dv UMUTEX_UNOWNED Zero, the value stored in the unowned lock. .It Dv UMUTEX_CONTESTED -The contenion indicator. +The contention indicator. .It Dv UMUTEX_RB_OWNERDEAD A thread owning the robust mutex terminated. The mutex is in unlocked state. From owner-svn-src-head@freebsd.org Thu Mar 5 15:52:35 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 502D226D13C; Thu, 5 Mar 2020 15:52:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YFcz0GC2z415Q; Thu, 5 Mar 2020 15:52:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C13BE991C; Thu, 5 Mar 2020 15:52:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025FqYoS000437; Thu, 5 Mar 2020 15:52:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025FqYXc000436; Thu, 5 Mar 2020 15:52:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003051552.025FqYXc000436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 5 Mar 2020 15:52:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358676 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358676 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 15:52:35 -0000 Author: kib Date: Thu Mar 5 15:52:34 2020 New Revision: 358676 URL: https://svnweb.freebsd.org/changeset/base/358676 Log: buffer pager: deref ucred immediately after read. Ucred is passed to bread(9) so that non-local filesystems use proper credentials. But, since clean buffer might be cached unless buf_pager_relbuf is not enabled, it makes credentials to have extra reference until buffer is reclaimed. Ucred reference would prevent jail from destroying if creds are jailed. Dereferencing the read credentials on the valid buffer avoid that, and should be fine because the buffer is valid and does not need re-read. PR: 238032 Reported by: bz Reproduced and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23775 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Thu Mar 5 15:51:44 2020 (r358675) +++ head/sys/kern/vfs_bio.c Thu Mar 5 15:52:34 2020 (r358676) @@ -5187,6 +5187,10 @@ again: br_flags, &bp); if (error != 0) goto end_pages; + if (bp->b_rcred == curthread->td_ucred) { + crfree(bp->b_rcred); + bp->b_rcred = NOCRED; + } if (LIST_EMPTY(&bp->b_dep)) { /* * Invalidation clears m->valid, but From owner-svn-src-head@freebsd.org Thu Mar 5 16:33:54 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB62926DF43; Thu, 5 Mar 2020 16:33:54 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YGXd2hH6z46nf; Thu, 5 Mar 2020 16:33:53 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 025GXou3033311 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 5 Mar 2020 08:33:50 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 025GXoE5033310; Thu, 5 Mar 2020 08:33:50 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 5 Mar 2020 08:33:50 -0800 From: Gleb Smirnoff To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305163350.GU5741@FreeBSD.org> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> X-Rspamd-Queue-Id: 48YGXd2hH6z46nf X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.07 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.989,0]; NEURAL_SPAM_MEDIUM(0.92)[0.917,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 16:33:54 -0000 On Thu, Mar 05, 2020 at 03:29:23PM +0100, Dimitry Andric wrote: D> On 2020-03-04 23:27, Gleb Smirnoff wrote: D> > Author: glebius D> > Date: Wed Mar 4 22:27:16 2020 D> > New Revision: 358655 D> > URL: https://svnweb.freebsd.org/changeset/base/358655 D> > D> > Log: D> > When a machine boots the NFS mounting script is executed after D> > interfaces are configured, but for many interfaces (e.g. all Intel) D> > ifconfig causes link renegotiation, so the first attempt to mount D> > NFS always fails. After that mount_nfs sleeps for 30 seconds, while D> > only a couple seconds are actually required for interface to get up. D> > Instead of sleeping, do select(2) on routing socket and check if D> > some interface became UP and in this case retry immediately. D> D> At least on i386, this causes a -Werror warning: D> D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct D> if_msghdr *' increases required alignment from 1 to 4 D> [-Werror,-Wcast-align] D> ifm = (struct if_msghdr *)buf; D> ^~~~~~~~~~~~~~~~~~~~~~~ D> 1 error generated. D> D> In practice I don't think the buffer can ever get misaligned, so can you D> please add a NO_WCAST_ALIGN= to the Makefile? route(8) handles the same problem via intermediate (void *) cast. What is preferred way to solve the problem? Change compiler flags file wide, or just through (void *) cast? -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu Mar 5 17:25:06 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 284FC26EE21; Thu, 5 Mar 2020 17:25:06 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YHgh15Rjz3FWh; Thu, 5 Mar 2020 17:25:03 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1j9uEw-0003ZG-7Y; Thu, 05 Mar 2020 20:24:54 +0300 Date: Thu, 5 Mar 2020 20:24:54 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Cc: Dimitry Andric , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305172454.GJ8028@zxy.spb.ru> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200305163350.GU5741@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48YHgh15Rjz3FWh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_SPAM_MEDIUM(0.80)[0.800,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 17:25:06 -0000 On Thu, Mar 05, 2020 at 08:33:50AM -0800, Gleb Smirnoff wrote: > On Thu, Mar 05, 2020 at 03:29:23PM +0100, Dimitry Andric wrote: > D> On 2020-03-04 23:27, Gleb Smirnoff wrote: > D> > Author: glebius > D> > Date: Wed Mar 4 22:27:16 2020 > D> > New Revision: 358655 > D> > URL: https://svnweb.freebsd.org/changeset/base/358655 > D> > > D> > Log: > D> > When a machine boots the NFS mounting script is executed after > D> > interfaces are configured, but for many interfaces (e.g. all Intel) > D> > ifconfig causes link renegotiation, so the first attempt to mount > D> > NFS always fails. After that mount_nfs sleeps for 30 seconds, while > D> > only a couple seconds are actually required for interface to get up. > D> > Instead of sleeping, do select(2) on routing socket and check if > D> > some interface became UP and in this case retry immediately. > D> > D> At least on i386, this causes a -Werror warning: > D> > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct > D> if_msghdr *' increases required alignment from 1 to 4 > D> [-Werror,-Wcast-align] > D> ifm = (struct if_msghdr *)buf; > D> ^~~~~~~~~~~~~~~~~~~~~~~ > D> 1 error generated. > D> > D> In practice I don't think the buffer can ever get misaligned, so can you > D> please add a NO_WCAST_ALIGN= to the Makefile? > > route(8) handles the same problem via intermediate (void *) cast. What is > preferred way to solve the problem? Change compiler flags file wide, or > just through (void *) cast? Copy to aligned buffer or got SIGBUS on some architectures? From owner-svn-src-head@freebsd.org Thu Mar 5 17:35:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BAD1026F0C8; Thu, 5 Mar 2020 17:35:19 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YHvV2Dxtz44XS; Thu, 5 Mar 2020 17:35:18 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1j9uOx-0003d6-EJ; Thu, 05 Mar 2020 20:35:15 +0300 Date: Thu, 5 Mar 2020 20:35:15 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305173515.GK8028@zxy.spb.ru> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200305172454.GJ8028@zxy.spb.ru> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48YHvV2Dxtz44XS X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of slw@zxy.spb.ru has no SPF policy when checking 195.70.199.98) smtp.mailfrom=slw@zxy.spb.ru X-Spamd-Result: default: False [0.88 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.60)[-0.596,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zxy.spb.ru]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; IP_SCORE(0.08)[asn: 5495(0.38), country: RU(0.01)]; NEURAL_SPAM_LONG(0.49)[0.494,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5495, ipnet:195.70.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 17:35:19 -0000 On Thu, Mar 05, 2020 at 08:24:54PM +0300, Slawa Olhovchenkov wrote: > On Thu, Mar 05, 2020 at 08:33:50AM -0800, Gleb Smirnoff wrote: > > > On Thu, Mar 05, 2020 at 03:29:23PM +0100, Dimitry Andric wrote: > > D> On 2020-03-04 23:27, Gleb Smirnoff wrote: > > D> > Author: glebius > > D> > Date: Wed Mar 4 22:27:16 2020 > > D> > New Revision: 358655 > > D> > URL: https://svnweb.freebsd.org/changeset/base/358655 > > D> > > > D> > Log: > > D> > When a machine boots the NFS mounting script is executed after > > D> > interfaces are configured, but for many interfaces (e.g. all Intel) > > D> > ifconfig causes link renegotiation, so the first attempt to mount > > D> > NFS always fails. After that mount_nfs sleeps for 30 seconds, while > > D> > only a couple seconds are actually required for interface to get up. > > D> > Instead of sleeping, do select(2) on routing socket and check if > > D> > some interface became UP and in this case retry immediately. > > D> > > D> At least on i386, this causes a -Werror warning: > > D> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct > > D> if_msghdr *' increases required alignment from 1 to 4 > > D> [-Werror,-Wcast-align] > > D> ifm = (struct if_msghdr *)buf; > > D> ^~~~~~~~~~~~~~~~~~~~~~~ > > D> 1 error generated. > > D> > > D> In practice I don't think the buffer can ever get misaligned, so can you > > D> please add a NO_WCAST_ALIGN= to the Makefile? > > > > route(8) handles the same problem via intermediate (void *) cast. What is > > preferred way to solve the problem? Change compiler flags file wide, or > > just through (void *) cast? > > Copy to aligned buffer or got SIGBUS on some architectures? char buf[2048] __aligned(__alignof(struct if_msghdr)); resolve this watning. From owner-svn-src-head@freebsd.org Thu Mar 5 17:44:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 569C526F3AC; Thu, 5 Mar 2020 17:44:15 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YJ5p5dMKz4TXR; Thu, 5 Mar 2020 17:44:14 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 025HiB55033740 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 5 Mar 2020 09:44:11 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 025HiBb0033739; Thu, 5 Mar 2020 09:44:11 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 5 Mar 2020 09:44:11 -0800 From: Gleb Smirnoff To: Slawa Olhovchenkov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305174411.GV5741@FreeBSD.org> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> <20200305173515.GK8028@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200305173515.GK8028@zxy.spb.ru> X-Rspamd-Queue-Id: 48YJ5p5dMKz4TXR X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.09 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(0.90)[0.902,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_LONG(-0.99)[-0.988,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 17:44:15 -0000 On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov wrote: S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct S> > > D> if_msghdr *' increases required alignment from 1 to 4 S> > > D> [-Werror,-Wcast-align] S> > > D> ifm = (struct if_msghdr *)buf; S> > > D> ^~~~~~~~~~~~~~~~~~~~~~~ S> > > D> 1 error generated. S> > > D> S> > > D> In practice I don't think the buffer can ever get misaligned, so can you S> > > D> please add a NO_WCAST_ALIGN= to the Makefile? S> > > S> > > route(8) handles the same problem via intermediate (void *) cast. What is S> > > preferred way to solve the problem? Change compiler flags file wide, or S> > > just through (void *) cast? S> > S> > Copy to aligned buffer or got SIGBUS on some architectures? S> S> char buf[2048] __aligned(__alignof(struct if_msghdr)); S> S> resolve this watning. Thanks, Slawa! I think this is the most elegant solution. -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu Mar 5 17:53:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A498B26F629; Thu, 5 Mar 2020 17:53:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YJJg0MF9z3QZD; Thu, 5 Mar 2020 17:53:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 80876B044; Thu, 5 Mar 2020 17:53:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025Hrcum072047; Thu, 5 Mar 2020 17:53:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025HrcRp072046; Thu, 5 Mar 2020 17:53:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003051753.025HrcRp072046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 5 Mar 2020 17:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358677 - head X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 358677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 17:53:39 -0000 Author: dim Date: Thu Mar 5 17:53:38 2020 New Revision: 358677 URL: https://svnweb.freebsd.org/changeset/base/358677 Log: Remove duplicate usr/libexec/cc1plus entry from ObsoleteFiles.inc. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Mar 5 15:52:34 2020 (r358676) +++ head/ObsoleteFiles.inc Thu Mar 5 17:53:38 2020 (r358677) @@ -648,7 +648,6 @@ OLD_FILES+=usr/lib32/libsupc++.so OLD_LIBS+=usr/lib32/libsupc++.so.1 OLD_FILES+=usr/lib32/libsupc++_p.a .endif -OLD_FILES+=usr/libexec/cc1plus OLD_LIBS+=usr/lib/libgomp.so.1 OLD_FILES+=usr/lib/libgomp_p.a OLD_FILES+=usr/lib32/libgcov.a From owner-svn-src-head@freebsd.org Thu Mar 5 18:09:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99F2E26FB8E; Thu, 5 Mar 2020 18:09:44 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YJgD04j5z4Mxv; Thu, 5 Mar 2020 18:09:43 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id C245B6FE; Thu, 5 Mar 2020 18:09:43 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-oi1-f171.google.com with SMTP id c1so6947686oiy.2; Thu, 05 Mar 2020 10:09:43 -0800 (PST) X-Gm-Message-State: ANhLgQ1IDQHFragg+ULNQdCfn6iHz6wP/xbTJGBoAd4dmGoo/QCtoF2T PCRig3B2oqFFYFYI8FIdi2cX8R2X7LMWs5ZodaA= X-Google-Smtp-Source: ADFU+vsT1F65QzrKoYfjkaXM16AyV+S7C8WVZ1qCwLHIZZZOFGHXuNF6ib6d2Bmoc5O78+XapKV/O1+Dlom2W8uWWKU= X-Received: by 2002:aca:4843:: with SMTP id v64mr222694oia.13.1583431782491; Thu, 05 Mar 2020 10:09:42 -0800 (PST) MIME-Version: 1.0 References: <202003022219.022MJUOk030293@repo.freebsd.org> In-Reply-To: <202003022219.022MJUOk030293@repo.freebsd.org> From: Mitchell Horne Date: Thu, 5 Mar 2020 13:09:30 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358556 - in head: libexec/tftpd libexec/tftpd/tests usr.bin/tftp To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 18:09:44 -0000 On Mon, Mar 2, 2020 at 5:19 PM John Baldwin wrote: > > Author: jhb > Date: Mon Mar 2 22:19:30 2020 > New Revision: 358556 > URL: https://svnweb.freebsd.org/changeset/base/358556 > > Log: > Add support for the TFTP windowsize option described in RFC 7440. > > The windowsize option permits multiple blocks to be transmitted > before the receiver sends an ACK improving throughput for larger > files. > > Reviewed by: asomers > MFC after: 2 weeks > Sponsored by: DARPA > Differential Revision: https://reviews.freebsd.org/D23836 > > Modified: > head/libexec/tftpd/tests/functional.c > head/libexec/tftpd/tftp-file.c > head/libexec/tftpd/tftp-file.h > head/libexec/tftpd/tftp-options.c > head/libexec/tftpd/tftp-options.h > head/libexec/tftpd/tftp-transfer.c > head/libexec/tftpd/tftp-utils.c > head/libexec/tftpd/tftp-utils.h > head/libexec/tftpd/tftpd.8 > head/usr.bin/tftp/main.c > head/usr.bin/tftp/tftp.1 > > Modified: head/libexec/tftpd/tests/functional.c > ============================================================================== > --- head/libexec/tftpd/tests/functional.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tests/functional.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > > @@ -89,6 +90,13 @@ recv_ack(uint16_t blocknum) > RECV(hdr, NULL, 0); > } > > +static void > +recv_oack(const char *options, size_t options_len) > +{ > + char hdr[] = {0, 6}; > + RECV(hdr, options, options_len); > +} > + > /* > * Receive a data packet from tftpd > * @param blocknum Expected block number to be received > @@ -159,6 +167,11 @@ send_ack(uint16_t blocknum) > > } > > +/* > + * build an option string > + */ > +#define OPTION_STR(name, value) name "\000" value "\000" > + > /* > * send a read request to tftpd. > * @param filename filename as a string, absolute or relative > @@ -166,6 +179,11 @@ send_ack(uint16_t blocknum) > */ > #define SEND_RRQ(filename, mode) SEND_STR("\0\001" filename "\0" mode "\0") > > +/* > + * send a read request with options > + */ > +#define SEND_RRQ_OPT(filename, mode, options) SEND_STR("\0\001" filename "\0" mode "\000" options) > + > /* > * send a write request to tftpd. > * @param filename filename as a string, absolute or relative > @@ -173,6 +191,11 @@ send_ack(uint16_t blocknum) > */ > #define SEND_WRQ(filename, mode) SEND_STR("\0\002" filename "\0" mode "\0") > > +/* > + * send a write request with options > + */ > +#define SEND_WRQ_OPT(filename, mode, options) SEND_STR("\0\002" filename "\0" mode "\000" options) > + > /* Define a test case, for both IPv4 and IPv6 */ > #define TFTPD_TC_DEFINE(name, head, ...) \ > static void \ > @@ -573,6 +596,32 @@ TFTPD_TC_DEFINE(rrq_medium,) > } > > /* > + * Read a medium file with a window size of 2. > + */ > +TFTPD_TC_DEFINE(rrq_medium_window,) > +{ > + int fd; > + size_t i; > + uint32_t contents[192]; > + char options[] = OPTION_STR("windowsize", "2"); > + > + for (i = 0; i < nitems(contents); i++) > + contents[i] = i; > + > + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, sizeof(contents)); > + close(fd); > + > + SEND_RRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); > + recv_oack(options, sizeof(options) - 1); > + send_ack(0); > + recv_data(1, (const char*)&contents[0], 512); > + recv_data(2, (const char*)&contents[128], 256); > + send_ack(2); > +} > + > +/* > * Read a file in netascii format > */ > TFTPD_TC_DEFINE(rrq_netascii,) > @@ -652,6 +701,59 @@ TFTPD_TC_DEFINE(rrq_small,) > } > > /* > + * Read a file following the example in RFC 7440. > + */ > +TFTPD_TC_DEFINE(rrq_window_rfc7440,) > +{ > + int fd; > + size_t i; > + char options[] = OPTION_STR("windowsize", "4"); > + alignas(uint32_t) char contents[13 * 512 - 4]; > + uint32_t *u32p; > + > + u32p = (uint32_t *)contents; > + for (i = 0; i < sizeof(contents) / sizeof(uint32_t); i++) > + u32p[i] = i; > + > + fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, sizeof(contents)); > + close(fd); > + > + SEND_RRQ_OPT("rfc7440.txt", "octet", OPTION_STR("windowsize", "4")); > + recv_oack(options, sizeof(options) - 1); > + send_ack(0); > + recv_data(1, &contents[0 * 512], 512); > + recv_data(2, &contents[1 * 512], 512); > + recv_data(3, &contents[2 * 512], 512); > + recv_data(4, &contents[3 * 512], 512); > + send_ack(4); > + recv_data(5, &contents[4 * 512], 512); > + recv_data(6, &contents[5 * 512], 512); > + recv_data(7, &contents[6 * 512], 512); > + recv_data(8, &contents[7 * 512], 512); > + > + /* ACK 5 as if 6-8 were dropped. */ > + send_ack(5); > + recv_data(6, &contents[5 * 512], 512); > + recv_data(7, &contents[6 * 512], 512); > + recv_data(8, &contents[7 * 512], 512); > + recv_data(9, &contents[8 * 512], 512); > + send_ack(9); > + recv_data(10, &contents[9 * 512], 512); > + recv_data(11, &contents[10 * 512], 512); > + recv_data(12, &contents[11 * 512], 512); > + recv_data(13, &contents[12 * 512], 508); > + > + /* Drop ACK and after timeout receive 10-13. */ > + recv_data(10, &contents[9 * 512], 512); > + recv_data(11, &contents[10 * 512], 512); > + recv_data(12, &contents[11 * 512], 512); > + recv_data(13, &contents[12 * 512], 508); > + send_ack(13); > +} > + > +/* > * Try to transfer a file with an unknown mode. > */ > TFTPD_TC_DEFINE(unknown_modes,) > @@ -872,6 +974,38 @@ TFTPD_TC_DEFINE(wrq_medium,) > } > > /* > + * Write a medium file with a window size of 2. > + */ > +TFTPD_TC_DEFINE(wrq_medium_window,) > +{ > + int fd; > + size_t i; > + ssize_t r; > + uint32_t contents[192]; > + char buffer[1024]; > + char options[] = OPTION_STR("windowsize", "2"); > + > + for (i = 0; i < nitems(contents); i++) > + contents[i] = i; > + > + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_WRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); > + recv_oack(options, sizeof(options) - 1); > + send_data(1, (const char*)&contents[0], 512); > + send_data(2, (const char*)&contents[128], 256); > + recv_ack(2); > + > + fd = open("medium.txt", O_RDONLY); > + ATF_REQUIRE(fd >= 0); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq((const char*)contents, 768, buffer, r); > +} > + > +/* > * Write a file in netascii format > */ > TFTPD_TC_DEFINE(wrq_netascii,) > @@ -965,7 +1099,71 @@ TFTPD_TC_DEFINE(wrq_truncate,) > ATF_REQUIRE_EQ(sb.st_size, 0); > } > > +/* > + * Write a file following the example in RFC 7440. > + */ > +TFTPD_TC_DEFINE(wrq_window_rfc7440,) > +{ > + int fd; > + size_t i; > + ssize_t r; > + char options[] = OPTION_STR("windowsize", "4"); > + alignas(uint32_t) char contents[13 * 512 - 4]; Hey John, This alignas directive seems to break builds with GCC. Mitchell > + char buffer[sizeof(contents)]; > + uint32_t *u32p; > > + u32p = (uint32_t *)contents; > + for (i = 0; i < sizeof(contents) / sizeof(uint32_t); i++) > + u32p[i] = i; > + > + fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0666); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_WRQ_OPT("rfc7440.txt", "octet", OPTION_STR("windowsize", "4")); > + recv_oack(options, sizeof(options) - 1); > + send_data(1, &contents[0 * 512], 512); > + send_data(2, &contents[1 * 512], 512); > + send_data(3, &contents[2 * 512], 512); > + send_data(4, &contents[3 * 512], 512); > + recv_ack(4); > + send_data(5, &contents[4 * 512], 512); > + > + /* Drop 6-8. */ > + recv_ack(5); > + send_data(6, &contents[5 * 512], 512); > + send_data(7, &contents[6 * 512], 512); > + send_data(8, &contents[7 * 512], 512); > + send_data(9, &contents[8 * 512], 512); > + recv_ack(9); > + > + /* Drop 11. */ > + send_data(10, &contents[9 * 512], 512); > + send_data(12, &contents[11 * 512], 512); > + > + /* > + * We can't send 13 here as tftpd has probably already seen 12 > + * and sent the ACK of 10 if running locally. While it would > + * recover by sending another ACK of 10, our state machine > + * would be out of sync. > + */ > + > + /* Ignore ACK for 10 and resend 10-13. */ > + recv_ack(10); > + send_data(10, &contents[9 * 512], 512); > + send_data(11, &contents[10 * 512], 512); > + send_data(12, &contents[11 * 512], 512); > + send_data(13, &contents[12 * 512], 508); > + recv_ack(13); > + > + fd = open("rfc7440.txt", O_RDONLY); > + ATF_REQUIRE(fd >= 0); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq(contents, sizeof(contents), buffer, r); > +} > + > + > /* > * Main > */ > @@ -981,10 +1179,12 @@ ATF_TP_ADD_TCS(tp) > TFTPD_TC_ADD(tp, rrq_eaccess); > TFTPD_TC_ADD(tp, rrq_empty); > TFTPD_TC_ADD(tp, rrq_medium); > + TFTPD_TC_ADD(tp, rrq_medium_window); > TFTPD_TC_ADD(tp, rrq_netascii); > TFTPD_TC_ADD(tp, rrq_nonexistent); > TFTPD_TC_ADD(tp, rrq_path_max); > TFTPD_TC_ADD(tp, rrq_small); > + TFTPD_TC_ADD(tp, rrq_window_rfc7440); > TFTPD_TC_ADD(tp, unknown_modes); > TFTPD_TC_ADD(tp, unknown_opcode); > TFTPD_TC_ADD(tp, w_flag); > @@ -994,10 +1194,12 @@ ATF_TP_ADD_TCS(tp) > TFTPD_TC_ADD(tp, wrq_eaccess); > TFTPD_TC_ADD(tp, wrq_eaccess_world_readable); > TFTPD_TC_ADD(tp, wrq_medium); > + TFTPD_TC_ADD(tp, wrq_medium_window); > TFTPD_TC_ADD(tp, wrq_netascii); > TFTPD_TC_ADD(tp, wrq_nonexistent); > TFTPD_TC_ADD(tp, wrq_small); > TFTPD_TC_ADD(tp, wrq_truncate); > + TFTPD_TC_ADD(tp, wrq_window_rfc7440); > > return (atf_no_error()); > } > > Modified: head/libexec/tftpd/tftp-file.c > ============================================================================== > --- head/libexec/tftpd/tftp-file.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-file.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -214,6 +214,20 @@ write_close(void) > return 0; > } > > +off_t > +tell_file(void) > +{ > + > + return ftello(file); > +} > + > +int > +seek_file(off_t offset) > +{ > + > + return fseeko(file, offset, SEEK_SET); > +} > + > int > read_init(int fd, FILE *f, const char *mode) > { > > Modified: head/libexec/tftpd/tftp-file.h > ============================================================================== > --- head/libexec/tftpd/tftp-file.h Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-file.h Mon Mar 2 22:19:30 2020 (r358556) > @@ -36,4 +36,7 @@ int read_init(int fd, FILE *f, const char *mode); > size_t read_file(char *buffer, int count); > int read_close(void); > > +int seek_file(off_t offset); > +off_t tell_file(void); > + > int synchnet(int peer); > > Modified: head/libexec/tftpd/tftp-options.c > ============================================================================== > --- head/libexec/tftpd/tftp-options.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-options.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -56,6 +56,7 @@ struct options options[] = { > { "blksize", NULL, NULL, option_blksize, 1 }, > { "blksize2", NULL, NULL, option_blksize2, 0 }, > { "rollover", NULL, NULL, option_rollover, 0 }, > + { "windowsize", NULL, NULL, option_windowsize, 1 }, > { NULL, NULL, NULL, NULL, 0 } > }; > > @@ -271,6 +272,41 @@ option_blksize2(int peer __unused) > if (debug&DEBUG_OPTIONS) > tftp_log(LOG_DEBUG, "Setting blksize2 to '%s'", > options[OPT_BLKSIZE2].o_reply); > + > + return (0); > +} > + > +int > +option_windowsize(int peer) > +{ > + int size; > + > + if (options[OPT_WINDOWSIZE].o_request == NULL) > + return (0); > + > + size = atoi(options[OPT_WINDOWSIZE].o_request); > + if (size < WINDOWSIZE_MIN || size > WINDOWSIZE_MAX) { > + if (acting_as_client) { > + tftp_log(LOG_ERR, > + "Invalid windowsize (%d blocks), aborting", > + size); > + send_error(peer, EBADOP); > + return (1); > + } else { > + tftp_log(LOG_WARNING, > + "Invalid windowsize (%d blocks), ignoring request", > + size); > + return (0); > + } > + } > + > + /* XXX: Should force a windowsize of 1 for non-seekable files. */ > + asprintf(&options[OPT_WINDOWSIZE].o_reply, "%d", size); > + windowsize = size; > + > + if (debug&DEBUG_OPTIONS) > + tftp_log(LOG_DEBUG, "Setting windowsize to '%s'", > + options[OPT_WINDOWSIZE].o_reply); > > return (0); > } > > Modified: head/libexec/tftpd/tftp-options.h > ============================================================================== > --- head/libexec/tftpd/tftp-options.h Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-options.h Mon Mar 2 22:19:30 2020 (r358556) > @@ -42,6 +42,7 @@ int option_timeout(int peer); > int option_blksize(int peer); > int option_blksize2(int peer); > int option_rollover(int peer); > +int option_windowsize(int peer); > > extern int options_extra_enabled; > extern int options_rfc_enabled; > @@ -61,4 +62,5 @@ enum opt_enum { > OPT_BLKSIZE, > OPT_BLKSIZE2, > OPT_ROLLOVER, > + OPT_WINDOWSIZE, > }; > > Modified: head/libexec/tftpd/tftp-transfer.c > ============================================================================== > --- head/libexec/tftpd/tftp-transfer.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-transfer.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -48,6 +48,12 @@ __FBSDID("$FreeBSD$"); > #include "tftp-options.h" > #include "tftp-transfer.h" > > +struct block_data { > + off_t offset; > + uint16_t block; > + int size; > +}; > + > /* > * Send a file via the TFTP data session. > */ > @@ -55,54 +61,73 @@ void > tftp_send(int peer, uint16_t *block, struct tftp_stats *ts) > { > struct tftphdr *rp; > - int size, n_data, n_ack, try; > - uint16_t oldblock; > + int size, n_data, n_ack, sendtry, acktry; > + u_int i, j; > + uint16_t oldblock, windowblock; > char sendbuffer[MAXPKTSIZE]; > char recvbuffer[MAXPKTSIZE]; > + struct block_data window[WINDOWSIZE_MAX]; > > rp = (struct tftphdr *)recvbuffer; > *block = 1; > ts->amount = 0; > + windowblock = 0; > + acktry = 0; > do { > +read_block: > if (debug&DEBUG_SIMPLE) > - tftp_log(LOG_DEBUG, "Sending block %d", *block); > + tftp_log(LOG_DEBUG, "Sending block %d (window block %d)", > + *block, windowblock); > > + window[windowblock].offset = tell_file(); > + window[windowblock].block = *block; > size = read_file(sendbuffer, segsize); > if (size < 0) { > tftp_log(LOG_ERR, "read_file returned %d", size); > send_error(peer, errno + 100); > goto abort; > } > + window[windowblock].size = size; > + windowblock++; > > - for (try = 0; ; try++) { > + for (sendtry = 0; ; sendtry++) { > n_data = send_data(peer, *block, sendbuffer, size); > - if (n_data > 0) { > - if (try == maxtimeouts) { > - tftp_log(LOG_ERR, > - "Cannot send DATA packet #%d, " > - "giving up", *block); > - return; > - } > + if (n_data == 0) > + break; > + > + if (sendtry == maxtimeouts) { > tftp_log(LOG_ERR, > - "Cannot send DATA packet #%d, trying again", > - *block); > - continue; > + "Cannot send DATA packet #%d, " > + "giving up", *block); > + return; > } > + tftp_log(LOG_ERR, > + "Cannot send DATA packet #%d, trying again", > + *block); > + } > > + /* Only check for ACK for last block in window. */ > + if (windowblock == windowsize || size != segsize) { > n_ack = receive_packet(peer, recvbuffer, > MAXPKTSIZE, NULL, timeoutpacket); > if (n_ack < 0) { > if (n_ack == RP_TIMEOUT) { > - if (try == maxtimeouts) { > + if (acktry == maxtimeouts) { > tftp_log(LOG_ERR, > "Timeout #%d send ACK %d " > - "giving up", try, *block); > + "giving up", acktry, *block); > return; > } > tftp_log(LOG_WARNING, > "Timeout #%d on ACK %d", > - try, *block); > - continue; > + acktry, *block); > + > + acktry++; > + ts->retries++; > + seek_file(window[0].offset); > + *block = window[0].block; > + windowblock = 0; > + goto read_block; > } > > /* Either read failure or ERROR packet */ > @@ -112,18 +137,60 @@ tftp_send(int peer, uint16_t *block, struct tftp_stats > goto abort; > } > if (rp->th_opcode == ACK) { > - ts->blocks++; > - if (rp->th_block == *block) { > - ts->amount += size; > - break; > + /* > + * Look for the ACKed block in our open > + * window. > + */ > + for (i = 0; i < windowblock; i++) { > + if (rp->th_block == window[i].block) > + break; > } > > - /* Re-synchronize with the other side */ > - (void) synchnet(peer); > - if (rp->th_block == (*block - 1)) { > + if (i == windowblock) { > + /* Did not recognize ACK. */ > + if (debug&DEBUG_SIMPLE) > + tftp_log(LOG_DEBUG, > + "ACK %d out of window", > + rp->th_block); > + > + /* Re-synchronize with the other side */ > + (void) synchnet(peer); > + > + /* Resend the current window. */ > ts->retries++; > - continue; > + seek_file(window[0].offset); > + *block = window[0].block; > + windowblock = 0; > + goto read_block; > } > + > + /* ACKed at least some data. */ > + acktry = 0; > + for (j = 0; j <= i; j++) { > + if (debug&DEBUG_SIMPLE) > + tftp_log(LOG_DEBUG, > + "ACKed block %d", > + window[j].block); > + ts->blocks++; > + ts->amount += window[j].size; > + } > + > + /* > + * Partial ACK. Rewind state to first > + * un-ACKed block. > + */ > + if (i + 1 != windowblock) { > + if (debug&DEBUG_SIMPLE) > + tftp_log(LOG_DEBUG, > + "Partial ACK"); > + seek_file(window[i + 1].offset); > + *block = window[i + 1].block; > + windowblock = 0; > + ts->retries++; > + goto read_block; > + } > + > + windowblock = 0; > } > > } > @@ -161,31 +228,35 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st > struct tftphdr *firstblock, size_t fb_size) > { > struct tftphdr *rp; > - uint16_t oldblock; > - int n_data, n_ack, writesize, i, retry; > + uint16_t oldblock, windowstart; > + int n_data, n_ack, writesize, i, retry, windowblock; > char recvbuffer[MAXPKTSIZE]; > > ts->amount = 0; > + windowblock = 0; > > if (firstblock != NULL) { > writesize = write_file(firstblock->th_data, fb_size); > ts->amount += writesize; > - for (i = 0; ; i++) { > - n_ack = send_ack(peer, *block); > - if (n_ack > 0) { > - if (i == maxtimeouts) { > + windowblock++; > + if (windowsize == 1 || fb_size != segsize) { > + for (i = 0; ; i++) { > + n_ack = send_ack(peer, *block); > + if (n_ack > 0) { > + if (i == maxtimeouts) { > + tftp_log(LOG_ERR, > + "Cannot send ACK packet #%d, " > + "giving up", *block); > + return; > + } > tftp_log(LOG_ERR, > - "Cannot send ACK packet #%d, " > - "giving up", *block); > - return; > + "Cannot send ACK packet #%d, trying again", > + *block); > + continue; > } > - tftp_log(LOG_ERR, > - "Cannot send ACK packet #%d, trying again", > - *block); > - continue; > - } > > - break; > + break; > + } > } > > if (fb_size != segsize) { > @@ -216,7 +287,8 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st > for (retry = 0; ; retry++) { > if (debug&DEBUG_SIMPLE) > tftp_log(LOG_DEBUG, > - "Receiving DATA block %d", *block); > + "Receiving DATA block %d (window block %d)", > + *block, windowblock); > > n_data = receive_packet(peer, recvbuffer, > MAXPKTSIZE, NULL, timeoutpacket); > @@ -232,6 +304,7 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st > "Timeout #%d on DATA block %d", > retry, *block); > send_ack(peer, oldblock); > + windowblock = 0; > continue; > } > > @@ -247,19 +320,42 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st > if (rp->th_block == *block) > break; > > + /* > + * Ignore duplicate blocks within the > + * window. > + * > + * This does not handle duplicate > + * blocks during a rollover as > + * gracefully, but that should still > + * recover eventually. > + */ > + if (*block > windowsize) > + windowstart = *block - windowsize; > + else > + windowstart = 0; > + if (rp->th_block > windowstart && > + rp->th_block < *block) { > + if (debug&DEBUG_SIMPLE) > + tftp_log(LOG_DEBUG, > + "Ignoring duplicate DATA block %d", > + rp->th_block); > + windowblock++; > + retry = 0; > + continue; > + } > + > tftp_log(LOG_WARNING, > "Expected DATA block %d, got block %d", > *block, rp->th_block); > > /* Re-synchronize with the other side */ > (void) synchnet(peer); > - if (rp->th_block == (*block-1)) { > - tftp_log(LOG_INFO, "Trying to sync"); > - *block = oldblock; > - ts->retries++; > - goto send_ack; /* rexmit */ > - } > > + tftp_log(LOG_INFO, "Trying to sync"); > + *block = oldblock; > + ts->retries++; > + goto send_ack; /* rexmit */ > + > } else { > tftp_log(LOG_WARNING, > "Expected DATA block, got %s block", > @@ -282,7 +378,11 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st > if (n_data != segsize) > write_close(); > } > + windowblock++; > > + /* Only send ACKs for the last block in the window. */ > + if (windowblock < windowsize && n_data == segsize) > + continue; > send_ack: > for (i = 0; ; i++) { > n_ack = send_ack(peer, *block); > @@ -301,6 +401,9 @@ send_ack: > continue; > } > > + if (debug&DEBUG_SIMPLE) > + tftp_log(LOG_DEBUG, "Sent ACK for %d", *block); > + windowblock = 0; > break; > } > gettimeofday(&(ts->tstop), NULL); > > Modified: head/libexec/tftpd/tftp-utils.c > ============================================================================== > --- head/libexec/tftpd/tftp-utils.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-utils.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -51,6 +51,7 @@ int timeoutnetwork = MAX_TIMEOUTS * TIMEOUT; > int maxtimeouts = MAX_TIMEOUTS; > uint16_t segsize = SEGSIZE; > uint16_t pktsize = SEGSIZE + 4; > +uint16_t windowsize = WINDOWSIZE; > > int acting_as_client; > > > Modified: head/libexec/tftpd/tftp-utils.h > ============================================================================== > --- head/libexec/tftpd/tftp-utils.h Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-utils.h Mon Mar 2 22:19:30 2020 (r358556) > @@ -46,6 +46,11 @@ __FBSDID("$FreeBSD$"); > #define TIMEOUT_MAX 255 /* Maximum timeout value */ > #define MIN_TIMEOUTS 3 > > +/* For the windowsize option */ > +#define WINDOWSIZE 1 > +#define WINDOWSIZE_MIN 1 > +#define WINDOWSIZE_MAX 65535 > + > extern int timeoutpacket; > extern int timeoutnetwork; > extern int maxtimeouts; > @@ -53,6 +58,7 @@ int settimeouts(int timeoutpacket, int timeoutnetwork, > > extern uint16_t segsize; > extern uint16_t pktsize; > +extern uint16_t windowsize; > > extern int acting_as_client; > > > Modified: head/libexec/tftpd/tftpd.8 > ============================================================================== > --- head/libexec/tftpd/tftpd.8 Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftpd.8 Mon Mar 2 22:19:30 2020 (r358556) > @@ -28,7 +28,7 @@ > .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 > .\" $FreeBSD$ > .\" > -.Dd June 22, 2011 > +.Dd March 2, 2020 > .Dt TFTPD 8 > .Os > .Sh NAME > @@ -245,6 +245,9 @@ The following RFC's are supported: > .Rs > .%T RFC 2349: TFTP Timeout Interval and Transfer Size Options > .Re > +.Rs > +.%T RFC 7440: TFTP Windowsize Option > +.Re > .Pp > The non-standard > .Cm rollover > @@ -291,6 +294,9 @@ Edwin Groothuis performed a major > and > .Xr tftp 1 > code to support RFC2348. > +.Pp > +Support for the windowsize option (RFC7440) was introduced in > +.Fx 13.0 . > .Sh NOTES > Files larger than 33,553,919 octets (65535 blocks, last one <512 > octets) cannot be correctly transferred without client and server > > Modified: head/usr.bin/tftp/main.c > ============================================================================== > --- head/usr.bin/tftp/main.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/usr.bin/tftp/main.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -114,6 +114,7 @@ static void setblocksize2(int, char **); > static void setoptions(int, char **); > static void setrollover(int, char **); > static void setpacketdrop(int, char **); > +static void setwindowsize(int, char **); > > static void command(bool, EditLine *, History *, HistEvent *) __dead2; > static const char *command_prompt(void); > @@ -158,6 +159,7 @@ static struct cmd cmdtab[] = { > "enable or disable RFC2347 style options" }, > { "help", help, "print help information" }, > { "packetdrop", setpacketdrop, "artificial packetloss feature" }, > + { "windowsize", setwindowsize, "set windowsize[*]" }, > { "?", help, "print help information" }, > { NULL, NULL, NULL } > }; > @@ -1068,4 +1070,28 @@ setpacketdrop(int argc, char *argv[]) > > printf("Randomly %d in 100 packets will be dropped\n", > packetdroppercentage); > +} > + > +static void > +setwindowsize(int argc, char *argv[]) > +{ > + > + if (!options_rfc_enabled) > + printf("RFC2347 style options are not enabled " > + "(but proceeding anyway)\n"); > + > + if (argc != 1) { > + int size = atoi(argv[1]); > + > + if (size < WINDOWSIZE_MIN || size > WINDOWSIZE_MAX) { > + printf("Windowsize should be between %d and %d " > + "blocks.\n", WINDOWSIZE_MIN, WINDOWSIZE_MAX); > + return; > + } else { > + asprintf(&options[OPT_WINDOWSIZE].o_request, "%d", > + size); > + } > + } > + printf("Windowsize is now %s blocks.\n", > + options[OPT_WINDOWSIZE].o_request); > } > > Modified: head/usr.bin/tftp/tftp.1 > ============================================================================== > --- head/usr.bin/tftp/tftp.1 Mon Mar 2 21:19:51 2020 (r358555) > +++ head/usr.bin/tftp/tftp.1 Mon Mar 2 22:19:30 2020 (r358556) > @@ -28,7 +28,7 @@ > .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94 > .\" $FreeBSD$ > .\" > -.Dd Aug 22, 2018 > +.Dd March 2, 2020 > .Dt TFTP 1 > .Os > .Sh NAME > @@ -216,6 +216,14 @@ Toggle packet tracing. > .Pp > .It Cm verbose > Toggle verbose mode. > +.Pp > +.It Cm windowsize Op Ar size > +Sets the TFTP windowsize option in TFTP Read Request or Write Request packets to > +.Op Ar size > +blocks as specified in RFC 7440. > +Valid values are between 1 and 65535. > +If no windowsize is specified, > +then the default windowsize of 1 block will be used. > .El > .Sh SEE ALSO > .Xr tftpd 8 > @@ -235,6 +243,9 @@ The following RFC's are supported: > .Re > .Rs > .%T RFC 3617: Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) > +.Re > +.Rs > +.%T RFC 7440: TFTP Windowsize Option > .Re > .Pp > The non-standard From owner-svn-src-head@freebsd.org Thu Mar 5 18:20:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B14126FEBB; Thu, 5 Mar 2020 18:20:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YJvM2YH6z3GCY; Thu, 5 Mar 2020 18:20:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 93643847; Thu, 5 Mar 2020 18:20:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::44b2:892b:3322:a46d] (unknown [IPv6:2001:470:7a58:0:44b2:892b:3322:a46d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B89A62D14E; Thu, 5 Mar 2020 19:20:11 +0100 (CET) From: Dimitry Andric Message-Id: <1A13B93C-7D87-4210-AD3D-2B198C166CE1@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_9C327041-3969-41C0-B571-F25708D80573"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Date: Thu, 5 Mar 2020 19:19:59 +0100 In-Reply-To: <20200305174411.GV5741@FreeBSD.org> Cc: Slawa Olhovchenkov , svn-src-head , svn-src-all , src-committers@freebsd.org To: Gleb Smirnoff References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> <20200305173515.GK8028@zxy.spb.ru> <20200305174411.GV5741@FreeBSD.org> X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 18:20:16 -0000 --Apple-Mail=_9C327041-3969-41C0-B571-F25708D80573 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 5 Mar 2020, at 18:44, Gleb Smirnoff wrote: >=20 > On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov wrote: > S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' = to 'struct > S> > > D> if_msghdr *' increases required alignment from 1 to 4 > S> > > D> [-Werror,-Wcast-align] > S> > > D> ifm =3D (struct if_msghdr *)buf; > S> > > D> ^~~~~~~~~~~~~~~~~~~~~~~ > S> > > D> 1 error generated. > S> > > D> > S> > > D> In practice I don't think the buffer can ever get = misaligned, so can you > S> > > D> please add a NO_WCAST_ALIGN=3D to the Makefile? > S> > > > S> > > route(8) handles the same problem via intermediate (void *) = cast. What is > S> > > preferred way to solve the problem? Change compiler flags file = wide, or > S> > > just through (void *) cast? > S> > > S> > Copy to aligned buffer or got SIGBUS on some architectures? > S> > S> char buf[2048] __aligned(__alignof(struct if_msghdr)); > S> > S> resolve this watning. >=20 > Thanks, Slawa! I think this is the most elegant solution. Why don't just declare the buffer as: struct if_msghdr buf; and then do: nread =3D read(s, &buf, sizeof buf); ? You are never reading more than one if_msghdr anyway, and then there is no need to cast anything. -Dimitry --Apple-Mail=_9C327041-3969-41C0-B571-F25708D80573 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXmFCzwAKCRCwXqMKLiCW o+ZEAJwLg7kEAdqiUVSNjAK2vAzAeqZ1CACeOlYaTkNlVV9/9u4Hz8rthtlJdm8= =jHHx -----END PGP SIGNATURE----- --Apple-Mail=_9C327041-3969-41C0-B571-F25708D80573-- From owner-svn-src-head@freebsd.org Thu Mar 5 18:30:47 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF74D248425; Thu, 5 Mar 2020 18:30:47 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YK7T5cTdz3y5q; Thu, 5 Mar 2020 18:30:45 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1j9vGb-0003xr-DL; Thu, 05 Mar 2020 21:30:41 +0300 Date: Thu, 5 Mar 2020 21:30:41 +0300 From: Slawa Olhovchenkov To: Dimitry Andric Cc: Gleb Smirnoff , svn-src-head , svn-src-all , src-committers@freebsd.org Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305183041.GU8012@zxy.spb.ru> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> <20200305173515.GK8028@zxy.spb.ru> <20200305174411.GV5741@FreeBSD.org> <1A13B93C-7D87-4210-AD3D-2B198C166CE1@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1A13B93C-7D87-4210-AD3D-2B198C166CE1@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48YK7T5cTdz3y5q X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_SPAM_MEDIUM(0.80)[0.800,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 18:30:48 -0000 On Thu, Mar 05, 2020 at 07:19:59PM +0100, Dimitry Andric wrote: > On 5 Mar 2020, at 18:44, Gleb Smirnoff wrote: > > > > On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov wrote: > > S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct > > S> > > D> if_msghdr *' increases required alignment from 1 to 4 > > S> > > D> [-Werror,-Wcast-align] > > S> > > D> ifm = (struct if_msghdr *)buf; > > S> > > D> ^~~~~~~~~~~~~~~~~~~~~~~ > > S> > > D> 1 error generated. > > S> > > D> > > S> > > D> In practice I don't think the buffer can ever get misaligned, so can you > > S> > > D> please add a NO_WCAST_ALIGN= to the Makefile? > > S> > > > > S> > > route(8) handles the same problem via intermediate (void *) cast. What is > > S> > > preferred way to solve the problem? Change compiler flags file wide, or > > S> > > just through (void *) cast? > > S> > > > S> > Copy to aligned buffer or got SIGBUS on some architectures? > > S> > > S> char buf[2048] __aligned(__alignof(struct if_msghdr)); > > S> > > S> resolve this watning. > > > > Thanks, Slawa! I think this is the most elegant solution. > > Why don't just declare the buffer as: > > struct if_msghdr buf; > > and then do: > > nread = read(s, &buf, sizeof buf); > > ? You are never reading more than one if_msghdr anyway, and then there > is no need to cast anything. My inspiration: route socket can return other messages (man 4 route) From owner-svn-src-head@freebsd.org Thu Mar 5 19:43:45 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03014249F34; Thu, 5 Mar 2020 19:43:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YLlh4N2Dz4CZP; Thu, 5 Mar 2020 19:43:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D7EAC630; Thu, 5 Mar 2020 19:43:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025Jhhmt037710; Thu, 5 Mar 2020 19:43:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025JhhW1037709; Thu, 5 Mar 2020 19:43:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003051943.025JhhW1037709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 5 Mar 2020 19:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358683 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358683 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 19:43:45 -0000 Author: mav Date: Thu Mar 5 19:43:43 2020 New Revision: 358683 URL: https://svnweb.freebsd.org/changeset/base/358683 Log: Remove vfs.zfs.top_maxinflight tunable/sysctl. It is dead since sorted scrub import at r334844. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Thu Mar 5 18:11:47 2020 (r358682) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Thu Mar 5 19:43:43 2020 (r358683) @@ -137,12 +137,6 @@ extern int zfs_vdev_async_write_active_min_dirty_perce */ int zfs_scan_strict_mem_lim = B_FALSE; -/* - * Maximum number of parallelly executing I/Os per top-level vdev. - * Tune with care. Very high settings (hundreds) are known to trigger - * some firmware bugs and resets on certain SSDs. - */ -int zfs_top_maxinflight = 32; /* maximum I/Os per top-level */ unsigned int zfs_resilver_delay = 2; /* number of ticks to delay resilver -- 2 is a good number */ unsigned int zfs_scrub_delay = 4; /* number of ticks to delay scrub -- 4 is a good number */ unsigned int zfs_scan_idle = 50; /* idle window in clock ticks */ @@ -186,8 +180,6 @@ boolean_t zfs_no_scrub_io = B_FALSE; /* set to disable boolean_t zfs_no_scrub_prefetch = B_FALSE; /* set to disable scrub prefetch */ SYSCTL_DECL(_vfs_zfs); -SYSCTL_UINT(_vfs_zfs, OID_AUTO, top_maxinflight, CTLFLAG_RWTUN, - &zfs_top_maxinflight, 0, "Maximum I/Os per top-level vdev"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, resilver_delay, CTLFLAG_RWTUN, &zfs_resilver_delay, 0, "Number of ticks to delay resilver"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, scrub_delay, CTLFLAG_RWTUN, @@ -1538,7 +1530,6 @@ dsl_scan_prefetch_thread(void *arg) dsl_scan_t *scn = arg; spa_t *spa = scn->scn_dp->dp_spa; vdev_t *rvd = spa->spa_root_vdev; - uint64_t maxinflight = rvd->vdev_children * zfs_top_maxinflight; scan_prefetch_issue_ctx_t *spic; /* loop until we are told to stop */ From owner-svn-src-head@freebsd.org Thu Mar 5 20:04:42 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C794C24B200; Thu, 5 Mar 2020 20:04:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YMCt5hnkz3Qrt; Thu, 5 Mar 2020 20:04:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE6E6CA27; Thu, 5 Mar 2020 20:04:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025K4g8J049492; Thu, 5 Mar 2020 20:04:42 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025K4f14049485; Thu, 5 Mar 2020 20:04:41 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202003052004.025K4f14049485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Thu, 5 Mar 2020 20:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358684 - in head/sys: amd64/conf conf dev/aacraid modules modules/aacraid powerpc/conf X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: in head/sys: amd64/conf conf dev/aacraid modules modules/aacraid powerpc/conf X-SVN-Commit-Revision: 358684 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 20:04:42 -0000 Author: luporl Date: Thu Mar 5 20:04:41 2020 New Revision: 358684 URL: https://svnweb.freebsd.org/changeset/base/358684 Log: [aacraid] Port driver to big-endian Port aacraid driver to big-endian (BE) hosts. The immediate goal of this change is to make it possible to use the aacraid driver on PowerPC64 machines that have Adaptec Series 8 SAS controllers. Adapters supported by this driver expect FIB contents in little-endian (LE) byte order. All FIBs have a fixed header part as well as a data part that depends on the command being issued to the controller. In this way, on BE hosts, the FIB header and all FIB data structures used in aacraid.c and aacraid_cam.c need to be converted to LE before being sent to the adapter and converted to BE when coming from it. The functions to convert each struct are on aacraid_endian.c. For little-endian (LE) targets, they are macros that expand to nothing. In some cases, when only a few fields of a large structure are used, the fields are converted inline, by the code using them. PR: 237463 Reviewed by: jhibbits Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D23887 Added: head/sys/dev/aacraid/aacraid_endian.c (contents, props changed) head/sys/dev/aacraid/aacraid_endian.h (contents, props changed) Modified: head/sys/amd64/conf/NOTES head/sys/conf/NOTES head/sys/conf/files.powerpc head/sys/dev/aacraid/aacraid.c head/sys/dev/aacraid/aacraid_cam.c head/sys/modules/Makefile head/sys/modules/aacraid/Makefile head/sys/powerpc/conf/GENERIC64 Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Thu Mar 5 19:43:43 2020 (r358683) +++ head/sys/amd64/conf/NOTES Thu Mar 5 20:04:41 2020 (r358684) @@ -417,10 +417,6 @@ device aac device aacp # SCSI Passthrough interface (optional, CAM required) # -# Adaptec by PMC RAID controllers, Series 6/7/8 and upcoming families -device aacraid # Container interface, CAM required - -# # Highpoint RocketRAID 27xx. device hpt27xx Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Mar 5 19:43:43 2020 (r358683) +++ head/sys/conf/NOTES Thu Mar 5 20:04:41 2020 (r358684) @@ -1490,6 +1490,8 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # # SCSI host adapters: # +# aacraid: Adaptec by PMC RAID controllers, Series 6/7/8 and upcoming +# families. Container interface, CAM required. # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx # ahd: Adaptec 29320/39320 Controllers. @@ -1512,6 +1514,7 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # 53C876, 53C885, 53C895, 53C895A, 53C896, 53C897, 53C1510D, # 53C1010-33, 53C1010-66. +device aacraid device ahc device ahd device esp Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Mar 5 19:43:43 2020 (r358683) +++ head/sys/conf/files.powerpc Thu Mar 5 20:04:41 2020 (r358684) @@ -16,6 +16,7 @@ cddl/dev/dtrace/powerpc/dtrace_subr.c optional dtrace cddl/dev/fbt/powerpc/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb +dev/aacraid/aacraid_endian.c optional aacraid dev/adb/adb_bus.c optional adb dev/adb/adb_kbd.c optional adb dev/adb/adb_mouse.c optional adb Modified: head/sys/dev/aacraid/aacraid.c ============================================================================== --- head/sys/dev/aacraid/aacraid.c Thu Mar 5 19:43:43 2020 (r358683) +++ head/sys/dev/aacraid/aacraid.c Thu Mar 5 20:04:41 2020 (r358684) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifndef FILTER_HANDLED #define FILTER_HANDLED 0x02 @@ -386,7 +387,7 @@ aac_daemon(void *arg) AAC_FIBSTATE_ASYNC | AAC_FIBSTATE_FAST_RESPONSE; fib->Header.Command = SendHostTime; - *(uint32_t *)fib->data = tv.tv_sec; + *(uint32_t *)fib->data = htole32(tv.tv_sec); aacraid_map_command_sg(cm, NULL, 0, 0); aacraid_release_command(cm); @@ -446,6 +447,7 @@ aac_get_container_info(struct aac_softc *sc, struct aa mi->Command = VM_NameServe; mi->MntType = FT_FILESYS; mi->MntCount = cid; + aac_mntinfo_tole(mi); if (sync_fib) { if (aac_sync_fib(sc, ContainerCommand, 0, fib, @@ -476,6 +478,7 @@ aac_get_container_info(struct aac_softc *sc, struct aa } } bcopy(&fib->data[0], mir, sizeof(struct aac_mntinforesp)); + aac_mntinforesp_toh(mir); /* UID */ *uid = cid; @@ -490,10 +493,12 @@ aac_get_container_info(struct aac_softc *sc, struct aa ccfg->Command = VM_ContainerConfig; ccfg->CTCommand.command = CT_CID_TO_32BITS_UID; ccfg->CTCommand.param[0] = cid; + aac_cnt_config_tole(ccfg); if (sync_fib) { rval = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_cnt_config)); + aac_cnt_config_toh(ccfg); if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK && mir->MntTable[0].VolType != CT_PASSTHRU) @@ -512,6 +517,7 @@ aac_get_container_info(struct aac_softc *sc, struct aa AAC_FIBSTATE_FAST_RESPONSE; fib->Header.Command = ContainerCommand; rval = aacraid_wait_command(cm); + aac_cnt_config_toh(ccfg); if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK && mir->MntTable[0].VolType != CT_PASSTHRU) @@ -804,8 +810,8 @@ aacraid_shutdown(device_t dev) cc = (struct aac_close_command *)&fib->data[0]; bzero(cc, sizeof(struct aac_close_command)); - cc->Command = VM_CloseAll; - cc->ContainerId = 0xfffffffe; + cc->Command = htole32(VM_CloseAll); + cc->ContainerId = htole32(0xfffffffe); if (aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_close_command))) printf("FAILED.\n"); @@ -905,6 +911,8 @@ aacraid_new_intr_type1(void *arg) cm = sc->aac_sync_cm; aac_unmap_command(cm); cm->cm_flags |= AAC_CMD_COMPLETED; + aac_fib_header_toh(&cm->cm_fib->Header); + /* is there a completion handler? */ if (cm->cm_complete != NULL) { cm->cm_complete(cm); @@ -931,7 +939,8 @@ aacraid_new_intr_type1(void *arg) for (;;) { isFastResponse = isAif = noMoreAif = 0; /* remove toggle bit (31) */ - handle = (sc->aac_common->ac_host_rrq[index] & 0x7fffffff); + handle = (le32toh(sc->aac_common->ac_host_rrq[index]) & + 0x7fffffff); /* check fast response bit (30) */ if (handle & 0x40000000) isFastResponse = 1; @@ -944,6 +953,7 @@ aacraid_new_intr_type1(void *arg) cm = sc->aac_commands + (handle - 1); fib = cm->cm_fib; + aac_fib_header_toh(&fib->Header); sc->aac_rrq_outstanding[vector_no]--; if (isAif) { noMoreAif = (fib->Header.XferState & AAC_FIBSTATE_NOMOREAIF) ? 1:0; @@ -954,7 +964,7 @@ aacraid_new_intr_type1(void *arg) } else { if (isFastResponse) { fib->Header.XferState |= AAC_FIBSTATE_DONEADAP; - *((u_int32_t *)(fib->data)) = ST_OK; + *((u_int32_t *)(fib->data)) = htole32(ST_OK); cm->cm_flags |= AAC_CMD_FASTRESP; } aac_remove_busy(cm); @@ -1342,6 +1352,10 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s raw->flags |= RIO2_SGL_CONFORMANT; } + for (i = 0; i < nseg; i++) + aac_sge_ieee1212_tole(sg + i); + aac_raw_io2_tole(raw); + /* update the FIB size for the s/g count */ fib->Header.Size += nseg * sizeof(struct aac_sge_ieee1212); @@ -1349,33 +1363,37 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s } else if (fib->Header.Command == RawIo) { struct aac_sg_tableraw *sg; sg = (struct aac_sg_tableraw *)cm->cm_sgtable; - sg->SgCount = nseg; + sg->SgCount = htole32(nseg); for (i = 0; i < nseg; i++) { sg->SgEntryRaw[i].SgAddress = segs[i].ds_addr; sg->SgEntryRaw[i].SgByteCount = segs[i].ds_len; sg->SgEntryRaw[i].Next = 0; sg->SgEntryRaw[i].Prev = 0; sg->SgEntryRaw[i].Flags = 0; + aac_sg_entryraw_tole(&sg->SgEntryRaw[i]); } + aac_raw_io_tole((struct aac_raw_io *)&fib->data[0]); /* update the FIB size for the s/g count */ fib->Header.Size += nseg*sizeof(struct aac_sg_entryraw); } else if ((cm->cm_sc->flags & AAC_FLAGS_SG_64BIT) == 0) { struct aac_sg_table *sg; sg = cm->cm_sgtable; - sg->SgCount = nseg; + sg->SgCount = htole32(nseg); for (i = 0; i < nseg; i++) { sg->SgEntry[i].SgAddress = segs[i].ds_addr; sg->SgEntry[i].SgByteCount = segs[i].ds_len; + aac_sg_entry_tole(&sg->SgEntry[i]); } /* update the FIB size for the s/g count */ fib->Header.Size += nseg*sizeof(struct aac_sg_entry); } else { struct aac_sg_table64 *sg; sg = (struct aac_sg_table64 *)cm->cm_sgtable; - sg->SgCount = nseg; + sg->SgCount = htole32(nseg); for (i = 0; i < nseg; i++) { sg->SgEntry64[i].SgAddress = segs[i].ds_addr; sg->SgEntry64[i].SgByteCount = segs[i].ds_len; + aac_sg_entry64_tole(&sg->SgEntry64[i]); } /* update the FIB size for the s/g count */ fib->Header.Size += nseg*sizeof(struct aac_sg_entry64); @@ -1405,11 +1423,13 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s cm->cm_flags |= AAC_CMD_MAPPED; if (cm->cm_flags & AAC_CMD_WAIT) { + aac_fib_header_tole(&fib->Header); aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, cm->cm_fibphys, 0, 0, 0, NULL, NULL); } else if (sc->flags & AAC_FLAGS_SYNC_MODE) { u_int32_t wait = 0; sc->aac_sync_cm = cm; + aac_fib_header_tole(&fib->Header); aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, cm->cm_fibphys, 0, 0, 0, &wait, NULL); } else { @@ -1788,6 +1808,8 @@ aac_init(struct aac_softc *sc) ip->MaxIoSize = sc->aac_max_sectors << 9; ip->MaxFibSize = sc->aac_max_fib_size; + aac_adapter_init_tole(ip); + /* * Do controller-type-specific initialisation */ @@ -1996,18 +2018,24 @@ aac_check_config(struct aac_softc *sc) ccfg->CTCommand.command = CT_GET_CONFIG_STATUS; ccfg->CTCommand.param[CNT_SIZE] = sizeof(struct aac_cf_status_hdr); + aac_cnt_config_tole(ccfg); rval = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof (struct aac_cnt_config)); + aac_cnt_config_toh(ccfg); + cf_shdr = (struct aac_cf_status_hdr *)ccfg->CTCommand.data; if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK) { - if (cf_shdr->action <= CFACT_PAUSE) { + if (le32toh(cf_shdr->action) <= CFACT_PAUSE) { bzero(ccfg, sizeof (*ccfg) - CT_PACKET_SIZE); ccfg->Command = VM_ContainerConfig; ccfg->CTCommand.command = CT_COMMIT_CONFIG; + aac_cnt_config_tole(ccfg); rval = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof (struct aac_cnt_config)); + aac_cnt_config_toh(ccfg); + if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK) { /* successful completion */ @@ -2087,6 +2115,8 @@ static int aac_sync_fib(struct aac_softc *sc, u_int32_t command, u_int32_t xferstate, struct aac_fib *fib, u_int16_t datasize) { + uint32_t ReceiverFibAddress; + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); mtx_assert(&sc->aac_io_lock, MA_OWNED); @@ -2105,18 +2135,22 @@ aac_sync_fib(struct aac_softc *sc, u_int32_t command, fib->Header.Size = sizeof(struct aac_fib_header) + datasize; fib->Header.SenderSize = sizeof(struct aac_fib); fib->Header.SenderFibAddress = 0; /* Not needed */ - fib->Header.u.ReceiverFibAddress = sc->aac_common_busaddr + + ReceiverFibAddress = sc->aac_common_busaddr + offsetof(struct aac_common, ac_sync_fib); + fib->Header.u.ReceiverFibAddress = ReceiverFibAddress; + aac_fib_header_tole(&fib->Header); /* * Give the FIB to the controller, wait for a response. */ if (aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, - fib->Header.u.ReceiverFibAddress, 0, 0, 0, NULL, NULL)) { + ReceiverFibAddress, 0, 0, 0, NULL, NULL)) { fwprintf(sc, HBA_FLAGS_DBG_ERROR_B, "IO error"); + aac_fib_header_toh(&fib->Header); return(EIO); } + aac_fib_header_toh(&fib->Header); return (0); } @@ -2407,10 +2441,13 @@ aac_src_send_command(struct aac_softc *sc, struct aac_ pFibX->Handle = cm->cm_fib->Header.Handle; pFibX->HostAddress = cm->cm_fibphys; pFibX->Size = cm->cm_fib->Header.Size; + aac_fib_xporthdr_tole(pFibX); address = cm->cm_fibphys - sizeof(struct aac_fib_xporthdr); high_addr = (u_int32_t)(address >> 32); } + aac_fib_header_tole(&cm->cm_fib->Header); + if (fibsize > 31) fibsize = 31; aac_enqueue_busy(cm); @@ -2468,8 +2505,8 @@ aac_describe_controller(struct aac_softc *sc) supp_info = ((struct aac_supplement_adapter_info *)&fib->data[0]); adapter_type = (char *)supp_info->AdapterTypeText; - sc->aac_feature_bits = supp_info->FeatureBits; - sc->aac_support_opt2 = supp_info->SupportedOptions2; + sc->aac_feature_bits = le32toh(supp_info->FeatureBits); + sc->aac_support_opt2 = le32toh(supp_info->SupportedOptions2); } } device_printf(sc->aac_dev, "%s, aacraid driver %d.%d.%d-%d\n", @@ -2487,6 +2524,7 @@ aac_describe_controller(struct aac_softc *sc) /* save the kernel revision structure for later use */ info = (struct aac_adapter_info *)&fib->data[0]; + aac_adapter_info_toh(info); sc->aac_revision = info->KernelRevision; if (bootverbose) { @@ -2720,6 +2758,18 @@ aac_ioctl_event(struct aac_softc *sc, struct aac_event /* * Send a FIB supplied from userspace + * + * Currently, sending a FIB from userspace in BE hosts is not supported. + * There are several things that need to be considered in order to + * support this, such as: + * - At least the FIB data part from userspace should already be in LE, + * or else the kernel would need to know all FIB types to be able to + * correctly convert it to BE. + * - SG tables are converted to BE by aacraid_map_command_sg(). This + * conversion should be supressed if the FIB comes from userspace. + * - aacraid_wait_command() calls functions that convert the FIB header + * to LE. But if the header is already in LE, the conversion should not + * be performed. */ static int aac_ioctl_sendfib(struct aac_softc *sc, caddr_t ufib) @@ -2961,6 +3011,8 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a ScsiPortCommandU64 : ScsiPortCommand; cm->cm_sgtable = (struct aac_sg_table *)&srbcmd->sg_map; + aac_srb_tole(srbcmd); + /* send command */ if (transfer_data) { bus_dmamap_load(cm->cm_passthr_dmat, @@ -2978,7 +3030,7 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a mtx_unlock(&sc->aac_io_lock); /* copy data */ - if (transfer_data && (srbcmd->flags & AAC_SRB_FLAGS_DATA_IN)) { + if (transfer_data && (le32toh(srbcmd->flags) & AAC_SRB_FLAGS_DATA_IN)) { if ((error = copyout(cm->cm_data, (void *)(uintptr_t)srb_sg_address, cm->cm_datalen)) != 0) @@ -2989,6 +3041,7 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a } /* status */ + aac_srb_response_toh((struct aac_srb_response *)fib->data); error = copyout(fib->data, user_reply, sizeof(struct aac_srb_response)); out: @@ -3039,7 +3092,7 @@ aac_request_aif(struct aac_softc *sc) /* set AIF marker */ fib->Header.Handle = 0x00800000; fib->Header.Command = AifRequest; - ((struct aac_aif_command *)fib->data)->command = AifReqEvent; + ((struct aac_aif_command *)fib->data)->command = htole32(AifReqEvent); aacraid_map_command_sg(cm, NULL, 0, 0); } @@ -3080,9 +3133,9 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f aacraid_print_aif(sc, aif); /* Is it an event that we should care about? */ - switch (aif->command) { + switch (le32toh(aif->command)) { case AifCmdEventNotify: - switch (aif->data.EN.type) { + switch (le32toh(aif->data.EN.type)) { case AifEnAddContainer: case AifEnDeleteContainer: /* @@ -3174,10 +3227,10 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f break; case AifEnEnclosureManagement: - switch (aif->data.EN.data.EEE.eventType) { + switch (le32toh(aif->data.EN.data.EEE.eventType)) { case AIF_EM_DRIVE_INSERTION: case AIF_EM_DRIVE_REMOVAL: - channel = aif->data.EN.data.EEE.unitID; + channel = le32toh(aif->data.EN.data.EEE.unitID); if (sc->cam_rescan_cb != NULL) sc->cam_rescan_cb(sc, ((channel>>24) & 0xF) + 1, @@ -3189,7 +3242,7 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f case AifEnAddJBOD: case AifEnDeleteJBOD: case AifRawDeviceRemove: - channel = aif->data.EN.data.ECE.container; + channel = le32toh(aif->data.EN.data.ECE.container); if (sc->cam_rescan_cb != NULL) sc->cam_rescan_cb(sc, ((channel>>24) & 0xF) + 1, AAC_CAM_TARGET_WILDCARD); @@ -3209,6 +3262,8 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f if (next == 0) sc->aifq_filled = 1; bcopy(fib, &sc->aac_aifq[current], sizeof(struct aac_fib)); + /* Make aifq's FIB header and data LE */ + aac_fib_header_tole(&sc->aac_aifq[current].Header); /* modify AIF contexts */ if (sc->aifq_filled) { for (ctx = sc->fibctx; ctx; ctx = ctx->next) { @@ -3602,6 +3657,7 @@ aac_get_bus_info(struct aac_softc *sc) c_cmd->cmd = CT_GET_SCSI_METHOD; c_cmd->param = 0; + aac_ctcfg_tole(c_cmd); error = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_ctcfg)); if (error) { @@ -3613,6 +3669,7 @@ aac_get_bus_info(struct aac_softc *sc) } c_resp = (struct aac_ctcfg_resp *)&fib->data[0]; + aac_ctcfg_resp_toh(c_resp); if (c_resp->Status != ST_OK) { device_printf(sc->aac_dev, "VM_ContainerConfig returned 0x%x\n", c_resp->Status); @@ -3632,6 +3689,7 @@ aac_get_bus_info(struct aac_softc *sc) vmi->ObjId = 0; vmi->IoctlCmd = GetBusInfo; + aac_vmioctl_tole(vmi); error = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_vmi_businf_resp)); if (error) { @@ -3643,6 +3701,7 @@ aac_get_bus_info(struct aac_softc *sc) } vmi_resp = (struct aac_vmi_businf_resp *)&fib->data[0]; + aac_vmi_businf_resp_toh(vmi_resp); if (vmi_resp->Status != ST_OK) { device_printf(sc->aac_dev, "VM_Ioctl returned %d\n", vmi_resp->Status); @@ -3814,6 +3873,7 @@ aac_reset_adapter(struct aac_softc *sc) pc->Min = 1; pc->NoRescan = 1; + aac_pause_command_tole(pc); (void) aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof (struct aac_pause_command)); aac_release_sync_fib(sc); Modified: head/sys/dev/aacraid/aacraid_cam.c ============================================================================== --- head/sys/dev/aacraid/aacraid_cam.c Thu Mar 5 19:43:43 2020 (r358683) +++ head/sys/dev/aacraid/aacraid_cam.c Thu Mar 5 20:04:41 2020 (r358684) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifndef CAM_NEW_TRAN_CODE #define CAM_NEW_TRAN_CODE 1 @@ -417,6 +418,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) { struct aac_raw_io2 *raw; + /* NOTE: LE conversion handled at aacraid_map_command_sg() */ raw = (struct aac_raw_io2 *)&fib->data[0]; bzero(raw, sizeof(struct aac_raw_io2)); fib->Header.Command = RawIo2; @@ -432,6 +434,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc raw->flags = RIO2_IO_TYPE_WRITE | RIO2_SG_FORMAT_IEEE1212; } else if (sc->flags & AAC_FLAGS_RAW_IO) { struct aac_raw_io *raw; + /* NOTE: LE conversion handled at aacraid_map_command_sg() */ raw = (struct aac_raw_io *)&fib->data[0]; bzero(raw, sizeof(struct aac_raw_io)); fib->Header.Command = RawIo; @@ -452,6 +455,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc br->ContainerId = ccb->ccb_h.target_id; br->BlockNumber = blockno; br->ByteCount = cm->cm_datalen; + aac_blockread_tole(br); fib->Header.Size += sizeof(struct aac_blockread); cm->cm_sgtable = &br->SgMap; } else { @@ -462,6 +466,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc bw->BlockNumber = blockno; bw->ByteCount = cm->cm_datalen; bw->Stable = CUNSTABLE; + aac_blockwrite_tole(bw); fib->Header.Size += sizeof(struct aac_blockwrite); cm->cm_sgtable = &bw->SgMap; } @@ -476,6 +481,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc br->BlockNumber = blockno; br->Pad = 0; br->Flags = 0; + aac_blockread64_tole(br); fib->Header.Size += sizeof(struct aac_blockread64); cm->cm_sgtable = (struct aac_sg_table *)&br->SgMap64; } else { @@ -487,6 +493,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc bw->BlockNumber = blockno; bw->Pad = 0; bw->Flags = 0; + aac_blockwrite64_tole(bw); fib->Header.Size += sizeof(struct aac_blockwrite64); cm->cm_sgtable = (struct aac_sg_table *)&bw->SgMap64; } @@ -656,9 +663,10 @@ aac_container_special_command(struct cam_sim *sim, uni AAC_PM_DRIVERSUP_STOP_UNIT); ccfg->CTCommand.param[1] = co->co_mntobj.ObjectId; ccfg->CTCommand.param[2] = 0; /* 1 - immediate */ + aac_cnt_config_tole(ccfg); if (aacraid_wait_command(cm) != 0 || - *(u_int32_t *)&fib->data[0] != 0) { + le32toh(*(u_int32_t *)&fib->data[0]) != 0) { printf("Power Management: Error start/stop container %d\n", co->co_mntobj.ObjectId); } @@ -930,6 +938,7 @@ aac_passthrough_command(struct cam_sim *sim, union ccb srb->lun = ccb->ccb_h.target_lun; srb->timeout = ccb->ccb_h.timeout; /* XXX */ srb->retry_limit = 0; + aac_srb_tole(srb); cm->cm_complete = aac_cam_complete; cm->cm_ccb = ccb; @@ -1119,7 +1128,7 @@ aac_container_complete(struct aac_command *cm) fwprintf(cm->cm_sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); ccb = cm->cm_ccb; - status = ((u_int32_t *)cm->cm_fib->data)[0]; + status = le32toh(((u_int32_t *)cm->cm_fib->data)[0]); if (cm->cm_flags & AAC_CMD_RESET) { ccb->ccb_h.status = CAM_SCSI_BUS_RESET; @@ -1146,6 +1155,7 @@ aac_cam_complete(struct aac_command *cm) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); ccb = cm->cm_ccb; srbr = (struct aac_srb_response *)&cm->cm_fib->data[0]; + aac_srb_response_toh(srbr); if (cm->cm_flags & AAC_CMD_FASTRESP) { /* fast response */ @@ -1297,6 +1307,7 @@ aac_cam_reset_bus(struct cam_sim *sim, union ccb *ccb) rbc = (struct aac_resetbus *)&vmi->IoctlBuf[0]; rbc->BusNumber = camsc->inf->BusNumber - 1; + aac_vmioctl_tole(vmi); if (aacraid_wait_command(cm) != 0) { device_printf(sc->aac_dev,"Error sending ResetBus command\n"); Added: head/sys/dev/aacraid/aacraid_endian.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/aacraid/aacraid_endian.c Thu Mar 5 20:04:41 2020 (r358684) @@ -0,0 +1,389 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Leandro Lupori + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include + +#if _BYTE_ORDER != _LITTLE_ENDIAN + +#define TOH2(field, bits) field = le##bits##toh(field) +#define TOH(field, bits) TOH2(field, bits) + +#define TOLE2(field, bits) field = htole##bits(field) +#define TOLE(field, bits) TOLE2(field, bits) + +/* Convert from Little-Endian to host order (TOH) */ + +void +aac_fib_header_toh(struct aac_fib_header *ptr) +{ + TOH(ptr->XferState, 32); + TOH(ptr->Command, 16); + TOH(ptr->Size, 16); + TOH(ptr->SenderSize, 16); + TOH(ptr->SenderFibAddress, 32); + TOH(ptr->u.ReceiverFibAddress, 32); + TOH(ptr->Handle, 32); + TOH(ptr->Previous, 32); + TOH(ptr->Next, 32); +} + +void +aac_adapter_info_toh(struct aac_adapter_info *ptr) +{ + TOH(ptr->PlatformBase, 32); + TOH(ptr->CpuArchitecture, 32); + TOH(ptr->CpuVariant, 32); + TOH(ptr->ClockSpeed, 32); + TOH(ptr->ExecutionMem, 32); + TOH(ptr->BufferMem, 32); + TOH(ptr->TotalMem, 32); + + TOH(ptr->KernelRevision.buildNumber, 32); + TOH(ptr->MonitorRevision.buildNumber, 32); + TOH(ptr->HardwareRevision.buildNumber, 32); + TOH(ptr->BIOSRevision.buildNumber, 32); + + TOH(ptr->ClusteringEnabled, 32); + TOH(ptr->ClusterChannelMask, 32); + TOH(ptr->SerialNumber, 64); + TOH(ptr->batteryPlatform, 32); + TOH(ptr->SupportedOptions, 32); + TOH(ptr->OemVariant, 32); +} + +void +aac_container_creation_toh(struct aac_container_creation *ptr) +{ + u_int32_t *date = (u_int32_t *)ptr + 1; + + *date = le32toh(*date); + TOH(ptr->ViaAdapterSerialNumber, 64); +} + +void +aac_mntobj_toh(struct aac_mntobj *ptr) +{ + TOH(ptr->ObjectId, 32); + aac_container_creation_toh(&ptr->CreateInfo); + TOH(ptr->Capacity, 32); + TOH(ptr->VolType, 32); + TOH(ptr->ObjType, 32); + TOH(ptr->ContentState, 32); + TOH(ptr->ObjExtension.BlockDevice.BlockSize, 32); + TOH(ptr->ObjExtension.BlockDevice.bdLgclPhysMap, 32); + TOH(ptr->AlterEgoId, 32); + TOH(ptr->CapacityHigh, 32); +} + +void +aac_mntinforesp_toh(struct aac_mntinforesp *ptr) +{ + TOH(ptr->Status, 32); + TOH(ptr->MntType, 32); + TOH(ptr->MntRespCount, 32); + aac_mntobj_toh(&ptr->MntTable[0]); +} + +void +aac_fsa_ctm_toh(struct aac_fsa_ctm *ptr) +{ + int i; + + TOH(ptr->command, 32); + for (i = 0; i < CT_FIB_PARAMS; i++) + TOH(ptr->param[i], 32); +} + +void +aac_cnt_config_toh(struct aac_cnt_config *ptr) +{ + TOH(ptr->Command, 32); + aac_fsa_ctm_toh(&ptr->CTCommand); +} + +void +aac_ctcfg_resp_toh(struct aac_ctcfg_resp *ptr) +{ + TOH(ptr->Status, 32); + TOH(ptr->resp, 32); + TOH(ptr->param, 32); +} + +void +aac_getbusinf_toh(struct aac_getbusinf *ptr) +{ + TOH(ptr->ProbeComplete, 32); + TOH(ptr->BusCount, 32); + TOH(ptr->TargetsPerBus, 32); +} + +void +aac_vmi_businf_resp_toh(struct aac_vmi_businf_resp *ptr) +{ + TOH(ptr->Status, 32); + TOH(ptr->ObjType, 32); + TOH(ptr->MethId, 32); + TOH(ptr->ObjId, 32); + TOH(ptr->IoctlCmd, 32); + aac_getbusinf_toh(&ptr->BusInf); +} + +void +aac_srb_response_toh(struct aac_srb_response *ptr) +{ + TOH(ptr->fib_status, 32); + TOH(ptr->srb_status, 32); + TOH(ptr->scsi_status, 32); + TOH(ptr->data_len, 32); + TOH(ptr->sense_len, 32); +} + +/* Convert from host order to Little-Endian (TOLE) */ + +void +aac_adapter_init_tole(struct aac_adapter_init *ptr) +{ + TOLE(ptr->InitStructRevision, 32); + TOLE(ptr->NoOfMSIXVectors, 32); + TOLE(ptr->FilesystemRevision, 32); + TOLE(ptr->CommHeaderAddress, 32); + TOLE(ptr->FastIoCommAreaAddress, 32); + TOLE(ptr->AdapterFibsPhysicalAddress, 32); + TOLE(ptr->AdapterFibsVirtualAddress, 32); + TOLE(ptr->AdapterFibsSize, 32); + TOLE(ptr->AdapterFibAlign, 32); + TOLE(ptr->PrintfBufferAddress, 32); + TOLE(ptr->PrintfBufferSize, 32); + TOLE(ptr->HostPhysMemPages, 32); + TOLE(ptr->HostElapsedSeconds, 32); + TOLE(ptr->InitFlags, 32); + TOLE(ptr->MaxIoCommands, 32); + TOLE(ptr->MaxIoSize, 32); + TOLE(ptr->MaxFibSize, 32); + TOLE(ptr->MaxNumAif, 32); + TOLE(ptr->HostRRQ_AddrLow, 32); + TOLE(ptr->HostRRQ_AddrHigh, 32); +} + +void +aac_fib_header_tole(struct aac_fib_header *ptr) +{ + TOLE(ptr->XferState, 32); + TOLE(ptr->Command, 16); + TOLE(ptr->Size, 16); + TOLE(ptr->SenderSize, 16); + TOLE(ptr->SenderFibAddress, 32); + TOLE(ptr->u.ReceiverFibAddress, 32); + TOLE(ptr->Handle, 32); + TOLE(ptr->Previous, 32); + TOLE(ptr->Next, 32); +} + +void +aac_mntinfo_tole(struct aac_mntinfo *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->MntType, 32); + TOLE(ptr->MntCount, 32); +} + +void +aac_fsa_ctm_tole(struct aac_fsa_ctm *ptr) +{ + int i; + + TOLE(ptr->command, 32); + for (i = 0; i < CT_FIB_PARAMS; i++) + TOLE(ptr->param[i], 32); +} + +void +aac_cnt_config_tole(struct aac_cnt_config *ptr) +{ + TOLE(ptr->Command, 32); + aac_fsa_ctm_tole(&ptr->CTCommand); +} + +void +aac_raw_io_tole(struct aac_raw_io *ptr) +{ + TOLE(ptr->BlockNumber, 64); + TOLE(ptr->ByteCount, 32); + TOLE(ptr->ContainerId, 16); + TOLE(ptr->Flags, 16); + TOLE(ptr->BpTotal, 16); + TOLE(ptr->BpComplete, 16); +} + +void +aac_raw_io2_tole(struct aac_raw_io2 *ptr) +{ + TOLE(ptr->strtBlkLow, 32); + TOLE(ptr->strtBlkHigh, 32); + TOLE(ptr->byteCnt, 32); + TOLE(ptr->ldNum, 16); + TOLE(ptr->flags, 16); + TOLE(ptr->sgeFirstSize, 32); + TOLE(ptr->sgeNominalSize, 32); +} + +void +aac_fib_xporthdr_tole(struct aac_fib_xporthdr *ptr) +{ + TOLE(ptr->HostAddress, 64); + TOLE(ptr->Size, 32); + TOLE(ptr->Handle, 32); +} + +void +aac_ctcfg_tole(struct aac_ctcfg *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->cmd, 32); + TOLE(ptr->param, 32); +} + +void +aac_vmioctl_tole(struct aac_vmioctl *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->ObjType, 32); + TOLE(ptr->MethId, 32); + TOLE(ptr->ObjId, 32); + TOLE(ptr->IoctlCmd, 32); + TOLE(ptr->IoctlBuf[0], 32); +} + +void +aac_pause_command_tole(struct aac_pause_command *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->Type, 32); + TOLE(ptr->Timeout, 32); + TOLE(ptr->Min, 32); + TOLE(ptr->NoRescan, 32); + TOLE(ptr->Parm3, 32); + TOLE(ptr->Parm4, 32); + TOLE(ptr->Count, 32); +} + +void +aac_srb_tole(struct aac_srb *ptr) +{ + TOLE(ptr->function, 32); + TOLE(ptr->bus, 32); + TOLE(ptr->target, 32); + TOLE(ptr->lun, 32); + TOLE(ptr->timeout, 32); + TOLE(ptr->flags, 32); + TOLE(ptr->data_len, 32); + TOLE(ptr->retry_limit, 32); + TOLE(ptr->cdb_len, 32); +} + +void +aac_sge_ieee1212_tole(struct aac_sge_ieee1212 *ptr) +{ + TOLE(ptr->addrLow, 32); + TOLE(ptr->addrHigh, 32); + TOLE(ptr->length, 32); + TOLE(ptr->flags, 32); +} + +void +aac_sg_entryraw_tole(struct aac_sg_entryraw *ptr) +{ + TOLE(ptr->Next, 32); + TOLE(ptr->Prev, 32); + TOLE(ptr->SgAddress, 64); + TOLE(ptr->SgByteCount, 32); + TOLE(ptr->Flags, 32); +} + +void +aac_sg_entry_tole(struct aac_sg_entry *ptr) +{ + TOLE(ptr->SgAddress, 32); + TOLE(ptr->SgByteCount, 32); +} + +void +aac_sg_entry64_tole(struct aac_sg_entry64 *ptr) +{ + TOLE(ptr->SgAddress, 64); + TOLE(ptr->SgByteCount, 32); +} + +void +aac_blockread_tole(struct aac_blockread *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->ContainerId, 32); + TOLE(ptr->BlockNumber, 32); + TOLE(ptr->ByteCount, 32); +} + +void +aac_blockwrite_tole(struct aac_blockwrite *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->ContainerId, 32); + TOLE(ptr->BlockNumber, 32); + TOLE(ptr->ByteCount, 32); + TOLE(ptr->Stable, 32); +} + +void +aac_blockread64_tole(struct aac_blockread64 *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->ContainerId, 16); + TOLE(ptr->SectorCount, 16); + TOLE(ptr->BlockNumber, 32); + TOLE(ptr->Pad, 16); + TOLE(ptr->Flags, 16); +} + +void +aac_blockwrite64_tole(struct aac_blockwrite64 *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->ContainerId, 16); + TOLE(ptr->SectorCount, 16); + TOLE(ptr->BlockNumber, 32); + TOLE(ptr->Pad, 16); + TOLE(ptr->Flags, 16); +} + +#endif Added: head/sys/dev/aacraid/aacraid_endian.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/aacraid/aacraid_endian.h Thu Mar 5 20:04:41 2020 (r358684) @@ -0,0 +1,114 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Leandro Lupori + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef AACRAID_ENDIAN_H +#define AACRAID_ENDIAN_H + +#include + +#if _BYTE_ORDER == _LITTLE_ENDIAN + +/* On Little-Endian (LE) hosts, make all FIB data conversion functions empty. */ + +/* Convert from Little-Endian to host order (TOH) */ +#define aac_fib_header_toh(ptr) +#define aac_adapter_info_toh(ptr) +#define aac_container_creation_toh(ptr) +#define aac_mntobj_toh(ptr) +#define aac_mntinforesp_toh(ptr) +#define aac_fsa_ctm_toh(ptr) +#define aac_cnt_config_toh(ptr) +#define aac_ctcfg_resp_toh(ptr) +#define aac_getbusinf_toh(ptr) +#define aac_vmi_businf_resp_toh(ptr) +#define aac_srb_response_toh(ptr) + +/* Convert from host order to Little-Endian (TOLE) */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Mar 5 20:53:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C07DF24C53A; Thu, 5 Mar 2020 20:53:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YNJS1K2Sz4f26; Thu, 5 Mar 2020 20:53:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE466D42E; Thu, 5 Mar 2020 20:53:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025KrhaX080334; Thu, 5 Mar 2020 20:53:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025KrhMs080333; Thu, 5 Mar 2020 20:53:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003052053.025KrhMs080333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 5 Mar 2020 20:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358685 - head/contrib/elftoolchain/libelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/libelf X-SVN-Commit-Revision: 358685 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 20:53:44 -0000 Author: emaste Date: Thu Mar 5 20:53:43 2020 New Revision: 358685 URL: https://svnweb.freebsd.org/changeset/base/358685 Log: libelf: rationalize error handling in ELF note conversion Previously _libelf_cvt_NOTE_tom (to host) returned false if a note's namesz + descsz exceeded the buffer size, while _libelf_cvt_NOTE_tof (to file) silently truncated. Return false in the latter case too. Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/libelf/libelf_convert.m4 Modified: head/contrib/elftoolchain/libelf/libelf_convert.m4 ============================================================================== --- head/contrib/elftoolchain/libelf/libelf_convert.m4 Thu Mar 5 20:04:41 2020 (r358684) +++ head/contrib/elftoolchain/libelf/libelf_convert.m4 Thu Mar 5 20:53:43 2020 (r358685) @@ -1022,7 +1022,7 @@ _libelf_cvt_NOTE_tof(unsigned char *dst, size_t dsz, u count -= sizeof(Elf_Note); if (count < sz) - sz = count; + return (0); (void) memcpy(dst, src, sz); From owner-svn-src-head@freebsd.org Thu Mar 5 21:01:20 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D96224C696; Thu, 5 Mar 2020 21:01:20 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YNTC4YG2z3MVY; Thu, 5 Mar 2020 21:01:19 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id 025L1FDG034727 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 5 Mar 2020 13:01:15 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 025L1EYZ034726; Thu, 5 Mar 2020 13:01:14 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 5 Mar 2020 13:01:14 -0800 From: Gleb Smirnoff To: Slawa Olhovchenkov Cc: Dimitry Andric , svn-src-head , svn-src-all , src-committers@freebsd.org Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305210114.GX5741@FreeBSD.org> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> <20200305173515.GK8028@zxy.spb.ru> <20200305174411.GV5741@FreeBSD.org> <1A13B93C-7D87-4210-AD3D-2B198C166CE1@FreeBSD.org> <20200305183041.GU8012@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200305183041.GU8012@zxy.spb.ru> X-Rspamd-Queue-Id: 48YNTC4YG2z3MVY X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.09 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.988,0]; NEURAL_SPAM_MEDIUM(0.90)[0.902,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 21:01:20 -0000 On Thu, Mar 05, 2020 at 09:30:41PM +0300, Slawa Olhovchenkov wrote: S> > > On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov wrote: S> > > S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct S> > > S> > > D> if_msghdr *' increases required alignment from 1 to 4 S> > > S> > > D> [-Werror,-Wcast-align] S> > > S> > > D> ifm = (struct if_msghdr *)buf; S> > > S> > > D> ^~~~~~~~~~~~~~~~~~~~~~~ S> > > S> > > D> 1 error generated. S> > > S> > > D> S> > > S> > > D> In practice I don't think the buffer can ever get misaligned, so can you S> > > S> > > D> please add a NO_WCAST_ALIGN= to the Makefile? S> > > S> > > S> > > S> > > route(8) handles the same problem via intermediate (void *) cast. What is S> > > S> > > preferred way to solve the problem? Change compiler flags file wide, or S> > > S> > > just through (void *) cast? S> > > S> > S> > > S> > Copy to aligned buffer or got SIGBUS on some architectures? S> > > S> S> > > S> char buf[2048] __aligned(__alignof(struct if_msghdr)); S> > > S> S> > > S> resolve this watning. S> > > S> > > Thanks, Slawa! I think this is the most elegant solution. S> > S> > Why don't just declare the buffer as: S> > S> > struct if_msghdr buf; S> > S> > and then do: S> > S> > nread = read(s, &buf, sizeof buf); S> > S> > ? You are never reading more than one if_msghdr anyway, and then there S> > is no need to cast anything. S> S> My inspiration: route socket can return other messages (man 4 route) Yes, exactly. We don't know what size next datagram is going to be. -- Gleb Smirnoff From owner-svn-src-head@freebsd.org Thu Mar 5 21:01:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DBA824C88F; Thu, 5 Mar 2020 21:01:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YNTl6fftz3Mks; Thu, 5 Mar 2020 21:01:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFA7DD4CC; Thu, 5 Mar 2020 21:01:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025L1lEU082270; Thu, 5 Mar 2020 21:01:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025L1lUA082269; Thu, 5 Mar 2020 21:01:47 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202003052101.025L1lUA082269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 5 Mar 2020 21:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358686 - head/sbin/mount_nfs X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sbin/mount_nfs X-SVN-Commit-Revision: 358686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 21:01:48 -0000 Author: glebius Date: Thu Mar 5 21:01:47 2020 New Revision: 358686 URL: https://svnweb.freebsd.org/changeset/base/358686 Log: Align the buffer to the alignment of the structure we expect. Submitted by: Slawa Olhovchenkov Modified: head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Thu Mar 5 20:53:43 2020 (r358685) +++ head/sbin/mount_nfs/mount_nfs.c Thu Mar 5 21:01:47 2020 (r358686) @@ -514,7 +514,7 @@ sec_num_to_name(int flavor) static time_t rtm_ifinfo_sleep(time_t sec) { - char buf[2048]; + char buf[2048] __aligned(__alignof(struct if_msghdr)); fd_set rfds; struct timeval tv, start; ssize_t nread; From owner-svn-src-head@freebsd.org Thu Mar 5 22:15:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2F5524E75D; Thu, 5 Mar 2020 22:15:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YQ6V3Lcwz4K6h; Thu, 5 Mar 2020 22:15:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 1904524C1; Thu, 5 Mar 2020 22:15:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::44b2:892b:3322:a46d] (unknown [IPv6:2001:470:7a58:0:44b2:892b:3322:a46d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 46A1F2D03E; Thu, 5 Mar 2020 23:15:12 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_06DCACBE-2866-4643-AE54-B08F4BA952F8"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Date: Thu, 5 Mar 2020 23:15:04 +0100 In-Reply-To: <20200305210114.GX5741@FreeBSD.org> Cc: Slawa Olhovchenkov , svn-src-head , svn-src-all , src-committers@freebsd.org To: Gleb Smirnoff References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> <20200305173515.GK8028@zxy.spb.ru> <20200305174411.GV5741@FreeBSD.org> <1A13B93C-7D87-4210-AD3D-2B198C166CE1@FreeBSD.org> <20200305183041.GU8012@zxy.spb.ru> <20200305210114.GX5741@FreeBSD.org> X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 22:15:15 -0000 --Apple-Mail=_06DCACBE-2866-4643-AE54-B08F4BA952F8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 5 Mar 2020, at 22:01, Gleb Smirnoff wrote: >=20 > On Thu, Mar 05, 2020 at 09:30:41PM +0300, Slawa Olhovchenkov wrote: > S> > > On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov = wrote: > S> > > S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from = 'char *' to 'struct > S> > > S> > > D> if_msghdr *' increases required alignment from 1 to 4 > S> > > S> > > D> [-Werror,-Wcast-align] > S> > > S> > > D> ifm =3D (struct if_msghdr = *)buf; > S> > > S> > > D> ^~~~~~~~~~~~~~~~~~~~~~~ > S> > > S> > > D> 1 error generated. > S> > > S> > > D> > S> > > S> > > D> In practice I don't think the buffer can ever get = misaligned, so can you > S> > > S> > > D> please add a NO_WCAST_ALIGN=3D to the Makefile? > S> > > S> > > > S> > > S> > > route(8) handles the same problem via intermediate (void = *) cast. What is > S> > > S> > > preferred way to solve the problem? Change compiler = flags file wide, or > S> > > S> > > just through (void *) cast? > S> > > S> > > S> > > S> > Copy to aligned buffer or got SIGBUS on some = architectures? > S> > > S> > S> > > S> char buf[2048] __aligned(__alignof(struct if_msghdr)); > S> > > S> > S> > > S> resolve this watning. > S> > > > S> > > Thanks, Slawa! I think this is the most elegant solution. > S> > > S> > Why don't just declare the buffer as: > S> > > S> > struct if_msghdr buf; > S> > > S> > and then do: > S> > > S> > nread =3D read(s, &buf, sizeof buf); > S> > > S> > ? You are never reading more than one if_msghdr anyway, and then = there > S> > is no need to cast anything. > S> > S> My inspiration: route socket can return other messages (man 4 = route) >=20 > Yes, exactly. We don't know what size next datagram is going to be. Oh, in that case this code seems completely wrong. How do you know the full datagram will be delivered with one read() call? If it always is, then there is no need to read more than the size of struct if_msghdr, since you are not using any data beyond it. So in that case, you can suffice with read(..., sizeof(if_msghdr)). If the read() call will return partial results, you must repeatedly call it in a loop, until you either reach EOF, or have enough data. In that case, a buffer with the size of if_msghdr is also enough, since you never need to read beyond that. -Dimitry --Apple-Mail=_06DCACBE-2866-4643-AE54-B08F4BA952F8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXmF56AAKCRCwXqMKLiCW o8u/AJ4gMCatiYthXVdvDYPlt+MuNcHd4QCfWsm9p65HeS1zqopZ0sysOH9eatc= =4Ny0 -----END PGP SIGNATURE----- --Apple-Mail=_06DCACBE-2866-4643-AE54-B08F4BA952F8-- From owner-svn-src-head@freebsd.org Thu Mar 5 22:45:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D092D24F0C6; Thu, 5 Mar 2020 22:45:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YQn93gV5z4flN; Thu, 5 Mar 2020 22:45:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BFBEE990; Thu, 5 Mar 2020 22:45:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025MjHvp046509; Thu, 5 Mar 2020 22:45:17 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025MjHZG046508; Thu, 5 Mar 2020 22:45:17 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003052245.025MjHZG046508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 5 Mar 2020 22:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358687 - head/libexec/tftpd/tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/libexec/tftpd/tests X-SVN-Commit-Revision: 358687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 22:45:18 -0000 Author: kevans Date: Thu Mar 5 22:45:16 2020 New Revision: 358687 URL: https://svnweb.freebsd.org/changeset/base/358687 Log: tftpd: tests: raise targeted cstd to c11 r358556 added alignas() use to the functional tests, which isn't defined until C11. Raise the -std to C11 to fix the build under freebsd-gcc{6,9}. Reported by: mhorne, Jenkins/CI Modified: head/libexec/tftpd/tests/Makefile Modified: head/libexec/tftpd/tests/Makefile ============================================================================== --- head/libexec/tftpd/tests/Makefile Thu Mar 5 21:01:47 2020 (r358686) +++ head/libexec/tftpd/tests/Makefile Thu Mar 5 22:45:16 2020 (r358687) @@ -10,5 +10,6 @@ TEST_METADATA.functional+= timeout=15 LIBADD= util WARNS?= 6 +CSTD= c11 .include From owner-svn-src-head@freebsd.org Fri Mar 6 00:00:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 305FE250C69; Fri, 6 Mar 2020 00:00:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YSRr6z7fz4C4w; Fri, 6 Mar 2020 00:00:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 6EB0E30FE; Fri, 6 Mar 2020 00:00:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358687 - head/libexec/tftpd/tests To: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003052245.025MjHZG046508@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <69c45761-b697-0809-9ba5-e16dd111d35b@FreeBSD.org> Date: Thu, 5 Mar 2020 16:00:24 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003052245.025MjHZG046508@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 00:00:25 -0000 On 3/5/20 2:45 PM, Kyle Evans wrote: > Author: kevans > Date: Thu Mar 5 22:45:16 2020 > New Revision: 358687 > URL: https://svnweb.freebsd.org/changeset/base/358687 > > Log: > tftpd: tests: raise targeted cstd to c11 > > r358556 added alignas() use to the functional tests, which isn't defined > until C11. Raise the -std to C11 to fix the build under freebsd-gcc{6,9}. > > Reported by: mhorne, Jenkins/CI Thanks for fixing! -- John Baldwin From owner-svn-src-head@freebsd.org Fri Mar 6 01:45:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C568252A7D; Fri, 6 Mar 2020 01:45:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YVmc2wLKz3CLr; Fri, 6 Mar 2020 01:45:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3067B18B26; Fri, 6 Mar 2020 01:45:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0261j3wE053285; Fri, 6 Mar 2020 01:45:03 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0261j3vl053282; Fri, 6 Mar 2020 01:45:03 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003060145.0261j3vl053282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 01:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358688 - head/lib/libc/powerpc64/string X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/lib/libc/powerpc64/string X-SVN-Commit-Revision: 358688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 01:45:04 -0000 Author: jhibbits Date: Fri Mar 6 01:45:03 2020 New Revision: 358688 URL: https://svnweb.freebsd.org/changeset/base/358688 Log: powerpc/powerpc64: Enforce natural alignment in memcpy Summary: POWER architecture CPUs (Book-S) require natural alignment for cache-inhibited storage accesses. Since we can't know the caching model for a page ahead of time, always enforce natural alignment in memcpy. This fixes a SIGBUS in X with acceleration enabled on POWER9. As part of this, revert r358672, it's no longer necessary with this fix. Regression tested by alfredo. Reviewed by: alfredo Differential Revision: https://reviews.freebsd.org/D23969 Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c head/lib/libc/powerpc64/string/memcpy.S head/lib/libc/powerpc64/string/memcpy_vsx.S Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c ============================================================================== --- head/lib/libc/powerpc64/string/bcopy_resolver.c Thu Mar 5 22:45:16 2020 (r358687) +++ head/lib/libc/powerpc64/string/bcopy_resolver.c Fri Mar 6 01:45:03 2020 (r358688) @@ -66,7 +66,7 @@ DEFINE_UIFUNC(, FN_RET, FN_NAME, FN_PARAMS) * Since POWER ISA 2.07B this is solved transparently * by the hardware */ - if (cpu_features2 & PPC_FEATURE2_ARCH_2_07) + if (cpu_features2 & PPC_FEATURE_HAS_VSX) return (FN_NAME_VSX); else return (FN_NAME_NOVSX); Modified: head/lib/libc/powerpc64/string/memcpy.S ============================================================================== --- head/lib/libc/powerpc64/string/memcpy.S Thu Mar 5 22:45:16 2020 (r358687) +++ head/lib/libc/powerpc64/string/memcpy.S Fri Mar 6 01:45:03 2020 (r358688) @@ -39,6 +39,11 @@ WEAK_REFERENCE(__memcpy, memcpy); #define BLOCK_BYTES (1 << BLOCK_BITS) #define BLOCK_MASK (BLOCK_BYTES - 1) +/* Minimum 8 byte alignment, to avoid cache-inhibited alignment faults. */ +#ifndef ALIGN_MASK +#define ALIGN_MASK 0x7 +#endif + /* * r3: dst * r4: src @@ -48,6 +53,12 @@ ENTRY(FN_NAME) cmpdi %r5, 0 /* len == 0? nothing to do */ beqlr- + /* If src and dst are relatively misaligned, do byte copies. */ + andi. %r8, %r3, ALIGN_MASK + andi. %r7, %r4, ALIGN_MASK + cmpd %r8, %r7 + mr %r7, %r5 + bne+ .Lcopy_remaining_fix_index_byte mr %r8, %r3 /* save dst */ /* align src */ Modified: head/lib/libc/powerpc64/string/memcpy_vsx.S ============================================================================== --- head/lib/libc/powerpc64/string/memcpy_vsx.S Thu Mar 5 22:45:16 2020 (r358687) +++ head/lib/libc/powerpc64/string/memcpy_vsx.S Fri Mar 6 01:45:03 2020 (r358688) @@ -30,6 +30,7 @@ #define FN_NAME __memcpy_vsx #define BLOCK_BITS 6 +#define ALIGN_MASK 0xf /* * r5: bytes to copy (multiple of BLOCK_BYTES) From owner-svn-src-head@freebsd.org Fri Mar 6 01:50:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD7C7252BF1; Fri, 6 Mar 2020 01:50:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YVtc2G9cz3PtY; Fri, 6 Mar 2020 01:50:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 121A118B32; Fri, 6 Mar 2020 01:50:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0261oFjN053593; Fri, 6 Mar 2020 01:50:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0261oFT3053592; Fri, 6 Mar 2020 01:50:15 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003060150.0261oFT3053592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 01:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358689 - head/sys/dev/mfi X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/mfi X-SVN-Commit-Revision: 358689 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 01:50:16 -0000 Author: jhibbits Date: Fri Mar 6 01:50:15 2020 New Revision: 358689 URL: https://svnweb.freebsd.org/changeset/base/358689 Log: Fix a mistaken conditional in mfi_tbolt_send_frame() As written, the condition of (cdb[0] != 0x28 || cdb[0] != 0x2A) will always be true, since if it's one, it's obviously not the other. Reading the code, the intent appears to be that it should only perform the operation if it's neither, otherwise the conditional can be elided. Found by clang 10. Modified: head/sys/dev/mfi/mfi_tbolt.c Modified: head/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- head/sys/dev/mfi/mfi_tbolt.c Fri Mar 6 01:45:03 2020 (r358688) +++ head/sys/dev/mfi/mfi_tbolt.c Fri Mar 6 01:50:15 2020 (r358689) @@ -1109,7 +1109,7 @@ mfi_tbolt_send_frame(struct mfi_softc *sc, struct mfi_ if (hdr->cmd == MFI_CMD_PD_SCSI_IO) { /* check for inquiry commands coming from CLI */ - if (cdb[0] != 0x28 || cdb[0] != 0x2A) { + if (cdb[0] != 0x28 && cdb[0] != 0x2A) { if ((req_desc = mfi_tbolt_build_mpt_cmd(sc, cm)) == NULL) { device_printf(sc->mfi_dev, "Mapping from MFI " From owner-svn-src-head@freebsd.org Fri Mar 6 02:30:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE8AE253C67; Fri, 6 Mar 2020 02:30:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YWmX5xTvz4HJX; Fri, 6 Mar 2020 02:30:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BFC64192CB; Fri, 6 Mar 2020 02:30:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0262U4nd077305; Fri, 6 Mar 2020 02:30:04 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0262U49L077304; Fri, 6 Mar 2020 02:30:04 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003060230.0262U49L077304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 02:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358690 - head/lib/libc/powerpc64/string X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/lib/libc/powerpc64/string X-SVN-Commit-Revision: 358690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 02:30:05 -0000 Author: jhibbits Date: Fri Mar 6 02:30:04 2020 New Revision: 358690 URL: https://svnweb.freebsd.org/changeset/base/358690 Log: Finish revert of r358672, missed in r358688. Manual reverts never succeed correctly. Reported by: luporl Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c ============================================================================== --- head/lib/libc/powerpc64/string/bcopy_resolver.c Fri Mar 6 01:50:15 2020 (r358689) +++ head/lib/libc/powerpc64/string/bcopy_resolver.c Fri Mar 6 02:30:04 2020 (r358690) @@ -66,7 +66,7 @@ DEFINE_UIFUNC(, FN_RET, FN_NAME, FN_PARAMS) * Since POWER ISA 2.07B this is solved transparently * by the hardware */ - if (cpu_features2 & PPC_FEATURE_HAS_VSX) + if (cpu_features & PPC_FEATURE_HAS_VSX) return (FN_NAME_VSX); else return (FN_NAME_NOVSX); From owner-svn-src-head@freebsd.org Fri Mar 6 03:46:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8876255012; Fri, 6 Mar 2020 03:46:48 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YYT45042z3xJq; Fri, 6 Mar 2020 03:46:48 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A668C1A1F8; Fri, 6 Mar 2020 03:46:48 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0263km0i025793; Fri, 6 Mar 2020 03:46:48 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0263kmXJ025792; Fri, 6 Mar 2020 03:46:48 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003060346.0263kmXJ025792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 03:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358691 - head/lib/libc/powerpc64/string X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/lib/libc/powerpc64/string X-SVN-Commit-Revision: 358691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 03:46:49 -0000 Author: jhibbits Date: Fri Mar 6 03:46:48 2020 New Revision: 358691 URL: https://svnweb.freebsd.org/changeset/base/358691 Log: powerpc/memcpy: Don't predict the src and dst will be misaligned Predicting misalignment will pessimize the expected common case. Don't predict true or false in thise case. Modified: head/lib/libc/powerpc64/string/memcpy.S Modified: head/lib/libc/powerpc64/string/memcpy.S ============================================================================== --- head/lib/libc/powerpc64/string/memcpy.S Fri Mar 6 02:30:04 2020 (r358690) +++ head/lib/libc/powerpc64/string/memcpy.S Fri Mar 6 03:46:48 2020 (r358691) @@ -58,7 +58,7 @@ ENTRY(FN_NAME) andi. %r7, %r4, ALIGN_MASK cmpd %r8, %r7 mr %r7, %r5 - bne+ .Lcopy_remaining_fix_index_byte + bne .Lcopy_remaining_fix_index_byte mr %r8, %r3 /* save dst */ /* align src */ From owner-svn-src-head@freebsd.org Fri Mar 6 08:50:19 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62FD02631E8; Fri, 6 Mar 2020 08:50:19 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YhCH1NV5z4ZZ1; Fri, 6 Mar 2020 08:50:19 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B2DD1D8D7; Fri, 6 Mar 2020 08:50:19 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0268oIbP006109; Fri, 6 Mar 2020 08:50:18 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0268oImB006108; Fri, 6 Mar 2020 08:50:18 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <202003060850.0268oImB006108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Fri, 6 Mar 2020 08:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358693 - head/sys/dev/rt X-SVN-Group: head X-SVN-Commit-Author: sgalabov X-SVN-Commit-Paths: head/sys/dev/rt X-SVN-Commit-Revision: 358693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 08:50:19 -0000 Author: sgalabov Date: Fri Mar 6 08:50:18 2020 New Revision: 358693 URL: https://svnweb.freebsd.org/changeset/base/358693 Log: Add Gigabit Ethernet support for RT3883 and RT2880 Ralink/Mediatek SoCs Submitted by: yamori813@yahoo.co.jp Reported by: yamori813@yahoo.co.jp Reviewed by: sgalabov, ray Obtained from: yamori813@yahoo.co.jp Differential Revision: https://reviews.freebsd.org/D22618 Modified: head/sys/dev/rt/if_rt.c Modified: head/sys/dev/rt/if_rt.c ============================================================================== --- head/sys/dev/rt/if_rt.c Fri Mar 6 07:07:25 2020 (r358692) +++ head/sys/dev/rt/if_rt.c Fri Mar 6 08:50:18 2020 (r358693) @@ -101,6 +101,7 @@ __FBSDID("$FreeBSD$"); #define RT_CHIPID_RT2880 0x2880 #define RT_CHIPID_RT3050 0x3050 +#define RT_CHIPID_RT3883 0x3883 #define RT_CHIPID_RT5350 0x5350 #define RT_CHIPID_MT7620 0x7620 #define RT_CHIPID_MT7621 0x7621 @@ -111,7 +112,7 @@ static const struct ofw_compat_data rt_compat_data[] = { "ralink,rt2880-eth", RT_CHIPID_RT2880 }, { "ralink,rt3050-eth", RT_CHIPID_RT3050 }, { "ralink,rt3352-eth", RT_CHIPID_RT3050 }, - { "ralink,rt3883-eth", RT_CHIPID_RT3050 }, + { "ralink,rt3883-eth", RT_CHIPID_RT3883 }, { "ralink,rt5350-eth", RT_CHIPID_RT5350 }, { "ralink,mt7620a-eth", RT_CHIPID_MT7620 }, { "mediatek,mt7620-eth", RT_CHIPID_MT7620 }, @@ -355,10 +356,18 @@ rt_attach(device_t dev) struct rt_softc *sc; struct ifnet *ifp; int error, i; +#ifdef FDT + phandle_t node; + char fdtval[32]; +#endif sc = device_get_softc(dev); sc->dev = dev; +#ifdef FDT + node = ofw_bus_get_node(sc->dev); +#endif + mtx_init(&sc->lock, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE); @@ -480,8 +489,16 @@ rt_attach(device_t dev) GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* fwd Other to CPU */ )); - if (sc->rt_chipid == RT_CHIPID_RT2880) - RT_WRITE(sc, MDIO_CFG, MDIO_2880_100T_INIT); +#ifdef FDT + if (sc->rt_chipid == RT_CHIPID_RT2880 || + sc->rt_chipid == RT_CHIPID_RT3883) { + if (OF_getprop(node, "port-mode", fdtval, sizeof(fdtval)) > 0 && + strcmp(fdtval, "gigasw") == 0) + RT_WRITE(sc, MDIO_CFG, MDIO_2880_GIGA_INIT); + else + RT_WRITE(sc, MDIO_CFG, MDIO_2880_100T_INIT); + } +#endif /* allocate Tx and Rx rings */ for (i = 0; i < RT_SOFTC_TX_RING_COUNT; i++) { @@ -2912,7 +2929,7 @@ rtmdio_probe(device_t dev) if (!ofw_bus_is_compatible(dev, "ralink,rt2880-mdio")) return (ENXIO); - device_set_desc(dev, "FV built-in ethernet interface, MDIO controller"); + device_set_desc(dev, "RT built-in ethernet interface, MDIO controller"); return(0); } From owner-svn-src-head@freebsd.org Fri Mar 6 09:59:09 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4420B264556; Fri, 6 Mar 2020 09:59:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Yjkh5d5wz4Cw7; Fri, 6 Mar 2020 09:59:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53F2E1E5AC; Fri, 6 Mar 2020 09:59:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0269x8IW047557; Fri, 6 Mar 2020 09:59:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0269x8Za047556; Fri, 6 Mar 2020 09:59:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003060959.0269x8Za047556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 09:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358694 - head/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 358694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 09:59:09 -0000 Author: hselasky Date: Fri Mar 6 09:59:07 2020 New Revision: 358694 URL: https://svnweb.freebsd.org/changeset/base/358694 Log: Fix some whitespace issues in ipoib. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Fri Mar 6 08:50:18 2020 (r358693) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Fri Mar 6 09:59:07 2020 (r358694) @@ -1760,12 +1760,12 @@ module_exit(ipoib_cleanup_module); static int ipoib_evhand(module_t mod, int event, void *arg) { - return (0); + return (0); } static moduledata_t ipoib_mod = { - .name = "ipoib", - .evhand = ipoib_evhand, + .name = "ipoib", + .evhand = ipoib_evhand, }; DECLARE_MODULE(ipoib, ipoib_mod, SI_SUB_LAST, SI_ORDER_ANY); From owner-svn-src-head@freebsd.org Fri Mar 6 11:26:17 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99EC6265B38; Fri, 6 Mar 2020 11:26:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YlgF2dJWz4cYS; Fri, 6 Mar 2020 11:26:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED0A91F5CD; Fri, 6 Mar 2020 11:26:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026BQG2X001805; Fri, 6 Mar 2020 11:26:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026BQGNg001804; Fri, 6 Mar 2020 11:26:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003061126.026BQGNg001804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 11:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358695 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 11:26:17 -0000 Author: hselasky Date: Fri Mar 6 11:26:16 2020 New Revision: 358695 URL: https://svnweb.freebsd.org/changeset/base/358695 Log: Define more subsystem orders. Intended for use with module_init_order() in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/sys/kernel.h Modified: head/sys/sys/kernel.h ============================================================================== --- head/sys/sys/kernel.h Fri Mar 6 09:59:07 2020 (r358694) +++ head/sys/sys/kernel.h Fri Mar 6 11:26:16 2020 (r358695) @@ -183,6 +183,10 @@ enum sysinit_elem_order { SI_ORDER_SECOND = 0x0000001, /* second*/ SI_ORDER_THIRD = 0x0000002, /* third*/ SI_ORDER_FOURTH = 0x0000003, /* fourth*/ + SI_ORDER_FIFTH = 0x0000004, /* fifth*/ + SI_ORDER_SIXTH = 0x0000005, /* sixth*/ + SI_ORDER_SEVENTH = 0x0000006, /* seventh*/ + SI_ORDER_EIGHTH = 0x0000007, /* eighth*/ SI_ORDER_MIDDLE = 0x1000000, /* somewhere in the middle */ SI_ORDER_ANY = 0xfffffff /* last*/ }; From owner-svn-src-head@freebsd.org Fri Mar 6 12:37:05 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CE1C267D52; Fri, 6 Mar 2020 12:37:05 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YnDx2NFjz4BJk; Fri, 6 Mar 2020 12:37:05 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B57D202CA; Fri, 6 Mar 2020 12:37:05 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026Cb5os043978; Fri, 6 Mar 2020 12:37:05 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026Cb4rj043977; Fri, 6 Mar 2020 12:37:04 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202003061237.026Cb4rj043977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Fri, 6 Mar 2020 12:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358698 - head/sys/dev/ixl X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/dev/ixl X-SVN-Commit-Revision: 358698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 12:37:05 -0000 Author: luporl Date: Fri Mar 6 12:37:04 2020 New Revision: 358698 URL: https://svnweb.freebsd.org/changeset/base/358698 Log: ixl: Add missing conversions from/to LE16 This fixes some errors on PPC64, during attach and when trying to assign an IP to an interface. With this change, basic operation of X710 NICs is now possible. This also fixes builds with IXL_DEBUG enabled Reviewed by: erj Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D23975 Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/ixl_pf_main.c Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Fri Mar 6 12:02:42 2020 (r358697) +++ head/sys/dev/ixl/if_ixl.c Fri Mar 6 12:37:04 2020 (r358698) @@ -398,11 +398,11 @@ ixl_if_attach_pre(if_ctx_t ctx) enum i40e_status_code status; int error = 0; - INIT_DBG_DEV(dev, "begin"); - dev = iflib_get_dev(ctx); pf = iflib_get_softc(ctx); + INIT_DBG_DEV(dev, "begin"); + vsi = &pf->vsi; vsi->back = pf; pf->dev = dev; @@ -588,10 +588,11 @@ ixl_if_attach_post(if_ctx_t ctx) int error = 0; enum i40e_status_code status; - INIT_DBG_DEV(dev, "begin"); - dev = iflib_get_dev(ctx); pf = iflib_get_softc(ctx); + + INIT_DBG_DEV(dev, "begin"); + vsi = &pf->vsi; vsi->ifp = iflib_get_ifp(ctx); hw = &pf->hw; Modified: head/sys/dev/ixl/ixl_pf_main.c ============================================================================== --- head/sys/dev/ixl/ixl_pf_main.c Fri Mar 6 12:02:42 2020 (r358697) +++ head/sys/dev/ixl/ixl_pf_main.c Fri Mar 6 12:37:04 2020 (r358698) @@ -1123,20 +1123,22 @@ ixl_switch_config(struct ixl_pf *pf) if (pf->dbg_mask & IXL_DBG_SWITCH_INFO) { device_printf(dev, "Switch config: header reported: %d in structure, %d total\n", - sw_config->header.num_reported, sw_config->header.num_total); - for (int i = 0; i < sw_config->header.num_reported; i++) { + LE16_TO_CPU(sw_config->header.num_reported), + LE16_TO_CPU(sw_config->header.num_total)); + for (int i = 0; + i < LE16_TO_CPU(sw_config->header.num_reported); i++) { device_printf(dev, "-> %d: type=%d seid=%d uplink=%d downlink=%d\n", i, sw_config->element[i].element_type, - sw_config->element[i].seid, - sw_config->element[i].uplink_seid, - sw_config->element[i].downlink_seid); + LE16_TO_CPU(sw_config->element[i].seid), + LE16_TO_CPU(sw_config->element[i].uplink_seid), + LE16_TO_CPU(sw_config->element[i].downlink_seid)); } } /* Simplified due to a single VSI */ - vsi->uplink_seid = sw_config->element[0].uplink_seid; - vsi->downlink_seid = sw_config->element[0].downlink_seid; - vsi->seid = sw_config->element[0].seid; + vsi->uplink_seid = LE16_TO_CPU(sw_config->element[0].uplink_seid); + vsi->downlink_seid = LE16_TO_CPU(sw_config->element[0].downlink_seid); + vsi->seid = LE16_TO_CPU(sw_config->element[0].seid); return (ret); } @@ -2058,12 +2060,14 @@ ixl_add_hw_filters(struct ixl_vsi *vsi, int flags, int bcopy(f->macaddr, b->mac_addr, ETHER_ADDR_LEN); if (f->vlan == IXL_VLAN_ANY) { b->vlan_tag = 0; - b->flags = I40E_AQC_MACVLAN_ADD_IGNORE_VLAN; + b->flags = CPU_TO_LE16( + I40E_AQC_MACVLAN_ADD_IGNORE_VLAN); } else { - b->vlan_tag = f->vlan; + b->vlan_tag = CPU_TO_LE16(f->vlan); b->flags = 0; } - b->flags |= I40E_AQC_MACVLAN_ADD_PERFECT_MATCH; + b->flags |= CPU_TO_LE16( + I40E_AQC_MACVLAN_ADD_PERFECT_MATCH); f->flags &= ~IXL_FILTER_ADD; j++; From owner-svn-src-head@freebsd.org Fri Mar 6 14:46:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2DA5326A055; Fri, 6 Mar 2020 14:46:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Yr6g3VMcz461x; Fri, 6 Mar 2020 14:46:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E75221AB7; Fri, 6 Mar 2020 14:46:51 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026EkoJ2022625; Fri, 6 Mar 2020 14:46:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026EkoVH022624; Fri, 6 Mar 2020 14:46:50 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003061446.026EkoVH022624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 6 Mar 2020 14:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358703 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 358703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 14:46:52 -0000 Author: andrew Date: Fri Mar 6 14:46:50 2020 New Revision: 358703 URL: https://svnweb.freebsd.org/changeset/base/358703 Log: Update the hypervisor registers - Add more registers needed by bhyve [1] - Move EL2 registers from armreg.h to hypervisor.h - Add the register name to hypervisor.h Obtained from: https://github.com/FreeBSD-UPB/freebsd [1] Modified: head/sys/arm64/include/armreg.h head/sys/arm64/include/hypervisor.h Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Fri Mar 6 14:43:13 2020 (r358702) +++ head/sys/arm64/include/armreg.h Fri Mar 6 14:46:50 2020 (r358703) @@ -66,13 +66,6 @@ #define UL(x) UINT64_C(x) -/* CNTHCTL_EL2 - Counter-timer Hypervisor Control register */ -#define CNTHCTL_EVNTI_MASK (0xf << 4) /* Bit to trigger event stream */ -#define CNTHCTL_EVNTDIR (1 << 3) /* Control transition trigger bit */ -#define CNTHCTL_EVNTEN (1 << 2) /* Enable event stream */ -#define CNTHCTL_EL1PCEN (1 << 1) /* Allow EL0/1 physical timer access */ -#define CNTHCTL_EL1PCTEN (1 << 0) /*Allow EL0/1 physical counter access*/ - /* CPACR_EL1 */ #define CPACR_FPEN_MASK (0x3 << 20) #define CPACR_FPEN_TRAP_ALL1 (0x0 << 20) /* Traps from EL0 and EL1 */ @@ -219,10 +212,6 @@ /* ICC_SRE_EL1 */ #define ICC_SRE_EL1_SRE (1U << 0) - -/* ICC_SRE_EL2 */ -#define ICC_SRE_EL2_SRE (1U << 0) -#define ICC_SRE_EL2_EN (1U << 3) /* ID_AA64DFR0_EL1 */ #define ID_AA64DFR0_EL1 MRS_REG(3, 0, 0, 5, 0) Modified: head/sys/arm64/include/hypervisor.h ============================================================================== --- head/sys/arm64/include/hypervisor.h Fri Mar 6 14:43:13 2020 (r358702) +++ head/sys/arm64/include/hypervisor.h Fri Mar 6 14:46:50 2020 (r358703) @@ -34,19 +34,21 @@ * e.g. specific to EL2, or controlling the hypervisor. */ -/* - * Architecture feature trap register - */ +/* CNTHCTL_EL2 - Counter-timer Hypervisor Control register */ +#define CNTHCTL_EVNTI_MASK (0xf << 4) /* Bit to trigger event stream */ +#define CNTHCTL_EVNTDIR (1 << 3) /* Control transition trigger bit */ +#define CNTHCTL_EVNTEN (1 << 2) /* Enable event stream */ +#define CNTHCTL_EL1PCEN (1 << 1) /* Allow EL0/1 physical timer access */ +#define CNTHCTL_EL1PCTEN (1 << 0) /*Allow EL0/1 physical counter access*/ + +/* CPTR_EL2 - Architecture feature trap register */ #define CPTR_RES0 0x7fefc800 #define CPTR_RES1 0x000033ff #define CPTR_TFP 0x00000400 #define CPTR_TTA 0x00100000 #define CPTR_TCPAC 0x80000000 -/* - * Hypervisor Config Register - */ - +/* HCR_EL2 - Hypervisor Config Register */ #define HCR_VM 0x0000000000000001 #define HCR_SWIO 0x0000000000000002 #define HCR_PTW 0x0000000000000004 @@ -58,6 +60,9 @@ #define HCR_VSE 0x0000000000000100 #define HCR_FB 0x0000000000000200 #define HCR_BSU_MASK 0x0000000000000c00 +#define HCR_BSU_IS 0x0000000000000400 +#define HCR_BSU_OS 0x0000000000000800 +#define HCR_BSU_FS 0x0000000000000c00 #define HCR_DC 0x0000000000001000 #define HCR_TWI 0x0000000000002000 #define HCR_TWE 0x0000000000004000 @@ -69,7 +74,7 @@ #define HCR_TIDCP 0x0000000000100000 #define HCR_TACR 0x0000000000200000 #define HCR_TSW 0x0000000000400000 -#define HCR_TPC 0x0000000000800000 +#define HCR_TPCP 0x0000000000800000 #define HCR_TPU 0x0000000001000000 #define HCR_TTLB 0x0000000002000000 #define HCR_TVM 0x0000000004000000 @@ -92,5 +97,89 @@ #define HCR_NV1 0x0000080000000000 #define HCR_AT 0x0000100000000000 -#endif +/* HPFAR_EL2 - Hypervisor IPA Fault Address Register */ +#define HPFAR_EL2_FIPA_SHIFT 4 +#define HPFAR_EL2_FIPA_MASK 0xfffffffff0 +/* ICC_SRE_EL2 */ +#define ICC_SRE_EL2_SRE (1U << 0) +#define ICC_SRE_EL2_EN (1U << 3) + +/* SCTLR_EL2 - System Control Register */ +#define SCTLR_EL2_RES1 0x30c50830 +#define SCTLR_EL2_M_SHIFT 0 +#define SCTLR_EL2_M (0x1 << SCTLR_EL2_M_SHIFT) +#define SCTLR_EL2_A_SHIFT 1 +#define SCTLR_EL2_A (0x1 << SCTLR_EL2_A_SHIFT) +#define SCTLR_EL2_C_SHIFT 2 +#define SCTLR_EL2_C (0x1 << SCTLR_EL2_C_SHIFT) +#define SCTLR_EL2_SA_SHIFT 3 +#define SCTLR_EL2_SA (0x1 << SCTLR_EL2_SA_SHIFT) +#define SCTLR_EL2_I_SHIFT 12 +#define SCTLR_EL2_I (0x1 << SCTLR_EL2_I_SHIFT) +#define SCTLR_EL2_WXN_SHIFT 19 +#define SCTLR_EL2_WXN (0x1 << SCTLR_EL2_WXN_SHIFT) +#define SCTLR_EL2_EE_SHIFT 25 +#define SCTLR_EL2_EE (0x1 << SCTLR_EL2_EE_SHIFT) + +/* TCR_EL2 - Translation Control Register */ +#define TCR_EL2_RES1 ((0x1UL << 31) | (0x1UL << 23)) +#define TCR_EL2_T0SZ_SHIFT 0 +#define TCR_EL2_T0SZ_MASK (0x3f << TCR_EL2_T0SZ_SHIFT) +#define TCR_EL2_T0SZ(x) ((x) << TCR_EL2_T0SZ_SHIFT) +/* Bits 7:6 are reserved */ +#define TCR_EL2_IRGN0_SHIFT 8 +#define TCR_EL2_IRGN0_MASK (0x3 << TCR_EL2_IRGN0_SHIFT) +#define TCR_EL2_ORGN0_SHIFT 10 +#define TCR_EL2_ORGN0_MASK (0x3 << TCR_EL2_ORGN0_SHIFT) +#define TCR_EL2_SH0_SHIFT 12 +#define TCR_EL2_SH0_MASK (0x3 << TCR_EL2_SH0_SHIFT) +#define TCR_EL2_TG0_SHIFT 14 +#define TCR_EL2_TG0_MASK (0x3 << TCR_EL2_TG0_SHIFT) +#define TCR_EL2_PS_SHIFT 16 +#define TCR_EL2_PS_32BITS (0 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_36BITS (1 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_40BITS (2 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_42BITS (3 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_44BITS (4 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_48BITS (5 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_52BITS (6 << TCR_EL2_PS_SHIFT) /* ARMv8.2-LPA */ + +/* VMPDIR_EL2 - Virtualization Multiprocessor ID Register */ +#define VMPIDR_EL2_U 0x0000000040000000 +#define VMPIDR_EL2_MT 0x0000000001000000 +#define VMPIDR_EL2_RES1 0x0000000080000000 + +/* VTCR_EL2 - Virtualization Translation Control Register */ +#define VTCR_EL2_RES1 (0x1 << 31) +#define VTCR_EL2_T0SZ_MASK 0x3f +#define VTCR_EL2_SL0_SHIFT 6 +#define VTCR_EL2_SL0_4K_LVL2 (0x0 << VTCR_EL2_SL0_SHIFT) +#define VTCR_EL2_SL0_4K_LVL1 (0x1 << VTCR_EL2_SL0_SHIFT) +#define VTCR_EL2_SL0_4K_LVL0 (0x2 << VTCR_EL2_SL0_SHIFT) +#define VTCR_EL2_IRGN0_SHIFT 8 +#define VTCR_EL2_IRGN0_WBWA (0x1 << VTCR_EL2_IRGN0_SHIFT) +#define VTCR_EL2_ORGN0_SHIFT 10 +#define VTCR_EL2_ORGN0_WBWA (0x1 << VTCR_EL2_ORGN0_SHIFT) +#define VTCR_EL2_SH0_SHIFT 12 +#define VTCR_EL2_SH0_NS (0x0 << VTCR_EL2_SH0_SHIFT) +#define VTCR_EL2_SH0_OS (0x2 << VTCR_EL2_SH0_SHIFT) +#define VTCR_EL2_SH0_IS (0x3 << VTCR_EL2_SH0_SHIFT) +#define VTCR_EL2_TG0_SHIFT 14 +#define VTCR_EL2_TG0_4K (0x0 << VTCR_EL2_TG0_SHIFT) +#define VTCR_EL2_TG0_64K (0x1 << VTCR_EL2_TG0_SHIFT) +#define VTCR_EL2_TG0_16K (0x2 << VTCR_EL2_TG0_SHIFT) +#define VTCR_EL2_PS_SHIFT 16 +#define VTCR_EL2_PS_32BIT (0x0 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_36BIT (0x1 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_40BIT (0x2 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_42BIT (0x3 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_44BIT (0x4 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_48BIT (0x5 << VTCR_EL2_PS_SHIFT) + +/* VTTBR_EL2 - Virtualization Translation Table Base Register */ +#define VTTBR_VMID_MASK 0xffff000000000000 +#define VTTBR_VMID_SHIFT 48 +#define VTTBR_HOST 0x0000000000000000 + +#endif /* !_MACHINE_HYPERVISOR_H_ */ From owner-svn-src-head@freebsd.org Fri Mar 6 15:26:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7872326AAC5; Fri, 6 Mar 2020 15:26:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Ys080tB0z4YjL; Fri, 6 Mar 2020 15:26:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAF09222A1; Fri, 6 Mar 2020 15:26:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026FQFtD046427; Fri, 6 Mar 2020 15:26:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026FQFBN046426; Fri, 6 Mar 2020 15:26:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003061526.026FQFBN046426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 6 Mar 2020 15:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358706 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 15:26:16 -0000 Author: emaste Date: Fri Mar 6 15:26:15 2020 New Revision: 358706 URL: https://svnweb.freebsd.org/changeset/base/358706 Log: readelf: add XEN_ELFNOTE_PHYS32_ENTRY note See r336469 for details. Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 14:56:47 2020 (r358705) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 15:26:15 2020 (r358706) @@ -1283,6 +1283,7 @@ note_type_xen(unsigned int nt) case 15: return "XEN_ELFNOTE_INIT_P2M"; case 16: return "XEN_ELFNOTE_MOD_START_PFN"; case 17: return "XEN_ELFNOTE_SUPPORTED_FEATURES"; + case 18: return "XEN_ELFNOTE_PHYS32_ENTRY"; default: return (note_type_unknown(nt)); } } From owner-svn-src-head@freebsd.org Fri Mar 6 15:58:53 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99C4D26B291; Fri, 6 Mar 2020 15:58:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Ysjn2FtPz3yk5; Fri, 6 Mar 2020 15:58:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D3172287E; Fri, 6 Mar 2020 15:58:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026FwqKJ064420; Fri, 6 Mar 2020 15:58:52 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026FwqlB064419; Fri, 6 Mar 2020 15:58:52 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003061558.026FwqlB064419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 6 Mar 2020 15:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358708 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 15:58:53 -0000 Author: emaste Date: Fri Mar 6 15:58:52 2020 New Revision: 358708 URL: https://svnweb.freebsd.org/changeset/base/358708 Log: readelf: decode and print Xen ELF note strings Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 15:57:21 2020 (r358707) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 15:58:52 2020 (r358708) @@ -3677,6 +3677,33 @@ static struct flag_desc note_feature_ctl_flags[] = { }; static void +dump_note_string(const char *description, const char *s, size_t len) +{ + size_t i; + int printable = 1; + + if (len == 0 || s[--len] != '\0') { + printable = 0; + } else { + for (i = 0; i < len; i++) { + if (!isprint(s[i])) { + printable = 0; + break; + } + } + } + + if (printable) { + printf(" %s: %s\n", description, s); + } else { + printf(" description data:"); + for (i = 0; i < len; i++) + printf(" %02x", (unsigned char)s[i]); + printf("\n"); + } +} + +static void dump_notes_data(struct readelf *re, const char *name, uint32_t type, const char *buf, size_t sz) { @@ -3714,6 +3741,30 @@ dump_notes_data(struct readelf *re, const char *name, switch (type) { case NT_GNU_PROPERTY_TYPE_0: dump_gnu_property_type_0(re, buf, sz); + return; + } + } else if (strcmp(name, "Xen") == 0) { + switch (type) { + case 5: + dump_note_string("Xen version", buf, sz); + return; + case 6: + dump_note_string("Guest OS", buf, sz); + return; + case 7: + dump_note_string("Guest version", buf, sz); + return; + case 8: + dump_note_string("Loader", buf, sz); + return; + case 9: + dump_note_string("PAE mode", buf, sz); + return; + case 10: + dump_note_string("Features", buf, sz); + return; + case 11: + dump_note_string("BSD symtab", buf, sz); return; } } From owner-svn-src-head@freebsd.org Fri Mar 6 16:00:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7304626B32A; Fri, 6 Mar 2020 16:00:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Yslm2Qp9z42Py; Fri, 6 Mar 2020 16:00:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E93D22887; Fri, 6 Mar 2020 16:00:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026G0ad2065436; Fri, 6 Mar 2020 16:00:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026G0aqC065435; Fri, 6 Mar 2020 16:00:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003061600.026G0aqC065435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 6 Mar 2020 16:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358709 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 358709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 16:00:36 -0000 Author: andrew Date: Fri Mar 6 16:00:35 2020 New Revision: 358709 URL: https://svnweb.freebsd.org/changeset/base/358709 Log: Add more are64 special register fields Obtained from: https://github.com/FreeBSD-UPB/freebsd Modified: head/sys/arm64/include/armreg.h Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Fri Mar 6 15:58:52 2020 (r358708) +++ head/sys/arm64/include/armreg.h Fri Mar 6 16:00:35 2020 (r358709) @@ -66,6 +66,18 @@ #define UL(x) UINT64_C(x) +/* CNTHCTL_EL2 - Counter-timer Hypervisor Control register */ +#define CNTHCTL_EVNTI_MASK (0xf << 4) /* Bit to trigger event stream */ +#define CNTHCTL_EVNTDIR (1 << 3) /* Control transition trigger bit */ +#define CNTHCTL_EVNTEN (1 << 2) /* Enable event stream */ +#define CNTHCTL_EL1PCEN (1 << 1) /* Allow EL0/1 physical timer access */ +#define CNTHCTL_EL1PCTEN (1 << 0) /*Allow EL0/1 physical counter access*/ + +/* CNTP_CTL_EL0 - Counter-timer Physical Timer Control register */ +#define CNTP_CTL_ENABLE (1 << 0) +#define CNTP_CTL_IMASK (1 << 1) +#define CNTP_CTL_ISTATUS (1 << 2) + /* CPACR_EL1 */ #define CPACR_FPEN_MASK (0x3 << 20) #define CPACR_FPEN_TRAP_ALL1 (0x0 << 20) /* Traps from EL0 and EL1 */ @@ -122,22 +134,53 @@ #define DCZID_BS_SIZE(reg) (((reg) & DCZID_BS_MASK) >> DCZID_BS_SHIFT) /* ESR_ELx */ -#define ESR_ELx_ISS_MASK 0x00ffffff +#define ESR_ELx_ISS_MASK 0x01ffffff #define ISS_INSN_FnV (0x01 << 10) #define ISS_INSN_EA (0x01 << 9) #define ISS_INSN_S1PTW (0x01 << 7) #define ISS_INSN_IFSC_MASK (0x1f << 0) -#define ISS_DATA_ISV (0x01 << 24) -#define ISS_DATA_SAS_MASK (0x03 << 22) -#define ISS_DATA_SSE (0x01 << 21) -#define ISS_DATA_SRT_MASK (0x1f << 16) + +#define ISS_MSR_DIR_SHIFT 0 +#define ISS_MSR_DIR (0x01 << ISS_MSR_DIR_SHIFT) +#define ISS_MSR_Rt_SHIFT 5 +#define ISS_MSR_Rt_MASK (0x1f << ISS_MSR_Rt_SHIFT) +#define ISS_MSR_Rt(x) (((x) & ISS_MSR_Rt_MASK) >> ISS_MSR_Rt_SHIFT) +#define ISS_MSR_CRm_SHIFT 1 +#define ISS_MSR_CRm_MASK (0xf << ISS_MSR_CRm_SHIFT) +#define ISS_MSR_CRm(x) (((x) & ISS_MSR_CRm_MASK) >> ISS_MSR_CRm_SHIFT) +#define ISS_MSR_CRn_SHIFT 10 +#define ISS_MSR_CRn_MASK (0xf << ISS_MSR_CRn_SHIFT) +#define ISS_MSR_CRn(x) (((x) & ISS_MSR_CRn_MASK) >> ISS_MSR_CRn_SHIFT) +#define ISS_MSR_OP1_SHIFT 14 +#define ISS_MSR_OP1_MASK (0x7 << ISS_MSR_OP1_SHIFT) +#define ISS_MSR_OP1(x) (((x) & ISS_MSR_OP1_MASK) >> ISS_MSR_OP1_SHIFT) +#define ISS_MSR_OP2_SHIFT 17 +#define ISS_MSR_OP2_MASK (0x7 << ISS_MSR_OP2_SHIFT) +#define ISS_MSR_OP2(x) (((x) & ISS_MSR_OP2_MASK) >> ISS_MSR_OP2_SHIFT) +#define ISS_MSR_OP0_SHIFT 20 +#define ISS_MSR_OP0_MASK (0x3 << ISS_MSR_OP0_SHIFT) +#define ISS_MSR_OP0(x) (((x) & ISS_MSR_OP0_MASK) >> ISS_MSR_OP0_SHIFT) +#define ISS_MSR_REG_MASK \ + (ISS_MSR_OP0_MASK | ISS_MSR_OP2_MASK | ISS_MSR_OP1_MASK | \ + ISS_MSR_CRn_MASK | ISS_MSR_CRm_MASK) + + +#define ISS_DATA_ISV_SHIFT 24 +#define ISS_DATA_ISV (0x01 << ISS_DATA_ISV_SHIFT) +#define ISS_DATA_SAS_SHIFT 22 +#define ISS_DATA_SAS_MASK (0x03 << ISS_DATA_SAS_SHIFT) +#define ISS_DATA_SSE_SHIFT 21 +#define ISS_DATA_SSE (0x01 << ISS_DATA_SSE_SHIFT) +#define ISS_DATA_SRT_SHIFT 16 +#define ISS_DATA_SRT_MASK (0x1f << ISS_DATA_SRT_SHIFT) #define ISS_DATA_SF (0x01 << 15) #define ISS_DATA_AR (0x01 << 14) #define ISS_DATA_FnV (0x01 << 10) #define ISS_DATA_EA (0x01 << 9) #define ISS_DATA_CM (0x01 << 8) #define ISS_DATA_S1PTW (0x01 << 7) -#define ISS_DATA_WnR (0x01 << 6) +#define ISS_DATA_WnR_SHIFT 6 +#define ISS_DATA_WnR (0x01 << ISS_DATA_WnR_SHIFT) #define ISS_DATA_DFSC_MASK (0x3f << 0) #define ISS_DATA_DFSC_ASF_L0 (0x00 << 0) #define ISS_DATA_DFSC_ASF_L1 (0x01 << 0) @@ -170,10 +213,12 @@ #define ESR_ELx_EC_MASK (0x3f << 26) #define ESR_ELx_EXCEPTION(esr) (((esr) & ESR_ELx_EC_MASK) >> ESR_ELx_EC_SHIFT) #define EXCP_UNKNOWN 0x00 /* Unkwn exception */ +#define EXCP_TRAP_WFI_WFE 0x01 /* Trapped WFI or WFE */ #define EXCP_FP_SIMD 0x07 /* VFP/SIMD trap */ #define EXCP_ILL_STATE 0x0e /* Illegal execution state */ #define EXCP_SVC32 0x11 /* SVC trap for AArch32 */ #define EXCP_SVC64 0x15 /* SVC trap for AArch64 */ +#define EXCP_HVC 0x16 /* HVC trap */ #define EXCP_MSR 0x18 /* MSR/MRS trap */ #define EXCP_INSN_ABORT_L 0x20 /* Instruction abort, from lower EL */ #define EXCP_INSN_ABORT 0x21 /* Instruction abort, from same EL */ @@ -714,6 +759,8 @@ #define TCR_TG1_4K (2 << TCR_TG1_SHIFT) #define TCR_TG1_64K (3 << TCR_TG1_SHIFT) +#define TCR_TG0_MASK 0x000000000000c000 + #define TCR_SH1_SHIFT 28 #define TCR_SH1_IS (0x3UL << TCR_SH1_SHIFT) #define TCR_ORGN1_SHIFT 26 @@ -740,6 +787,7 @@ #define TCR_T1SZ_SHIFT 16 #define TCR_T0SZ_SHIFT 0 +#define TCR_T0SZ_MASK 0x3f #define TCR_T1SZ(x) ((x) << TCR_T1SZ_SHIFT) #define TCR_T0SZ(x) ((x) << TCR_T0SZ_SHIFT) #define TCR_TxSZ(x) (TCR_T1SZ(x) | TCR_T0SZ(x)) From owner-svn-src-head@freebsd.org Fri Mar 6 17:02:16 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF56226C324; Fri, 6 Mar 2020 17:02:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Yv6w1X4Mz4WnM; Fri, 6 Mar 2020 17:02:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16DBA233F1; Fri, 6 Mar 2020 17:02:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026H2F5X005891; Fri, 6 Mar 2020 17:02:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026H2EGD005883; Fri, 6 Mar 2020 17:02:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003061702.026H2EGD005883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 6 Mar 2020 17:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358711 - in head/contrib/llvm-project/clang: include/clang/Basic lib/CodeGen lib/Sema X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/contrib/llvm-project/clang: include/clang/Basic lib/CodeGen lib/Sema X-SVN-Commit-Revision: 358711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 17:02:16 -0000 Author: dim Date: Fri Mar 6 17:02:14 2020 New Revision: 358711 URL: https://svnweb.freebsd.org/changeset/base/358711 Log: Merge commit f75939599 from llvm git (by Erich Keane): Reland r374450 with Richard Smith's comments and test fixed. The behavior from the original patch has changed, since we're no longer allowing LLVM to just ignore the alignment. Instead, we're just assuming the maximum possible alignment. Differential Revision: https://reviews.llvm.org/D68824 llvm-svn: 374562 This fixes 'Assertion failed: (Alignment != 0 && "Invalid Alignment"), function CreateAlignmentAssumption', when building recent versions of v8, which invoke __builtin_assume_aligned() with its alignment argument set to 4GiB or more. Clang will now report a warning, and show the maximum possible alignment instead, e.g.: huge-align.cpp:1:27: warning: requested alignment must be 536870912 bytes or smaller; maximum alignment assumed [-Wbuiltin-assume-aligned-alignment] void *f(void *g) { return __builtin_assume_aligned(g, 4294967296); } ^ ~~~~~~~~~~ Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=43839 Reported by: cem MFC after: 3 days Modified: head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp Modified: head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td Fri Mar 6 17:02:14 2020 (r358711) @@ -2797,6 +2797,10 @@ def err_alignment_dependent_typedef_name : Error< def err_attribute_aligned_too_great : Error< "requested alignment must be %0 bytes or smaller">; +def warn_assume_aligned_too_great + : Warning<"requested alignment must be %0 bytes or smaller; maximum " + "alignment assumed">, + InGroup>; def warn_redeclaration_without_attribute_prev_attribute_ignored : Warning< "%q0 redeclared without %1 attribute: previous %1 ignored">, InGroup; Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -2026,11 +2026,13 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDe Value *AlignmentValue = EmitScalarExpr(E->getArg(1)); ConstantInt *AlignmentCI = cast(AlignmentValue); - unsigned Alignment = (unsigned)AlignmentCI->getZExtValue(); + if (AlignmentCI->getValue().ugt(llvm::Value::MaximumAlignment)) + AlignmentCI = ConstantInt::get(AlignmentCI->getType(), + llvm::Value::MaximumAlignment); EmitAlignmentAssumption(PtrValue, Ptr, /*The expr loc is sufficient.*/ SourceLocation(), - Alignment, OffsetValue); + AlignmentCI, OffsetValue); return RValue::get(PtrValue); } case Builtin::BI__assume: Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -4548,7 +4548,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo llvm::Value *Alignment = EmitScalarExpr(AA->getAlignment()); llvm::ConstantInt *AlignmentCI = cast(Alignment); EmitAlignmentAssumption(Ret.getScalarVal(), RetTy, Loc, AA->getLocation(), - AlignmentCI->getZExtValue(), OffsetValue); + AlignmentCI, OffsetValue); } else if (const auto *AA = TargetDecl->getAttr()) { llvm::Value *AlignmentVal = CallArgs[AA->getParamIndex().getLLVMIndex()] .getRValue(*this) Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -294,8 +294,7 @@ class ScalarExprEmitter (public) Value *AlignmentValue = CGF.EmitScalarExpr(AVAttr->getAlignment()); llvm::ConstantInt *AlignmentCI = cast(AlignmentValue); - CGF.EmitAlignmentAssumption(V, E, AVAttr->getLocation(), - AlignmentCI->getZExtValue()); + CGF.EmitAlignmentAssumption(V, E, AVAttr->getLocation(), AlignmentCI); } /// EmitLoadOfLValue - Given an expression with complex type that represents a Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -1460,14 +1460,14 @@ static void emitAlignedClause(CodeGenFunction &CGF, if (!CGF.HaveInsertPoint()) return; for (const auto *Clause : D.getClausesOfKind()) { - unsigned ClauseAlignment = 0; + llvm::APInt ClauseAlignment(64, 0); if (const Expr *AlignmentExpr = Clause->getAlignment()) { auto *AlignmentCI = cast(CGF.EmitScalarExpr(AlignmentExpr)); - ClauseAlignment = static_cast(AlignmentCI->getZExtValue()); + ClauseAlignment = AlignmentCI->getValue(); } for (const Expr *E : Clause->varlists()) { - unsigned Alignment = ClauseAlignment; + llvm::APInt Alignment(ClauseAlignment); if (Alignment == 0) { // OpenMP [2.8.1, Description] // If no optional parameter is specified, implementation-defined default @@ -1478,12 +1478,13 @@ static void emitAlignedClause(CodeGenFunction &CGF, E->getType()->getPointeeType())) .getQuantity(); } - assert((Alignment == 0 || llvm::isPowerOf2_32(Alignment)) && + assert((Alignment == 0 || Alignment.isPowerOf2()) && "alignment is not power of 2"); if (Alignment != 0) { llvm::Value *PtrValue = CGF.EmitScalarExpr(E); CGF.EmitAlignmentAssumption( - PtrValue, E, /*No second loc needed*/ SourceLocation(), Alignment); + PtrValue, E, /*No second loc needed*/ SourceLocation(), + llvm::ConstantInt::get(CGF.getLLVMContext(), Alignment)); } } } Modified: head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -2048,24 +2048,9 @@ void CodeGenFunction::EmitAlignmentAssumption(llvm::Va } void CodeGenFunction::EmitAlignmentAssumption(llvm::Value *PtrValue, - QualType Ty, SourceLocation Loc, - SourceLocation AssumptionLoc, - unsigned Alignment, - llvm::Value *OffsetValue) { - llvm::Value *TheCheck; - llvm::Instruction *Assumption = Builder.CreateAlignmentAssumption( - CGM.getDataLayout(), PtrValue, Alignment, OffsetValue, &TheCheck); - if (SanOpts.has(SanitizerKind::Alignment)) { - llvm::Value *AlignmentVal = llvm::ConstantInt::get(IntPtrTy, Alignment); - EmitAlignmentAssumptionCheck(PtrValue, Ty, Loc, AssumptionLoc, AlignmentVal, - OffsetValue, TheCheck, Assumption); - } -} - -void CodeGenFunction::EmitAlignmentAssumption(llvm::Value *PtrValue, const Expr *E, SourceLocation AssumptionLoc, - unsigned Alignment, + llvm::Value *Alignment, llvm::Value *OffsetValue) { if (auto *CE = dyn_cast(E)) E = CE->getSubExprAsWritten(); Modified: head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h Fri Mar 6 17:02:14 2020 (r358711) @@ -2829,13 +2829,8 @@ class CodeGenFunction : public CodeGenTypeCache { (pub llvm::Value *Alignment, llvm::Value *OffsetValue = nullptr); - void EmitAlignmentAssumption(llvm::Value *PtrValue, QualType Ty, - SourceLocation Loc, SourceLocation AssumptionLoc, - unsigned Alignment, - llvm::Value *OffsetValue = nullptr); - void EmitAlignmentAssumption(llvm::Value *PtrValue, const Expr *E, - SourceLocation AssumptionLoc, unsigned Alignment, + SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue = nullptr); //===--------------------------------------------------------------------===// Modified: head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -5961,6 +5961,12 @@ bool Sema::SemaBuiltinAssumeAligned(CallExpr *TheCall) if (!Result.isPowerOf2()) return Diag(TheCall->getBeginLoc(), diag::err_alignment_not_power_of_two) << Arg->getSourceRange(); + + // Alignment calculations can wrap around if it's greater than 2**29. + unsigned MaximumAlignment = 536870912; + if (Result > MaximumAlignment) + Diag(TheCall->getBeginLoc(), diag::warn_assume_aligned_too_great) + << Arg->getSourceRange() << MaximumAlignment; } if (NumArgs > 2) { From owner-svn-src-head@freebsd.org Fri Mar 6 17:24:52 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CE8526CC7C; Fri, 6 Mar 2020 17:24:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Yvd01Y2wz4NXn; Fri, 6 Mar 2020 17:24:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8285238CF; Fri, 6 Mar 2020 17:24:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026HOpAL021598; Fri, 6 Mar 2020 17:24:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026HOp0x021597; Fri, 6 Mar 2020 17:24:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003061724.026HOp0x021597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 6 Mar 2020 17:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358713 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 17:24:52 -0000 Author: emaste Date: Fri Mar 6 17:24:51 2020 New Revision: 358713 URL: https://svnweb.freebsd.org/changeset/base/358713 Log: readelf: print GNU Build-ID Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 17:11:29 2020 (r358712) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 17:24:51 2020 (r358713) @@ -3742,6 +3742,12 @@ dump_notes_data(struct readelf *re, const char *name, case NT_GNU_PROPERTY_TYPE_0: dump_gnu_property_type_0(re, buf, sz); return; + case NT_GNU_BUILD_ID: + printf(" Build ID: "); + for (i = 0; i < sz; i++) + printf("%02x", (unsigned char)buf[i]); + printf("\n"); + return; } } else if (strcmp(name, "Xen") == 0) { switch (type) { From owner-svn-src-head@freebsd.org Fri Mar 6 18:41:39 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5A4E26E434; Fri, 6 Mar 2020 18:41:39 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YxKb39L0z4J3F; Fri, 6 Mar 2020 18:41:39 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B7E524753; Fri, 6 Mar 2020 18:41:39 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026Ifdju068329; Fri, 6 Mar 2020 18:41:39 GMT (envelope-from chs@FreeBSD.org) Received: (from chs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026IfbhP068321; Fri, 6 Mar 2020 18:41:37 GMT (envelope-from chs@FreeBSD.org) Message-Id: <202003061841.026IfbhP068321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chs set sender to chs@FreeBSD.org using -f From: Chuck Silvers Date: Fri, 6 Mar 2020 18:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358714 - in head/sys: conf fs/mntfs kern sys ufs/ffs ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: chs X-SVN-Commit-Paths: in head/sys: conf fs/mntfs kern sys ufs/ffs ufs/ufs X-SVN-Commit-Revision: 358714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 18:41:39 -0000 Author: chs Date: Fri Mar 6 18:41:37 2020 New Revision: 358714 URL: https://svnweb.freebsd.org/changeset/base/358714 Log: Add a new "mntfs" pseudo file system which provides private device vnodes for file systems to safely access their disk devices, and adapt FFS to use it. Also add a new BO_NOBUFS flag to allow enforcing that file systems using mntfs vnodes do not accidentally use the original devfs vnode to create buffers. Reviewed by: kib, mckusick Approved by: imp (mentor) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D23787 Added: head/sys/fs/mntfs/ head/sys/fs/mntfs/mntfs_vnops.c (contents, props changed) Modified: head/sys/conf/files head/sys/kern/vfs_subr.c head/sys/sys/bufobj.h head/sys/sys/mount.h head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufsmount.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/conf/files Fri Mar 6 18:41:37 2020 (r358714) @@ -3479,6 +3479,7 @@ fs/fuse/fuse_main.c optional fusefs fs/fuse/fuse_node.c optional fusefs fs/fuse/fuse_vfsops.c optional fusefs fs/fuse/fuse_vnops.c optional fusefs +fs/mntfs/mntfs_vnops.c standard fs/msdosfs/msdosfs_conv.c optional msdosfs fs/msdosfs/msdosfs_denode.c optional msdosfs fs/msdosfs/msdosfs_fat.c optional msdosfs Added: head/sys/fs/mntfs/mntfs_vnops.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/fs/mntfs/mntfs_vnops.c Fri Mar 6 18:41:37 2020 (r358714) @@ -0,0 +1,95 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Netflix, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include + +/* + * The "mntfs" VCHR vnodes implemented here provide a safe way for file systems + * to access their disk devices. Using the normal devfs vnode has the problem + * that if the device disappears, the devfs vnode is vgone'd as part of + * removing it from the application-visible namespace, and some file systems + * (notably FFS with softdep) get very unhappy if their dirty buffers are + * invalidated out from under them. By using a separate, private vnode, + * file systems are able to clean up their buffer state in a controlled fashion + * when the underlying device disappears. + */ + +static int +mntfs_reclaim(struct vop_reclaim_args *ap) +{ + struct vnode *vp = ap->a_vp; + + dev_rel(vp->v_rdev); + return (0); +} + +struct vop_vector mntfs_vnodeops = { + .vop_default = &default_vnodeops, + + .vop_fsync = vop_stdfsync, + .vop_strategy = VOP_PANIC, + .vop_reclaim = mntfs_reclaim, +}; +VFS_VOP_VECTOR_REGISTER(mntfs_vnodeops); + +/* + * Allocate a private VCHR vnode for use by a mounted fs. + * The underlying device will be the same as for the given vnode. + * This mntfs vnode must be freed with mntfs_freevp() rather than just + * releasing the reference. + */ +struct vnode * +mntfs_allocvp(struct mount *mp, struct vnode *ovp) +{ + struct vnode *vp; + struct cdev *dev; + + ASSERT_VOP_ELOCKED(ovp, __func__); + + dev = ovp->v_rdev; + + getnewvnode("mntfs", mp, &mntfs_vnodeops, &vp); + vp->v_type = VCHR; + vp->v_data = NULL; + dev_ref(dev); + vp->v_rdev = dev; + + return (vp); +} + +void +mntfs_freevp(struct vnode *vp) +{ + + vgone(vp); + vrele(vp); +} Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/kern/vfs_subr.c Fri Mar 6 18:41:37 2020 (r358714) @@ -2289,6 +2289,8 @@ buf_vlist_add(struct buf *bp, struct bufobj *bo, b_xfl int error; ASSERT_BO_WLOCKED(bo); + KASSERT((bo->bo_flag & BO_NOBUFS) == 0, + ("buf_vlist_add: bo %p does not allow bufs", bo)); KASSERT((xflags & BX_VNDIRTY) == 0 || (bo->bo_flag & BO_DEAD) == 0, ("dead bo %p", bo)); KASSERT((bp->b_xflags & (BX_VNDIRTY|BX_VNCLEAN)) == 0, Modified: head/sys/sys/bufobj.h ============================================================================== --- head/sys/sys/bufobj.h Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/sys/bufobj.h Fri Mar 6 18:41:37 2020 (r358714) @@ -117,6 +117,7 @@ struct bufobj { #define BO_ONWORKLST (1 << 0) /* On syncer work-list */ #define BO_WWAIT (1 << 1) /* Wait for output to complete */ #define BO_DEAD (1 << 2) /* Dead; only with INVARIANTS */ +#define BO_NOBUFS (1 << 3) /* No bufs allowed */ #define BO_LOCKPTR(bo) (&(bo)->bo_lock) #define BO_LOCK(bo) rw_wlock(BO_LOCKPTR((bo))) Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/sys/mount.h Fri Mar 6 18:41:37 2020 (r358714) @@ -940,6 +940,8 @@ extern struct sx vfsconf_sx; #define vfsconf_unlock() sx_xunlock(&vfsconf_sx) #define vfsconf_slock() sx_slock(&vfsconf_sx) #define vfsconf_sunlock() sx_sunlock(&vfsconf_sx) +struct vnode *mntfs_allocvp(struct mount *, struct vnode *); +void mntfs_freevp(struct vnode *); /* * Declarations for these vfs default operations are located in Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/ufs/ffs/ffs_alloc.c Fri Mar 6 18:41:37 2020 (r358714) @@ -3594,6 +3594,7 @@ buffered_write(fp, uio, active_cred, flags, td) struct inode *ip; struct buf *bp; struct fs *fs; + struct ufsmount *ump; struct filedesc *fdp; int error; daddr_t lbn; @@ -3622,10 +3623,12 @@ buffered_write(fp, uio, active_cred, flags, td) return (EINVAL); } ip = VTOI(vp); - if (ITODEVVP(ip) != devvp) { + ump = ip->i_ump; + if (ump->um_odevvp != devvp) { vput(vp); return (EINVAL); } + devvp = ump->um_devvp; fs = ITOFS(ip); vput(vp); foffset_lock_uio(fp, uio, flags); Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Mar 6 18:41:37 2020 (r358714) @@ -151,7 +151,7 @@ static const char *ffs_opts[] = { "acls", "async", "no static int ffs_mount(struct mount *mp) { - struct vnode *devvp; + struct vnode *devvp, *odevvp; struct thread *td; struct ufsmount *ump = NULL; struct fs *fs; @@ -246,6 +246,7 @@ ffs_mount(struct mount *mp) if (mp->mnt_flag & MNT_UPDATE) { ump = VFSTOUFS(mp); fs = ump->um_fs; + odevvp = ump->um_odevvp; devvp = ump->um_devvp; if (fsckpid == -1 && ump->um_fsckpid > 0) { if ((error = ffs_flushfiles(mp, WRITECLOSE, td)) != 0 || @@ -337,16 +338,15 @@ ffs_mount(struct mount *mp) * If upgrade to read-write by non-root, then verify * that user has necessary permissions on the device. */ - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); - error = VOP_ACCESS(devvp, VREAD | VWRITE, + vn_lock(odevvp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_ACCESS(odevvp, VREAD | VWRITE, td->td_ucred, td); if (error) error = priv_check(td, PRIV_VFS_MOUNT_PERM); + VOP_UNLOCK(odevvp); if (error) { - VOP_UNLOCK(devvp); return (error); } - VOP_UNLOCK(devvp); fs->fs_flags &= ~FS_UNCLEAN; if (fs->fs_clean == 0) { fs->fs_flags |= FS_UNCLEAN; @@ -782,8 +782,8 @@ loop: * Common code for mount and mountroot */ static int -ffs_mountfs(devvp, mp, td) - struct vnode *devvp; +ffs_mountfs(odevvp, mp, td) + struct vnode *odevvp; struct mount *mp; struct thread *td; { @@ -794,6 +794,7 @@ ffs_mountfs(devvp, mp, td) struct ucred *cred; struct g_consumer *cp; struct mount *nmp; + struct vnode *devvp; int candelete, canspeedup; off_t loc; @@ -802,11 +803,13 @@ ffs_mountfs(devvp, mp, td) cred = td ? td->td_ucred : NOCRED; ronly = (mp->mnt_flag & MNT_RDONLY) != 0; + devvp = mntfs_allocvp(mp, odevvp); + VOP_UNLOCK(odevvp); KASSERT(devvp->v_type == VCHR, ("reclaimed devvp")); dev = devvp->v_rdev; if (atomic_cmpset_acq_ptr((uintptr_t *)&dev->si_mountpt, 0, (uintptr_t)mp) == 0) { - VOP_UNLOCK(devvp); + mntfs_freevp(devvp); return (EBUSY); } g_topology_lock(); @@ -814,12 +817,14 @@ ffs_mountfs(devvp, mp, td) g_topology_unlock(); if (error != 0) { atomic_store_rel_ptr((uintptr_t *)&dev->si_mountpt, 0); - VOP_UNLOCK(devvp); + mntfs_freevp(devvp); return (error); } dev_ref(dev); devvp->v_bufobj.bo_ops = &ffs_ops; - VOP_UNLOCK(devvp); + BO_LOCK(&odevvp->v_bufobj); + odevvp->v_bufobj.bo_flag |= BO_NOBUFS; + BO_UNLOCK(&odevvp->v_bufobj); if (dev->si_iosize_max != 0) mp->mnt_iosize_max = dev->si_iosize_max; if (mp->mnt_iosize_max > MAXPHYS) @@ -1020,6 +1025,7 @@ ffs_mountfs(devvp, mp, td) ump->um_mountp = mp; ump->um_dev = dev; ump->um_devvp = devvp; + ump->um_odevvp = odevvp; ump->um_nindir = fs->fs_nindir; ump->um_bptrtodb = fs->fs_fsbtodb; ump->um_seqinc = fs->fs_frag; @@ -1099,7 +1105,11 @@ out: free(ump, M_UFSMNT); mp->mnt_data = NULL; } + BO_LOCK(&odevvp->v_bufobj); + odevvp->v_bufobj.bo_flag &= ~BO_NOBUFS; + BO_UNLOCK(&odevvp->v_bufobj); atomic_store_rel_ptr((uintptr_t *)&dev->si_mountpt, 0); + mntfs_freevp(devvp); dev_rel(dev); return (error); } @@ -1304,8 +1314,12 @@ ffs_unmount(mp, mntflags) } g_vfs_close(ump->um_cp); g_topology_unlock(); + BO_LOCK(&ump->um_odevvp->v_bufobj); + ump->um_odevvp->v_bufobj.bo_flag &= ~BO_NOBUFS; + BO_UNLOCK(&ump->um_odevvp->v_bufobj); atomic_store_rel_ptr((uintptr_t *)&ump->um_dev->si_mountpt, 0); - vrele(ump->um_devvp); + mntfs_freevp(ump->um_devvp); + vrele(ump->um_odevvp); dev_rel(ump->um_dev); mtx_destroy(UFS_MTX(ump)); if (mp->mnt_gjprovider != NULL) { @@ -2293,7 +2307,19 @@ ffs_geom_strategy(struct bufobj *bo, struct buf *bp) struct buf *tbp; int error, nocopy; + /* + * This is the bufobj strategy for the private VCHR vnodes + * used by FFS to access the underlying storage device. + * We override the default bufobj strategy and thus bypass + * VOP_STRATEGY() for these vnodes. + */ vp = bo2vnode(bo); + KASSERT(bp->b_vp == NULL || bp->b_vp->v_type != VCHR || + bp->b_vp->v_rdev == NULL || + bp->b_vp->v_rdev->si_mountpt == NULL || + VFSTOUFS(bp->b_vp->v_rdev->si_mountpt) == NULL || + vp == VFSTOUFS(bp->b_vp->v_rdev->si_mountpt)->um_devvp, + ("ffs_geom_strategy() with wrong vp")); if (bp->b_iocmd == BIO_WRITE) { if ((bp->b_flags & B_VALIDSUSPWRT) == 0 && bp->b_vp != NULL && bp->b_vp->v_mount != NULL && Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/ufs/ufs/ufsmount.h Fri Mar 6 18:41:37 2020 (r358714) @@ -83,7 +83,8 @@ struct ufsmount { struct cdev *um_dev; /* (r) device mounted */ struct g_consumer *um_cp; /* (r) GEOM access point */ struct bufobj *um_bo; /* (r) Buffer cache object */ - struct vnode *um_devvp; /* (r) blk dev mounted vnode */ + struct vnode *um_odevvp; /* (r) devfs dev vnode */ + struct vnode *um_devvp; /* (r) mntfs private vnode */ u_long um_fstype; /* (c) type of filesystem */ struct fs *um_fs; /* (r) pointer to superblock */ struct ufs_extattr_per_mount um_extattr; /* (c) extended attrs */ From owner-svn-src-head@freebsd.org Fri Mar 6 19:09:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92B4526ECBD; Fri, 6 Mar 2020 19:09:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YxxC1pvWz4GD4; Fri, 6 Mar 2020 19:09:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF01C24B8C; Fri, 6 Mar 2020 19:09:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026J92jJ084719; Fri, 6 Mar 2020 19:09:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026J91qp084715; Fri, 6 Mar 2020 19:09:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003061909.026J91qp084715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 6 Mar 2020 19:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358715 - in head: share/man/man9 sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 358715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 19:09:03 -0000 Author: markj Date: Fri Mar 6 19:09:01 2020 New Revision: 358715 URL: https://svnweb.freebsd.org/changeset/base/358715 Log: Add COUNTER_U64_SYSINIT() and COUNTER_U64_DEFINE_EARLY(). The aim is to reduce the boilerplate needed today to define and initialize global counters. Also add SI_SUB_COUNTER to the sysinit ordering. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23977 Modified: head/share/man/man9/counter.9 head/sys/kern/subr_counter.c head/sys/kern/subr_pcpu.c head/sys/sys/counter.h head/sys/sys/kernel.h Modified: head/share/man/man9/counter.9 ============================================================================== --- head/share/man/man9/counter.9 Fri Mar 6 18:41:37 2020 (r358714) +++ head/share/man/man9/counter.9 Fri Mar 6 19:09:01 2020 (r358715) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 22, 2017 +.Dd March 6, 2020 .Dt COUNTER 9 .Os .Sh NAME @@ -53,6 +53,8 @@ .Fn counter_u64_zero "counter_u64_t c" .Ft int64_t .Fn counter_ratecheck "struct counter_rate *cr" "int64_t limit" +.Fn COUNTER_U64_SYSINIT "counter_u64_t c" +.Fn COUNTER_U64_DEFINE_EARLY "counter_u64_t c" .In sys/sysctl.h .Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr .Fn SYSCTL_ADD_COUNTER_U64 ctx parent nbr name access ptr descr @@ -142,6 +144,20 @@ If the limit was reached on previous second, but was j then .Fn counter_ratecheck returns number of events since previous reset. +.It Fn COUNTER_U64_SYSINIT c +Define a +.Xr SYSINIT 9 +initializer for the global counter +.Fa c . +.It Fn COUNTER_U64_DEFINE_EARLY c +Define and initialize a global counter +.Fa c . +It is always safe to increment +.Fa c , +though updates prior to the +.Dv SI_SUB_COUNTER +.Xr SYSINIT 9 +event are lost. .It Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr Declare a static .Xr sysctl 9 @@ -245,6 +261,7 @@ SYSCTL_COUNTER_U64_ARRAY(_debug, OID_AUTO, counter_arr .Xr malloc 9 , .Xr ratecheck 9 , .Xr sysctl 9 , +.Xr SYSINIT 9 , .Xr uma 9 .Sh HISTORY The Modified: head/sys/kern/subr_counter.c ============================================================================== --- head/sys/kern/subr_counter.c Fri Mar 6 18:41:37 2020 (r358714) +++ head/sys/kern/subr_counter.c Fri Mar 6 19:09:01 2020 (r358715) @@ -172,3 +172,21 @@ counter_ratecheck(struct counter_rate *cr, int64_t lim return (val); } + +void +counter_u64_sysinit(void *arg) +{ + counter_u64_t *cp; + + cp = arg; + *cp = counter_u64_alloc(M_WAITOK); +} + +void +counter_u64_sysuninit(void *arg) +{ + counter_u64_t *cp; + + cp = arg; + counter_u64_free(*cp); +} Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Fri Mar 6 18:41:37 2020 (r358714) +++ head/sys/kern/subr_pcpu.c Fri Mar 6 19:09:01 2020 (r358715) @@ -148,7 +148,7 @@ pcpu_zones_startup(void) pcpu_zone_64 = uma_zcreate("64 pcpu", sizeof(uint64_t), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); } -SYSINIT(pcpu_zones, SI_SUB_VM, SI_ORDER_ANY, pcpu_zones_startup, NULL); +SYSINIT(pcpu_zones, SI_SUB_COUNTER, SI_ORDER_FIRST, pcpu_zones_startup, NULL); /* * First-fit extent based allocator for allocating space in the per-cpu Modified: head/sys/sys/counter.h ============================================================================== --- head/sys/sys/counter.h Fri Mar 6 18:41:37 2020 (r358714) +++ head/sys/sys/counter.h Fri Mar 6 19:09:01 2020 (r358715) @@ -74,5 +74,18 @@ struct counter_rate { int64_t counter_ratecheck(struct counter_rate *, int64_t); +#define COUNTER_U64_SYSINIT(c) \ + SYSINIT(c##_counter_sysinit, SI_SUB_COUNTER, \ + SI_ORDER_ANY, counter_u64_sysinit, &c); \ + SYSUNINIT(c##_counter_sysuninit, SI_SUB_COUNTER, \ + SI_ORDER_ANY, counter_u64_sysuninit, &c) + +#define COUNTER_U64_DEFINE_EARLY(c) \ + counter_u64_t __read_mostly c = EARLY_COUNTER; \ + COUNTER_U64_SYSINIT(c) + +void counter_u64_sysinit(void *); +void counter_u64_sysuninit(void *); + #endif /* _KERNEL */ #endif /* ! __SYS_COUNTER_H__ */ Modified: head/sys/sys/kernel.h ============================================================================== --- head/sys/sys/kernel.h Fri Mar 6 18:41:37 2020 (r358714) +++ head/sys/sys/kernel.h Fri Mar 6 19:09:01 2020 (r358715) @@ -91,7 +91,8 @@ enum sysinit_sub_id { SI_SUB_DONE = 0x0000001, /* processed*/ SI_SUB_TUNABLES = 0x0700000, /* establish tunable values */ SI_SUB_COPYRIGHT = 0x0800001, /* first use of console*/ - SI_SUB_VM = 0x1000000, /* virtual memory system init*/ + SI_SUB_VM = 0x1000000, /* virtual memory system init */ + SI_SUB_COUNTER = 0x1100000, /* counter(9) is initialized */ SI_SUB_KMEM = 0x1800000, /* kernel memory*/ SI_SUB_HYPERVISOR = 0x1A40000, /* * Hypervisor detection and From owner-svn-src-head@freebsd.org Fri Mar 6 19:10:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79C2F26ED3E; Fri, 6 Mar 2020 19:10:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YxyL1f2Kz4J6M; Fri, 6 Mar 2020 19:10:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6A9024BA1; Fri, 6 Mar 2020 19:10:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026JA1RP084847; Fri, 6 Mar 2020 19:10:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026JA0J4084842; Fri, 6 Mar 2020 19:10:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003061910.026JA0J4084842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 6 Mar 2020 19:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358716 - in head/sys: kern vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: kern vm X-SVN-Commit-Revision: 358716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 19:10:03 -0000 Author: markj Date: Fri Mar 6 19:10:00 2020 New Revision: 358716 URL: https://svnweb.freebsd.org/changeset/base/358716 Log: Use COUNTER_U64_DEFINE_EARLY() in places where it simplifies things. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23978 Modified: head/sys/kern/subr_smr.c head/sys/kern/vfs_cache.c head/sys/vm/swap_pager.c head/sys/vm/vm_object.c head/sys/vm/vm_page.c head/sys/vm/vm_reserv.c Modified: head/sys/kern/subr_smr.c ============================================================================== --- head/sys/kern/subr_smr.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/kern/subr_smr.c Fri Mar 6 19:10:00 2020 (r358716) @@ -198,15 +198,15 @@ static uma_zone_t smr_zone; static SYSCTL_NODE(_debug, OID_AUTO, smr, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "SMR Stats"); -static counter_u64_t advance = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(advance); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, advance, CTLFLAG_RW, &advance, ""); -static counter_u64_t advance_wait = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(advance_wait); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, advance_wait, CTLFLAG_RW, &advance_wait, ""); -static counter_u64_t poll = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(poll); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, poll, CTLFLAG_RW, &poll, ""); -static counter_u64_t poll_scan = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(poll_scan); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, poll_scan, CTLFLAG_RW, &poll_scan, ""); -static counter_u64_t poll_fail = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(poll_fail); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, poll_fail, CTLFLAG_RW, &poll_fail, ""); /* @@ -631,15 +631,3 @@ smr_init(void) smr_zone = uma_zcreate("SMR CPU", sizeof(struct smr), NULL, NULL, NULL, NULL, (CACHE_LINE_SIZE * 2) - 1, UMA_ZONE_PCPU); } - -static void -smr_init_counters(void *unused) -{ - - advance = counter_u64_alloc(M_WAITOK); - advance_wait = counter_u64_alloc(M_WAITOK); - poll = counter_u64_alloc(M_WAITOK); - poll_scan = counter_u64_alloc(M_WAITOK); - poll_fail = counter_u64_alloc(M_WAITOK); -} -SYSINIT(smr_counters, SI_SUB_CPU, SI_ORDER_ANY, smr_init_counters, NULL); Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/kern/vfs_cache.c Fri Mar 6 19:10:00 2020 (r358716) @@ -345,11 +345,12 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Name cache statistics"); -#define STATNODE_ULONG(name, descr) \ +#define STATNODE_ULONG(name, descr) \ SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, descr); -#define STATNODE_COUNTER(name, descr) \ - static counter_u64_t __read_mostly name; \ - SYSCTL_COUNTER_U64(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, descr); +#define STATNODE_COUNTER(name, descr) \ + static COUNTER_U64_DEFINE_EARLY(name); \ + SYSCTL_COUNTER_U64(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, \ + descr); STATNODE_ULONG(numneg, "Number of negative cache entries"); STATNODE_ULONG(numcache, "Number of cache entries"); STATNODE_COUNTER(numcachehv, "Number of namecache entries with vnodes held"); @@ -1936,26 +1937,6 @@ nchinit(void *dummy __unused) TAILQ_INIT(&ncneg_hot.nl_list); mtx_init(&ncneg_shrink_lock, "ncnegs", NULL, MTX_DEF); - - numcachehv = counter_u64_alloc(M_WAITOK); - numcalls = counter_u64_alloc(M_WAITOK); - dothits = counter_u64_alloc(M_WAITOK); - dotdothits = counter_u64_alloc(M_WAITOK); - numchecks = counter_u64_alloc(M_WAITOK); - nummiss = counter_u64_alloc(M_WAITOK); - nummisszap = counter_u64_alloc(M_WAITOK); - numposzaps = counter_u64_alloc(M_WAITOK); - numposhits = counter_u64_alloc(M_WAITOK); - numnegzaps = counter_u64_alloc(M_WAITOK); - numneghits = counter_u64_alloc(M_WAITOK); - numfullpathcalls = counter_u64_alloc(M_WAITOK); - numfullpathfail1 = counter_u64_alloc(M_WAITOK); - numfullpathfail2 = counter_u64_alloc(M_WAITOK); - numfullpathfail4 = counter_u64_alloc(M_WAITOK); - numfullpathfound = counter_u64_alloc(M_WAITOK); - zap_and_exit_bucket_relock_success = counter_u64_alloc(M_WAITOK); - numneg_evicted = counter_u64_alloc(M_WAITOK); - shrinking_skipped = counter_u64_alloc(M_WAITOK); } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL); Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/vm/swap_pager.c Fri Mar 6 19:10:00 2020 (r358716) @@ -177,12 +177,12 @@ static unsigned long swap_maxpages; SYSCTL_ULONG(_vm, OID_AUTO, swap_maxpages, CTLFLAG_RD, &swap_maxpages, 0, "Maximum amount of swap supported"); -static counter_u64_t swap_free_deferred; +static COUNTER_U64_DEFINE_EARLY(swap_free_deferred); SYSCTL_COUNTER_U64(_vm_stats_swap, OID_AUTO, free_deferred, CTLFLAG_RD, &swap_free_deferred, "Number of pages that deferred freeing swap space"); -static counter_u64_t swap_free_completed; +static COUNTER_U64_DEFINE_EARLY(swap_free_completed); SYSCTL_COUNTER_U64(_vm_stats_swap, OID_AUTO, free_completed, CTLFLAG_RD, &swap_free_completed, "Number of deferred frees completed"); @@ -526,15 +526,6 @@ swap_pager_init(void) sx_init(&sw_alloc_sx, "swspsx"); sx_init(&swdev_syscall_lock, "swsysc"); } - -static void -swap_pager_counters(void) -{ - - swap_free_deferred = counter_u64_alloc(M_WAITOK); - swap_free_completed = counter_u64_alloc(M_WAITOK); -} -SYSINIT(swap_counters, SI_SUB_CPU, SI_ORDER_ANY, swap_pager_counters, NULL); /* * SWAP_PAGER_SWAP_INIT() - swap pager initialization from pageout process Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/vm/vm_object.c Fri Mar 6 19:10:00 2020 (r358716) @@ -153,30 +153,20 @@ struct vm_object kernel_object_store; static SYSCTL_NODE(_vm_stats, OID_AUTO, object, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "VM object stats"); -static counter_u64_t object_collapses = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(object_collapses); SYSCTL_COUNTER_U64(_vm_stats_object, OID_AUTO, collapses, CTLFLAG_RD, &object_collapses, "VM object collapses"); -static counter_u64_t object_bypasses = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(object_bypasses); SYSCTL_COUNTER_U64(_vm_stats_object, OID_AUTO, bypasses, CTLFLAG_RD, &object_bypasses, "VM object bypasses"); -static counter_u64_t object_collapse_waits = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(object_collapse_waits); SYSCTL_COUNTER_U64(_vm_stats_object, OID_AUTO, collapse_waits, CTLFLAG_RD, &object_collapse_waits, "Number of sleeps for collapse"); - -static void -counter_startup(void) -{ - - object_collapses = counter_u64_alloc(M_WAITOK); - object_bypasses = counter_u64_alloc(M_WAITOK); - object_collapse_waits = counter_u64_alloc(M_WAITOK); -} -SYSINIT(object_counters, SI_SUB_CPU, SI_ORDER_ANY, counter_startup, NULL); static uma_zone_t obj_zone; Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/vm/vm_page.c Fri Mar 6 19:10:00 2020 (r358716) @@ -130,30 +130,20 @@ static int vm_pageproc_waiters; static SYSCTL_NODE(_vm_stats, OID_AUTO, page, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "VM page statistics"); -static counter_u64_t pqstate_commit_retries = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(pqstate_commit_retries); SYSCTL_COUNTER_U64(_vm_stats_page, OID_AUTO, pqstate_commit_retries, CTLFLAG_RD, &pqstate_commit_retries, "Number of failed per-page atomic queue state updates"); -static counter_u64_t queue_ops = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(queue_ops); SYSCTL_COUNTER_U64(_vm_stats_page, OID_AUTO, queue_ops, CTLFLAG_RD, &queue_ops, "Number of batched queue operations"); -static counter_u64_t queue_nops = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(queue_nops); SYSCTL_COUNTER_U64(_vm_stats_page, OID_AUTO, queue_nops, CTLFLAG_RD, &queue_nops, "Number of batched queue operations with no effects"); - -static void -counter_startup(void) -{ - - pqstate_commit_retries = counter_u64_alloc(M_WAITOK); - queue_ops = counter_u64_alloc(M_WAITOK); - queue_nops = counter_u64_alloc(M_WAITOK); -} -SYSINIT(page_counters, SI_SUB_CPU, SI_ORDER_ANY, counter_startup, NULL); /* * bogus page -- for I/O to/from partially complete buffers, Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/vm/vm_reserv.c Fri Mar 6 19:10:00 2020 (r358716) @@ -264,11 +264,11 @@ static struct vm_reserv_domain vm_rvd[MAXMEMDOM]; static SYSCTL_NODE(_vm, OID_AUTO, reserv, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Reservation Info"); -static counter_u64_t vm_reserv_broken = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(vm_reserv_broken); SYSCTL_COUNTER_U64(_vm_reserv, OID_AUTO, broken, CTLFLAG_RD, &vm_reserv_broken, "Cumulative number of broken reservations"); -static counter_u64_t vm_reserv_freed = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(vm_reserv_freed); SYSCTL_COUNTER_U64(_vm_reserv, OID_AUTO, freed, CTLFLAG_RD, &vm_reserv_freed, "Cumulative number of freed reservations"); @@ -284,7 +284,7 @@ SYSCTL_OID(_vm_reserv, OID_AUTO, partpopq, sysctl_vm_reserv_partpopq, "A", "Partially populated reservation queues"); -static counter_u64_t vm_reserv_reclaimed = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(vm_reserv_reclaimed); SYSCTL_COUNTER_U64(_vm_reserv, OID_AUTO, reclaimed, CTLFLAG_RD, &vm_reserv_reclaimed, "Cumulative number of reclaimed reservations"); @@ -1439,21 +1439,6 @@ vm_reserv_startup(vm_offset_t *vaddr, vm_paddr_t end) */ return (new_end); } - -/* - * Initializes the reservation management system. Specifically, initializes - * the reservation counters. - */ -static void -vm_reserv_counter_init(void *unused) -{ - - vm_reserv_freed = counter_u64_alloc(M_WAITOK); - vm_reserv_broken = counter_u64_alloc(M_WAITOK); - vm_reserv_reclaimed = counter_u64_alloc(M_WAITOK); -} -SYSINIT(vm_reserv_counter_init, SI_SUB_CPU, SI_ORDER_ANY, - vm_reserv_counter_init, NULL); /* * Returns the superpage containing the given page. From owner-svn-src-head@freebsd.org Fri Mar 6 19:56:14 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 142D926FBC3; Fri, 6 Mar 2020 19:56:14 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Yyzd587Gz4LXC; Fri, 6 Mar 2020 19:56:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E0CC25513; Fri, 6 Mar 2020 19:56:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026JuDCN014945; Fri, 6 Mar 2020 19:56:13 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026JuDe6014943; Fri, 6 Mar 2020 19:56:13 GMT (envelope-from np@FreeBSD.org) Message-Id: <202003061956.026JuDe6014943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 6 Mar 2020 19:56:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358717 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 358717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 19:56:14 -0000 Author: np Date: Fri Mar 6 19:56:12 2020 New Revision: 358717 URL: https://svnweb.freebsd.org/changeset/base/358717 Log: cxgbe/t4_tom: Do not uninitialize a toepcb that has not been initialized. This fixes the following panic: --- trap 0xc, rip = 0xffffffff80c00411, rsp = 0xfffffe0025192840, rbp = 0xfffffe0025192860 --- vmem_xfree() at vmem_xfree+0xd1/frame 0xfffffe0025192860 tls_uninit_toep() at tls_uninit_toep+0x78/frame 0xfffffe0025192880 free_toepcb() at free_toepcb+0x32/frame 0xfffffe00251928a0 t4_connect() at t4_connect+0x3be/frame 0xfffffe0025192950 tcp_offload_connect() at tcp_offload_connect+0xa4/frame 0xfffffe0025192990 tcp_usr_connect() at tcp_usr_connect+0xec/frame 0xfffffe00251929f0 soconnect() at soconnect+0xae/frame 0xfffffe0025192a30 kern_connectat() at kern_connectat+0xe2/frame 0xfffffe0025192a90 sys_connect() at sys_connect+0x75/frame 0xfffffe0025192ad0 amd64_syscall() at amd64_syscall+0x137/frame 0xfffffe0025192bf0 fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0025192bf0 --- syscall (98, FreeBSD ELF64, sys_connect), rip = 0x8008e9d8a, rsp = 0x7fffffffc0f8, rbp = 0x7fffffffc130 --- Reviewed by: jhb@ MFC after: 3 days Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D23989 Modified: head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Fri Mar 6 19:10:00 2020 (r358716) +++ head/sys/dev/cxgbe/tom/t4_tom.c Fri Mar 6 19:56:12 2020 (r358717) @@ -187,6 +187,8 @@ init_toepcb(struct vi_info *vi, struct toepcb *toep) if (ulp_mode(toep) == ULP_MODE_TCPDDP) ddp_init_toep(toep); + toep->flags |= TPF_INITIALIZED; + return (0); } @@ -210,9 +212,11 @@ free_toepcb(struct toepcb *toep) KASSERT(!(toep->flags & TPF_CPL_PENDING), ("%s: CPL pending", __func__)); - if (ulp_mode(toep) == ULP_MODE_TCPDDP) - ddp_uninit_toep(toep); - tls_uninit_toep(toep); + if (toep->flags & TPF_INITIALIZED) { + if (ulp_mode(toep) == ULP_MODE_TCPDDP) + ddp_uninit_toep(toep); + tls_uninit_toep(toep); + } free(toep, M_CXGBE); } Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Fri Mar 6 19:10:00 2020 (r358716) +++ head/sys/dev/cxgbe/tom/t4_tom.h Fri Mar 6 19:56:12 2020 (r358717) @@ -73,6 +73,7 @@ enum { TPF_SYNQE_EXPANDED = (1 << 9), /* toepcb ready, tid context updated */ TPF_FORCE_CREDITS = (1 << 10), /* always send credits */ TPF_KTLS = (1 << 11), /* send TLS records from KTLS */ + TPF_INITIALIZED = (1 << 12), /* init_toepcb has been called */ }; enum { From owner-svn-src-head@freebsd.org Fri Mar 6 20:44:23 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05D10250762; Fri, 6 Mar 2020 20:44:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z03B5hbxz4Cnw; Fri, 6 Mar 2020 20:44:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8952F25E54; Fri, 6 Mar 2020 20:44:22 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026KiMSS044533; Fri, 6 Mar 2020 20:44:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026KiM4F044532; Fri, 6 Mar 2020 20:44:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003062044.026KiM4F044532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 6 Mar 2020 20:44:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358718 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 358718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 20:44:23 -0000 Author: markj Date: Fri Mar 6 20:44:22 2020 New Revision: 358718 URL: https://svnweb.freebsd.org/changeset/base/358718 Log: Remove dead code from the powerpc uma_small_alloc(). 32-bit Book-E doesn't set UMA_MD_SMALL_ALLOC, and 32-bit OEA platforms have a 32-bit vm_paddr_t. Moreover, this code was wrong in that it leaked the page if the check failed. Reviewed by: jhibbits MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23991 Modified: head/sys/powerpc/powerpc/uma_machdep.c Modified: head/sys/powerpc/powerpc/uma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/uma_machdep.c Fri Mar 6 19:56:12 2020 (r358717) +++ head/sys/powerpc/powerpc/uma_machdep.c Fri Mar 6 20:44:22 2020 (r358718) @@ -66,11 +66,6 @@ uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int return (NULL); pa = VM_PAGE_TO_PHYS(m); - - /* On book-e sizeof(void *) < sizeof(vm_paddr_t) */ - if ((vm_offset_t)pa != pa) - return (NULL); - #ifdef __powerpc64__ if ((wait & M_NODUMP) == 0) dump_add_page(pa); From owner-svn-src-head@freebsd.org Fri Mar 6 21:15:26 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFEF4250EE6; Fri, 6 Mar 2020 21:15:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z0l22z4Vz4P6s; Fri, 6 Mar 2020 21:15:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3216A263D7; Fri, 6 Mar 2020 21:15:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LFQ2n062339; Fri, 6 Mar 2020 21:15:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LFQcg062338; Fri, 6 Mar 2020 21:15:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003062115.026LFQcg062338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Mar 2020 21:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358719 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 21:15:26 -0000 Author: kib Date: Fri Mar 6 21:15:25 2020 New Revision: 358719 URL: https://svnweb.freebsd.org/changeset/base/358719 Log: zfs dmu_read: loosen the assertion. Since switch to the lockless grab, shared busy for ahead/behind pages allows other threads to validate and map the pages readonly. Reviewed by: avg, jeff, markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D23986 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Mar 6 20:44:22 2020 (r358718) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Mar 6 21:15:25 2020 (r358719) @@ -1752,7 +1752,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ break; } ASSERT(m->dirty == 0); - ASSERT(!pmap_page_is_mapped(m)); + ASSERT(!pmap_page_is_write_mapped(m)); ASSERT(db->db_size > PAGE_SIZE); bufoff = IDX_TO_OFF(m->pindex) % db->db_size; @@ -1867,7 +1867,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ break; } ASSERT(m->dirty == 0); - ASSERT(!pmap_page_is_mapped(m)); + ASSERT(!pmap_page_is_write_mapped(m)); ASSERT(db->db_size > PAGE_SIZE); bufoff = IDX_TO_OFF(m->pindex) % db->db_size; From owner-svn-src-head@freebsd.org Fri Mar 6 21:21:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36377250FE2; Fri, 6 Mar 2020 21:21:02 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z0sT6ZvTz4dRQ; Fri, 6 Mar 2020 21:21:01 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBCA626413; Fri, 6 Mar 2020 21:21:01 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LL1PU064747; Fri, 6 Mar 2020 21:21:01 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LL180064742; Fri, 6 Mar 2020 21:21:01 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062121.026LL180064742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 21:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358720 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 358720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 21:21:02 -0000 Author: andreast Date: Fri Mar 6 21:21:01 2020 New Revision: 358720 URL: https://svnweb.freebsd.org/changeset/base/358720 Log: - Drop 'All rights reserved' - Replace hardcoded size by nitems Modified: head/sys/dev/iicbus/max6690.c Modified: head/sys/dev/iicbus/max6690.c ============================================================================== --- head/sys/dev/iicbus/max6690.c Fri Mar 6 21:15:25 2020 (r358719) +++ head/sys/dev/iicbus/max6690.c Fri Mar 6 21:21:01 2020 (r358720) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -124,7 +123,7 @@ max6690_read(device_t dev, uint32_t addr, uint8_t reg, for (;;) { - err = iicbus_transfer(dev, msg, 4); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; if (busy[0] & 0x80) @@ -302,8 +301,9 @@ max6690_start(void *xdev) "Sensor Information"); /* I use i to pass the sensor id. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "temp", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, i % 2, - max6690_sensor_sysctl, "IK", sysctl_desc); + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, i % 2, + max6690_sensor_sysctl, "IK", sysctl_desc); } /* Dump sensor location & ID. */ From owner-svn-src-head@freebsd.org Fri Mar 6 21:24:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56527251222; Fri, 6 Mar 2020 21:24:10 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z0x60dXdz3JL4; Fri, 6 Mar 2020 21:24:10 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 06CEF265A2; Fri, 6 Mar 2020 21:24:10 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LO91f068225; Fri, 6 Mar 2020 21:24:09 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LO9xn068224; Fri, 6 Mar 2020 21:24:09 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062124.026LO9xn068224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 21:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358721 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 358721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 21:24:10 -0000 Author: andreast Date: Fri Mar 6 21:24:09 2020 New Revision: 358721 URL: https://svnweb.freebsd.org/changeset/base/358721 Log: Drop 'All rights reserved' Replace hardcoded sizes by nitems and sizeof Modified: head/sys/dev/iicbus/ds1631.c Modified: head/sys/dev/iicbus/ds1631.c ============================================================================== --- head/sys/dev/iicbus/ds1631.c Fri Mar 6 21:21:01 2020 (r358720) +++ head/sys/dev/iicbus/ds1631.c Fri Mar 6 21:24:09 2020 (r358721) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -135,7 +134,7 @@ ds1631_write(device_t dev, uint32_t addr, uint8_t reg, for (;;) { - if (iicbus_transfer(dev, msg, 1) == 0) + if (iicbus_transfer(dev, msg, nitems(msg)) == 0) return (0); if (++try > 5) { device_printf(dev, "iicbus write failed\n"); @@ -158,7 +157,7 @@ ds1631_read_1(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -186,7 +185,7 @@ ds1631_read_2(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -275,7 +274,7 @@ ds1631_init(device_t dev, uint32_t addr) */ conf = DS1631_CONTROL_10BIT; - err = ds1631_write(dev, addr, DS1631_CONTROL, &conf, 1); + err = ds1631_write(dev, addr, DS1631_CONTROL, &conf, sizeof(conf)); if (err < 0) { device_printf(dev, "ds1631 write config failed: %x\n", err); return (-1); From owner-svn-src-head@freebsd.org Fri Mar 6 21:25:31 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A6FB251313; Fri, 6 Mar 2020 21:25:31 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [157.161.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z0yf5TYxz3MPQ; Fri, 6 Mar 2020 21:25:30 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-94.100.156.244.flashcable.ch [94.100.156.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 2D44CC0DBB; Fri, 6 Mar 2020 22:25:28 +0100 (CET) Subject: Re: svn commit: r358720 - head/sys/dev/iicbus From: Andreas Tobler To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003062121.026LL180064742@repo.freebsd.org> Message-ID: <4901a173-c961-208a-5e94-d22be9867aac@FreeBSD.org> Date: Fri, 6 Mar 2020 22:25:27 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003062121.026LL180064742@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: Idefix Submit on 127.0.1.1 X-Rspamd-Queue-Id: 48Z0yf5TYxz3MPQ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.01 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.92)[-0.922,0]; NEURAL_SPAM_MEDIUM(0.93)[0.935,0]; ASN(0.00)[asn:6772, ipnet:157.161.0.0/16, country:CH] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 21:25:31 -0000 On 06.03.20 22:21, Andreas Tobler wrote: > Author: andreast > Date: Fri Mar 6 21:21:01 2020 > New Revision: 358720 > URL: https://svnweb.freebsd.org/changeset/base/358720 > > Log: > - Drop 'All rights reserved' > - Replace hardcoded size by nitems The CTLFLAG_MPSAFE I forgot to mention since I have it since years in my tree. Sorry. Andreas > > Modified: > head/sys/dev/iicbus/max6690.c > > Modified: head/sys/dev/iicbus/max6690.c > ============================================================================== > --- head/sys/dev/iicbus/max6690.c Fri Mar 6 21:15:25 2020 (r358719) > +++ head/sys/dev/iicbus/max6690.c Fri Mar 6 21:21:01 2020 (r358720) > @@ -2,7 +2,6 @@ > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2010 Andreas Tobler > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > @@ -124,7 +123,7 @@ max6690_read(device_t dev, uint32_t addr, uint8_t reg, > > for (;;) > { > - err = iicbus_transfer(dev, msg, 4); > + err = iicbus_transfer(dev, msg, nitems(msg)); > if (err != 0) > goto retry; > if (busy[0] & 0x80) > @@ -302,8 +301,9 @@ max6690_start(void *xdev) > "Sensor Information"); > /* I use i to pass the sensor id. */ > SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "temp", > - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, i % 2, > - max6690_sensor_sysctl, "IK", sysctl_desc); > + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, > + dev, i % 2, > + max6690_sensor_sysctl, "IK", sysctl_desc); > > } > /* Dump sensor location & ID. */ > From owner-svn-src-head@freebsd.org Fri Mar 6 21:26:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A1A52513AA; Fri, 6 Mar 2020 21:26:36 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z0zw0QG2z3Pq3; Fri, 6 Mar 2020 21:26:36 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D57D6265A3; Fri, 6 Mar 2020 21:26:35 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LQZK5068402; Fri, 6 Mar 2020 21:26:35 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LQZKK068401; Fri, 6 Mar 2020 21:26:35 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062126.026LQZKK068401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 21:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358722 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 358722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 21:26:36 -0000 Author: andreast Date: Fri Mar 6 21:26:35 2020 New Revision: 358722 URL: https://svnweb.freebsd.org/changeset/base/358722 Log: Drop 'All rights reserved' Replace hardcoded size by nitems Modified: head/sys/dev/iicbus/ds1775.c Modified: head/sys/dev/iicbus/ds1775.c ============================================================================== --- head/sys/dev/iicbus/ds1775.c Fri Mar 6 21:24:09 2020 (r358721) +++ head/sys/dev/iicbus/ds1775.c Fri Mar 6 21:26:35 2020 (r358722) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -104,7 +103,7 @@ ds1775_read_2(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; From owner-svn-src-head@freebsd.org Fri Mar 6 21:32:43 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFB682517C8; Fri, 6 Mar 2020 21:32:43 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z16z3Xspz444C; Fri, 6 Mar 2020 21:32:43 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7407D2674E; Fri, 6 Mar 2020 21:32:42 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LWglc074428; Fri, 6 Mar 2020 21:32:42 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LWgGA074427; Fri, 6 Mar 2020 21:32:42 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062132.026LWgGA074427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 21:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358723 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 358723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 21:32:44 -0000 Author: andreast Date: Fri Mar 6 21:32:42 2020 New Revision: 358723 URL: https://svnweb.freebsd.org/changeset/base/358723 Log: Drop 'All rights reserved' Replace hardcoded sizes by nitems and sizeof Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE, I run this driver since a few years with CTLFLAG_MPSAFE w/o issues. Add a HACK to handle a special case for a sensor location. Modified: head/sys/dev/iicbus/ad7417.c Modified: head/sys/dev/iicbus/ad7417.c ============================================================================== --- head/sys/dev/iicbus/ad7417.c Fri Mar 6 21:26:35 2020 (r358722) +++ head/sys/dev/iicbus/ad7417.c Fri Mar 6 21:32:42 2020 (r358723) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -143,7 +142,7 @@ ad7417_write(device_t dev, uint32_t addr, uint8_t reg, for (;;) { - if (iicbus_transfer(dev, msg, 1) == 0) + if (iicbus_transfer(dev, msg, nitems(msg)) == 0) return (0); if (++try > 5) { @@ -167,7 +166,7 @@ ad7417_read_1(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -195,7 +194,7 @@ ad7417_read_2(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -230,7 +229,7 @@ ad7417_write_read(device_t dev, uint32_t addr, struct for (;;) { - err = iicbus_transfer(dev, msg, 3); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -258,18 +257,18 @@ ad7417_init_adc(device_t dev, uint32_t addr) /* Clear Config2 */ buf = 0; - err = ad7417_write(dev, addr, AD7417_CONFIG2, &buf, 1); + err = ad7417_write(dev, addr, AD7417_CONFIG2, &buf, sizeof(buf)); /* Read & cache Config1 */ buf = 0; - err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, 1); + err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, sizeof(buf)); err = ad7417_read_1(dev, addr, AD7417_CONFIG, &buf); adc741x_config = (uint8_t)buf; /* Disable shutdown mode */ adc741x_config &= 0xfe; buf = adc741x_config; - err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, 1); + err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, sizeof(buf)); if (err < 0) return (-1); @@ -310,7 +309,7 @@ ad7417_probe(device_t dev) static int ad7417_fill_sensor_prop(device_t dev) { - phandle_t child; + phandle_t child, node; struct ad7417_softc *sc; u_int id[10]; char location[96]; @@ -359,13 +358,27 @@ ad7417_fill_sensor_prop(device_t dev) for (j = 0; j < i; j++) sc->sc_sensors[j].therm.zone = id[j]; + /* Some PowerMac's have the real location of the sensors on + child nodes of the hwsensor-location node. Check for and + fix the name if needed. + This is needed to apply the below HACK with the diode. + */ + j = 0; + for (node = OF_child(child); node != 0; node = OF_peer(node)) { + + OF_getprop(node, "location", location, sizeof(location)); + strcpy(sc->sc_sensors[i].therm.name, location); + j++; + } + /* Finish setting up sensor properties */ for (j = 0; j < i; j++) { sc->sc_sensors[j].dev = dev; /* HACK: Apple wired a random diode to the ADC line */ - if (strstr(sc->sc_sensors[j].therm.name, "DIODE TEMP") - != NULL) { + if ((strstr(sc->sc_sensors[j].therm.name, "DIODE TEMP") + != NULL) + || (strstr(sc->sc_sensors[j].therm.name, "AD1") != NULL)) { sc->sc_sensors[j].type = ADC7417_TEMP_SENSOR; sc->sc_sensors[j].therm.read = (int (*)(struct pmac_therm *))(ad7417_diode_read); @@ -444,10 +457,10 @@ ad7417_attach(device_t dev) } /* I use i to pass the sensor id. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - unit, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, - i, ad7417_sensor_sysctl, - sc->sc_sensors[i].type == ADC7417_TEMP_SENSOR ? "IK" : "I", - desc); + unit, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, i, ad7417_sensor_sysctl, + sc->sc_sensors[i].type == ADC7417_TEMP_SENSOR ? + "IK" : "I", desc); } /* Dump sensor location, ID & type. */ if (bootverbose) { From owner-svn-src-head@freebsd.org Fri Mar 6 21:51:29 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91FC7251F97; Fri, 6 Mar 2020 21:51:29 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z1Xc5k7Hz4qHM; Fri, 6 Mar 2020 21:51:28 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8614326ABB; Fri, 6 Mar 2020 21:51:28 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LpSOl082572; Fri, 6 Mar 2020 21:51:28 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LpSfe082571; Fri, 6 Mar 2020 21:51:28 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062151.026LpSfe082571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 21:51:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358724 - head/sys/powerpc/powermac X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/powerpc/powermac X-SVN-Commit-Revision: 358724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 21:51:29 -0000 Author: andreast Date: Fri Mar 6 21:51:28 2020 New Revision: 358724 URL: https://svnweb.freebsd.org/changeset/base/358724 Log: Drop 'All rights reserved' Replace hardcoded sizes by nitems and sizeof Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE, I run this driver since a few years with CTLFLAG_MPSAFE w/o issues. Modified: head/sys/powerpc/powermac/fcu.c Modified: head/sys/powerpc/powermac/fcu.c ============================================================================== --- head/sys/powerpc/powermac/fcu.c Fri Mar 6 21:32:42 2020 (r358723) +++ head/sys/powerpc/powermac/fcu.c Fri Mar 6 21:51:28 2020 (r358724) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -152,7 +151,7 @@ fcu_write(device_t dev, uint32_t addr, uint8_t reg, ui for (;;) { - if (iicbus_transfer(dev, msg, 1) == 0) + if (iicbus_transfer(dev, msg, nitems(msg)) == 0) return (0); if (++try > 5) { @@ -176,7 +175,7 @@ fcu_read_1(device_t dev, uint32_t addr, uint8_t reg, u for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -250,8 +249,8 @@ fcu_start(void *xdev) sc = device_get_softc(dev); /* Start the fcu device. */ - fcu_write(sc->sc_dev, sc->sc_addr, 0xe, buf, 1); - fcu_write(sc->sc_dev, sc->sc_addr, 0x2e, buf, 1); + fcu_write(sc->sc_dev, sc->sc_addr, 0xe, buf, sizeof(buf)); + fcu_write(sc->sc_dev, sc->sc_addr, 0x2e, buf, sizeof(buf)); fcu_read_1(sc->sc_dev, sc->sc_addr, 0, buf); fcu_rpm_shift = (buf[0] == 1) ? 2 : 3; @@ -290,7 +289,7 @@ fcu_fan_set_rpm(struct fcu_fan *fan, int rpm) buf[0] = rpm >> (8 - fcu_rpm_shift); buf[1] = rpm << fcu_rpm_shift; - if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 2) < 0) + if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, sizeof(buf)) < 0) return (EIO); return (0); @@ -323,7 +322,7 @@ fcu_fan_get_rpm(struct fcu_fan *fan) return (-1); if ((fail & (1 << fan->id)) != 0) { device_printf(fan->dev, - "RPM Fan failed ID: %d\n", fan->id); + "RPM Fan failed ID: %d %#x\n", fan->id, fail); return (-1); } /* Check if fan is active. */ @@ -356,7 +355,7 @@ fcu_fan_set_pwm(struct fcu_fan *fan, int pwm) { uint8_t reg; struct fcu_softc *sc; - uint8_t buf[2]; + uint8_t buf[1]; sc = device_get_softc(fan->dev); @@ -378,7 +377,7 @@ fcu_fan_set_pwm(struct fcu_fan *fan, int pwm) buf[0] = (pwm * 2550) / 1000; - if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 1) < 0) + if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, sizeof(buf)) < 0) return (EIO); return (0); } @@ -632,8 +631,9 @@ fcu_attach_fans(device_t dev) "Maximum allowed RPM"); /* I use i to pass the fan id. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "rpm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - dev, i, fcu_fanrpm_sysctl, "I", "Fan RPM"); + "rpm", CTLTYPE_INT | CTLFLAG_RW | + CTLFLAG_MPSAFE, dev, i, + fcu_fanrpm_sysctl, "I", "Fan RPM"); } else { fcu_fan_get_pwm(dev, &sc->sc_fans[i], &sc->sc_fans[i].setpoint, @@ -654,13 +654,14 @@ fcu_attach_fans(device_t dev) * of info I want to display/modify. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "pwm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - dev, FCU_PWM_SYSCTL_PWM | i, fcu_fanrpm_sysctl, "I", - "Fan PWM in %"); - SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "rpm", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, - dev, FCU_PWM_SYSCTL_RPM | i, fcu_fanrpm_sysctl, "I", - "Fan RPM"); + "pwm", CTLTYPE_INT | CTLFLAG_RW | + CTLFLAG_MPSAFE, dev, + FCU_PWM_SYSCTL_PWM | i, + fcu_fanrpm_sysctl, "I", "Fan PWM in %"); + "rpm", CTLTYPE_INT | CTLFLAG_RD | + CTLFLAG_MPSAFE, dev, + FCU_PWM_SYSCTL_RPM | i, + fcu_fanrpm_sysctl, "I", "Fan RPM"); } } From owner-svn-src-head@freebsd.org Fri Mar 6 23:01:50 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2033D253625; Fri, 6 Mar 2020 23:01:50 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z35p069Qz45lM; Fri, 6 Mar 2020 23:01:50 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F2E64277A5; Fri, 6 Mar 2020 23:01:49 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026N1nqm030566; Fri, 6 Mar 2020 23:01:49 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026N1nFl030549; Fri, 6 Mar 2020 23:01:49 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062301.026N1nFl030549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 23:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358725 - head/sys/powerpc/powermac X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/powerpc/powermac X-SVN-Commit-Revision: 358725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 23:01:50 -0000 Author: andreast Date: Fri Mar 6 23:01:49 2020 New Revision: 358725 URL: https://svnweb.freebsd.org/changeset/base/358725 Log: Revert Modified: head/sys/powerpc/powermac/fcu.c Modified: head/sys/powerpc/powermac/fcu.c ============================================================================== --- head/sys/powerpc/powermac/fcu.c Fri Mar 6 21:51:28 2020 (r358724) +++ head/sys/powerpc/powermac/fcu.c Fri Mar 6 23:01:49 2020 (r358725) @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -151,7 +152,7 @@ fcu_write(device_t dev, uint32_t addr, uint8_t reg, ui for (;;) { - if (iicbus_transfer(dev, msg, nitems(msg)) == 0) + if (iicbus_transfer(dev, msg, 1) == 0) return (0); if (++try > 5) { @@ -175,7 +176,7 @@ fcu_read_1(device_t dev, uint32_t addr, uint8_t reg, u for (;;) { - err = iicbus_transfer(dev, msg, nitems(msg)); + err = iicbus_transfer(dev, msg, 2); if (err != 0) goto retry; @@ -249,8 +250,8 @@ fcu_start(void *xdev) sc = device_get_softc(dev); /* Start the fcu device. */ - fcu_write(sc->sc_dev, sc->sc_addr, 0xe, buf, sizeof(buf)); - fcu_write(sc->sc_dev, sc->sc_addr, 0x2e, buf, sizeof(buf)); + fcu_write(sc->sc_dev, sc->sc_addr, 0xe, buf, 1); + fcu_write(sc->sc_dev, sc->sc_addr, 0x2e, buf, 1); fcu_read_1(sc->sc_dev, sc->sc_addr, 0, buf); fcu_rpm_shift = (buf[0] == 1) ? 2 : 3; @@ -289,7 +290,7 @@ fcu_fan_set_rpm(struct fcu_fan *fan, int rpm) buf[0] = rpm >> (8 - fcu_rpm_shift); buf[1] = rpm << fcu_rpm_shift; - if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, sizeof(buf)) < 0) + if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 2) < 0) return (EIO); return (0); @@ -322,7 +323,7 @@ fcu_fan_get_rpm(struct fcu_fan *fan) return (-1); if ((fail & (1 << fan->id)) != 0) { device_printf(fan->dev, - "RPM Fan failed ID: %d %#x\n", fan->id, fail); + "RPM Fan failed ID: %d\n", fan->id); return (-1); } /* Check if fan is active. */ @@ -355,7 +356,7 @@ fcu_fan_set_pwm(struct fcu_fan *fan, int pwm) { uint8_t reg; struct fcu_softc *sc; - uint8_t buf[1]; + uint8_t buf[2]; sc = device_get_softc(fan->dev); @@ -377,7 +378,7 @@ fcu_fan_set_pwm(struct fcu_fan *fan, int pwm) buf[0] = (pwm * 2550) / 1000; - if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, sizeof(buf)) < 0) + if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 1) < 0) return (EIO); return (0); } @@ -631,9 +632,8 @@ fcu_attach_fans(device_t dev) "Maximum allowed RPM"); /* I use i to pass the fan id. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "rpm", CTLTYPE_INT | CTLFLAG_RW | - CTLFLAG_MPSAFE, dev, i, - fcu_fanrpm_sysctl, "I", "Fan RPM"); + "rpm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + dev, i, fcu_fanrpm_sysctl, "I", "Fan RPM"); } else { fcu_fan_get_pwm(dev, &sc->sc_fans[i], &sc->sc_fans[i].setpoint, @@ -654,14 +654,13 @@ fcu_attach_fans(device_t dev) * of info I want to display/modify. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "pwm", CTLTYPE_INT | CTLFLAG_RW | - CTLFLAG_MPSAFE, dev, - FCU_PWM_SYSCTL_PWM | i, - fcu_fanrpm_sysctl, "I", "Fan PWM in %"); - "rpm", CTLTYPE_INT | CTLFLAG_RD | - CTLFLAG_MPSAFE, dev, - FCU_PWM_SYSCTL_RPM | i, - fcu_fanrpm_sysctl, "I", "Fan RPM"); + "pwm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + dev, FCU_PWM_SYSCTL_PWM | i, fcu_fanrpm_sysctl, "I", + "Fan PWM in %"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "rpm", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + dev, FCU_PWM_SYSCTL_RPM | i, fcu_fanrpm_sysctl, "I", + "Fan RPM"); } } From owner-svn-src-head@freebsd.org Fri Mar 6 23:31:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52659253E9B; Fri, 6 Mar 2020 23:31:10 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z3ld4yGKz4H3f; Fri, 6 Mar 2020 23:31:09 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7789C27BC0; Fri, 6 Mar 2020 23:31:09 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026NV9Tb045941; Fri, 6 Mar 2020 23:31:09 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026NV9k4045928; Fri, 6 Mar 2020 23:31:09 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003062331.026NV9k4045928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 6 Mar 2020 23:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358726 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2020 23:31:10 -0000 Author: brooks Date: Fri Mar 6 23:31:09 2020 New Revision: 358726 URL: https://svnweb.freebsd.org/changeset/base/358726 Log: Remove an apparently incorrect assertion. Without this change mips64 fails to boot. Discussed with: markj Sponsored by: DARPA Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Fri Mar 6 23:01:49 2020 (r358725) +++ head/sys/vm/uma_core.c Fri Mar 6 23:31:09 2020 (r358726) @@ -716,9 +716,6 @@ zone_put_bucket(uma_zone_t zone, int domain, uma_bucke goto out; zdom = zone_domain_lock(zone, domain); - KASSERT(!ws || zdom->uzd_nitems < zone->uz_bucket_max, - ("%s: zone %p overflow", __func__, zone)); - /* * Conditionally set the maximum number of items. */ From owner-svn-src-head@freebsd.org Sat Mar 7 00:29:15 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67D9025513D; Sat, 7 Mar 2020 00:29:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z52g1NzFz4J8X; Sat, 7 Mar 2020 00:29:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA7026F6; Sat, 7 Mar 2020 00:29:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0270TCDV081784; Sat, 7 Mar 2020 00:29:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0270TCrd081783; Sat, 7 Mar 2020 00:29:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003070029.0270TCrd081783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 7 Mar 2020 00:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358727 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2020 00:29:15 -0000 Author: imp Date: Sat Mar 7 00:29:12 2020 New Revision: 358727 URL: https://svnweb.freebsd.org/changeset/base/358727 Log: Reword a comment to describe what's actually going on. We can call invalidate several times potentially. We just don't do anything on the second and subsequent calls. Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Fri Mar 6 23:31:09 2020 (r358726) +++ head/sys/cam/cam_periph.c Sat Mar 7 00:29:12 2020 (r358727) @@ -649,7 +649,7 @@ cam_periph_invalidate(struct cam_periph *periph) cam_periph_assert(periph, MA_OWNED); /* - * We only call this routine the first time a peripheral is + * We only tear down the device the first time a peripheral is * invalidated. */ if ((periph->flags & CAM_PERIPH_INVALID) != 0) From owner-svn-src-head@freebsd.org Sat Mar 7 00:55:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB8EC256657; Sat, 7 Mar 2020 00:55:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z5dH5QgWz4MgH; Sat, 7 Mar 2020 00:55:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99F13C7F; Sat, 7 Mar 2020 00:55:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0270tl48000552; Sat, 7 Mar 2020 00:55:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0270tkMf000549; Sat, 7 Mar 2020 00:55:46 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003070055.0270tkMf000549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 7 Mar 2020 00:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358728 - in head/sys: sys vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: sys vm X-SVN-Commit-Revision: 358728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2020 00:55:49 -0000 Author: markj Date: Sat Mar 7 00:55:46 2020 New Revision: 358728 URL: https://svnweb.freebsd.org/changeset/base/358728 Log: Move SMR pointer type definition and access macros to smr_types.h. The intent is to provide a header that can be included by other headers without introducing too much pollution. smr.h depends on various headers and will likely grow over time, but is less likely to be required by system headers. Rename SMR_TYPE_DECLARE() to SMR_POINTER(): - One might use SMR to protect more than just pointers; it could be used for resizeable arrays, for example, so TYPE seems too generic. - It is useful to be able to define anonymous SMR-protected pointer types and the _DECLARE suffix makes that look wrong. Reviewed by: jeff, mjg, rlibby Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23988 Added: head/sys/sys/smr_types.h (contents, props changed) Modified: head/sys/sys/_smr.h head/sys/sys/smr.h head/sys/vm/vm_radix.c Modified: head/sys/sys/_smr.h ============================================================================== --- head/sys/sys/_smr.h Sat Mar 7 00:29:12 2020 (r358727) +++ head/sys/sys/_smr.h Sat Mar 7 00:55:46 2020 (r358728) @@ -35,4 +35,16 @@ typedef uint32_t smr_seq_t; typedef int32_t smr_delta_t; typedef struct smr *smr_t; +#define SMR_ENTERED(smr) \ + (curthread->td_critnest != 0 && zpcpu_get((smr))->c_seq != SMR_SEQ_INVALID) + +#define SMR_ASSERT_ENTERED(smr) \ + KASSERT(SMR_ENTERED(smr), ("Not in smr section")) + +#define SMR_ASSERT_NOT_ENTERED(smr) \ + KASSERT(!SMR_ENTERED(smr), ("In smr section.")); + +#define SMR_ASSERT(ex, fn) \ + KASSERT((ex), (fn ": Assertion " #ex " failed at %s:%d", __FILE__, __LINE__)) + #endif /* __SYS_SMR_H_ */ Modified: head/sys/sys/smr.h ============================================================================== --- head/sys/sys/smr.h Sat Mar 7 00:29:12 2020 (r358727) +++ head/sys/sys/smr.h Sat Mar 7 00:55:46 2020 (r358728) @@ -35,7 +35,8 @@ /* * Safe memory reclamation. See subr_smr.c for a description of the - * algorithm. + * algorithm, and smr_types.h for macros to define and access SMR-protected + * data structures. * * Readers synchronize with smr_enter()/exit() and writers may either * free directly to a SMR UMA zone or use smr_synchronize or wait. @@ -81,112 +82,6 @@ struct smr { #define SMR_LAZY 0x0001 /* Higher latency write, fast read. */ #define SMR_DEFERRED 0x0002 /* Aggregate updates to wr_seq. */ - -#define SMR_ENTERED(smr) \ - (curthread->td_critnest != 0 && zpcpu_get((smr))->c_seq != SMR_SEQ_INVALID) - -#define SMR_ASSERT_ENTERED(smr) \ - KASSERT(SMR_ENTERED(smr), ("Not in smr section")) - -#define SMR_ASSERT_NOT_ENTERED(smr) \ - KASSERT(!SMR_ENTERED(smr), ("In smr section.")); - -#define SMR_ASSERT(ex, fn) \ - KASSERT((ex), (fn ": Assertion " #ex " failed at %s:%d", __FILE__, __LINE__)) - -/* - * SMR Accessors are meant to provide safe access to SMR protected - * pointers and prevent misuse and accidental access. - * - * Accessors are grouped by type: - * entered - Use while in a read section (between smr_enter/smr_exit()) - * serialized - Use while holding a lock that serializes writers. Updates - * are synchronized with readers via included barriers. - * unserialized - Use after the memory is out of scope and not visible to - * readers. - * - * All acceses include a parameter for an assert to verify the required - * synchronization. For example, a writer might use: - * - * smr_serialized_store(pointer, value, mtx_owned(&writelock)); - * - * These are only enabled in INVARIANTS kernels. - */ - -/* Type restricting pointer access to force smr accessors. */ -#define SMR_TYPE_DECLARE(smrtype, type) \ -typedef struct { \ - type __ptr; /* Do not access directly */ \ -} smrtype - -/* - * Read from an SMR protected pointer while in a read section. - */ -#define smr_entered_load(p, smr) ({ \ - SMR_ASSERT(SMR_ENTERED((smr)), "smr_entered_load"); \ - (__typeof((p)->__ptr))atomic_load_acq_ptr((uintptr_t *)&(p)->__ptr); \ -}) - -/* - * Read from an SMR protected pointer while serialized by an - * external mechanism. 'ex' should contain an assert that the - * external mechanism is held. i.e. mtx_owned() - */ -#define smr_serialized_load(p, ex) ({ \ - SMR_ASSERT(ex, "smr_serialized_load"); \ - (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ -}) - -/* - * Store 'v' to an SMR protected pointer while serialized by an - * external mechanism. 'ex' should contain an assert that the - * external mechanism is held. i.e. mtx_owned() - * - * Writers that are serialized with mutual exclusion or on a single - * thread should use smr_serialized_store() rather than swap. - */ -#define smr_serialized_store(p, v, ex) do { \ - SMR_ASSERT(ex, "smr_serialized_store"); \ - __typeof((p)->__ptr) _v = (v); \ - atomic_store_rel_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ -} while (0) - -/* - * swap 'v' with an SMR protected pointer and return the old value - * while serialized by an external mechanism. 'ex' should contain - * an assert that the external mechanism is provided. i.e. mtx_owned() - * - * Swap permits multiple writers to update a pointer concurrently. - */ -#define smr_serialized_swap(p, v, ex) ({ \ - SMR_ASSERT(ex, "smr_serialized_swap"); \ - __typeof((p)->__ptr) _v = (v); \ - /* Release barrier guarantees contents are visible to reader */ \ - atomic_thread_fence_rel(); \ - (__typeof((p)->__ptr))atomic_swap_ptr( \ - (uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ -}) - -/* - * Read from an SMR protected pointer when no serialization is required - * such as in the destructor callback or when the caller guarantees other - * synchronization. - */ -#define smr_unserialized_load(p, ex) ({ \ - SMR_ASSERT(ex, "smr_unserialized_load"); \ - (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ -}) - -/* - * Store to an SMR protected pointer when no serialiation is required - * such as in the destructor callback or when the caller guarantees other - * synchronization. - */ -#define smr_unserialized_store(p, v, ex) do { \ - SMR_ASSERT(ex, "smr_unserialized_store"); \ - __typeof((p)->__ptr) _v = (v); \ - atomic_store_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ -} while (0) /* * Return the current write sequence number. This is not the same as the Added: head/sys/sys/smr_types.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/smr_types.h Sat Mar 7 00:55:46 2020 (r358728) @@ -0,0 +1,138 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019, 2020 Jeffrey Roberson + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_SMR_TYPES_H_ +#define _SYS_SMR_TYPES_H_ + +#include + +/* + * SMR Accessors are meant to provide safe access to SMR protected + * pointers and prevent misuse and accidental access. + * + * Accessors are grouped by type: + * entered - Use while in a read section (between smr_enter/smr_exit()) + * serialized - Use while holding a lock that serializes writers. Updates + * are synchronized with readers via included barriers. + * unserialized - Use after the memory is out of scope and not visible to + * readers. + * + * All acceses include a parameter for an assert to verify the required + * synchronization. For example, a writer might use: + * + * smr_serialized_store(pointer, value, mtx_owned(&writelock)); + * + * These are only enabled in INVARIANTS kernels. + */ + +/* Type restricting pointer access to force smr accessors. */ +#define SMR_POINTER(type) \ +struct { \ + type __ptr; /* Do not access directly */ \ +} + +/* + * Read from an SMR protected pointer while in a read section. + */ +#define smr_entered_load(p, smr) ({ \ + SMR_ASSERT(SMR_ENTERED((smr)), "smr_entered_load"); \ + (__typeof((p)->__ptr))atomic_load_acq_ptr((uintptr_t *)&(p)->__ptr); \ +}) + +/* + * Read from an SMR protected pointer while serialized by an + * external mechanism. 'ex' should contain an assert that the + * external mechanism is held. i.e. mtx_owned() + */ +#define smr_serialized_load(p, ex) ({ \ + SMR_ASSERT(ex, "smr_serialized_load"); \ + (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ +}) + +/* + * Store 'v' to an SMR protected pointer while serialized by an + * external mechanism. 'ex' should contain an assert that the + * external mechanism is held. i.e. mtx_owned() + * + * Writers that are serialized with mutual exclusion or on a single + * thread should use smr_serialized_store() rather than swap. + */ +#define smr_serialized_store(p, v, ex) do { \ + SMR_ASSERT(ex, "smr_serialized_store"); \ + __typeof((p)->__ptr) _v = (v); \ + atomic_store_rel_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +} while (0) + +/* + * swap 'v' with an SMR protected pointer and return the old value + * while serialized by an external mechanism. 'ex' should contain + * an assert that the external mechanism is provided. i.e. mtx_owned() + * + * Swap permits multiple writers to update a pointer concurrently. + */ +#define smr_serialized_swap(p, v, ex) ({ \ + SMR_ASSERT(ex, "smr_serialized_swap"); \ + __typeof((p)->__ptr) _v = (v); \ + /* Release barrier guarantees contents are visible to reader */ \ + atomic_thread_fence_rel(); \ + (__typeof((p)->__ptr))atomic_swap_ptr( \ + (uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +}) + +/* + * Read from an SMR protected pointer when no serialization is required + * such as in the destructor callback or when the caller guarantees other + * synchronization. + */ +#define smr_unserialized_load(p, ex) ({ \ + SMR_ASSERT(ex, "smr_unserialized_load"); \ + (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ +}) + +/* + * Store to an SMR protected pointer when no serialiation is required + * such as in the destructor callback or when the caller guarantees other + * synchronization. + */ +#define smr_unserialized_store(p, v, ex) do { \ + SMR_ASSERT(ex, "smr_unserialized_store"); \ + __typeof((p)->__ptr) _v = (v); \ + atomic_store_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +} while (0) + +#ifndef _KERNEL + +/* + * Load an SMR protected pointer when accessing kernel data structures through + * libkvm. + */ +#define smr_kvm_load(p) ((p)->__ptr) + +#endif /* !_KERNEL */ +#endif /* !_SYS_SMR_TYPES_H_ */ Modified: head/sys/vm/vm_radix.c ============================================================================== --- head/sys/vm/vm_radix.c Sat Mar 7 00:29:12 2020 (r358727) +++ head/sys/vm/vm_radix.c Sat Mar 7 00:55:46 2020 (r358728) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -101,7 +102,7 @@ __FBSDID("$FreeBSD$"); enum vm_radix_access { SMR, LOCKED, UNSERIALIZED }; struct vm_radix_node; -SMR_TYPE_DECLARE(smrnode_t, struct vm_radix_node *); +typedef SMR_POINTER(struct vm_radix_node *) smrnode_t; struct vm_radix_node { vm_pindex_t rn_owner; /* Owner of record. */ From owner-svn-src-head@freebsd.org Sat Mar 7 03:58:59 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F04D25A4FB; Sat, 7 Mar 2020 03:58:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z9hg0Gprz3Fc4; Sat, 7 Mar 2020 03:58:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B501A2E10; Sat, 7 Mar 2020 03:58:58 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0273ww0e009494; Sat, 7 Mar 2020 03:58:58 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0273wwPI009493; Sat, 7 Mar 2020 03:58:58 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003070358.0273wwPI009493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 7 Mar 2020 03:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358729 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 358729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2020 03:58:59 -0000 Author: jhibbits Date: Sat Mar 7 03:58:58 2020 New Revision: 358729 URL: https://svnweb.freebsd.org/changeset/base/358729 Log: compat: Allow explicit overriding of COMPAT_ARCH and COMPAT_CPUTYPE Summary: Allow src.conf to override the inferred COMPAT_ARCH and COMPAT_CPUTYPE variables, such that a different CPU target can be specified explicitly for the general target vs the compat target. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D23992 Modified: head/share/mk/bsd.compat.mk Modified: head/share/mk/bsd.compat.mk ============================================================================== --- head/share/mk/bsd.compat.mk Sat Mar 7 00:55:46 2020 (r358728) +++ head/share/mk/bsd.compat.mk Sat Mar 7 03:58:58 2020 (r358729) @@ -4,8 +4,8 @@ __<${_this:T}>__: .if defined(_LIBCOMPAT) -COMPAT_ARCH= ${TARGET_ARCH} -COMPAT_CPUTYPE= ${TARGET_CPUTYPE} +COMPAT_ARCH?= ${TARGET_ARCH} +COMPAT_CPUTYPE?= ${CPUTYPE_${_LIBCOMPAT}} .if (defined(WANT_COMPILER_TYPE) && ${WANT_COMPILER_TYPE} == gcc) || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) COMPAT_COMPILER_TYPE= gcc From owner-svn-src-head@freebsd.org Sat Mar 7 08:41:11 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC79C25F044; Sat, 7 Mar 2020 08:41:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ZHyH2ZyYz3LK0; Sat, 7 Mar 2020 08:41:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25DE0651D; Sat, 7 Mar 2020 08:41:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0278fBRp077262; Sat, 7 Mar 2020 08:41:11 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0278fAUl077260; Sat, 7 Mar 2020 08:41:10 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202003070841.0278fAUl077260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 7 Mar 2020 08:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358730 - in head: sys/netinet usr.bin/netstat X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: in head: sys/netinet usr.bin/netstat X-SVN-Commit-Revision: 358730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2020 08:41:11 -0000 Author: hrs Date: Sat Mar 7 08:41:10 2020 New Revision: 358730 URL: https://svnweb.freebsd.org/changeset/base/358730 Log: Fix an issue of net.inet.igmp.stats handler. The header of (struct igmpstat) could be cleared by sysctl(3). This can be reproduced by "netstat -s -z -p igmp". PR: 244584 MFC after: 1 week Modified: head/sys/netinet/igmp.c head/usr.bin/netstat/inet.c Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Sat Mar 7 03:58:58 2020 (r358729) +++ head/sys/netinet/igmp.c Sat Mar 7 08:41:10 2020 (r358730) @@ -145,6 +145,7 @@ static void igmp_v3_suppress_group_record(struct in_mu static int sysctl_igmp_default_version(SYSCTL_HANDLER_ARGS); static int sysctl_igmp_gsr(SYSCTL_HANDLER_ARGS); static int sysctl_igmp_ifinfo(SYSCTL_HANDLER_ARGS); +static int sysctl_igmp_stat(SYSCTL_HANDLER_ARGS); static const struct netisr_handler igmp_nh = { .nh_name = "igmp", @@ -260,8 +261,9 @@ VNET_DEFINE_STATIC(int, igmp_default_version) = IGMP_V /* * Virtualized sysctls. */ -SYSCTL_STRUCT(_net_inet_igmp, IGMPCTL_STATS, stats, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(igmpstat), igmpstat, ""); +SYSCTL_PROC(_net_inet_igmp, IGMPCTL_STATS, stats, + CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RW | CTLFLAG_MPSAFE, + &VNET_NAME(igmpstat), 0, sysctl_igmp_stat, "S,igmpstat", ""); SYSCTL_INT(_net_inet_igmp, OID_AUTO, recvifkludge, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(igmp_recvifkludge), 0, "Rewrite IGMPv1/v2 reports from 0.0.0.0 to contain subnet address"); @@ -333,6 +335,59 @@ igmp_restore_context(struct mbuf *m) #endif #endif return (m->m_pkthdr.flowid); +} + +/* + * IGMP statistics. + */ +static int +sysctl_igmp_stat(SYSCTL_HANDLER_ARGS) +{ + struct igmpstat igps0; + int error; + char *p; + + error = sysctl_wire_old_buffer(req, sizeof(V_igmpstat)); + if (error) + return (error); + + if (req->oldptr != NULL) { + if (req->oldlen < sizeof(V_igmpstat)) + error = ENOMEM; + else + error = SYSCTL_OUT(req, &V_igmpstat, + sizeof(V_igmpstat)); + } else + req->validlen = sizeof(V_igmpstat); + if (error) + goto out; + if (req->newptr != NULL) { + if (req->newlen < sizeof(V_igmpstat)) + error = ENOMEM; + else + error = SYSCTL_IN(req, &igps0, + sizeof(igps0)); + if (error) + goto out; + /* + * igps0 must be "all zero". + */ + p = (char *)&igps0; + while (*p == '\0' && p < (char *)&igps0 + sizeof(igps0)) + p++; + if (p != (char *)&igps0 + sizeof(igps0)) { + error = EINVAL; + goto out; + } + /* + * Avoid overwrite of the version and length field. + */ + igps0.igps_version = V_igmpstat.igps_version; + igps0.igps_len = V_igmpstat.igps_len; + bcopy(&igps0, &V_igmpstat, sizeof(V_igmpstat)); + } +out: + return (error); } /* Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Sat Mar 7 03:58:58 2020 (r358729) +++ head/usr.bin/netstat/inet.c Sat Mar 7 08:41:10 2020 (r358730) @@ -1222,10 +1222,26 @@ void igmp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) { struct igmpstat igmpstat; + int error, zflag0; if (fetch_stats("net.inet.igmp.stats", 0, &igmpstat, sizeof(igmpstat), kread) != 0) return; + /* + * Reread net.inet.igmp.stats when zflag == 1. + * This is because this MIB contains version number and + * length of the structure which are not set when clearing + * the counters. + */ + zflag0 = zflag; + if (zflag) { + zflag = 0; + error = fetch_stats("net.inet.igmp.stats", 0, &igmpstat, + sizeof(igmpstat), kread); + zflag = zflag0; + if (error) + return; + } if (igmpstat.igps_version != IGPS_VERSION_3) { xo_warnx("%s: version mismatch (%d != %d)", __func__, From owner-svn-src-head@freebsd.org Sat Mar 7 15:37:25 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2EB93269248; Sat, 7 Mar 2020 15:37:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ZTBX4tm8z3yr9; Sat, 7 Mar 2020 15:37:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51CC9B152; Sat, 7 Mar 2020 15:37:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 027FbOSr036911; Sat, 7 Mar 2020 15:37:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 027FbOYh036910; Sat, 7 Mar 2020 15:37:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003071537.027FbOYh036910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 7 Mar 2020 15:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358732 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2020 15:37:25 -0000 Author: markj Date: Sat Mar 7 15:37:23 2020 New Revision: 358732 URL: https://svnweb.freebsd.org/changeset/base/358732 Log: Clean up uma_int.h a bit. This makes it easier to write libkvm programs that access UMA data structures. - Remove a couple of unused slab functions and make others local to uma_core.c. Similarly move SLAB_BITSETS, which affects the layout of slab structures, to uma_core.c. - Stop defining the slab structures under _KERNEL. There's no real reason they can't be visible to userspace like the rest of UMA's structures are. - Group KEG_ASSERT_COLD with other keg macros. - Convert an assertion about MAXMEMDOM to use _Static_assert. No functional change intended. Discussed with: jeff Reviewed by: rlibby Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23980 Modified: head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sat Mar 7 15:09:45 2020 (r358731) +++ head/sys/vm/uma_core.c Sat Mar 7 15:37:23 2020 (r358732) @@ -117,6 +117,16 @@ static uma_zone_t kegs; static uma_zone_t zones; /* + * On INVARIANTS builds, the slab contains a second bitset of the same size, + * "dbg_bits", which is laid out immediately after us_free. + */ +#ifdef INVARIANTS +#define SLAB_BITSETS 2 +#else +#define SLAB_BITSETS 1 +#endif + +/* * These are the two zones from which all offpage uma_slab_ts are allocated. * * One zone is for slab headers that can represent a larger number of items, @@ -1898,7 +1908,7 @@ zero_init(void *mem, int size, int flags) } #ifdef INVARIANTS -struct noslabbits * +static struct noslabbits * slab_dbg_bits(uma_slab_t slab, uma_keg_t keg) { @@ -1909,7 +1919,7 @@ slab_dbg_bits(uma_slab_t slab, uma_keg_t keg) /* * Actual size of embedded struct slab (!OFFPAGE). */ -size_t +static size_t slab_sizeof(int nitems) { size_t s; @@ -1918,15 +1928,6 @@ slab_sizeof(int nitems) return (roundup(s, UMA_ALIGN_PTR + 1)); } -/* - * Size of memory for embedded slabs (!OFFPAGE). - */ -size_t -slab_space(int nitems) -{ - return (UMA_SLAB_SIZE - slab_sizeof(nitems)); -} - #define UMA_FIXPT_SHIFT 31 #define UMA_FRAC_FIXPT(n, d) \ ((uint32_t)(((uint64_t)(n) << UMA_FIXPT_SHIFT) / (d))) @@ -1965,18 +1966,6 @@ slab_ipers_hdr(u_int size, u_int rsize, u_int slabsize } return (ipers); -} - -/* - * Compute the number of items that will fit in a slab for a startup zone. - */ -int -slab_ipers(size_t size, int align) -{ - int rsize; - - rsize = roundup(size, align + 1); /* Assume no CACHESPREAD */ - return (slab_ipers_hdr(size, rsize, UMA_SLAB_SIZE, true)); } struct keg_layout_result { Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Sat Mar 7 15:09:45 2020 (r358731) +++ head/sys/vm/uma_int.h Sat Mar 7 15:37:23 2020 (r358732) @@ -368,11 +368,6 @@ struct uma_keg { }; typedef struct uma_keg * uma_keg_t; -#ifdef _KERNEL -#define KEG_ASSERT_COLD(k) \ - KASSERT(uma_keg_get_allocs((k)) == 0, \ - ("keg %s initialization after use.", (k)->uk_name)) - /* * Free bits per-slab. */ @@ -391,30 +386,14 @@ struct uma_slab { uint8_t us_domain; /* Backing NUMA domain. */ struct noslabbits us_free; /* Free bitmask, flexible. */ }; -_Static_assert(sizeof(struct uma_slab) == offsetof(struct uma_slab, us_free), +_Static_assert(sizeof(struct uma_slab) == __offsetof(struct uma_slab, us_free), "us_free field must be last"); -#if MAXMEMDOM >= 255 -#error "Slab domain type insufficient" -#endif +_Static_assert(MAXMEMDOM < 255, + "us_domain field is not wide enough"); typedef struct uma_slab * uma_slab_t; /* - * On INVARIANTS builds, the slab contains a second bitset of the same size, - * "dbg_bits", which is laid out immediately after us_free. - */ -#ifdef INVARIANTS -#define SLAB_BITSETS 2 -#else -#define SLAB_BITSETS 1 -#endif - -/* These three functions are for embedded (!OFFPAGE) use only. */ -size_t slab_sizeof(int nitems); -size_t slab_space(int nitems); -int slab_ipers(size_t size, int align); - -/* * Slab structure with a full sized bitset and hash link for both * HASH and OFFPAGE zones. */ @@ -460,7 +439,6 @@ slab_item_index(uma_slab_t slab, uma_keg_t keg, void * data = (uintptr_t)slab_data(slab, keg); return (((uintptr_t)item - data) / keg->uk_rsize); } -#endif /* _KERNEL */ STAILQ_HEAD(uma_bucketlist, uma_bucket); @@ -578,6 +556,10 @@ static __inline uma_slab_t hash_sfind(struct uma_hash KASSERT((void *)(keg) != NULL, \ ("%s: Invalid zone %p type", __func__, (zone))); \ } while (0) + +#define KEG_ASSERT_COLD(k) \ + KASSERT(uma_keg_get_allocs((k)) == 0, \ + ("keg %s initialization after use.", (k)->uk_name)) /* Domains are contiguous after the last CPU */ #define ZDOM_GET(z, n) \