From owner-svn-src-head@freebsd.org Sun Dec 13 03: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 64FA84AC677; Sun, 13 Dec 2020 03:58:44 +0000 (UTC) (envelope-from bdragon@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CtrNh23hsz4rlr; Sun, 13 Dec 2020 03:58:44 +0000 (UTC) (envelope-from bdragon@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 2A357EEE; Sun, 13 Dec 2020 03:58:44 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BD3wi6e030018; Sun, 13 Dec 2020 03:58:44 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BD3whcS030015; Sun, 13 Dec 2020 03:58:43 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <202012130358.0BD3whcS030015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Sun, 13 Dec 2020 03:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368604 - in head/sys/powerpc: include powerpc X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: in head/sys/powerpc: include powerpc X-SVN-Commit-Revision: 368604 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.34 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, 13 Dec 2020 03:58:44 -0000 Author: bdragon Date: Sun Dec 13 03:58:43 2020 New Revision: 368604 URL: https://svnweb.freebsd.org/changeset/base/368604 Log: [PowerPC] Floating-point exception trap followup * Fix incorrect operation on 32-bit caused by incorrectly-sized storage for a temporary FPSCR. * Fix several whitespace problems. * Don't try to enable VSX during cleanup_fpscr(). Reviewed by: alfredo, jhibbits (earlier version) Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D27453 Modified: head/sys/powerpc/include/cpufunc.h head/sys/powerpc/powerpc/exec_machdep.c head/sys/powerpc/powerpc/fpu.c Modified: head/sys/powerpc/include/cpufunc.h ============================================================================== --- head/sys/powerpc/include/cpufunc.h Sun Dec 13 02:21:54 2020 (r368603) +++ head/sys/powerpc/include/cpufunc.h Sun Dec 13 03:58:43 2020 (r368604) @@ -163,21 +163,21 @@ mttb(u_quad_t time) mtspr(TBR_TBWL, (uint32_t)(time & 0xffffffff)); } - static __inline register_t mffs(void) { - register_t value; + uint64_t value; __asm __volatile ("mffs 0; stfd 0,0(%0)" :: "b"(&value)); - return (value); + return ((register_t)value); } static __inline void -mtfsf(register_t value) +mtfsf(uint64_t value) { + __asm __volatile ("lfd 0,0(%0); mtfsf 0xff,0" :: "b"(&value)); } Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Sun Dec 13 02:21:54 2020 (r368603) +++ head/sys/powerpc/powerpc/exec_machdep.c Sun Dec 13 03:58:43 2020 (r368604) @@ -239,14 +239,13 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask usfp = (void *)((sp - rndfsize) & ~0xFul); } - /* + /* * Set Floating Point facility to "Ignore Exceptions Mode" so signal - * handler can run. + * handler can run. */ if (td->td_pcb->pcb_flags & PCB_FPU) tf->srr1 = tf->srr1 & ~(PSL_FE0 | PSL_FE1); - /* * Set up the registers to return to sigcode. * @@ -334,10 +333,10 @@ sys_sigreturn(struct thread *td, struct sigreturn_args if (error != 0) return (error); - /* + /* * Save FPU state if needed. User may have changed it on - * signal handler - */ + * signal handler + */ if (uc.uc_mcontext.mc_srr1 & PSL_FP) save_fpu(td); Modified: head/sys/powerpc/powerpc/fpu.c ============================================================================== --- head/sys/powerpc/powerpc/fpu.c Sun Dec 13 02:21:54 2020 (r368603) +++ head/sys/powerpc/powerpc/fpu.c Sun Dec 13 03:58:43 2020 (r368604) @@ -209,7 +209,6 @@ save_fpu_nodrop(struct thread *td) save_fpu_int(td); } - /* * Clear Floating-Point Status and Control Register */ @@ -217,19 +216,18 @@ void cleanup_fpscr() { register_t msr; - msr = mfmsr(); - mtmsr(msr | PSL_FP | PSL_VSX); + msr = mfmsr(); + mtmsr(msr | PSL_FP); mtfsf(0); isync(); mtmsr(msr); } - /* - * * Returns the current fp exception - * */ + * Get the current fp exception + */ u_int get_fpu_exception(struct thread *td) { From owner-svn-src-head@freebsd.org Sun Dec 13 09:38: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 7DFE34B39B3; Sun, 13 Dec 2020 09:38:51 +0000 (UTC) (envelope-from se@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Ctzx734lCz3Nrs; Sun, 13 Dec 2020 09:38:51 +0000 (UTC) (envelope-from se@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 5CA925562; Sun, 13 Dec 2020 09:38:51 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BD9cplp041056; Sun, 13 Dec 2020 09:38:51 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BD9cpTp041055; Sun, 13 Dec 2020 09:38:51 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012130938.0BD9cpTp041055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sun, 13 Dec 2020 09:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368606 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 368606 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.34 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, 13 Dec 2020 09:38:51 -0000 Author: se Date: Sun Dec 13 09:38:50 2020 New Revision: 368606 URL: https://svnweb.freebsd.org/changeset/base/368606 Log: Fix WITHOUT_ICONV build There was an unprotected use of nl_langinfo() to determine the order of day vs. month in the generated output. When building without ICONV support, the order will be: month, day. Modified: head/usr.bin/calendar/events.c Modified: head/usr.bin/calendar/events.c ============================================================================== --- head/usr.bin/calendar/events.c Sun Dec 13 05:34:14 2020 (r368605) +++ head/usr.bin/calendar/events.c Sun Dec 13 09:38:50 2020 (r368606) @@ -202,9 +202,13 @@ event_print_all(FILE *fp) struct event *e; struct tm tm; char dbuf[80]; +#ifdef WITH_ICONV static int d_first; d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); +#else +#define d_first 0 +#endif while (walkthrough_dates(&e) != 0) { if (e) { From owner-svn-src-head@freebsd.org Sun Dec 13 11: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 5D7D54B5A01; Sun, 13 Dec 2020 11:13:59 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (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 4Cv22v1xKzz3jk1; Sun, 13 Dec 2020 11:13:58 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 723C45C00B2; Sun, 13 Dec 2020 06:13:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 13 Dec 2020 06:13:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=g jW+6Rh1/9DcMn4o598o4dji8cdP08/0mSzsfmyNnJI=; b=Znuec/CPdpoxk8nOc 2GiRDa8mBvP3XS8nudXpcJNjkQs7FVGGLsdwl+uM2hPao7OxW5QACL67sWbq08gk 2s3ikKNVsqtUa2D8AfDFLlZkrsq13cS1YG5bAACf57lyTbq9wbeSMKS72702asMl SvZMCyugRLT2TSlN8mGloF2x28i0CsVWt1BLqI1ga17X6TFl/jJ0CAJqelI+AR37 NbrqWT8NO/U9jwoJn6bfe/ERGz5CYSrRTAr0JB7bz2YgBwTDo1NB9cAr7VKjgICV bod6MI8dmNQvbNvpxLQNd6xxmGGX2tudHXPTx9Gq3xwEg8G+hvTHgJD0VwCscWyy GafWw== 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=fm1; bh=gjW+6Rh1/9DcMn4o598o4dji8cdP08/0mSzsfmyNn JI=; b=H/acdhAVomFd2KHSpnQore2x6jR2edsJQ9C8BY1IoHlC17OmLvhG8ziab y+/eSbVCT6OUWNUug6oKOYp2SdXgpNmLe+ssKkQoqFn+20A3acdFAl9NC2LXfIwt gv/29zd4U/hpYwuwf9X6/L1yXkyiSHgOcoy24ZvrKhr3+oPPNU6rHw7FvdC+6ydH ZOM5lEZevJWK0sPwign23JYQVU0UK+GfUcxS45s3ySzR14FZja1pvzvKXZK3ChOC AA9ElFbuYsrvn1oLXPkwRTJo6Qy49GoUuKk+0R88BW37H7pGF6ORvj1ld3rLkhDA bq/959LBXTqKUDVZaX2RaH9olWybA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudekiedgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomhepjghurhhi ucfrrghnkhhovhcuoeihuhhrihhpvheshihurhhiphhvrdguvghvqeenucggtffrrghtth gvrhhnpeevfeevgfetgfeukeefjeduueekffejuefgieetteeuledvtdethfelhedvjeet veenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucfkphepledurddvgedtrdduvd egrdduheejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhephihurhhiphhvseihuhhrihhpvhdruggvvh X-ME-Proxy: Received: from [192.168.1.6] (unknown [91.240.124.157]) by mail.messagingengine.com (Postfix) with ESMTPA id 0876F240057; Sun, 13 Dec 2020 06:13:56 -0500 (EST) Subject: Re: svn commit: r368606 - head/usr.bin/calendar To: =?UTF-8?Q?Stefan_E=c3=9fer?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012130938.0BD9cpTp041055@repo.freebsd.org> From: Yuri Pankov Message-ID: Date: Sun, 13 Dec 2020 14:13:55 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <202012130938.0BD9cpTp041055@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Cv22v1xKzz3jk1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 13 Dec 2020 11:13:59 -0000 Stefan Eßer wrote: > Author: se > Date: Sun Dec 13 09:38:50 2020 > New Revision: 368606 > URL: https://svnweb.freebsd.org/changeset/base/368606 > > Log: > Fix WITHOUT_ICONV build > > There was an unprotected use of nl_langinfo() to determine the order of > day vs. month in the generated output. That's strange, nl_langinfo() is standard and its visibility should not (and does not?) depend on WITH/WITHOUT_ICONV. May be just move langinfo.h include outside of "#ifdef WITH_ICONV" block? > When building without ICONV support, the order will be: month, day. > > Modified: > head/usr.bin/calendar/events.c > > Modified: head/usr.bin/calendar/events.c > ============================================================================== > --- head/usr.bin/calendar/events.c Sun Dec 13 05:34:14 2020 (r368605) > +++ head/usr.bin/calendar/events.c Sun Dec 13 09:38:50 2020 (r368606) > @@ -202,9 +202,13 @@ event_print_all(FILE *fp) > struct event *e; > struct tm tm; > char dbuf[80]; > +#ifdef WITH_ICONV > static int d_first; > > d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); > +#else > +#define d_first 0 > +#endif > > while (walkthrough_dates(&e) != 0) { > if (e) { > From owner-svn-src-head@freebsd.org Sun Dec 13 16:26: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 435A14BDADC; Sun, 13 Dec 2020 16:26:39 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cv8zg11FRz4cKc; Sun, 13 Dec 2020 16:26:39 +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 1143F12B82; Sun, 13 Dec 2020 16:26:39 +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 0BDGQcmI013021; Sun, 13 Dec 2020 16:26:38 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDGQbrh013014; Sun, 13 Dec 2020 16:26:37 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202012131626.0BDGQbrh013014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Sun, 13 Dec 2020 16:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368608 - in head: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive X-SVN-Commit-Revision: 368608 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.34 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, 13 Dec 2020 16:26:39 -0000 Author: mm Date: Sun Dec 13 16:26:37 2020 New Revision: 368608 URL: https://svnweb.freebsd.org/changeset/base/368608 Log: MFV r368607: Sync libarchive with vendor. Vendor changes: Issue #1461: Unbreak build without lzma Issue #1462: warc reader: Fix build with gcc11 Issue #1463: Fix code compatibility in test_archive_read_support.c Issue #1464: Use built-in strnlen on platforms where not available Issue #1465: warc reader: fix undefined behaviour in deconst() function MFC after: 3 days X-MFC-With: 368234 Modified: head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c head/contrib/libarchive/libarchive/archive_read_support_format_warc.c head/contrib/libarchive/libarchive/archive_read_support_format_zip.c head/contrib/libarchive/libarchive/test/test_archive_read_support.c head/lib/libarchive/config_freebsd.h Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Sun Dec 13 15:29:19 2020 (r368607) +++ head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Sun Dec 13 16:26:37 2020 (r368608) @@ -136,6 +136,9 @@ static int skip(struct archive_read *a); static int read_header(struct archive_read *, struct archive_entry *); static int64_t mtree_atol(char **, int base); +#ifndef HAVE_STRNLEN +static size_t mtree_strnlen(const char *, size_t); +#endif /* * There's no standard for TIME_T_MAX/TIME_T_MIN. So we compute them @@ -187,6 +190,24 @@ get_time_t_min(void) #endif } +#ifdef HAVE_STRNLEN +#define mtree_strnlen(a,b) strnlen(a,b) +#else +static size_t +mtree_strnlen(const char *p, size_t maxlen) +{ + size_t i; + + for (i = 0; i <= maxlen; i++) { + if (p[i] == 0) + break; + } + if (i > maxlen) + return (-1);/* invalid */ + return (i); +} +#endif + static int archive_read_format_mtree_options(struct archive_read *a, const char *key, const char *val) @@ -1540,7 +1561,7 @@ parse_digest(struct archive_read *a, struct archive_en len *= 2; - if (strnlen(digest, len+1) != len) { + if (mtree_strnlen(digest, len+1) != len) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "incorrect digest length, ignoring"); return ARCHIVE_WARN; Modified: head/contrib/libarchive/libarchive/archive_read_support_format_warc.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_warc.c Sun Dec 13 15:29:19 2020 (r368607) +++ head/contrib/libarchive/libarchive/archive_read_support_format_warc.c Sun Dec 13 16:26:37 2020 (r368608) @@ -127,7 +127,7 @@ static int _warc_skip(struct archive_read *a); static int _warc_rdhdr(struct archive_read *a, struct archive_entry *e); /* private routines */ -static unsigned int _warc_rdver(const char buf[10], size_t bsz); +static unsigned int _warc_rdver(const char *buf, size_t bsz); static unsigned int _warc_rdtyp(const char *buf, size_t bsz); static warc_string_t _warc_rduri(const char *buf, size_t bsz); static ssize_t _warc_rdlen(const char *buf, size_t bsz); @@ -443,7 +443,7 @@ _warc_skip(struct archive_read *a) static void* deconst(const void *c) { - return (char *)0x1 + (((const char *)c) - (const char *)0x1); + return (void *)(uintptr_t)c; } static char* Modified: head/contrib/libarchive/libarchive/archive_read_support_format_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Sun Dec 13 15:29:19 2020 (r368607) +++ head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Sun Dec 13 16:26:37 2020 (r368608) @@ -899,6 +899,7 @@ process_extra(struct archive_read *a, struct archive_e return ARCHIVE_OK; } +#if HAVE_LZMA_H && HAVE_LIBLZMA /* * Auxiliary function to uncompress data chunk from zipx archive * (zip with lzma compression). @@ -971,6 +972,7 @@ zipx_lzma_uncompress_buffer(const char *compressed_buf free(lzma_alone_compressed_buffer); return status; } +#endif /* * Assumes file pointer is at beginning of local file header. Modified: head/contrib/libarchive/libarchive/test/test_archive_read_support.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_archive_read_support.c Sun Dec 13 15:29:19 2020 (r368607) +++ head/contrib/libarchive/libarchive/test/test_archive_read_support.c Sun Dec 13 16:26:37 2020 (r368608) @@ -126,7 +126,9 @@ DEFINE_TEST(test_archive_read_support) ARCHIVE_FORMAT_WARC, ARCHIVE_FORMAT_RAR_V5, }; - for (unsigned i = 0; i < sizeof(format_codes) / sizeof(int); i++) { + unsigned int i; + + for (i = 0; i < sizeof(format_codes) / sizeof(int); i++) { format_code = format_codes[i]; test_filter_or_format(format_code_enabler); test_filter_or_format(format_code_setter); Modified: head/lib/libarchive/config_freebsd.h ============================================================================== --- head/lib/libarchive/config_freebsd.h Sun Dec 13 15:29:19 2020 (r368607) +++ head/lib/libarchive/config_freebsd.h Sun Dec 13 16:26:37 2020 (r368608) @@ -183,6 +183,7 @@ #define HAVE_STRFTIME 1 #define HAVE_STRINGS_H 1 #define HAVE_STRING_H 1 +#define HAVE_STRNLEN 1 #define HAVE_STRRCHR 1 #define HAVE_STRUCT_STATFS_F_NAMEMAX 1 #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 From owner-svn-src-head@freebsd.org Sun Dec 13 18:06: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 B23814BF5AD; Sun, 13 Dec 2020 18:06:25 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvCBn4f0Rz4hJS; Sun, 13 Dec 2020 18:06:25 +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 91A1513DED; Sun, 13 Dec 2020 18:06:25 +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 0BDI6PPb082476; Sun, 13 Dec 2020 18:06:25 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDI6Puj082474; Sun, 13 Dec 2020 18:06:25 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012131806.0BDI6Puj082474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 13 Dec 2020 18:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368609 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 368609 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.34 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, 13 Dec 2020 18:06:25 -0000 Author: mjg Date: Sun Dec 13 18:06:24 2020 New Revision: 368609 URL: https://svnweb.freebsd.org/changeset/base/368609 Log: fd: fix fdrop prediction when closing a fd Most of the time this is the last reference, contrary to typical fdrop use. Modified: head/sys/kern/kern_descrip.c head/sys/sys/file.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Dec 13 16:26:37 2020 (r368608) +++ head/sys/kern/kern_descrip.c Sun Dec 13 18:06:24 2020 (r368609) @@ -2766,7 +2766,7 @@ closef(struct file *fp, struct thread *td) FILEDESC_XUNLOCK(fdp); } } - return (fdrop(fp, td)); + return (fdrop_close(fp, td)); } /* Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Sun Dec 13 16:26:37 2020 (r368608) +++ head/sys/sys/file.h Sun Dec 13 18:06:24 2020 (r368609) @@ -299,6 +299,17 @@ fhold(struct file *fp) _error; \ }) +#define fdrop_close(fp, td) ({ \ + struct file *_fp; \ + int _error; \ + \ + _error = 0; \ + _fp = (fp); \ + if (__predict_true(refcount_release(&_fp->f_count))) \ + _error = _fdrop(_fp, td); \ + _error; \ +}) + static __inline fo_rdwr_t fo_read; static __inline fo_rdwr_t fo_write; static __inline fo_truncate_t fo_truncate; From owner-svn-src-head@freebsd.org Sun Dec 13 18:56: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 D75544C0960; Sun, 13 Dec 2020 18:56:24 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvDJS4zhsz4l65; Sun, 13 Dec 2020 18:56:24 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ed1-f42.google.com with SMTP id r5so14843647eda.12; Sun, 13 Dec 2020 10:56:24 -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=LeQP1ZRaaG5esb04MOnBHfU9qVQVZfua8eegrMvHW/o=; b=apbSLn+7JM5ajte3RmxiSJCWs6cJQ0cBYStWe9jHT2Gwy5GLsy0TyOfVKbYitRr3XJ qsPwnHARwRdfAQglov7suqHQ409EzbDaPynp+IiHV822zET56+bsFuYyhiSRXKF8hBlm n252aBSDDDUo4zaQJ8C5aPIxLQEVW50CYH9PIaLJHocnpbl3W94I4ScV7TeWj0vD1ttA 95Jwdp63NunvPTSO/JfqnzcfE7kOAzb4hkj7hUvAmIW/VU1lXQfYvGMrfH66LB9K1L0O lJkR1KuQnz9PoTwNQHRgc3WeeY18CTIAuSRt0/iq02cIPY9TgeWhLzBry0DvDXXpUoxG wbEg== X-Gm-Message-State: AOAM531+lHYA7fXOU+geTo9GsSddqWIImjt08iw9NHcFwHq1gA97I9wf y7wP/Dm4kjB48dtIZqCvIis3EjAjBqvKLQ== X-Google-Smtp-Source: ABdhPJzzRvAmDv0hjHC86h7CpO1ssnr6UkSOuhECwRQ4Ps6PsU8H8em9LsD7I0c+G1XYWVJeLEDdzw== X-Received: by 2002:aa7:c543:: with SMTP id s3mr21495854edr.88.1607885783204; Sun, 13 Dec 2020 10:56:23 -0800 (PST) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com. [209.85.221.48]) by smtp.gmail.com with ESMTPSA id ho12sm11320349ejc.45.2020.12.13.10.56.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Dec 2020 10:56:22 -0800 (PST) Received: by mail-wr1-f48.google.com with SMTP id 91so14244491wrj.7; Sun, 13 Dec 2020 10:56:22 -0800 (PST) X-Received: by 2002:a5d:6cc2:: with SMTP id c2mr14438738wrc.374.1607885782457; Sun, 13 Dec 2020 10:56:22 -0800 (PST) MIME-Version: 1.0 References: <202012131806.0BDI6Puj082474@repo.freebsd.org> In-Reply-To: <202012131806.0BDI6Puj082474@repo.freebsd.org> From: Alexander Richardson Date: Sun, 13 Dec 2020 18:56:11 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368609 - in head/sys: kern sys To: Mateusz Guzik Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CvDJS4zhsz4l65 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 13 Dec 2020 18:56:24 -0000 On Sun, 13 Dec 2020 at 18:06, Mateusz Guzik wrote: > > Author: mjg > Date: Sun Dec 13 18:06:24 2020 > New Revision: 368609 > URL: https://svnweb.freebsd.org/changeset/base/368609 > > Log: > fd: fix fdrop prediction when closing a fd > > Most of the time this is the last reference, contrary to typical fdrop use. > > Modified: > head/sys/kern/kern_descrip.c > head/sys/sys/file.h > > Modified: head/sys/kern/kern_descrip.c > ============================================================================== > --- head/sys/kern/kern_descrip.c Sun Dec 13 16:26:37 2020 (r368608) > +++ head/sys/kern/kern_descrip.c Sun Dec 13 18:06:24 2020 (r368609) > @@ -2766,7 +2766,7 @@ closef(struct file *fp, struct thread *td) > FILEDESC_XUNLOCK(fdp); > } > } > - return (fdrop(fp, td)); > + return (fdrop_close(fp, td)); > } > > /* > > Modified: head/sys/sys/file.h > ============================================================================== > --- head/sys/sys/file.h Sun Dec 13 16:26:37 2020 (r368608) > +++ head/sys/sys/file.h Sun Dec 13 18:06:24 2020 (r368609) > @@ -299,6 +299,17 @@ fhold(struct file *fp) > _error; \ > }) > > +#define fdrop_close(fp, td) ({ \ > + struct file *_fp; \ > + int _error; \ > + \ > + _error = 0; \ > + _fp = (fp); \ > + if (__predict_true(refcount_release(&_fp->f_count))) \ > + _error = _fdrop(_fp, td); \ > + _error; \ > +}) > + > static __inline fo_rdwr_t fo_read; > static __inline fo_rdwr_t fo_write; > static __inline fo_truncate_t fo_truncate; Wouldn't this be more readable as a static __inline function (or if you are concerned about it not being inlined, __always_inline)? Also means you can drop the temporary _fp variable that's there to avoid side-effects in macro args. Regards, Alex From owner-svn-src-head@freebsd.org Sun Dec 13 18:57: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 BBE194C0AAE; Sun, 13 Dec 2020 18:57:08 +0000 (UTC) (envelope-from se@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvDKJ4vd9z4l7f; Sun, 13 Dec 2020 18:57:08 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f1a9b0054962bf042eefcc0.dip0.t-ipconnect.de [IPv6:2003:cd:5f1a:9b00:5496:2bf0:42ee:fcc0]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id F33FA9BEA; Sun, 13 Dec 2020 18:57:07 +0000 (UTC) (envelope-from se@freebsd.org) To: Yuri Pankov References: <202012130938.0BD9cpTp041055@repo.freebsd.org> From: Stefan Esser Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r368606 - head/usr.bin/calendar Message-ID: <3dad51fd-ce00-99e2-e83a-fa4c18e6bfce@freebsd.org> Date: Sun, 13 Dec 2020 19:57:05 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="I04qkHyLSvATaJOyKYAw0dSgjqSDPElBv" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 13 Dec 2020 18:57:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --I04qkHyLSvATaJOyKYAw0dSgjqSDPElBv Content-Type: multipart/mixed; boundary="7Z581B1MjGYPd68vZ9am94BCVLlFBCfqK"; protected-headers="v1" From: Stefan Esser To: Yuri Pankov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <3dad51fd-ce00-99e2-e83a-fa4c18e6bfce@freebsd.org> Subject: Re: svn commit: r368606 - head/usr.bin/calendar References: <202012130938.0BD9cpTp041055@repo.freebsd.org> In-Reply-To: --7Z581B1MjGYPd68vZ9am94BCVLlFBCfqK Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Am 13.12.20 um 12:13 schrieb Yuri Pankov: > Stefan E=C3=9Fer wrote: >> Author: se >> Date: Sun Dec 13 09:38:50 2020 >> New Revision: 368606 >> URL: https://svnweb.freebsd.org/changeset/base/368606 >> >> Log: >> =C2=A0=C2=A0 Fix WITHOUT_ICONV build >> =C2=A0=C2=A0 There was an unprotected use of nl_langinfo() to determin= e the=20 >> order of >> =C2=A0=C2=A0 day vs. month in the generated output. >=20 > That's strange, nl_langinfo() is standard and its visibility should not= =20 > (and does not?) depend on WITH/WITHOUT_ICONV.=C2=A0 May be just move=20 > langinfo.h include outside of "#ifdef WITH_ICONV" block? Yes, you are perfectly right ... I had noticed that WITHOUT_ICONV lead to a problem due to the missing=20 prototype, but I had not seen that this was due to the include of langinfo.h being conditional on WITH_ICONV. I'll revert this commit and move the include of langinfo.h out of the conditional block, as suggested by you. Thanks for pointing this out! Best regards, STefan --7Z581B1MjGYPd68vZ9am94BCVLlFBCfqK-- --I04qkHyLSvATaJOyKYAw0dSgjqSDPElBv Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAl/WZAEFAwAAAAAACgkQR+u171r99UR6 MAgAuImw4Y0y+GDlerwKn4/l5GS0rFaipOtmyIP3w/bDQmDoIuB23n7jjfdQQF051BvRi9CWVEof wpngvE6O8LavM9B/WIedi2s9tR9sQyAiPMUTDfnbBgJ+VxBM+WYd0aNNeeJss5i6Itmw8MSg187j TjZl++15uX9wu4EnL5itAiZWqX0rS0+nyxMkFsuW+r7NBubNheA+Zp9+JaZqF3UnH9Q8c8JwDIjf xhcJQzK53F2YBVnUu5GW20044WFp+9lazQJyG3Bb5RmnaKftaO1OUzRnnHOT7TNv+nJ3fMyiAeA/ hGi0UeeA4dE4BkT56ull+gcam4lSJ9T3P1A6iTiNRQ== =oyw3 -----END PGP SIGNATURE----- --I04qkHyLSvATaJOyKYAw0dSgjqSDPElBv-- From owner-svn-src-head@freebsd.org Sun Dec 13 19:03: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 181F14C0AF4; Sun, 13 Dec 2020 19:03:39 +0000 (UTC) (envelope-from se@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvDSq076qz4lxH; Sun, 13 Dec 2020 19:03:39 +0000 (UTC) (envelope-from se@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 EB76B145D4; Sun, 13 Dec 2020 19:03:38 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BDJ3cDs020279; Sun, 13 Dec 2020 19:03:38 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDJ3cBX020278; Sun, 13 Dec 2020 19:03:38 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012131903.0BDJ3cBX020278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sun, 13 Dec 2020 19:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368610 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 368610 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.34 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, 13 Dec 2020 19:03:39 -0000 Author: se Date: Sun Dec 13 19:03:38 2020 New Revision: 368610 URL: https://svnweb.freebsd.org/changeset/base/368610 Log: Revert r368606 The issue will be fixed in a different way. Reported by: yuripv Modified: head/usr.bin/calendar/events.c Modified: head/usr.bin/calendar/events.c ============================================================================== --- head/usr.bin/calendar/events.c Sun Dec 13 18:06:24 2020 (r368609) +++ head/usr.bin/calendar/events.c Sun Dec 13 19:03:38 2020 (r368610) @@ -202,13 +202,9 @@ event_print_all(FILE *fp) struct event *e; struct tm tm; char dbuf[80]; -#ifdef WITH_ICONV static int d_first; d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); -#else -#define d_first 0 -#endif while (walkthrough_dates(&e) != 0) { if (e) { From owner-svn-src-head@freebsd.org Sun Dec 13 19:07: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 33E944C0EC9; Sun, 13 Dec 2020 19:07:00 +0000 (UTC) (envelope-from se@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvDXh11fVz4mWP; Sun, 13 Dec 2020 19:07:00 +0000 (UTC) (envelope-from se@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 1608E1485D; Sun, 13 Dec 2020 19:07:00 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BDJ6xUa020487; Sun, 13 Dec 2020 19:06:59 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDJ6xvJ020486; Sun, 13 Dec 2020 19:06:59 GMT (envelope-from se@FreeBSD.org) Message-Id: <202012131906.0BDJ6xvJ020486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sun, 13 Dec 2020 19:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368611 - head/usr.bin/calendar X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/usr.bin/calendar X-SVN-Commit-Revision: 368611 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.34 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, 13 Dec 2020 19:07:00 -0000 Author: se Date: Sun Dec 13 19:06:59 2020 New Revision: 368611 URL: https://svnweb.freebsd.org/changeset/base/368611 Log: Fix WITHOUT_ICONV build Move the include of langinfo.h out of the WITH_ICONV condition block, since it is not dependent on ICONV. This was correct when nl_langinfo() had only been called in the WITH_ICONV case, but that is no longer the case. Submitted by: yuripv Modified: head/usr.bin/calendar/events.c Modified: head/usr.bin/calendar/events.c ============================================================================== --- head/usr.bin/calendar/events.c Sun Dec 13 19:03:38 2020 (r368610) +++ head/usr.bin/calendar/events.c Sun Dec 13 19:06:59 2020 (r368611) @@ -32,13 +32,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #ifdef WITH_ICONV #include #include -#include static iconv_t conv = (iconv_t)-1; static char *currentEncoding = NULL; From owner-svn-src-head@freebsd.org Sun Dec 13 19:10: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 8A1BF4C112B; Sun, 13 Dec 2020 19:10:06 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvDcG343Yz4mZt; Sun, 13 Dec 2020 19:10:06 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x32f.google.com with SMTP id e25so13313547wme.0; Sun, 13 Dec 2020 11:10:06 -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=WrS1KG5iCmCZ1AzCDuBBO2UXQ0egfcQPbNG9LftVUHc=; b=JBkPA0SF9uK2W1dKqsM3pv/rGrPr/Qs8J4zsBMXWItdiKX3dKxr4jCwwrKfUxGee9q 843+kjbpmuHkWMULjP98AY9PQA9As/INELxNWag0A7vcwJznQc2GOdDB5ImnDes6N1Qd PYElc5Yz2VHSfGiEorNtTFl6tFF/cXlZBQNkPfNul9E3+DUQFPwpTtT5Ld236L3UlrwN 30tgWtrX6IL34QraXbjmPGZf8hQfxJGCcS/hCOFdQ0WtBBp9d0WtgQvPeElEd/GXcGgz yJqQAW2YuJU1pIDSxf6lPkZDTe5Yxw1Gm5bkAwdPc6PJwsObaWWP+VRqqRUok1FvZD/U cttg== 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=WrS1KG5iCmCZ1AzCDuBBO2UXQ0egfcQPbNG9LftVUHc=; b=U/Q0C/bewNZjgaC+rm5Uk2rVhL2/oFKl/1Ld3+kxBj9b/aKXA/CdgWfG9cIOolQSW3 QbOUxX0qQulTmDi3LEvge/7dYJyQGHqGr/Cu067/hyj2mtEYWayqv2bhcpjLasGGsf3o OACQMg6nmvvvlaPNuqWqHCM5hZKgjcr0+wrzn5SvlGx0qTqZCaNO+PZpXkO1s8qDj80w z4kqNjI9/biNrddu1K+6zzH0hVlPDqZOOaGdNoRO4tsUNG4g98ZreqBa3BBYFVb2m3o3 Th9LfEYDcE/Nxy1D3+cE9VQG/ZXUVHqVOXBjpQLsOt97mr7WvZ9jGVC2U96XXGgIO4Gj BiwQ== X-Gm-Message-State: AOAM531Koj8cZf05ks0z9aB2tbjwTIDQofke5O3A7HgKfr7fck4QXxCX ldAQ+DHF3kB07klMqbdz4JqU8DWRsbYGizIGB+Ge0fvt X-Google-Smtp-Source: ABdhPJw5c+9rs4CQIENYTMuHZcd13VYmGuXD30i1EPD7xAb4P0DmuUCPqlLNvoQLhQMU3R+Ahe+WBVIQofcj2gwYMcU= X-Received: by 2002:a1c:f00a:: with SMTP id a10mr24204869wmb.83.1607886603552; Sun, 13 Dec 2020 11:10:03 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:f811:0:0:0:0:0 with HTTP; Sun, 13 Dec 2020 11:10:02 -0800 (PST) In-Reply-To: References: <202012131806.0BDI6Puj082474@repo.freebsd.org> From: Mateusz Guzik Date: Sun, 13 Dec 2020 20:10:02 +0100 Message-ID: Subject: Re: svn commit: r368609 - in head/sys: kern sys To: Alexander Richardson Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CvDcG343Yz4mZt X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 13 Dec 2020 19:10:06 -0000 Unfortunately inlines mess with __FILE__/__LINE__ by showing the implementation instead of the consumer. This in particular matters with https://reviews.freebsd.org/D27600 I failed to find replacements for __ macros which don't suffer the problem. On 12/13/20, Alexander Richardson wrote: > On Sun, 13 Dec 2020 at 18:06, Mateusz Guzik wrote: >> >> Author: mjg >> Date: Sun Dec 13 18:06:24 2020 >> New Revision: 368609 >> URL: https://svnweb.freebsd.org/changeset/base/368609 >> >> Log: >> fd: fix fdrop prediction when closing a fd >> >> Most of the time this is the last reference, contrary to typical fdrop >> use. >> >> Modified: >> head/sys/kern/kern_descrip.c >> head/sys/sys/file.h >> >> Modified: head/sys/kern/kern_descrip.c >> ============================================================================== >> --- head/sys/kern/kern_descrip.c Sun Dec 13 16:26:37 2020 >> (r368608) >> +++ head/sys/kern/kern_descrip.c Sun Dec 13 18:06:24 2020 >> (r368609) >> @@ -2766,7 +2766,7 @@ closef(struct file *fp, struct thread *td) >> FILEDESC_XUNLOCK(fdp); >> } >> } >> - return (fdrop(fp, td)); >> + return (fdrop_close(fp, td)); >> } >> >> /* >> >> Modified: head/sys/sys/file.h >> ============================================================================== >> --- head/sys/sys/file.h Sun Dec 13 16:26:37 2020 (r368608) >> +++ head/sys/sys/file.h Sun Dec 13 18:06:24 2020 (r368609) >> @@ -299,6 +299,17 @@ fhold(struct file *fp) >> _error; \ >> }) >> >> +#define fdrop_close(fp, td) ({ \ >> + struct file *_fp; \ >> + int _error; \ >> + \ >> + _error = 0; \ >> + _fp = (fp); \ >> + if (__predict_true(refcount_release(&_fp->f_count))) \ >> + _error = _fdrop(_fp, td); \ >> + _error; \ >> +}) >> + >> static __inline fo_rdwr_t fo_read; >> static __inline fo_rdwr_t fo_write; >> static __inline fo_truncate_t fo_truncate; > > Wouldn't this be more readable as a static __inline function (or if > you are concerned about it not being inlined, __always_inline)? Also > means you can drop the temporary _fp variable that's there to avoid > side-effects in macro args. > > Regards, > Alex > -- Mateusz Guzik From owner-svn-src-head@freebsd.org Sun Dec 13 19: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 7F6E64C15AD; Sun, 13 Dec 2020 19:22:01 +0000 (UTC) (envelope-from rlibby@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvDt04pdMz4n3R; Sun, 13 Dec 2020 19:22:00 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f195.google.com with SMTP id p14so4607357qke.6; Sun, 13 Dec 2020 11:22:00 -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=8aUCTBmfPTpB4R8j680QPeHe4WG2rBWHvnTHh9RvBTw=; b=UPw8nsztP2gJ0FbBBsgCewlC6CeaFKE/oscuqe0EOU4OpXYA+x1I22v/ntNIsWGyji V1UMQDK0JUdmVF4Z38P2m/BVKHMP0ay0qAKXa0t9/rA8aQFX36oGKJt6zdKW+V0RdtXb Fm9Q/hwIrF/LjiCh2m2MbvII+ZYKxkkZU4GhOCU27pea5/DKHZAWE8gT8ur8NVgHyjHC yrA3C6sJLbnsHWT3qmTQi4COQVxY3azb1RX2Xgl/xWqe1fEd0OqVYWuGpPOPAQwKcGaj xT7cebZaAPpSNw0IelvCihoE3btiEBzvYGfqtXQE+r1gs0LvKGj+WQYj5BShwmA+QVH9 xYCw== X-Gm-Message-State: AOAM532ZpV7Ynig6FyZ6c8Mv1DNrwO0KTIu9Gr5r7MyIbEOnXSJ6NgiN PQmk+PNu1qSw9MF9qdSfu66HcP8k1JhPkg== X-Google-Smtp-Source: ABdhPJzlJqd+6J1yDkI1Y9Syk6113yJmiP47S25kkO/gs+g4dkzIaU+63Ri/flienlfRyLvCEIZgtQ== X-Received: by 2002:a37:8384:: with SMTP id f126mr28149836qkd.500.1607887319424; Sun, 13 Dec 2020 11:21:59 -0800 (PST) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com. [209.85.222.172]) by smtp.gmail.com with ESMTPSA id p58sm13469315qte.38.2020.12.13.11.21.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Dec 2020 11:21:58 -0800 (PST) Received: by mail-qk1-f172.google.com with SMTP id n142so13740507qkn.2; Sun, 13 Dec 2020 11:21:58 -0800 (PST) X-Received: by 2002:a05:620a:531:: with SMTP id h17mr28248022qkh.428.1607887318518; Sun, 13 Dec 2020 11:21:58 -0800 (PST) MIME-Version: 1.0 References: <202008251330.07PDU4WQ055570@repo.freebsd.org> In-Reply-To: <202008251330.07PDU4WQ055570@repo.freebsd.org> From: Ryan Libby Date: Sun, 13 Dec 2020 11:21:47 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r364761 - in head: share/mk sys/conf sys/modules/cloudabi32 sys/modules/cloudabi64 sys/modules/linux sys/modules/linux64 To: Alex Richardson Cc: src-committers , svn-src-all , svn-src-head , Brooks Davis , Ed Maste Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CvDt04pdMz4n3R 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.195 as permitted sender) smtp.mailfrom=rlibby@gmail.com X-Spamd-Result: default: False [-2.58 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.58)[-0.577]; FORGED_SENDER(0.30)[rlibby@freebsd.org,rlibby@gmail.com]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.222.195:from]; 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]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[rlibby]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; SPAMHAUS_ZRD(0.00)[209.85.222.195:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.195:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.195:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 13 Dec 2020 19:22:01 -0000 On Tue, Aug 25, 2020 at 6:30 AM Alex Richardson wrote: > > Author: arichardson > Date: Tue Aug 25 13:30:03 2020 > New Revision: 364761 > URL: https://svnweb.freebsd.org/changeset/base/364761 > > Log: > Pass -fuse-ld=/path/to/ld if ${LD} != "ld" > > This is needed so that setting LD/XLD is not ignored when linking with $CC > instead of directly using $LD. Currently only clang accepts an absolute > path for -fuse-ld= (Clang 12+ will add a new --ld-path flag), so we now > warn when building with GCC and $LD != "ld" since that might result in the > wrong linker being used. > > We have been setting XLD=/path/to/cheri/ld.lld in CheriBSD for a long time and > used a similar version of this patch to avoid linking with /usr/bin/ld. > This change is also required when building FreeBSD on an Ubuntu with Clang: > In that case we set XCC=/usr/lib/llvm-10/bin/clang and since > /usr/lib/llvm-10/bin/ does not contain a "ld" binary the build fails with > `clang: error: unable to execute command: Executable "ld" doesn't exist!` > unless we pass -fuse-ld=/usr/lib/llvm-10/bin/ld.lld. > > This change passes -fuse-ld instead of copying ${XLD} to WOLRDTMP/bin/ld > since then we would have to ensure that this file does not exist while > building the bootstrap tools. The cross-linker might not be compatible with > the host linker (e.g. when building on macos: host-linker= Mach-O /usr/bin/ld, > cross-linker=LLVM ld.lld). > > Reviewed By: brooks, emaste > Differential Revision: https://reviews.freebsd.org/D26055 > > Modified: > head/share/mk/bsd.sys.mk > head/sys/conf/kern.mk > head/sys/conf/kern.post.mk > head/sys/modules/cloudabi32/Makefile > head/sys/modules/cloudabi64/Makefile > head/sys/modules/linux/Makefile > head/sys/modules/linux64/Makefile > > Modified: head/share/mk/bsd.sys.mk > ============================================================================== > --- head/share/mk/bsd.sys.mk Tue Aug 25 13:29:57 2020 (r364760) > +++ head/share/mk/bsd.sys.mk Tue Aug 25 13:30:03 2020 (r364761) > @@ -284,6 +284,19 @@ CFLAGS+= ERROR-tried-to-rebuild-during-make-install > .endif > .endif > > +# Please keep this if in sync with kern.mk > +.if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") > +# Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". > +# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. > +.if ${COMPILER_TYPE} == "clang" > +LDFLAGS+= -fuse-ld=${LD:[1]} > +.else > +# GCC does not support an absolute path for -fuse-ld so we just print this > +# warning instead and let the user add the required symlinks. > +.warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported FYI: This causes a huge amount of wrong and irrelevant warnings in the build log for gcc cross compilers with XLD set, such as the toolchain from pkg install amd64-xtoolchain-gcc. That causes XLD to be set (via CROSS_BINUTILS_PREFIX in Makefile.inc1) to a path which is indeed the default linker for the cross compiler. The warnings are harmless, but annoying. Sorry, I don't have a suggestion for a better method. You can see an example in the build log from a gcc build in CI here (although note that the build currently fails for unrelated reasons): https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc6_build/3131 > +.endif > +.endif > + > # Tell bmake not to mistake standard targets for things to be searched for > # or expect to ever be up-to-date. > PHONY_NOTMAIN = analyze afterdepend afterinstall all beforedepend beforeinstall \ > > Modified: head/sys/conf/kern.mk > ============================================================================== > --- head/sys/conf/kern.mk Tue Aug 25 13:29:57 2020 (r364760) > +++ head/sys/conf/kern.mk Tue Aug 25 13:30:03 2020 (r364761) > @@ -270,6 +270,22 @@ CFLAGS+= -std=iso9899:1999 > CFLAGS+= -std=${CSTD} > .endif # CSTD > > +# Please keep this if in sync with bsd.sys.mk > +.if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") > +# Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". > +# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. > +.if ${COMPILER_TYPE} == "clang" > +# Note: unlike bsd.sys.mk we can't use LDFLAGS here since that is used for the > +# flags required when linking the kernel. We don't need those flags when > +# building the vdsos. However, we do need -fuse-ld, so use ${CCLDFLAGS} instead. > +CCLDFLAGS+= -fuse-ld=${LD:[1]} > +.else > +# GCC does not support an absolute path for -fuse-ld so we just print this > +# warning instead and let the user add the required symlinks. > +.warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported > +.endif > +.endif > + > # Set target-specific linker emulation name. > LD_EMULATION_aarch64=aarch64elf > LD_EMULATION_amd64=elf_x86_64_fbsd > > Modified: head/sys/conf/kern.post.mk > ============================================================================== > --- head/sys/conf/kern.post.mk Tue Aug 25 13:29:57 2020 (r364760) > +++ head/sys/conf/kern.post.mk Tue Aug 25 13:30:03 2020 (r364761) > @@ -228,7 +228,7 @@ kernel-clean: > # in the a.out ld. For now, this works. > hack.pico: Makefile > :> hack.c > - ${CC} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico > + ${CC} ${CCLDFLAGS} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico > rm -f hack.c > > offset.inc: $S/kern/genoffset.sh genoffset.o > > Modified: head/sys/modules/cloudabi32/Makefile > ============================================================================== > --- head/sys/modules/cloudabi32/Makefile Tue Aug 25 13:29:57 2020 (r364760) > +++ head/sys/modules/cloudabi32/Makefile Tue Aug 25 13:30:03 2020 (r364761) > @@ -33,7 +33,7 @@ BINARY_ARCHITECTURE=i386 > .endif > > cloudabi32_vdso.o: ${VDSO_SRCS} > - ${CC} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib \ > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib \ > -Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \ > ${VDSO_SRCS} -o ${.TARGET} > > > Modified: head/sys/modules/cloudabi64/Makefile > ============================================================================== > --- head/sys/modules/cloudabi64/Makefile Tue Aug 25 13:29:57 2020 (r364760) > +++ head/sys/modules/cloudabi64/Makefile Tue Aug 25 13:30:03 2020 (r364761) > @@ -25,7 +25,7 @@ BINARY_ARCHITECTURE=i386 > .endif > > cloudabi64_vdso.o: ${VDSO_SRCS} > - ${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib \ > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -shared -nostdinc -nostdlib \ > -Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \ > ${VDSO_SRCS} -o ${.TARGET} > > > Modified: head/sys/modules/linux/Makefile > ============================================================================== > --- head/sys/modules/linux/Makefile Tue Aug 25 13:29:57 2020 (r364760) > +++ head/sys/modules/linux/Makefile Tue Aug 25 13:30:03 2020 (r364761) > @@ -54,7 +54,7 @@ linux${SFX}_assym.h: linux${SFX}_genassym.o > sh ${SYSDIR}/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET} > > linux${SFX}_locore.o: linux${SFX}_assym.h assym.inc > - ${CC} -x assembler-with-cpp -DLOCORE -m32 -shared -s \ > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -DLOCORE -m32 -shared -s \ > -pipe -I. -I${SYSDIR} ${WERROR} -Wall -fno-common -nostdinc -nostdlib \ > -fno-omit-frame-pointer -fPIC \ > -Wl,-T${SRCTOP}/sys/${MACHINE_CPUARCH}/linux${SFX}/${VDSO}.lds.s \ > > Modified: head/sys/modules/linux64/Makefile > ============================================================================== > --- head/sys/modules/linux64/Makefile Tue Aug 25 13:29:57 2020 (r364760) > +++ head/sys/modules/linux64/Makefile Tue Aug 25 13:30:03 2020 (r364761) > @@ -30,7 +30,7 @@ linux_assym.h: linux_genassym.o > sh ${SYSDIR}/kern/genassym.sh linux_genassym.o > ${.TARGET} > > linux_locore.o: linux_locore.asm linux_assym.h > - ${CC} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \ > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \ > -pipe -I. -I${SYSDIR} ${WERROR} -Wall -fno-common -fPIC -nostdinc \ > -Wl,-T${SRCTOP}/sys/${MACHINE}/linux/${VDSO}.lds.s \ > -Wl,-soname=${VDSO}.so.1,-warn-common -nostdlib \ From owner-svn-src-head@freebsd.org Sun Dec 13 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 D038D4C1BD5; Sun, 13 Dec 2020 19:43:45 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvFM55cW6z4pWd; Sun, 13 Dec 2020 19:43:45 +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 B39271532A; Sun, 13 Dec 2020 19:43:45 +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 0BDJhj8t045231; Sun, 13 Dec 2020 19:43:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDJhjOj045230; Sun, 13 Dec 2020 19:43:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012131943.0BDJhjOj045230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 13 Dec 2020 19:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368612 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368612 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.34 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, 13 Dec 2020 19:43:45 -0000 Author: kib Date: Sun Dec 13 19:43:45 2020 New Revision: 368612 URL: https://svnweb.freebsd.org/changeset/base/368612 Log: Correct indent. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/subr_sleepqueue.c Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Sun Dec 13 19:06:59 2020 (r368611) +++ head/sys/kern/subr_sleepqueue.c Sun Dec 13 19:43:45 2020 (r368612) @@ -462,7 +462,7 @@ sleepq_check_ast_sc_locked(struct thread *td, struct s p = td->td_proc; CTR3(KTR_PROC, "sleepq catching signals: thread %p (pid %ld, %s)", - (void *)td, (long)p->p_pid, td->td_name); + (void *)td, (long)p->p_pid, td->td_name); PROC_LOCK(p); /* From owner-svn-src-head@freebsd.org Sun Dec 13 19:45: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 57CA54C213C; Sun, 13 Dec 2020 19:45:43 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvFPM22D5z4plF; Sun, 13 Dec 2020 19:45:43 +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 38515153A1; Sun, 13 Dec 2020 19:45:43 +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 0BDJjhxJ045416; Sun, 13 Dec 2020 19:45:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDJjhSY045415; Sun, 13 Dec 2020 19:45:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012131945.0BDJjhSY045415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 13 Dec 2020 19:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368613 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368613 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.34 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, 13 Dec 2020 19:45:43 -0000 Author: kib Date: Sun Dec 13 19:45:42 2020 New Revision: 368613 URL: https://svnweb.freebsd.org/changeset/base/368613 Log: Fix TDP_WAKEUP/thr_wake(curthread->td_tid) after r366428. Reported by: arichardson Reviewed by: arichardson, markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27597 Modified: head/sys/kern/subr_sleepqueue.c Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Sun Dec 13 19:43:45 2020 (r368612) +++ head/sys/kern/subr_sleepqueue.c Sun Dec 13 19:45:42 2020 (r368613) @@ -441,12 +441,10 @@ sleepq_check_ast_sc_locked(struct thread *td, struct s mtx_assert(&sc->sc_lock, MA_OWNED); - ret = 0; if ((td->td_pflags & TDP_WAKEUP) != 0) { td->td_pflags &= ~TDP_WAKEUP; - ret = EINTR; thread_lock(td); - return (0); + return (EINTR); } /* From owner-svn-src-head@freebsd.org Sun Dec 13 21:28: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 7DEEC4C4078; Sun, 13 Dec 2020 21:28:16 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvHgh39qZz3BpW; Sun, 13 Dec 2020 21:28:16 +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 5AC2F1637A; Sun, 13 Dec 2020 21:28: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 0BDLSGx2007802; Sun, 13 Dec 2020 21:28:16 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDLSGeG007801; Sun, 13 Dec 2020 21:28:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012132128.0BDLSGeG007801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 13 Dec 2020 21:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368614 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368614 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.34 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, 13 Dec 2020 21:28:16 -0000 Author: mjg Date: Sun Dec 13 21:28:15 2020 New Revision: 368614 URL: https://svnweb.freebsd.org/changeset/base/368614 Log: vfs: correctly predict last fdrop on failed open Arguably since the count is guaranteed to be 1 the code should be modified to avoid the work. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sun Dec 13 19:45:42 2020 (r368613) +++ head/sys/kern/vfs_syscalls.c Sun Dec 13 21:28:15 2020 (r368614) @@ -1229,7 +1229,7 @@ success: return (0); bad: KASSERT(indx == -1, ("indx=%d, should be -1", indx)); - fdrop(fp, td); + fdrop_close(fp, td); return (error); } From owner-svn-src-head@freebsd.org Sun Dec 13 21:29: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 074E34C4680; Sun, 13 Dec 2020 21:29:40 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvHjH6hG0z3By3; Sun, 13 Dec 2020 21:29:39 +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 D88D616898; Sun, 13 Dec 2020 21:29:39 +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 0BDLTd39007913; Sun, 13 Dec 2020 21:29:39 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDLTdq0007912; Sun, 13 Dec 2020 21:29:39 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012132129.0BDLTdq0007912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 13 Dec 2020 21:29:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368615 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368615 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.34 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, 13 Dec 2020 21:29:40 -0000 Author: mjg Date: Sun Dec 13 21:29:39 2020 New Revision: 368615 URL: https://svnweb.freebsd.org/changeset/base/368615 Log: cache: fix ups bad predicts - last level fallback normally sees CREATE; the code should be optimized to not get there for said case - fast path commonly fails with ENOENT Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Dec 13 21:28:15 2020 (r368614) +++ head/sys/kern/vfs_cache.c Sun Dec 13 21:29:39 2020 (r368615) @@ -1824,7 +1824,10 @@ retry: } return (-1); negative_success: - if (__predict_false(cnp->cn_nameiop == CREATE)) { + /* + * We don't get here with regular lookup apart from corner cases. + */ + if (__predict_true(cnp->cn_nameiop == CREATE)) { if (cnp->cn_flags & ISLASTCN) { counter_u64_add(numnegzaps, 1); error = cache_zap_locked_bucket(ncp, cnp, hash, blp); @@ -1927,7 +1930,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st } return (-1); negative_success: - if (__predict_false(cnp->cn_nameiop == CREATE)) { + if (cnp->cn_nameiop == CREATE) { if (cnp->cn_flags & ISLASTCN) { vfs_smr_exit(); goto out_fallback; @@ -4589,7 +4592,10 @@ out: case CACHE_FPL_STATUS_HANDLED: MPASS(error != CACHE_FPL_FAILED); cache_fpl_smr_assert_not_entered(fpl); - if (__predict_false(error != 0)) { + /* + * A common error is ENOENT. + */ + if (error != 0) { ndp->ni_dvp = NULL; ndp->ni_vp = NULL; cache_fpl_cleanup_cnp(cnp); From owner-svn-src-head@freebsd.org Sun Dec 13 21:30: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 6F1D44C4362; Sun, 13 Dec 2020 21:30:43 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvHkW2nMhz3BrJ; Sun, 13 Dec 2020 21:30:43 +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 52929161F8; Sun, 13 Dec 2020 21:30:43 +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 0BDLUhnJ009020; Sun, 13 Dec 2020 21:30:43 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDLUhGU009019; Sun, 13 Dec 2020 21:30:43 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012132130.0BDLUhGU009019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 13 Dec 2020 21:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368616 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 368616 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.34 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, 13 Dec 2020 21:30:43 -0000 Author: mjg Date: Sun Dec 13 21:30:42 2020 New Revision: 368616 URL: https://svnweb.freebsd.org/changeset/base/368616 Log: Patch annotation in sigdeferstop Probability flipped since sigdefer handling was moved away from regular VOP calls. Modified: head/sys/sys/signalvar.h Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Sun Dec 13 21:29:39 2020 (r368615) +++ head/sys/sys/signalvar.h Sun Dec 13 21:30:42 2020 (r368616) @@ -367,7 +367,7 @@ static inline int sigdeferstop(int mode) { - if (__predict_true(mode == SIGDEFERSTOP_NOP)) + if (__predict_false(mode == SIGDEFERSTOP_NOP)) return (SIGDEFERSTOP_VAL_NCHG); return (sigdeferstop_impl(mode)); } From owner-svn-src-head@freebsd.org Sun Dec 13 21:32: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 112AF4C490F; Sun, 13 Dec 2020 21:32:20 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvHmN03Fvz3CPT; Sun, 13 Dec 2020 21:32:20 +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 E8E6516A0B; Sun, 13 Dec 2020 21:32:19 +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 0BDLWJXd011344; Sun, 13 Dec 2020 21:32:19 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDLWJJu011342; Sun, 13 Dec 2020 21:32:19 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012132132.0BDLWJJu011342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 13 Dec 2020 21:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368617 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368617 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.34 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, 13 Dec 2020 21:32:20 -0000 Author: mjg Date: Sun Dec 13 21:32:19 2020 New Revision: 368617 URL: https://svnweb.freebsd.org/changeset/base/368617 Log: uipc: disable prediction in unp_pcb_lock_peer The branch is not very predictable one way or the other, at least during buildkernel where it only correctly matched 57% of calls. Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Sun Dec 13 21:30:42 2020 (r368616) +++ head/sys/kern/uipc_usrreq.c Sun Dec 13 21:32:19 2020 (r368617) @@ -382,7 +382,7 @@ unp_pcb_lock_peer(struct unpcb *unp) UNP_PCB_LOCK_ASSERT(unp); unp2 = unp->unp_conn; - if (__predict_false(unp2 == NULL)) + if (unp2 == NULL) return (NULL); if (__predict_false(unp == unp2)) return (unp); From owner-svn-src-head@freebsd.org Sun Dec 13 23:51: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 09B624C7FAE; Sun, 13 Dec 2020 23:51:52 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvLsM6xrzz3QGc; Sun, 13 Dec 2020 23:51:51 +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 D73FE18423; Sun, 13 Dec 2020 23:51:51 +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 0BDNppkp008797; Sun, 13 Dec 2020 23:51:51 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BDNppv3008796; Sun, 13 Dec 2020 23:51:51 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202012132351.0BDNppv3008796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 13 Dec 2020 23:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368622 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 368622 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.34 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, 13 Dec 2020 23:51:52 -0000 Author: tuexen Date: Sun Dec 13 23:51:51 2020 New Revision: 368622 URL: https://svnweb.freebsd.org/changeset/base/368622 Log: Harden the handling of outgoing streams in case of an restart or INIT collision. This avouds an out-of-bounce access in case the peer can break the cookie signature. Thanks to Felix Wilhelm from Google for reporting the issue. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Dec 13 23:32:50 2020 (r368621) +++ head/sys/netinet/sctp_input.c Sun Dec 13 23:51:51 2020 (r368622) @@ -1699,7 +1699,9 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle NULL); } asoc->my_rwnd = ntohl(initack_cp->init.a_rwnd); - asoc->pre_open_streams = ntohs(initack_cp->init.num_outbound_streams); + if (asoc->pre_open_streams < asoc->streamoutcnt) { + asoc->pre_open_streams = asoc->streamoutcnt; + } if (ntohl(init_cp->init.initiate_tag) != asoc->peer_vtag) { /* @@ -1831,7 +1833,9 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle /* move to OPEN state, if not in SHUTDOWN_SENT */ SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); } - asoc->pre_open_streams = ntohs(initack_cp->init.num_outbound_streams); + if (asoc->pre_open_streams < asoc->streamoutcnt) { + asoc->pre_open_streams = asoc->streamoutcnt; + } asoc->init_seq_number = ntohl(initack_cp->init.initial_tsn); asoc->sending_seq = asoc->asconf_seq_out = asoc->str_reset_seq_out = asoc->init_seq_number; asoc->asconf_seq_out_acked = asoc->asconf_seq_out - 1; @@ -2108,7 +2112,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in /* process the INIT-ACK info (my info) */ asoc->my_vtag = ntohl(initack_cp->init.initiate_tag); asoc->my_rwnd = ntohl(initack_cp->init.a_rwnd); - asoc->pre_open_streams = ntohs(initack_cp->init.num_outbound_streams); asoc->init_seq_number = ntohl(initack_cp->init.initial_tsn); asoc->sending_seq = asoc->asconf_seq_out = asoc->str_reset_seq_out = asoc->init_seq_number; asoc->asconf_seq_out_acked = asoc->asconf_seq_out - 1; From owner-svn-src-head@freebsd.org Mon Dec 14 00:46: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 9EF3E4A91AC; Mon, 14 Dec 2020 00:46:24 +0000 (UTC) (envelope-from jrtc27@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvN4J46sDz3j59; Mon, 14 Dec 2020 00:46:24 +0000 (UTC) (envelope-from jrtc27@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 805CA18EC3; Mon, 14 Dec 2020 00:46:24 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BE0kOtb041297; Mon, 14 Dec 2020 00:46:24 GMT (envelope-from jrtc27@FreeBSD.org) Received: (from jrtc27@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BE0kOnC041296; Mon, 14 Dec 2020 00:46:24 GMT (envelope-from jrtc27@FreeBSD.org) Message-Id: <202012140046.0BE0kOnC041296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrtc27 set sender to jrtc27@FreeBSD.org using -f From: Jessica Clarke Date: Mon, 14 Dec 2020 00:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368623 - head/stand/common X-SVN-Group: head X-SVN-Commit-Author: jrtc27 X-SVN-Commit-Paths: head/stand/common X-SVN-Commit-Revision: 368623 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.34 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, 14 Dec 2020 00:46:24 -0000 Author: jrtc27 Date: Mon Dec 14 00:46:24 2020 New Revision: 368623 URL: https://svnweb.freebsd.org/changeset/base/368623 Log: loader: Print autoboot countdown immediately, not at 9 For the first second otime and ntime are equal so no message gets printed. Instead we should print the countdown right from the start, although we do it at the end of the first iteration so that if a key has already been pressed then the message is suppressed. Reviewed by: imp Approved by: imp Differential Revision: https://reviews.freebsd.org/D26935 Modified: head/stand/common/boot.c Modified: head/stand/common/boot.c ============================================================================== --- head/stand/common/boot.c Sun Dec 13 23:51:51 2020 (r368622) +++ head/stand/common/boot.c Mon Dec 14 00:46:24 2020 (r368623) @@ -202,8 +202,9 @@ autoboot(int timeout, char *prompt) } if (timeout >= 0) { - otime = time(NULL); - when = otime + timeout; /* when to boot */ + otime = -1; + ntime = time(NULL); + when = ntime + timeout; /* when to boot */ yes = 0; From owner-svn-src-head@freebsd.org Mon Dec 14 00:48: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 0C9154A92EC; Mon, 14 Dec 2020 00:48:00 +0000 (UTC) (envelope-from jrtc27@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvN676yyVz3jH1; Mon, 14 Dec 2020 00:47:59 +0000 (UTC) (envelope-from jrtc27@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 E273F18F2E; Mon, 14 Dec 2020 00:47:59 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BE0lxjk041421; Mon, 14 Dec 2020 00:47:59 GMT (envelope-from jrtc27@FreeBSD.org) Received: (from jrtc27@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BE0lx9N041420; Mon, 14 Dec 2020 00:47:59 GMT (envelope-from jrtc27@FreeBSD.org) Message-Id: <202012140047.0BE0lx9N041420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrtc27 set sender to jrtc27@FreeBSD.org using -f From: Jessica Clarke Date: Mon, 14 Dec 2020 00:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368624 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: jrtc27 X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 368624 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.34 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, 14 Dec 2020 00:48:00 -0000 Author: jrtc27 Date: Mon Dec 14 00:47:59 2020 New Revision: 368624 URL: https://svnweb.freebsd.org/changeset/base/368624 Log: mips: Fix sub-word atomics implementation These aligned the address but then always used the least significant bits of the value in memory, which is the wrong half 50% of the time for 16-bit atomics and the wrong quarter 75% of the time for 8-bit atomics. These bugs were all present in r178172, the commit that added the mips port, and have remained for its entire existence to date. Reviewed by: jhb (mentor) Approved by: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D27343 Modified: head/sys/mips/mips/support.S Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Mon Dec 14 00:46:24 2020 (r368623) +++ head/sys/mips/mips/support.S Mon Dec 14 00:47:59 2020 (r368624) @@ -90,6 +90,7 @@ #include #include #include +#include #include #include #include @@ -578,9 +579,14 @@ END(ffs) */ LEAF(atomic_set_16) .set noreorder - srl a0, a0, 2 # round down address to be 32-bit aligned - sll a0, a0, 2 - andi a1, a1, 0xffff + /* NB: Only bit 1 is masked so the ll catches unaligned inputs */ + andi t0, a0, 2 # get unaligned offset + xor a0, a0, t0 # align pointer +#if _BYTE_ORDER == BIG_ENDIAN + xori t0, t0, 2 +#endif + sll t0, t0, 3 # convert byte offset to bit offset + sll a1, a1, t0 # put bits in the right half 1: ll t0, 0(a0) or t0, t0, a1 @@ -600,17 +606,18 @@ END(atomic_set_16) */ LEAF(atomic_clear_16) .set noreorder - srl a0, a0, 2 # round down address to be 32-bit aligned - sll a0, a0, 2 - nor a1, zero, a1 + /* NB: Only bit 1 is masked so the ll catches unaligned inputs */ + andi t0, a0, 2 # get unaligned offset + xor a0, a0, t0 # align pointer +#if _BYTE_ORDER == BIG_ENDIAN + xori t0, t0, 2 +#endif + sll t0, t0, 3 # convert byte offset to bit offset + sll a1, a1, t0 # put bits in the right half + not a1, a1 1: ll t0, 0(a0) - move t1, t0 - andi t1, t1, 0xffff # t1 has the original lower 16 bits - and t1, t1, a1 # t1 has the new lower 16 bits - srl t0, t0, 16 # preserve original top 16 bits - sll t0, t0, 16 - or t0, t0, t1 + and t0, t0, a1 sc t0, 0(a0) beq t0, zero, 1b nop @@ -628,17 +635,23 @@ END(atomic_clear_16) */ LEAF(atomic_subtract_16) .set noreorder - srl a0, a0, 2 # round down address to be 32-bit aligned - sll a0, a0, 2 + /* NB: Only bit 1 is masked so the ll catches unaligned inputs */ + andi t0, a0, 2 # get unaligned offset + xor a0, a0, t0 # align pointer +#if _BYTE_ORDER == BIG_ENDIAN + xori t0, t0, 2 # flip order for big-endian +#endif + sll t0, t0, 3 # convert byte offset to bit offset + sll a1, a1, t0 # put bits in the right half + li t2, 0xffff + sll t2, t2, t0 # compute mask 1: ll t0, 0(a0) - move t1, t0 - andi t1, t1, 0xffff # t1 has the original lower 16 bits - subu t1, t1, a1 - andi t1, t1, 0xffff # t1 has the new lower 16 bits - srl t0, t0, 16 # preserve original top 16 bits - sll t0, t0, 16 - or t0, t0, t1 + subu t1, t0, a1 + /* Exploit ((t0 & ~t2) | (t1 & t2)) = t0 ^ ((t0 ^ t1) & t2) */ + xor t1, t0, t1 + and t1, t1, t2 + xor t0, t0, t1 sc t0, 0(a0) beq t0, zero, 1b nop @@ -655,17 +668,23 @@ END(atomic_subtract_16) */ LEAF(atomic_add_16) .set noreorder - srl a0, a0, 2 # round down address to be 32-bit aligned - sll a0, a0, 2 + /* NB: Only bit 1 is masked so the ll catches unaligned inputs */ + andi t0, a0, 2 # get unaligned offset + xor a0, a0, t0 # align pointer +#if _BYTE_ORDER == BIG_ENDIAN + xori t0, t0, 2 # flip order for big-endian +#endif + sll t0, t0, 3 # convert byte offset to bit offset + sll a1, a1, t0 # put bits in the right half + li t2, 0xffff + sll t2, t2, t0 # compute mask 1: ll t0, 0(a0) - move t1, t0 - andi t1, t1, 0xffff # t1 has the original lower 16 bits - addu t1, t1, a1 - andi t1, t1, 0xffff # t1 has the new lower 16 bits - srl t0, t0, 16 # preserve original top 16 bits - sll t0, t0, 16 - or t0, t0, t1 + addu t1, t0, a1 + /* Exploit ((t0 & ~t2) | (t1 & t2)) = t0 ^ ((t0 ^ t1) & t2) */ + xor t1, t0, t1 + and t1, t1, t2 + xor t0, t0, t1 sc t0, 0(a0) beq t0, zero, 1b nop @@ -682,17 +701,22 @@ END(atomic_add_16) */ LEAF(atomic_add_8) .set noreorder - srl a0, a0, 2 # round down address to be 32-bit aligned - sll a0, a0, 2 + andi t0, a0, 3 # get unaligned offset + xor a0, a0, t0 # align pointer +#if _BYTE_ORDER == BIG_ENDIAN + xori t0, t0, 3 # flip order for big-endian +#endif + sll t0, t0, 3 # convert byte offset to bit offset + sll a1, a1, t0 # put bits in the right quarter + li t2, 0xff + sll t2, t2, t0 # compute mask 1: ll t0, 0(a0) - move t1, t0 - andi t1, t1, 0xff # t1 has the original lower 8 bits - addu t1, t1, a1 - andi t1, t1, 0xff # t1 has the new lower 8 bits - srl t0, t0, 8 # preserve original top 24 bits - sll t0, t0, 8 - or t0, t0, t1 + addu t1, t0, a1 + /* Exploit ((t0 & ~t2) | (t1 & t2)) = t0 ^ ((t0 ^ t1) & t2) */ + xor t1, t0, t1 + and t1, t1, t2 + xor t0, t0, t1 sc t0, 0(a0) beq t0, zero, 1b nop @@ -710,17 +734,22 @@ END(atomic_add_8) */ LEAF(atomic_subtract_8) .set noreorder - srl a0, a0, 2 # round down address to be 32-bit aligned - sll a0, a0, 2 + andi t0, a0, 3 # get unaligned offset + xor a0, a0, t0 # align pointer +#if _BYTE_ORDER == BIG_ENDIAN + xori t0, t0, 3 # flip order for big-endian +#endif + sll t0, t0, 3 # convert byte offset to bit offset + sll a1, a1, t0 # put bits in the right quarter + li t2, 0xff + sll t2, t2, t0 # compute mask 1: ll t0, 0(a0) - move t1, t0 - andi t1, t1, 0xff # t1 has the original lower 8 bits - subu t1, t1, a1 - andi t1, t1, 0xff # t1 has the new lower 8 bits - srl t0, t0, 8 # preserve original top 24 bits - sll t0, t0, 8 - or t0, t0, t1 + subu t1, t0, a1 + /* Exploit ((t0 & ~t2) | (t1 & t2)) = t0 ^ ((t0 ^ t1) & t2) */ + xor t1, t0, t1 + and t1, t1, t2 + xor t0, t0, t1 sc t0, 0(a0) beq t0, zero, 1b nop From owner-svn-src-head@freebsd.org Mon Dec 14 00:50: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 0A3E64A969F; Mon, 14 Dec 2020 00:50:46 +0000 (UTC) (envelope-from jrtc27@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvN9K6yZ2z3jsX; Mon, 14 Dec 2020 00:50:45 +0000 (UTC) (envelope-from jrtc27@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 E22C318DEA; Mon, 14 Dec 2020 00:50:45 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BE0oj2b041831; Mon, 14 Dec 2020 00:50:45 GMT (envelope-from jrtc27@FreeBSD.org) Received: (from jrtc27@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BE0ojMg041830; Mon, 14 Dec 2020 00:50:45 GMT (envelope-from jrtc27@FreeBSD.org) Message-Id: <202012140050.0BE0ojMg041830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrtc27 set sender to jrtc27@FreeBSD.org using -f From: Jessica Clarke Date: Mon, 14 Dec 2020 00:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368625 - head/lib/libc/string X-SVN-Group: head X-SVN-Commit-Author: jrtc27 X-SVN-Commit-Paths: head/lib/libc/string X-SVN-Commit-Revision: 368625 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.34 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, 14 Dec 2020 00:50:46 -0000 Author: jrtc27 Date: Mon Dec 14 00:50:45 2020 New Revision: 368625 URL: https://svnweb.freebsd.org/changeset/base/368625 Log: strdup.3: Function appeared in 4.3BSD-Reno, not 4.4BSD Linux claims 4.3BSD, we claim 4.4BSD and OpenBSD claims 4.3BSD-Reno. It turns out that OpenBSD got it right: the function was added in late 1988 a few months after 4.3BSD-Tahoe, well in advance of 4.3BSD-Reno. Reviewed by: bcr Approved by: bcr Differential Revision: https://reviews.freebsd.org/D27392 Modified: head/lib/libc/string/strdup.3 Modified: head/lib/libc/string/strdup.3 ============================================================================== --- head/lib/libc/string/strdup.3 Mon Dec 14 00:47:59 2020 (r368624) +++ head/lib/libc/string/strdup.3 Mon Dec 14 00:50:45 2020 (r368625) @@ -91,7 +91,7 @@ function is specified by The .Fn strdup function first appeared in -.Bx 4.4 . +.Bx 4.3 Reno . The .Fn strndup function was added in From owner-svn-src-head@freebsd.org Mon Dec 14 00:54: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 2EBA54A98FD; Mon, 14 Dec 2020 00:54:06 +0000 (UTC) (envelope-from jrtc27@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvNFB0pr7z3k7n; Mon, 14 Dec 2020 00:54:06 +0000 (UTC) (envelope-from jrtc27@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 0ED12191B3; Mon, 14 Dec 2020 00:54:06 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BE0s5pp047749; Mon, 14 Dec 2020 00:54:05 GMT (envelope-from jrtc27@FreeBSD.org) Received: (from jrtc27@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BE0s5gv047748; Mon, 14 Dec 2020 00:54:05 GMT (envelope-from jrtc27@FreeBSD.org) Message-Id: <202012140054.0BE0s5gv047748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrtc27 set sender to jrtc27@FreeBSD.org using -f From: Jessica Clarke Date: Mon, 14 Dec 2020 00:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368626 - head/stand/efi/loader/arch/riscv X-SVN-Group: head X-SVN-Commit-Author: jrtc27 X-SVN-Commit-Paths: head/stand/efi/loader/arch/riscv X-SVN-Commit-Revision: 368626 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.34 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, 14 Dec 2020 00:54:06 -0000 Author: jrtc27 Date: Mon Dec 14 00:54:05 2020 New Revision: 368626 URL: https://svnweb.freebsd.org/changeset/base/368626 Log: loader: Ignore the .interp section on RISC-V Without this we risk having the .interp section be placed earlier in the file and mess with section offsets; in particular it has been seen to be placed at the start of the file and cause the PE/COFF header to not be at address 0. This is the same fix as was done for arm64 in r365578. Reviewed by: mhorne, imp Approved by: mhorne, imp Differential Revision: https://reviews.freebsd.org/D27603 Modified: head/stand/efi/loader/arch/riscv/ldscript.riscv Modified: head/stand/efi/loader/arch/riscv/ldscript.riscv ============================================================================== --- head/stand/efi/loader/arch/riscv/ldscript.riscv Mon Dec 14 00:50:45 2020 (r368625) +++ head/stand/efi/loader/arch/riscv/ldscript.riscv Mon Dec 14 00:54:05 2020 (r368626) @@ -82,6 +82,7 @@ SECTIONS _edata = .; /* Unused sections */ + .interp : { *(.interp) } .dynstr : { *(.dynstr) } .hash : { *(.hash) } } From owner-svn-src-head@freebsd.org Mon Dec 14 10:33: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 5E24C4B596C; Mon, 14 Dec 2020 10:33:28 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cvd5h22h1z4hvQ; Mon, 14 Dec 2020 10:33:28 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ed1-f67.google.com with SMTP id r5so16605510eda.12; Mon, 14 Dec 2020 02:33:28 -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=nmWyEIfR/WqvhAq14mS5eVyD3sCbqjCHlmHBfHQNDmI=; b=Go8Khs8R9nUOiu/kT4GEvthdX0+K5IBiJU1i+UVPX0Q42p78Db9GR3snJ2i0KY3fFV 5NChyhpyBh0rsvTrpqZl1o+Pejn0zrPlGs5HqDwKkMoHra13TYt4hlyH4xR1i7YjPhxw wnPWJQdrnO3ps+Rxh5Ex1pNyhhPZVPql+Mtx3Jhirlt3eg1cmsuAoWeNQy9rtS8BFcMi 0x2cggCj3Taln9ZI4dGi5ulAgdV4DZ2Aw1WocIs6f0I9gBSNVDMUNI2BkVzJ4O5zF+W7 aOlTapcML+zlPnCN655AONRLylIi1udSmzBWI7yieWHQKbE/aljuc1ed6UO0z4T3kmtN e3Fw== X-Gm-Message-State: AOAM530t/LLSYgxJTfFHojP6qija1W7WzQGt9hXkwICQJdqCicY68QQ6 C7a0C/+8AX7fMIZ6hW3LU9cSjAoHn5KZ9+d/ X-Google-Smtp-Source: ABdhPJwg5FJlrzgCneCeyQjvLCiIVvUkpr+8GJQzKnTkOvz/upgDtelTptJwsJY/X4A5oYsa2/P+mQ== X-Received: by 2002:aa7:cad2:: with SMTP id l18mr24125886edt.183.1607942006375; Mon, 14 Dec 2020 02:33:26 -0800 (PST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com. [209.85.128.44]) by smtp.gmail.com with ESMTPSA id n16sm15418037edq.62.2020.12.14.02.33.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Dec 2020 02:33:26 -0800 (PST) Received: by mail-wm1-f44.google.com with SMTP id a6so13235169wmc.2; Mon, 14 Dec 2020 02:33:26 -0800 (PST) X-Received: by 2002:a1c:2483:: with SMTP id k125mr27247441wmk.67.1607942005664; Mon, 14 Dec 2020 02:33:25 -0800 (PST) MIME-Version: 1.0 References: <202008251330.07PDU4WQ055570@repo.freebsd.org> In-Reply-To: From: Alexander Richardson Date: Mon, 14 Dec 2020 10:33:14 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r364761 - in head: share/mk sys/conf sys/modules/cloudabi32 sys/modules/cloudabi64 sys/modules/linux sys/modules/linux64 To: Ryan Libby Cc: src-committers , svn-src-all , svn-src-head , Brooks Davis , Ed Maste Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Cvd5h22h1z4hvQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 14 Dec 2020 10:33:28 -0000 On Sun, 13 Dec 2020 at 19:22, Ryan Libby wrote: > > On Tue, Aug 25, 2020 at 6:30 AM Alex Richardson wrote: > > > > Author: arichardson > > Date: Tue Aug 25 13:30:03 2020 > > New Revision: 364761 > > URL: https://svnweb.freebsd.org/changeset/base/364761 > > > > Log: > > Pass -fuse-ld=/path/to/ld if ${LD} != "ld" > > > > This is needed so that setting LD/XLD is not ignored when linking with $CC > > instead of directly using $LD. Currently only clang accepts an absolute > > path for -fuse-ld= (Clang 12+ will add a new --ld-path flag), so we now > > warn when building with GCC and $LD != "ld" since that might result in the > > wrong linker being used. > > > > We have been setting XLD=/path/to/cheri/ld.lld in CheriBSD for a long time and > > used a similar version of this patch to avoid linking with /usr/bin/ld. > > This change is also required when building FreeBSD on an Ubuntu with Clang: > > In that case we set XCC=/usr/lib/llvm-10/bin/clang and since > > /usr/lib/llvm-10/bin/ does not contain a "ld" binary the build fails with > > `clang: error: unable to execute command: Executable "ld" doesn't exist!` > > unless we pass -fuse-ld=/usr/lib/llvm-10/bin/ld.lld. > > > > This change passes -fuse-ld instead of copying ${XLD} to WOLRDTMP/bin/ld > > since then we would have to ensure that this file does not exist while > > building the bootstrap tools. The cross-linker might not be compatible with > > the host linker (e.g. when building on macos: host-linker= Mach-O /usr/bin/ld, > > cross-linker=LLVM ld.lld). > > > > Reviewed By: brooks, emaste > > Differential Revision: https://reviews.freebsd.org/D26055 > > > > Modified: > > head/share/mk/bsd.sys.mk > > head/sys/conf/kern.mk > > head/sys/conf/kern.post.mk > > head/sys/modules/cloudabi32/Makefile > > head/sys/modules/cloudabi64/Makefile > > head/sys/modules/linux/Makefile > > head/sys/modules/linux64/Makefile > > > > Modified: head/share/mk/bsd.sys.mk > > ============================================================================== > > --- head/share/mk/bsd.sys.mk Tue Aug 25 13:29:57 2020 (r364760) > > +++ head/share/mk/bsd.sys.mk Tue Aug 25 13:30:03 2020 (r364761) > > @@ -284,6 +284,19 @@ CFLAGS+= ERROR-tried-to-rebuild-during-make-install > > .endif > > .endif > > > > +# Please keep this if in sync with kern.mk > > +.if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") > > +# Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". > > +# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. > > +.if ${COMPILER_TYPE} == "clang" > > +LDFLAGS+= -fuse-ld=${LD:[1]} > > +.else > > +# GCC does not support an absolute path for -fuse-ld so we just print this > > +# warning instead and let the user add the required symlinks. > > +.warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported > > FYI: This causes a huge amount of wrong and irrelevant warnings in the > build log for gcc cross compilers with XLD set, such as the toolchain > from pkg install amd64-xtoolchain-gcc. That causes XLD to be set (via > CROSS_BINUTILS_PREFIX in Makefile.inc1) to a path which is indeed the > default linker for the cross compiler. The warnings are harmless, but > annoying. Sorry, I don't have a suggestion for a better method. > > You can see an example in the build log from a gcc build in CI here > (although note that the build currently fails for unrelated reasons): > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc6_build/3131 > Hi Ryan, I think there are (at least) 3 options to fix/silence this warning: 1) The easiest option would be to turn off this warning for GCC builds and hope that the user-supplied LD matches the one that GCC will invoke. 2) Another option could be to ask GCC for what it thinks the default linker is and use that in the toolchain file, and update the check to use `${CC} --print-prog-name ld` instead of (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") $ /usr/local/bin/mips-unknown-freebsd12.1-gcc6 --print-prog-name ld /usr/local/bin/mips-unknown-freebsd12.1-ld $ /usr/local/bin/mips-unknown-freebsd12.1-gcc6 --print-prog-name ld.bfd /usr/local/lib/gcc/mips-unknown-freebsd12.1/6.5.0/../../../../mips-unknown-freebsd12.1/bin/ld.bfd 2a) We could also use ${CC} -xc /dev/null -o /dev/null -Wl,--version` to detect linker features in bsd.linker.mk and check if that matches the value returned by ${LD} --version. 3) Change the xtoolchain installed a gcc-N hardlink in /usr/local/-unknown-freebsd/bin and use that as ${CC}. It would match then the ld directory and the existing check could work. I'd personally opt for 1 since I don't build with GCC and don't have time right now to implement the other options. Let me know what you think. Thanks, Alex > > +.endif > > +.endif > > + > > # Tell bmake not to mistake standard targets for things to be searched for > > # or expect to ever be up-to-date. > > PHONY_NOTMAIN = analyze afterdepend afterinstall all beforedepend beforeinstall \ > > > > Modified: head/sys/conf/kern.mk > > ============================================================================== > > --- head/sys/conf/kern.mk Tue Aug 25 13:29:57 2020 (r364760) > > +++ head/sys/conf/kern.mk Tue Aug 25 13:30:03 2020 (r364761) > > @@ -270,6 +270,22 @@ CFLAGS+= -std=iso9899:1999 > > CFLAGS+= -std=${CSTD} > > .endif # CSTD > > > > +# Please keep this if in sync with bsd.sys.mk > > +.if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") > > +# Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". > > +# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. > > +.if ${COMPILER_TYPE} == "clang" > > +# Note: unlike bsd.sys.mk we can't use LDFLAGS here since that is used for the > > +# flags required when linking the kernel. We don't need those flags when > > +# building the vdsos. However, we do need -fuse-ld, so use ${CCLDFLAGS} instead. > > +CCLDFLAGS+= -fuse-ld=${LD:[1]} > > +.else > > +# GCC does not support an absolute path for -fuse-ld so we just print this > > +# warning instead and let the user add the required symlinks. > > +.warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported > > +.endif > > +.endif > > + > > # Set target-specific linker emulation name. > > LD_EMULATION_aarch64=aarch64elf > > LD_EMULATION_amd64=elf_x86_64_fbsd > > > > Modified: head/sys/conf/kern.post.mk > > ============================================================================== > > --- head/sys/conf/kern.post.mk Tue Aug 25 13:29:57 2020 (r364760) > > +++ head/sys/conf/kern.post.mk Tue Aug 25 13:30:03 2020 (r364761) > > @@ -228,7 +228,7 @@ kernel-clean: > > # in the a.out ld. For now, this works. > > hack.pico: Makefile > > :> hack.c > > - ${CC} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico > > + ${CC} ${CCLDFLAGS} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico > > rm -f hack.c > > > > offset.inc: $S/kern/genoffset.sh genoffset.o > > > > Modified: head/sys/modules/cloudabi32/Makefile > > ============================================================================== > > --- head/sys/modules/cloudabi32/Makefile Tue Aug 25 13:29:57 2020 (r364760) > > +++ head/sys/modules/cloudabi32/Makefile Tue Aug 25 13:30:03 2020 (r364761) > > @@ -33,7 +33,7 @@ BINARY_ARCHITECTURE=i386 > > .endif > > > > cloudabi32_vdso.o: ${VDSO_SRCS} > > - ${CC} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib \ > > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib \ > > -Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \ > > ${VDSO_SRCS} -o ${.TARGET} > > > > > > Modified: head/sys/modules/cloudabi64/Makefile > > ============================================================================== > > --- head/sys/modules/cloudabi64/Makefile Tue Aug 25 13:29:57 2020 (r364760) > > +++ head/sys/modules/cloudabi64/Makefile Tue Aug 25 13:30:03 2020 (r364761) > > @@ -25,7 +25,7 @@ BINARY_ARCHITECTURE=i386 > > .endif > > > > cloudabi64_vdso.o: ${VDSO_SRCS} > > - ${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib \ > > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -shared -nostdinc -nostdlib \ > > -Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \ > > ${VDSO_SRCS} -o ${.TARGET} > > > > > > Modified: head/sys/modules/linux/Makefile > > ============================================================================== > > --- head/sys/modules/linux/Makefile Tue Aug 25 13:29:57 2020 (r364760) > > +++ head/sys/modules/linux/Makefile Tue Aug 25 13:30:03 2020 (r364761) > > @@ -54,7 +54,7 @@ linux${SFX}_assym.h: linux${SFX}_genassym.o > > sh ${SYSDIR}/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET} > > > > linux${SFX}_locore.o: linux${SFX}_assym.h assym.inc > > - ${CC} -x assembler-with-cpp -DLOCORE -m32 -shared -s \ > > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -DLOCORE -m32 -shared -s \ > > -pipe -I. -I${SYSDIR} ${WERROR} -Wall -fno-common -nostdinc -nostdlib \ > > -fno-omit-frame-pointer -fPIC \ > > -Wl,-T${SRCTOP}/sys/${MACHINE_CPUARCH}/linux${SFX}/${VDSO}.lds.s \ > > > > Modified: head/sys/modules/linux64/Makefile > > ============================================================================== > > --- head/sys/modules/linux64/Makefile Tue Aug 25 13:29:57 2020 (r364760) > > +++ head/sys/modules/linux64/Makefile Tue Aug 25 13:30:03 2020 (r364761) > > @@ -30,7 +30,7 @@ linux_assym.h: linux_genassym.o > > sh ${SYSDIR}/kern/genassym.sh linux_genassym.o > ${.TARGET} > > > > linux_locore.o: linux_locore.asm linux_assym.h > > - ${CC} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \ > > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \ > > -pipe -I. -I${SYSDIR} ${WERROR} -Wall -fno-common -fPIC -nostdinc \ > > -Wl,-T${SRCTOP}/sys/${MACHINE}/linux/${VDSO}.lds.s \ > > -Wl,-soname=${VDSO}.so.1,-warn-common -nostdlib \ From owner-svn-src-head@freebsd.org Mon Dec 14 11:56: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 5429D4B7707; Mon, 14 Dec 2020 11:56: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvfxF1y9Fz4mXJ; Mon, 14 Dec 2020 11:56: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 35DE320F5B; Mon, 14 Dec 2020 11:56:17 +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 0BEBuHPl069273; Mon, 14 Dec 2020 11:56:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BEBuHLU069272; Mon, 14 Dec 2020 11:56:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012141156.0BEBuHLU069272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 14 Dec 2020 11:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368632 - head/lib/libusb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/lib/libusb X-SVN-Commit-Revision: 368632 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.34 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, 14 Dec 2020 11:56:17 -0000 Author: hselasky Date: Mon Dec 14 11:56:16 2020 New Revision: 368632 URL: https://svnweb.freebsd.org/changeset/base/368632 Log: Be bug compatible with other operating systems by allowing non-sequential interface numbering for USB descriptors in userspace. Else certain USB control requests using the interface number, won't be recognized by the USB firmware. Refer to section 9.2.3 in the USB 2.0 specification: Interfaces are numbered from zero to one less than the number of concurrent interfaces supported by the configuration. PR: 251784 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/lib/libusb/libusb20_desc.c Modified: head/lib/libusb/libusb20_desc.c ============================================================================== --- head/lib/libusb/libusb20_desc.c Mon Dec 14 11:09:07 2020 (r368631) +++ head/lib/libusb/libusb20_desc.c Mon Dec 14 11:56:16 2020 (r368632) @@ -81,9 +81,10 @@ libusb20_parse_config_desc(const void *config_desc) if (ptr[1] != LIBUSB20_DT_CONFIG) { return (NULL); /* not config descriptor */ } + /* - * The first "bInterfaceNumber" should never have the value 0xff. - * Then it is corrupt. + * The first "bInterfaceNumber" cannot start at 0xFFFF + * because the field is 8-bit. */ niface_no_alt = 0; nendpoint = 0; @@ -206,12 +207,15 @@ libusb20_parse_config_desc(const void *config_desc) if (libusb20_me_decode(ptr, ptr[0], &last_if->desc)) { /* ignore */ } - /* - * Sometimes USB devices have corrupt interface - * descriptors and we need to overwrite the provided - * interface number! - */ - last_if->desc.bInterfaceNumber = niface - 1; + + /* detect broken USB descriptors when USB debugging is enabled */ + if (last_if->desc.bInterfaceNumber != (uint8_t)(niface - 1)) { + const char *str = getenv("LIBUSB_DEBUG"); + if (str != NULL && str[0] != '\0' && str[0] != '0') { + printf("LIBUSB_DEBUG: bInterfaceNumber(%u) is not sequential(%u)\n", + last_if->desc.bInterfaceNumber, niface - 1); + } + } last_if->extra.ptr = LIBUSB20_ADD_BYTES(ptr, ptr[0]); last_if->extra.len = 0; last_if->extra.type = LIBUSB20_ME_IS_RAW; From owner-svn-src-head@freebsd.org Mon Dec 14 11:57: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 373B44B763E; Mon, 14 Dec 2020 11:57:44 +0000 (UTC) (envelope-from mmel@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cvfyw15DXz4msH; Mon, 14 Dec 2020 11:57:44 +0000 (UTC) (envelope-from mmel@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 182A421537; Mon, 14 Dec 2020 11:57:44 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BEBvhHg069472; Mon, 14 Dec 2020 11:57:43 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BEBvhI9069471; Mon, 14 Dec 2020 11:57:43 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202012141157.0BEBvhI9069471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Mon, 14 Dec 2020 11:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368633 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 368633 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.34 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, 14 Dec 2020 11:57:44 -0000 Author: mmel Date: Mon Dec 14 11:57:43 2020 New Revision: 368633 URL: https://svnweb.freebsd.org/changeset/base/368633 Log: Verify (and fix) the context_id argument passed to the mpentry () by PSCI. Some older PSCI implementations corrupt (or do not pass) the context_id argument to newly started secondary cores. Although the ideal solution to this problem is u-boot update, we can find the correct value for the argument (cpuid) by comparing of real core mpidr register with the value stored in pcu->mpidr. MFC after: 2 weeks Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Mon Dec 14 11:56:16 2020 (r368632) +++ head/sys/arm64/arm64/mp_machdep.c Mon Dec 14 11:57:43 2020 (r368633) @@ -206,6 +206,21 @@ init_secondary(uint64_t cpu) { struct pcpu *pcpup; pmap_t pmap0; + u_int mpidr; + + /* + * Verify that the value passed in 'cpu' argument (aka context_id) is + * valid. Some older U-Boot based PSCI implementations are buggy, + * they can pass random value in it. + */ + mpidr = READ_SPECIALREG(mpidr_el1) & CPU_AFF_MASK; + if (cpu >= MAXCPU || __pcpu[cpu].pc_mpidr != mpidr) { + for (cpu = 0; cpu < mp_maxid; cpu++) + if (__pcpu[cpu].pc_mpidr == mpidr) + break; + if ( cpu >= MAXCPU) + panic("MPIDR for this CPU is not in pcpu table"); + } pcpup = &__pcpu[cpu]; /* From owner-svn-src-head@freebsd.org Mon Dec 14 13:10: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 CC2394B9741; Mon, 14 Dec 2020 13:10:19 +0000 (UTC) (envelope-from mmel@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvhZg5Q7Fz4qt4; Mon, 14 Dec 2020 13:10:19 +0000 (UTC) (envelope-from mmel@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 ACD2722225; Mon, 14 Dec 2020 13:10:19 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BEDAJeE013965; Mon, 14 Dec 2020 13:10:19 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BEDAJ8c013964; Mon, 14 Dec 2020 13:10:19 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202012141310.0BEDAJ8c013964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Mon, 14 Dec 2020 13:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368634 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 368634 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.34 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, 14 Dec 2020 13:10:19 -0000 Author: mmel Date: Mon Dec 14 13:10:19 2020 New Revision: 368634 URL: https://svnweb.freebsd.org/changeset/base/368634 Log: Finish implementation of ARM PMU interrupts. The ARM PMU may use single per-core interrupt or may use multiple generic interrupts, one per core. In this case, special attention must be paid to the correct identification of the physical location of the core, its order in the external database (FDT) and the associated cpuid. Also keep in mind that a SoC can have multiple different PMUs (usually one per cluster) Modified: head/sys/arm/arm/pmu.c Modified: head/sys/arm/arm/pmu.c ============================================================================== --- head/sys/arm/arm/pmu.c Mon Dec 14 11:57:43 2020 (r368633) +++ head/sys/arm/arm/pmu.c Mon Dec 14 13:10:19 2020 (r368634) @@ -60,33 +60,19 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef notyet #define MAX_RLEN 8 -#else -#define MAX_RLEN 1 -#endif +struct pmu_intr { + struct resource *res; + void *ih; + int cpuid; +}; + struct pmu_softc { - struct resource *res[MAX_RLEN]; device_t dev; - void *ih[MAX_RLEN]; + struct pmu_intr irq[MAX_RLEN]; }; -static struct resource_spec pmu_spec[] = { - { SYS_RES_IRQ, 0, RF_ACTIVE }, - /* We don't currently handle pmu events, other than on cpu 0 */ -#ifdef notyet - { SYS_RES_IRQ, 1, RF_ACTIVE | RF_OPTIONAL }, - { SYS_RES_IRQ, 2, RF_ACTIVE | RF_OPTIONAL }, - { SYS_RES_IRQ, 3, RF_ACTIVE | RF_OPTIONAL }, - { SYS_RES_IRQ, 4, RF_ACTIVE | RF_OPTIONAL }, - { SYS_RES_IRQ, 5, RF_ACTIVE | RF_OPTIONAL }, - { SYS_RES_IRQ, 6, RF_ACTIVE | RF_OPTIONAL }, - { SYS_RES_IRQ, 7, RF_ACTIVE | RF_OPTIONAL }, -#endif - { -1, 0 } -}; - /* CCNT */ #if __ARM_ARCH > 6 int pmu_attched = 0; @@ -131,34 +117,163 @@ pmu_intr(void *arg) } static int +pmu_parse_affinity(struct pmu_softc *sc, struct pmu_intr *irq, phandle_t xref, + uint32_t mpidr) +{ + struct pcpu *pcpu; + int i, err; + + + if (xref != 0) { + err = OF_getencprop(OF_node_from_xref(xref), "reg", &mpidr, + sizeof(mpidr)); + if (err < 0) { + device_printf(sc->dev, "missing 'reg' property\n"); + return (ENXIO); + } + } + + for (i = 0; i < MAXCPU; i++) { + pcpu = pcpu_find(i); + if (pcpu != NULL && pcpu->pc_mpidr == mpidr) { + irq->cpuid = i; + return (0); + } + } + + device_printf(sc->dev, "Cannot find CPU with MPIDR: 0x%08X\n", mpidr); + return (ENXIO); +} + +static int +pmu_parse_intr(struct pmu_softc *sc) +{ + bool has_affinity; + phandle_t node, *cpus; + int rid, err, ncpus, i; + + + node = ofw_bus_get_node(sc->dev); + has_affinity = OF_hasprop(node, "interrupt-affinity"); + + for (i = 0; i < MAX_RLEN; i++) + sc->irq[i].cpuid = -1; + + cpus = NULL; + if (has_affinity) { + ncpus = OF_getencprop_alloc_multi(node, "interrupt-affinity", + sizeof(*cpus), (void **)&cpus); + if (ncpus < 0) { + device_printf(sc->dev, + "Cannot read interrupt affinity property\n"); + return (ENXIO); + } + } + + /* Process first interrupt */ + rid = 0; + sc->irq[0].res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &rid, + RF_ACTIVE | RF_SHAREABLE); + + if (sc->irq[0].res == NULL) { + device_printf(sc->dev, "Cannot get interrupt\n"); + err = ENXIO; + goto done; + } + + /* Check if PMU have one per-CPU interrupt */ + if (intr_is_per_cpu(sc->irq[0].res)) { + if (has_affinity) { + device_printf(sc->dev, + "Per CPU interupt have declared affinity\n"); + err = ENXIO; + goto done; + } + return (0); + } + + /* + * PMU with set of generic interrupts (one per core) + * Each one must be binded to exact core. + */ + err = pmu_parse_affinity(sc, sc->irq + 0, has_affinity ? cpus[0]: 0, + 0); + if (err != 0) { + device_printf(sc->dev, "Cannot parse affinity for CPUid: 0\n"); + goto done; + } + + for (i = 1; i < MAX_RLEN; i++) { + rid = i; + sc->irq[i].res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, + &rid, RF_ACTIVE | RF_SHAREABLE); + if (sc->irq[i].res == NULL) + break; + + if (intr_is_per_cpu(sc->irq[i].res)) + { + device_printf(sc->dev, "Unexpected per CPU interupt\n"); + err = ENXIO; + goto done; + } + + if (has_affinity && i >= ncpus) { + device_printf(sc->dev, "Missing value in interrupt " + "affinity property\n"); + err = ENXIO; + goto done; + } + + err = pmu_parse_affinity(sc, sc->irq + i, + has_affinity ? cpus[i]: 0, i); + if (err != 0) { + device_printf(sc->dev, + "Cannot parse affinity for CPUid: %d.\n", i); + goto done; + } + } + err = 0; +done: + OF_prop_free(cpus); + return (err); +} + +static int pmu_attach(device_t dev) { struct pmu_softc *sc; #if defined(__arm__) && (__ARM_ARCH > 6) uint32_t iesr; #endif - int err; - int i; + int err, i; sc = device_get_softc(dev); sc->dev = dev; - if (bus_alloc_resources(dev, pmu_spec, sc->res)) { - device_printf(dev, "could not allocate resources\n"); - return (ENXIO); - } + err = pmu_parse_intr(sc); + if (err != 0) + return (err); - /* Setup interrupt handler */ for (i = 0; i < MAX_RLEN; i++) { - if (sc->res[i] == NULL) + if (sc->irq[i].res == NULL) break; - - err = bus_setup_intr(dev, sc->res[i], INTR_MPSAFE | INTR_TYPE_MISC, - pmu_intr, NULL, NULL, &sc->ih[i]); - if (err) { - device_printf(dev, "Unable to setup interrupt handler.\n"); - return (ENXIO); + err = bus_setup_intr(dev, sc->irq[i].res, + INTR_MPSAFE | INTR_TYPE_MISC, pmu_intr, NULL, NULL, + &sc->irq[i].ih); + if (err != 0) { + device_printf(dev, + "Unable to setup interrupt handler.\n"); + goto fail; } + if (sc->irq[i].cpuid != -1) { + err = bus_bind_intr(dev, sc->irq[i].res, + sc->irq[i].cpuid); + if (err != 0) { + device_printf(sc->dev, + "Unable to bind interrupt.\n"); + goto fail; + } + } } #if defined(__arm__) && (__ARM_ARCH > 6) @@ -176,11 +291,32 @@ pmu_attach(device_t dev) #endif return (0); + +fail: + for (i = 1; i < MAX_RLEN; i++) { + if (sc->irq[i].ih != NULL) + bus_teardown_intr(dev, sc->irq[i].res, sc->irq[i].ih); + if (sc->irq[i].res != NULL) + bus_release_resource(dev, SYS_RES_IRQ, i, + sc->irq[i].res); + } + return(err); } #ifdef FDT static struct ofw_compat_data compat_data[] = { {"arm,armv8-pmuv3", 1}, + {"arm,cortex-a77-pmu", 1}, + {"arm,cortex-a76-pmu", 1}, + {"arm,cortex-a75-pmu", 1}, + {"arm,cortex-a73-pmu", 1}, + {"arm,cortex-a72-pmu", 1}, + {"arm,cortex-a65-pmu", 1}, + {"arm,cortex-a57-pmu", 1}, + {"arm,cortex-a55-pmu", 1}, + {"arm,cortex-a53-pmu", 1}, + {"arm,cortex-a34-pmu", 1}, + {"arm,cortex-a17-pmu", 1}, {"arm,cortex-a15-pmu", 1}, {"arm,cortex-a12-pmu", 1}, From owner-svn-src-head@freebsd.org Mon Dec 14 14:00: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 8846D4BA368; Mon, 14 Dec 2020 14:00:55 +0000 (UTC) (envelope-from mmel@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cvjj3354rz4t6F; Mon, 14 Dec 2020 14:00:55 +0000 (UTC) (envelope-from mmel@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 5CBAF22A65; Mon, 14 Dec 2020 14:00:55 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BEE0ttT047035; Mon, 14 Dec 2020 14:00:55 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BEE0sRq047030; Mon, 14 Dec 2020 14:00:54 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202012141400.0BEE0sRq047030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Mon, 14 Dec 2020 14:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368635 - in head/sys/arm: arm include X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: in head/sys/arm: arm include X-SVN-Commit-Revision: 368635 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.34 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, 14 Dec 2020 14:00:55 -0000 Author: mmel Date: Mon Dec 14 14:00:54 2020 New Revision: 368635 URL: https://svnweb.freebsd.org/changeset/base/368635 Log: Remove unused functions and variables in cpufunc.[ch]. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm.S head/sys/arm/include/cpufunc.h head/sys/arm/include/machdep.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Mon Dec 14 13:10:19 2020 (r368634) +++ head/sys/arm/arm/cpufunc.c Mon Dec 14 14:00:54 2020 (r368635) @@ -62,24 +62,10 @@ __FBSDID("$FreeBSD$"); #include /* PRIMARY CACHE VARIABLES */ -int arm_picache_size; -int arm_picache_line_size; -int arm_picache_ways; -int arm_pdcache_size; /* and unified */ -int arm_pdcache_line_size; -int arm_pdcache_ways; - -int arm_pcache_type; -int arm_pcache_unified; - int arm_dcache_align; int arm_dcache_align_mask; -u_int arm_cache_level; -u_int arm_cache_type[14]; -u_int arm_cache_loc; - #ifdef CPU_MV_PJ4B static void pj4bv7_setup(void); #endif @@ -155,16 +141,10 @@ u_int cputype; static void get_cachetype_cp15(void); -/* Additional cache information local to this file. Log2 of some of the - above numbers. */ -static int arm_dcache_l2_nsets; -static int arm_dcache_l2_assoc; -static int arm_dcache_l2_linesize; - static void get_cachetype_cp15(void) { - u_int ctype, isize, dsize, cpuid; + u_int ctype, dsize, cpuid; u_int clevel, csize, i, sel; u_int multiplier; u_char type; @@ -184,8 +164,6 @@ get_cachetype_cp15(void) if (CPU_CT_FORMAT(ctype) == CPU_CT_ARMV7) { __asm __volatile("mrc p15, 1, %0, c0, c0, 1" : "=r" (clevel)); - arm_cache_level = clevel; - arm_cache_loc = CPU_CLIDR_LOC(arm_cache_level); i = 0; while ((type = (clevel & 0x7)) && i < 7) { if (type == CACHE_DCACHE || type == CACHE_UNI_CACHE || @@ -195,7 +173,6 @@ get_cachetype_cp15(void) : : "r" (sel)); __asm __volatile("mrc p15, 1, %0, c0, c0, 0" : "=r" (csize)); - arm_cache_type[sel] = csize; arm_dcache_align = 1 << (CPUV7_CT_xSIZE_LEN(csize) + 4); arm_dcache_align_mask = arm_dcache_align - 1; @@ -206,57 +183,22 @@ get_cachetype_cp15(void) : : "r" (sel)); __asm __volatile("mrc p15, 1, %0, c0, c0, 0" : "=r" (csize)); - arm_cache_type[sel] = csize; } i++; clevel >>= 3; } } else { - if ((ctype & CPU_CT_S) == 0) - arm_pcache_unified = 1; - /* * If you want to know how this code works, go read the ARM ARM. */ - arm_pcache_type = CPU_CT_CTYPE(ctype); - - if (arm_pcache_unified == 0) { - isize = CPU_CT_ISIZE(ctype); - multiplier = (isize & CPU_CT_xSIZE_M) ? 3 : 2; - arm_picache_line_size = 1U << (CPU_CT_xSIZE_LEN(isize) + 3); - if (CPU_CT_xSIZE_ASSOC(isize) == 0) { - if (isize & CPU_CT_xSIZE_M) - arm_picache_line_size = 0; /* not present */ - else - arm_picache_ways = 1; - } else { - arm_picache_ways = multiplier << - (CPU_CT_xSIZE_ASSOC(isize) - 1); - } - arm_picache_size = multiplier << (CPU_CT_xSIZE_SIZE(isize) + 8); - } - dsize = CPU_CT_DSIZE(ctype); multiplier = (dsize & CPU_CT_xSIZE_M) ? 3 : 2; - arm_pdcache_line_size = 1U << (CPU_CT_xSIZE_LEN(dsize) + 3); + arm_dcache_align = 1U << (CPU_CT_xSIZE_LEN(dsize) + 3); if (CPU_CT_xSIZE_ASSOC(dsize) == 0) { if (dsize & CPU_CT_xSIZE_M) - arm_pdcache_line_size = 0; /* not present */ - else - arm_pdcache_ways = 1; - } else { - arm_pdcache_ways = multiplier << - (CPU_CT_xSIZE_ASSOC(dsize) - 1); + arm_dcache_align = 0; /* not present */ } - arm_pdcache_size = multiplier << (CPU_CT_xSIZE_SIZE(dsize) + 8); - - arm_dcache_align = arm_pdcache_line_size; - - arm_dcache_l2_assoc = CPU_CT_xSIZE_ASSOC(dsize) + multiplier - 2; - arm_dcache_l2_linesize = CPU_CT_xSIZE_LEN(dsize) + 3; - arm_dcache_l2_nsets = 6 + CPU_CT_xSIZE_SIZE(dsize) - - CPU_CT_xSIZE_ASSOC(dsize) - CPU_CT_xSIZE_LEN(dsize); out: arm_dcache_align_mask = arm_dcache_align - 1; Modified: head/sys/arm/arm/cpufunc_asm.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm.S Mon Dec 14 13:10:19 2020 (r368634) +++ head/sys/arm/arm/cpufunc_asm.S Mon Dec 14 14:00:54 2020 (r368635) @@ -53,21 +53,6 @@ ENTRY(cpufunc_nullop) END(cpufunc_nullop) /* - * Generic functions to write the internal coprocessor registers - * - * Currently these registers are - * c1 - CPU Control - * c3 - Domain Access Control - * - * All other registers are CPU architecture specific - */ - -ENTRY(cpu_domains) - mcr p15, 0, r0, c3, c0, 0 - RET -END(cpu_domains) - -/* * Generic functions to read/modify/write the internal coprocessor registers * * @@ -89,36 +74,4 @@ ENTRY(cpufunc_control) RET END(cpufunc_control) - -/* - * other potentially useful software functions are: - * clean D cache entry and flush I cache entry - * for the moment use cache_purgeID_E - */ - -/* Random odd functions */ - -/* Allocate and lock a cacheline for the specified address. */ - -#define CPWAIT_BRANCH \ - sub pc, pc, #4 -#define CPWAIT() \ - mrc p15, 0, r2, c2, c0, 0; \ - mov r2, r2; \ - CPWAIT_BRANCH - -ENTRY(arm_lock_cache_line) - mcr p15, 0, r0, c7, c10, 4 /* Drain write buffer */ - mov r1, #1 - mcr p15, 0, r1, c9, c2, 0 /* Enable data cache lock mode */ - CPWAIT() - mcr p15, 0, r0, c7, c2, 5 /* Allocate the cache line */ - mcr p15, 0, r0, c7, c10, 4 /* Drain write buffer */ - mov r1, #0 - str r1, [r0] - mcr p15, 0, r0, c7, c10, 4 /* Drain write buffer */ - mcr p15, 0, r1, c9, c2, 0 /* Disable data cache lock mode */ - CPWAIT() - RET -END(arm_lock_cache_line) Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Mon Dec 14 13:10:19 2020 (r368634) +++ head/sys/arm/include/cpufunc.h Mon Dec 14 14:00:54 2020 (r368635) @@ -87,11 +87,9 @@ extern u_int cputype; int set_cpufuncs (void); #define ARCHITECTURE_NOT_PRESENT 1 /* known but not configured */ -#define ARCHITECTURE_NOT_SUPPORTED 2 /* not known */ void cpufunc_nullop (void); u_int cpufunc_control (u_int clear, u_int bic); -void cpu_domains (u_int domains); #if defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) @@ -182,23 +180,9 @@ void cpu_reset (void) __attribute__((__noreturn__)); */ /* PRIMARY CACHE VARIABLES */ -extern int arm_picache_size; -extern int arm_picache_line_size; -extern int arm_picache_ways; - -extern int arm_pdcache_size; /* and unified */ -extern int arm_pdcache_line_size; -extern int arm_pdcache_ways; - -extern int arm_pcache_type; -extern int arm_pcache_unified; - extern int arm_dcache_align; extern int arm_dcache_align_mask; -extern u_int arm_cache_level; -extern u_int arm_cache_loc; -extern u_int arm_cache_type[14]; #define HAVE_INLINE_FFS Modified: head/sys/arm/include/machdep.h ============================================================================== --- head/sys/arm/include/machdep.h Mon Dec 14 13:10:19 2020 (r368634) +++ head/sys/arm/include/machdep.h Mon Dec 14 14:00:54 2020 (r368635) @@ -16,7 +16,6 @@ extern vm_offset_t abtstack; /* misc prototypes used by the many arm machdeps */ struct trapframe; -void arm_lock_cache_line(vm_offset_t); void init_proc0(vm_offset_t kstack); void halt(void); void abort_handler(struct trapframe *, int ); From owner-svn-src-head@freebsd.org Mon Dec 14 21:23: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 3C2824C3E82; Mon, 14 Dec 2020 21:23:16 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvvWS0x0Wz3rBS; Mon, 14 Dec 2020 21:23:15 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f194.google.com with SMTP id u5so4146395qkf.0; Mon, 14 Dec 2020 13:23:15 -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=yl5VqMWvzxm++ywW19/h3XpPRRq0c35eY7vDU2bDT6Y=; b=Ri3n5xGvcE+mbv2JwKGwJG+dmSHliu44M7gNFdu5rQcqb0jEWLsU0ZaiPpVrO0Hvqh NiDgIyY1cl10OEV6WfUJtY7CQCHM6MO9d5s598egovO0/8gPN9UL3hqQQaiB1N/3cVn1 u27IEZL+x0L/Be80+f5zx5GhSAWUeJFYguF+do00khHID4ugHn4lDndkNYFUiohdkxt9 3Mf+qIkoQInsh10+ivL0i2/ZSTe2HBmppOMi+y0mrff9xRypFdxWqbr+Py42DYUxlPw8 Te9E0m3+n28qTIxiSaJxniViScAo2yDtXfguO2XGLHkPyo4ykYlx6dm7RcN4TmK1htqQ 9SfQ== X-Gm-Message-State: AOAM532+DKo2rKyiGj5T5+gxDVzRnTi4MwBUOHDTqXhFyCKI5ZPOzGpN 57uBKWAtRHQSo77ZgEcN+jxzJtIhIlgeTQ== X-Google-Smtp-Source: ABdhPJxiDa36aj7oJzdqQAFHYPvka3nFJMOqYSaJsu5fLBQF5s+yCqL0jQcbYbFoW3EpGqYa5S3Qlg== X-Received: by 2002:a05:620a:2e6:: with SMTP id a6mr33753890qko.375.1607980994384; Mon, 14 Dec 2020 13:23:14 -0800 (PST) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com. [209.85.222.169]) by smtp.gmail.com with ESMTPSA id l20sm17456243qtu.25.2020.12.14.13.23.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Dec 2020 13:23:13 -0800 (PST) Received: by mail-qk1-f169.google.com with SMTP id i67so9584941qkf.11; Mon, 14 Dec 2020 13:23:13 -0800 (PST) X-Received: by 2002:ae9:f312:: with SMTP id p18mr33867332qkg.311.1607980993194; Mon, 14 Dec 2020 13:23:13 -0800 (PST) MIME-Version: 1.0 References: <202008251330.07PDU4WQ055570@repo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Mon, 14 Dec 2020 13:23:02 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r364761 - in head: share/mk sys/conf sys/modules/cloudabi32 sys/modules/cloudabi64 sys/modules/linux sys/modules/linux64 To: Alexander Richardson Cc: src-committers , svn-src-all , svn-src-head , Brooks Davis , Ed Maste , John Baldwin Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CvvWS0x0Wz3rBS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 14 Dec 2020 21:23:16 -0000 On Mon, Dec 14, 2020 at 2:33 AM Alexander Richardson wrote: > > On Sun, 13 Dec 2020 at 19:22, Ryan Libby wrote: > > > > On Tue, Aug 25, 2020 at 6:30 AM Alex Richardson wrote: > > > > > > Author: arichardson > > > Date: Tue Aug 25 13:30:03 2020 > > > New Revision: 364761 > > > URL: https://svnweb.freebsd.org/changeset/base/364761 > > > > > > Log: > > > Pass -fuse-ld=/path/to/ld if ${LD} != "ld" > > > > > > This is needed so that setting LD/XLD is not ignored when linking with $CC > > > instead of directly using $LD. Currently only clang accepts an absolute > > > path for -fuse-ld= (Clang 12+ will add a new --ld-path flag), so we now > > > warn when building with GCC and $LD != "ld" since that might result in the > > > wrong linker being used. > > > > > > We have been setting XLD=/path/to/cheri/ld.lld in CheriBSD for a long time and > > > used a similar version of this patch to avoid linking with /usr/bin/ld. > > > This change is also required when building FreeBSD on an Ubuntu with Clang: > > > In that case we set XCC=/usr/lib/llvm-10/bin/clang and since > > > /usr/lib/llvm-10/bin/ does not contain a "ld" binary the build fails with > > > `clang: error: unable to execute command: Executable "ld" doesn't exist!` > > > unless we pass -fuse-ld=/usr/lib/llvm-10/bin/ld.lld. > > > > > > This change passes -fuse-ld instead of copying ${XLD} to WOLRDTMP/bin/ld > > > since then we would have to ensure that this file does not exist while > > > building the bootstrap tools. The cross-linker might not be compatible with > > > the host linker (e.g. when building on macos: host-linker= Mach-O /usr/bin/ld, > > > cross-linker=LLVM ld.lld). > > > > > > Reviewed By: brooks, emaste > > > Differential Revision: https://reviews.freebsd.org/D26055 > > > > > > Modified: > > > head/share/mk/bsd.sys.mk > > > head/sys/conf/kern.mk > > > head/sys/conf/kern.post.mk > > > head/sys/modules/cloudabi32/Makefile > > > head/sys/modules/cloudabi64/Makefile > > > head/sys/modules/linux/Makefile > > > head/sys/modules/linux64/Makefile > > > > > > Modified: head/share/mk/bsd.sys.mk > > > ============================================================================== > > > --- head/share/mk/bsd.sys.mk Tue Aug 25 13:29:57 2020 (r364760) > > > +++ head/share/mk/bsd.sys.mk Tue Aug 25 13:30:03 2020 (r364761) > > > @@ -284,6 +284,19 @@ CFLAGS+= ERROR-tried-to-rebuild-during-make-install > > > .endif > > > .endif > > > > > > +# Please keep this if in sync with kern.mk > > > +.if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") > > > +# Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". > > > +# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. > > > +.if ${COMPILER_TYPE} == "clang" > > > +LDFLAGS+= -fuse-ld=${LD:[1]} > > > +.else > > > +# GCC does not support an absolute path for -fuse-ld so we just print this > > > +# warning instead and let the user add the required symlinks. > > > +.warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported > > > > FYI: This causes a huge amount of wrong and irrelevant warnings in the > > build log for gcc cross compilers with XLD set, such as the toolchain > > from pkg install amd64-xtoolchain-gcc. That causes XLD to be set (via > > CROSS_BINUTILS_PREFIX in Makefile.inc1) to a path which is indeed the > > default linker for the cross compiler. The warnings are harmless, but > > annoying. Sorry, I don't have a suggestion for a better method. > > > > You can see an example in the build log from a gcc build in CI here > > (although note that the build currently fails for unrelated reasons): > > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc6_build/3131 > > > Hi Ryan, > > I think there are (at least) 3 options to fix/silence this warning: > > 1) The easiest option would be to turn off this warning for GCC builds > and hope that the user-supplied LD matches the one that GCC will > invoke. > Thanks for looking at it. I don't have a strong feeling about it, but I think simple is good so I'm also fine with (1). > 2) Another option could be to ask GCC for what it thinks the default > linker is and use that in the toolchain file, and update the check to > use `${CC} --print-prog-name ld` instead of (${CC:[1]:H} != > ${LD:[1]:H} || ${LD:[1]:T} != "ld") > $ /usr/local/bin/mips-unknown-freebsd12.1-gcc6 --print-prog-name ld > /usr/local/bin/mips-unknown-freebsd12.1-ld > $ /usr/local/bin/mips-unknown-freebsd12.1-gcc6 --print-prog-name ld.bfd > /usr/local/lib/gcc/mips-unknown-freebsd12.1/6.5.0/../../../../mips-unknown-freebsd12.1/bin/ld.bfd > Examining this, in amd64-xtoolchain-gcc: XCC=/usr/local/bin/x86_64-unknown-freebsd13.0-gcc ... CROSS_BINUTILS_PREFIX=/usr/local/x86_64-unknown-freebsd13.0/bin/ ... but % /usr/local/bin/x86_64-unknown-freebsd13.0-gcc --print-prog-name=ld /usr/local/bin/x86_64-unknown-freebsd13.0-ld % /usr/local/bin/x86_64-unknown-freebsd13.0-gcc --sysroot=/usr/obj/gcc6/usr/src/freebsd/amd64.amd64/tmp -B/usr/local/x86_64-unknown-freebsd13.0/bin/ --print-prog-name=ld /usr/local/bin/x86_64-unknown-freebsd13.0-ld So I was not exactly correct, above. They're hard links to the same ld program, but through different paths (even with -B as it appears in the build). I'm assuming this is okay but now I wonder if the xtoolchain is slightly misconfigured, or if gcc is lying (it's not reporting the path from -B)... ...okay, examining ports/devel/freebsd-gcc6/Makefile: --with-ld=${LOCALBASE}/bin/${BU_PREFIX}-ld So the xtoolchain gcc linker can't be influenced with -B. Hmm. It seems wrong that XCC's default linker path is different from XLD, even if they are links to the same file. Anyway, all that is to say, I think that this sounds good in concept but may also need either a fix in the xtoolchain or more hackery in the make files. > 2a) We could also use ${CC} -xc /dev/null -o /dev/null -Wl,--version` > to detect linker features in bsd.linker.mk and check if that matches > the value returned by ${LD} --version. > > 3) Change the xtoolchain installed a gcc-N hardlink in > /usr/local/-unknown-freebsd/bin and use that as ${CC}. > It would match then the ld directory and the existing check could > work. This seems okay to me but it sounds like a big change for a warning, and anyway I think (2) is probably a more reliable method of determining the default linker. It would seem to make some sense for a toolchain to have a whole directory with links to all the tools. However I'm not an expert here. > > I'd personally opt for 1 since I don't build with GCC and don't have > time right now to implement the other options. > Let me know what you think. > > Thanks, > Alex (CC'd jhb in case he has an opinion on the xtoolchain --with-ld vs XLD bit.) Thanks, Ryan > > > > +.endif > > > +.endif > > > + > > > # Tell bmake not to mistake standard targets for things to be searched for > > > # or expect to ever be up-to-date. > > > PHONY_NOTMAIN = analyze afterdepend afterinstall all beforedepend beforeinstall \ > > > > > > Modified: head/sys/conf/kern.mk > > > ============================================================================== > > > --- head/sys/conf/kern.mk Tue Aug 25 13:29:57 2020 (r364760) > > > +++ head/sys/conf/kern.mk Tue Aug 25 13:30:03 2020 (r364761) > > > @@ -270,6 +270,22 @@ CFLAGS+= -std=iso9899:1999 > > > CFLAGS+= -std=${CSTD} > > > .endif # CSTD > > > > > > +# Please keep this if in sync with bsd.sys.mk > > > +.if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") > > > +# Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". > > > +# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. > > > +.if ${COMPILER_TYPE} == "clang" > > > +# Note: unlike bsd.sys.mk we can't use LDFLAGS here since that is used for the > > > +# flags required when linking the kernel. We don't need those flags when > > > +# building the vdsos. However, we do need -fuse-ld, so use ${CCLDFLAGS} instead. > > > +CCLDFLAGS+= -fuse-ld=${LD:[1]} > > > +.else > > > +# GCC does not support an absolute path for -fuse-ld so we just print this > > > +# warning instead and let the user add the required symlinks. > > > +.warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported > > > +.endif > > > +.endif > > > + > > > # Set target-specific linker emulation name. > > > LD_EMULATION_aarch64=aarch64elf > > > LD_EMULATION_amd64=elf_x86_64_fbsd > > > > > > Modified: head/sys/conf/kern.post.mk > > > ============================================================================== > > > --- head/sys/conf/kern.post.mk Tue Aug 25 13:29:57 2020 (r364760) > > > +++ head/sys/conf/kern.post.mk Tue Aug 25 13:30:03 2020 (r364761) > > > @@ -228,7 +228,7 @@ kernel-clean: > > > # in the a.out ld. For now, this works. > > > hack.pico: Makefile > > > :> hack.c > > > - ${CC} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico > > > + ${CC} ${CCLDFLAGS} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico > > > rm -f hack.c > > > > > > offset.inc: $S/kern/genoffset.sh genoffset.o > > > > > > Modified: head/sys/modules/cloudabi32/Makefile > > > ============================================================================== > > > --- head/sys/modules/cloudabi32/Makefile Tue Aug 25 13:29:57 2020 (r364760) > > > +++ head/sys/modules/cloudabi32/Makefile Tue Aug 25 13:30:03 2020 (r364761) > > > @@ -33,7 +33,7 @@ BINARY_ARCHITECTURE=i386 > > > .endif > > > > > > cloudabi32_vdso.o: ${VDSO_SRCS} > > > - ${CC} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib \ > > > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib \ > > > -Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \ > > > ${VDSO_SRCS} -o ${.TARGET} > > > > > > > > > Modified: head/sys/modules/cloudabi64/Makefile > > > ============================================================================== > > > --- head/sys/modules/cloudabi64/Makefile Tue Aug 25 13:29:57 2020 (r364760) > > > +++ head/sys/modules/cloudabi64/Makefile Tue Aug 25 13:30:03 2020 (r364761) > > > @@ -25,7 +25,7 @@ BINARY_ARCHITECTURE=i386 > > > .endif > > > > > > cloudabi64_vdso.o: ${VDSO_SRCS} > > > - ${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib \ > > > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -shared -nostdinc -nostdlib \ > > > -Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \ > > > ${VDSO_SRCS} -o ${.TARGET} > > > > > > > > > Modified: head/sys/modules/linux/Makefile > > > ============================================================================== > > > --- head/sys/modules/linux/Makefile Tue Aug 25 13:29:57 2020 (r364760) > > > +++ head/sys/modules/linux/Makefile Tue Aug 25 13:30:03 2020 (r364761) > > > @@ -54,7 +54,7 @@ linux${SFX}_assym.h: linux${SFX}_genassym.o > > > sh ${SYSDIR}/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET} > > > > > > linux${SFX}_locore.o: linux${SFX}_assym.h assym.inc > > > - ${CC} -x assembler-with-cpp -DLOCORE -m32 -shared -s \ > > > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -DLOCORE -m32 -shared -s \ > > > -pipe -I. -I${SYSDIR} ${WERROR} -Wall -fno-common -nostdinc -nostdlib \ > > > -fno-omit-frame-pointer -fPIC \ > > > -Wl,-T${SRCTOP}/sys/${MACHINE_CPUARCH}/linux${SFX}/${VDSO}.lds.s \ > > > > > > Modified: head/sys/modules/linux64/Makefile > > > ============================================================================== > > > --- head/sys/modules/linux64/Makefile Tue Aug 25 13:29:57 2020 (r364760) > > > +++ head/sys/modules/linux64/Makefile Tue Aug 25 13:30:03 2020 (r364761) > > > @@ -30,7 +30,7 @@ linux_assym.h: linux_genassym.o > > > sh ${SYSDIR}/kern/genassym.sh linux_genassym.o > ${.TARGET} > > > > > > linux_locore.o: linux_locore.asm linux_assym.h > > > - ${CC} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \ > > > + ${CC} ${CCLDFLAGS} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \ > > > -pipe -I. -I${SYSDIR} ${WERROR} -Wall -fno-common -fPIC -nostdinc \ > > > -Wl,-T${SRCTOP}/sys/${MACHINE}/linux/${VDSO}.lds.s \ > > > -Wl,-soname=${VDSO}.so.1,-warn-common -nostdlib \ From owner-svn-src-head@freebsd.org Mon Dec 14 22: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 4CFDF4C4A5E; Mon, 14 Dec 2020 22:13:59 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cvwdz1fDTz3tpX; Mon, 14 Dec 2020 22:13:59 +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 2A0521214; Mon, 14 Dec 2020 22:13:59 +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 0BEMDxfP061625; Mon, 14 Dec 2020 22:13:59 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BEMDxjJ061624; Mon, 14 Dec 2020 22:13:59 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202012142213.0BEMDxjJ061624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 14 Dec 2020 22:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368647 - head/libexec/tftpd X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/libexec/tftpd X-SVN-Commit-Revision: 368647 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.34 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, 14 Dec 2020 22:13:59 -0000 Author: tuexen Date: Mon Dec 14 22:13:58 2020 New Revision: 368647 URL: https://svnweb.freebsd.org/changeset/base/368647 Log: Improve the counting of blocks used to transfer a file from the server to the client in case of not using an OACK: Don't miss the first block in case of it is not also the last one. MFC after: 1 week Modified: head/libexec/tftpd/tftp-transfer.c Modified: head/libexec/tftpd/tftp-transfer.c ============================================================================== --- head/libexec/tftpd/tftp-transfer.c Mon Dec 14 22:07:07 2020 (r368646) +++ head/libexec/tftpd/tftp-transfer.c Mon Dec 14 22:13:58 2020 (r368647) @@ -258,6 +258,7 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st if (firstblock != NULL) { writesize = write_file(firstblock->th_data, fb_size); ts->amount += writesize; + ts->blocks++; windowblock++; if (windowsize == 1 || fb_size != segsize) { for (i = 0; ; i++) { @@ -280,7 +281,6 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st } if (fb_size != segsize) { - ts->blocks++; write_close(); gettimeofday(&(ts->tstop), NULL); return; From owner-svn-src-head@freebsd.org Mon Dec 14 22:23: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 5DD7B4C66A0; Mon, 14 Dec 2020 22:23:10 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvwrZ28Kxz4QwS; Mon, 14 Dec 2020 22:23:10 +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 3CFBCCE2; Mon, 14 Dec 2020 22:23:10 +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 0BEMNAYO067738; Mon, 14 Dec 2020 22:23:10 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BEMN9v9067733; Mon, 14 Dec 2020 22:23:09 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202012142223.0BEMN9v9067733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 14 Dec 2020 22:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368648 - in head/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: amd64/conf arm64/conf i386/conf powerpc/conf riscv/conf X-SVN-Commit-Revision: 368648 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.34 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, 14 Dec 2020 22:23:10 -0000 Author: melifaro Date: Mon Dec 14 22:23:08 2020 New Revision: 368648 URL: https://svnweb.freebsd.org/changeset/base/368648 Log: Enable ROUTE_MPATH support in GENERIC kernels. Ability to load-balance traffic over multiple path is a must-have thing for routers. It may be used by the servers to balance outgoing traffic over multiple default gateways. The previous implementation, RADIX_MPATH stayed in the shadow for too long. It was not well maintained, which lead us to a vicious circle - people were using non-contiguous mask or firewalls to achieve similar goals. As a result, some routing daemons implementation still don't have multipath support enabled for FreeBSD. Turning on ROUTE_MPATH by default would fix it. It will allow to reduce networking feature gap to other operating systems. Linux and OpenBSD enabled similar support at least 5 years ago. ROUTE_MPATH does not consume memory unless actually used. It enables around ~1k LOC. It does not bring any behaviour changes for userland. Additionally, feature is (temporarily) turned off by the net.route.multipath sysctl defaulting to 0. Differential Revision: https://reviews.freebsd.org/D27428 Modified: head/sys/amd64/conf/GENERIC head/sys/arm64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/riscv/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Mon Dec 14 22:13:58 2020 (r368647) +++ head/sys/amd64/conf/GENERIC Mon Dec 14 22:23:08 2020 (r368648) @@ -31,6 +31,7 @@ options VIMAGE # Subsystem virtualization, e.g. VNE options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 +options ROUTE_MPATH # Multipath routing support options TCP_OFFLOAD # TCP offload options TCP_BLACKBOX # Enhanced TCP event logging options TCP_HHOOK # hhook(9) framework for TCP Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Mon Dec 14 22:13:58 2020 (r368647) +++ head/sys/arm64/conf/GENERIC Mon Dec 14 22:23:08 2020 (r368648) @@ -30,6 +30,7 @@ options PREEMPTION # Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET options INET # InterNETworking options INET6 # IPv6 communications protocols +options ROUTE_MPATH # Multipath routing support options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_HHOOK # hhook(9) framework for TCP options TCP_OFFLOAD # TCP offload Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Mon Dec 14 22:13:58 2020 (r368647) +++ head/sys/i386/conf/GENERIC Mon Dec 14 22:23:08 2020 (r368648) @@ -32,6 +32,7 @@ options VIMAGE # Subsystem virtualization, e.g. VNE options INET # InterNETworking options INET6 # IPv6 communications protocols options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 +options ROUTE_MPATH # Multipath routing support options TCP_HHOOK # hhook(9) framework for TCP options TCP_OFFLOAD # TCP offload options SCTP_SUPPORT # Allow kldload of SCTP Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Mon Dec 14 22:13:58 2020 (r368647) +++ head/sys/powerpc/conf/GENERIC64 Mon Dec 14 22:23:08 2020 (r368648) @@ -42,6 +42,7 @@ options VIMAGE # Subsystem virtualization, e.g. VNE options INET #InterNETworking options INET6 #IPv6 communications protocols options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 +options ROUTE_MPATH # Multipath routing support options TCP_OFFLOAD # TCP offload options TCP_BLACKBOX # Enhanced TCP event logging options TCP_HHOOK # hhook(9) framework for TCP Modified: head/sys/riscv/conf/GENERIC ============================================================================== --- head/sys/riscv/conf/GENERIC Mon Dec 14 22:13:58 2020 (r368647) +++ head/sys/riscv/conf/GENERIC Mon Dec 14 22:23:08 2020 (r368648) @@ -31,6 +31,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options TCP_HHOOK # hhook(9) framework for TCP options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 +options ROUTE_MPATH # Multipath routing support options TCP_OFFLOAD # TCP offload options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem From owner-svn-src-head@freebsd.org Mon Dec 14 22:52: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 15E3C4C938E; Mon, 14 Dec 2020 22:52:30 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvxVQ09tJz4Tct; Mon, 14 Dec 2020 22:52:30 +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 E25601822; Mon, 14 Dec 2020 22:52:29 +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 0BEMqTg3086742; Mon, 14 Dec 2020 22:52:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BEMqTMJ086741; Mon, 14 Dec 2020 22:52:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012142252.0BEMqTMJ086741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 14 Dec 2020 22:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368649 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 368649 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.34 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, 14 Dec 2020 22:52:30 -0000 Author: kib Date: Mon Dec 14 22:52:29 2020 New Revision: 368649 URL: https://svnweb.freebsd.org/changeset/base/368649 Log: amd64 pmap: fix PCID mode invalidations When r362031 moved local TLB invalidation after shootdown IPI send, it moved too much. In particular, PCID-mode clearing of the pm_gen generation counters must occur before IPIs are send, which is in fact described by the comment before seq_cst fence in the invalidation functions. Fix it by extracting pm_gen clearing into new helper pmap_invalidate_preipi(), which is executed before a call to smp_masked_tlb_shootdown(). Rest of the local invalidation callbacks is simplified as result, and become very similar to the remote shootdown handlers (to be merged in some future). Move pin of the thread to pmap_invalidate_preipi(), and do unpin in smp_masked_tlb_shootdown(). Reported and tested by: mjg (previous version) Reviewed by: alc, cem (previous version), markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D227588 Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Mon Dec 14 22:23:08 2020 (r368648) +++ head/sys/amd64/amd64/mp_machdep.c Mon Dec 14 22:52:29 2020 (r368649) @@ -635,11 +635,11 @@ invl_scoreboard_slot(u_int cpu) } /* - * Used by pmap to request cache or TLB invalidation on local and - * remote processors. Mask provides the set of remote CPUs which are + * Used by the pmap to request cache or TLB invalidation on local and + * remote processors. Mask provides the set of remote CPUs that are * to be signalled with the invalidation IPI. As an optimization, the - * curcpu_cb callback is invoked on the calling CPU while waiting for - * remote CPUs to complete the operation. + * curcpu_cb callback is invoked on the calling CPU in a critical + * section while waiting for the remote CPUs to complete the operation. * * The callback function is called unconditionally on the caller's * underlying processor, even when this processor is not set in the @@ -649,6 +649,9 @@ invl_scoreboard_slot(u_int cpu) * Interrupts must be enabled when calling the function with smp * started, to avoid deadlock with other IPIs that are protected with * smp_ipi_mtx spinlock at the initiator side. + * + * Function must be called with the thread pinned, and it unpins on + * completion. */ static void smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, @@ -662,23 +665,21 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, * It is not necessary to signal other CPUs while booting or * when in the debugger. */ - if (kdb_active || KERNEL_PANICKED() || !smp_started) { - curcpu_cb(pmap, addr1, addr2); - return; - } + if (kdb_active || KERNEL_PANICKED() || !smp_started) + goto local_cb; - sched_pin(); + KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); /* * Check for other cpus. Return if none. */ if (CPU_ISFULLSET(&mask)) { if (mp_ncpus <= 1) - goto nospinexit; + goto local_cb; } else { CPU_CLR(PCPU_GET(cpuid), &mask); if (CPU_EMPTY(&mask)) - goto nospinexit; + goto local_cb; } /* @@ -734,13 +735,22 @@ smp_targeted_tlb_shootdown(cpuset_t mask, pmap_t pmap, while (atomic_load_int(p_cpudone) != generation) ia32_pause(); } - critical_exit(); + + /* + * Unpin before leaving critical section. If the thread owes + * preemption, this allows scheduler to select thread on any + * CPU from its cpuset. + */ sched_unpin(); + critical_exit(); + return; -nospinexit: +local_cb: + critical_enter(); curcpu_cb(pmap, addr1, addr2); sched_unpin(); + critical_exit(); } void Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Dec 14 22:23:08 2020 (r368648) +++ head/sys/amd64/amd64/pmap.c Mon Dec 14 22:52:29 2020 (r368649) @@ -2773,54 +2773,19 @@ pmap_invalidate_ept(pmap_t pmap) static cpuset_t pmap_invalidate_cpu_mask(pmap_t pmap) { - return (pmap == kernel_pmap ? all_cpus : pmap->pm_active); } static inline void -pmap_invalidate_page_pcid(pmap_t pmap, vm_offset_t va, - const bool invpcid_works1) +pmap_invalidate_preipi_pcid(pmap_t pmap) { - struct invpcid_descr d; - uint64_t kcr3, ucr3; - uint32_t pcid; u_int cpuid, i; + sched_pin(); + cpuid = PCPU_GET(cpuid); - if (pmap == PCPU_GET(curpmap)) { - if (pmap->pm_ucr3 != PMAP_NO_CR3 && - /* - * If we context-switched right after - * PCPU_GET(ucr3_load_mask), we could read the - * ~CR3_PCID_SAVE mask, which causes us to skip - * the code below to invalidate user pages. This - * is handled in pmap_activate_sw_pcid_pti() by - * clearing pm_gen if ucr3_load_mask is ~CR3_PCID_SAVE. - */ - PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { - /* - * Because pm_pcid is recalculated on a - * context switch, we must disable switching. - * Otherwise, we might use a stale value - * below. - */ - critical_enter(); - pcid = pmap->pm_pcids[cpuid].pm_pcid; - if (invpcid_works1) { - d.pcid = pcid | PMAP_PCID_USER_PT; - d.pad = 0; - d.addr = va; - invpcid(&d, INVPCID_ADDR); - } else { - kcr3 = pmap->pm_cr3 | pcid | CR3_PCID_SAVE; - ucr3 = pmap->pm_ucr3 | pcid | - PMAP_PCID_USER_PT | CR3_PCID_SAVE; - pmap_pti_pcid_invlpg(ucr3, kcr3, va); - } - critical_exit(); - } - } else - pmap->pm_pcids[cpuid].pm_gen = 0; + if (pmap != PCPU_GET(curpmap)) + cpuid = 0xffffffff; /* An impossible value */ CPU_FOREACH(i) { if (cpuid != i) @@ -2841,51 +2806,98 @@ pmap_invalidate_page_pcid(pmap_t pmap, vm_offset_t va, } static void -pmap_invalidate_page_pcid_invpcid(pmap_t pmap, vm_offset_t va) +pmap_invalidate_preipi_nopcid(pmap_t pmap __unused) { + sched_pin(); +} - pmap_invalidate_page_pcid(pmap, va, true); +DEFINE_IFUNC(static, void, pmap_invalidate_preipi, (pmap_t)) +{ + return (pmap_pcid_enabled ? pmap_invalidate_preipi_pcid : + pmap_invalidate_preipi_nopcid); } -static void -pmap_invalidate_page_pcid_noinvpcid(pmap_t pmap, vm_offset_t va) +static inline void +pmap_invalidate_page_pcid_cb(pmap_t pmap, vm_offset_t va, + const bool invpcid_works1) { + struct invpcid_descr d; + uint64_t kcr3, ucr3; + uint32_t pcid; + u_int cpuid; - pmap_invalidate_page_pcid(pmap, va, false); + /* + * Because pm_pcid is recalculated on a context switch, we + * must ensure there is no preemption, not just pinning. + * Otherwise, we might use a stale value below. + */ + CRITICAL_ASSERT(curthread); + + /* + * No need to do anything with user page tables invalidation + * if there is no user page table, or invalidation is deferred + * until the return to userspace. ucr3_load_mask is stable + * because we have preemption disabled. + */ + if (pmap->pm_ucr3 == PMAP_NO_CR3 || + PCPU_GET(ucr3_load_mask) != PMAP_UCR3_NOMASK) + return; + + cpuid = PCPU_GET(cpuid); + + pcid = pmap->pm_pcids[cpuid].pm_pcid; + if (invpcid_works1) { + d.pcid = pcid | PMAP_PCID_USER_PT; + d.pad = 0; + d.addr = va; + invpcid(&d, INVPCID_ADDR); + } else { + kcr3 = pmap->pm_cr3 | pcid | CR3_PCID_SAVE; + ucr3 = pmap->pm_ucr3 | pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; + pmap_pti_pcid_invlpg(ucr3, kcr3, va); + } } static void -pmap_invalidate_page_nopcid(pmap_t pmap, vm_offset_t va) +pmap_invalidate_page_pcid_invpcid_cb(pmap_t pmap, vm_offset_t va) { + pmap_invalidate_page_pcid_cb(pmap, va, true); } -DEFINE_IFUNC(static, void, pmap_invalidate_page_mode, (pmap_t, vm_offset_t)) +static void +pmap_invalidate_page_pcid_noinvpcid_cb(pmap_t pmap, vm_offset_t va) { + pmap_invalidate_page_pcid_cb(pmap, va, false); +} +static void +pmap_invalidate_page_nopcid_cb(pmap_t pmap __unused, vm_offset_t va __unused) +{ +} + +DEFINE_IFUNC(static, void, pmap_invalidate_page_cb, (pmap_t, vm_offset_t)) +{ if (pmap_pcid_enabled) - return (invpcid_works ? pmap_invalidate_page_pcid_invpcid : - pmap_invalidate_page_pcid_noinvpcid); - return (pmap_invalidate_page_nopcid); + return (invpcid_works ? pmap_invalidate_page_pcid_invpcid_cb : + pmap_invalidate_page_pcid_noinvpcid_cb); + return (pmap_invalidate_page_nopcid_cb); } static void pmap_invalidate_page_curcpu_cb(pmap_t pmap, vm_offset_t va, vm_offset_t addr2 __unused) { - if (pmap == kernel_pmap) { invlpg(va); - } else { - if (pmap == PCPU_GET(curpmap)) - invlpg(va); - pmap_invalidate_page_mode(pmap, va); + } else if (pmap == PCPU_GET(curpmap)) { + invlpg(va); + pmap_invalidate_page_cb(pmap, va); } } void pmap_invalidate_page(pmap_t pmap, vm_offset_t va) { - if (pmap_type_guest(pmap)) { pmap_invalidate_ept(pmap); return; @@ -2894,6 +2906,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) KASSERT(pmap->pm_type == PT_X86, ("pmap_invalidate_page: invalid type %d", pmap->pm_type)); + pmap_invalidate_preipi(pmap); smp_masked_invlpg(pmap_invalidate_cpu_mask(pmap), va, pmap, pmap_invalidate_page_curcpu_cb); } @@ -2902,74 +2915,63 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) #define PMAP_INVLPG_THRESHOLD (4 * 1024 * PAGE_SIZE) static void -pmap_invalidate_range_pcid(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, +pmap_invalidate_range_pcid_cb(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, const bool invpcid_works1) { struct invpcid_descr d; uint64_t kcr3, ucr3; uint32_t pcid; - u_int cpuid, i; + u_int cpuid; + CRITICAL_ASSERT(curthread); + + if (pmap != PCPU_GET(curpmap) || + pmap->pm_ucr3 == PMAP_NO_CR3 || + PCPU_GET(ucr3_load_mask) != PMAP_UCR3_NOMASK) + return; + cpuid = PCPU_GET(cpuid); - if (pmap == PCPU_GET(curpmap)) { - if (pmap->pm_ucr3 != PMAP_NO_CR3 && - PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { - critical_enter(); - pcid = pmap->pm_pcids[cpuid].pm_pcid; - if (invpcid_works1) { - d.pcid = pcid | PMAP_PCID_USER_PT; - d.pad = 0; - d.addr = sva; - for (; d.addr < eva; d.addr += PAGE_SIZE) - invpcid(&d, INVPCID_ADDR); - } else { - kcr3 = pmap->pm_cr3 | pcid | CR3_PCID_SAVE; - ucr3 = pmap->pm_ucr3 | pcid | - PMAP_PCID_USER_PT | CR3_PCID_SAVE; - pmap_pti_pcid_invlrng(ucr3, kcr3, sva, eva); - } - critical_exit(); - } - } else - pmap->pm_pcids[cpuid].pm_gen = 0; - CPU_FOREACH(i) { - if (cpuid != i) - pmap->pm_pcids[i].pm_gen = 0; + pcid = pmap->pm_pcids[cpuid].pm_pcid; + if (invpcid_works1) { + d.pcid = pcid | PMAP_PCID_USER_PT; + d.pad = 0; + for (d.addr = sva; d.addr < eva; d.addr += PAGE_SIZE) + invpcid(&d, INVPCID_ADDR); + } else { + kcr3 = pmap->pm_cr3 | pcid | CR3_PCID_SAVE; + ucr3 = pmap->pm_ucr3 | pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; + pmap_pti_pcid_invlrng(ucr3, kcr3, sva, eva); } - /* See the comment in pmap_invalidate_page_pcid(). */ - atomic_thread_fence_seq_cst(); } static void -pmap_invalidate_range_pcid_invpcid(pmap_t pmap, vm_offset_t sva, +pmap_invalidate_range_pcid_invpcid_cb(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - - pmap_invalidate_range_pcid(pmap, sva, eva, true); + pmap_invalidate_range_pcid_cb(pmap, sva, eva, true); } static void -pmap_invalidate_range_pcid_noinvpcid(pmap_t pmap, vm_offset_t sva, +pmap_invalidate_range_pcid_noinvpcid_cb(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - - pmap_invalidate_range_pcid(pmap, sva, eva, false); + pmap_invalidate_range_pcid_cb(pmap, sva, eva, false); } static void -pmap_invalidate_range_nopcid(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +pmap_invalidate_range_nopcid_cb(pmap_t pmap __unused, vm_offset_t sva __unused, + vm_offset_t eva __unused) { } -DEFINE_IFUNC(static, void, pmap_invalidate_range_mode, (pmap_t, vm_offset_t, +DEFINE_IFUNC(static, void, pmap_invalidate_range_cb, (pmap_t, vm_offset_t, vm_offset_t)) { - if (pmap_pcid_enabled) - return (invpcid_works ? pmap_invalidate_range_pcid_invpcid : - pmap_invalidate_range_pcid_noinvpcid); - return (pmap_invalidate_range_nopcid); + return (invpcid_works ? pmap_invalidate_range_pcid_invpcid_cb : + pmap_invalidate_range_pcid_noinvpcid_cb); + return (pmap_invalidate_range_nopcid_cb); } static void @@ -2980,19 +2982,16 @@ pmap_invalidate_range_curcpu_cb(pmap_t pmap, vm_offset if (pmap == kernel_pmap) { for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); - } else { - if (pmap == PCPU_GET(curpmap)) { - for (addr = sva; addr < eva; addr += PAGE_SIZE) - invlpg(addr); - } - pmap_invalidate_range_mode(pmap, sva, eva); + } else if (pmap == PCPU_GET(curpmap)) { + for (addr = sva; addr < eva; addr += PAGE_SIZE) + invlpg(addr); + pmap_invalidate_range_cb(pmap, sva, eva); } } void pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - if (eva - sva >= PMAP_INVLPG_THRESHOLD) { pmap_invalidate_all(pmap); return; @@ -3006,17 +3005,18 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm KASSERT(pmap->pm_type == PT_X86, ("pmap_invalidate_range: invalid type %d", pmap->pm_type)); + pmap_invalidate_preipi(pmap); smp_masked_invlpg_range(pmap_invalidate_cpu_mask(pmap), sva, eva, pmap, pmap_invalidate_range_curcpu_cb); } static inline void -pmap_invalidate_all_pcid(pmap_t pmap, bool invpcid_works1) +pmap_invalidate_all_pcid_cb(pmap_t pmap, bool invpcid_works1) { struct invpcid_descr d; uint64_t kcr3; uint32_t pcid; - u_int cpuid, i; + u_int cpuid; if (pmap == kernel_pmap) { if (invpcid_works1) { @@ -3025,79 +3025,64 @@ pmap_invalidate_all_pcid(pmap_t pmap, bool invpcid_wor } else { invltlb_glob(); } - } else { + } else if (pmap == PCPU_GET(curpmap)) { + CRITICAL_ASSERT(curthread); cpuid = PCPU_GET(cpuid); - if (pmap == PCPU_GET(curpmap)) { - critical_enter(); - pcid = pmap->pm_pcids[cpuid].pm_pcid; - if (invpcid_works1) { - d.pcid = pcid; - d.pad = 0; - d.addr = 0; - invpcid(&d, INVPCID_CTX); - } else { - kcr3 = pmap->pm_cr3 | pcid; - load_cr3(kcr3); - } - if (pmap->pm_ucr3 != PMAP_NO_CR3) - PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); - critical_exit(); - } else - pmap->pm_pcids[cpuid].pm_gen = 0; - CPU_FOREACH(i) { - if (cpuid != i) - pmap->pm_pcids[i].pm_gen = 0; + + pcid = pmap->pm_pcids[cpuid].pm_pcid; + if (invpcid_works1) { + d.pcid = pcid; + d.pad = 0; + d.addr = 0; + invpcid(&d, INVPCID_CTX); + } else { + kcr3 = pmap->pm_cr3 | pcid; + load_cr3(kcr3); } + if (pmap->pm_ucr3 != PMAP_NO_CR3) + PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); } - /* See the comment in pmap_invalidate_page_pcid(). */ - atomic_thread_fence_seq_cst(); } static void -pmap_invalidate_all_pcid_invpcid(pmap_t pmap) +pmap_invalidate_all_pcid_invpcid_cb(pmap_t pmap) { - - pmap_invalidate_all_pcid(pmap, true); + pmap_invalidate_all_pcid_cb(pmap, true); } static void -pmap_invalidate_all_pcid_noinvpcid(pmap_t pmap) +pmap_invalidate_all_pcid_noinvpcid_cb(pmap_t pmap) { - - pmap_invalidate_all_pcid(pmap, false); + pmap_invalidate_all_pcid_cb(pmap, false); } static void -pmap_invalidate_all_nopcid(pmap_t pmap) +pmap_invalidate_all_nopcid_cb(pmap_t pmap) { - if (pmap == kernel_pmap) invltlb_glob(); else if (pmap == PCPU_GET(curpmap)) invltlb(); } -DEFINE_IFUNC(static, void, pmap_invalidate_all_mode, (pmap_t)) +DEFINE_IFUNC(static, void, pmap_invalidate_all_cb, (pmap_t)) { - if (pmap_pcid_enabled) - return (invpcid_works ? pmap_invalidate_all_pcid_invpcid : - pmap_invalidate_all_pcid_noinvpcid); - return (pmap_invalidate_all_nopcid); + return (invpcid_works ? pmap_invalidate_all_pcid_invpcid_cb : + pmap_invalidate_all_pcid_noinvpcid_cb); + return (pmap_invalidate_all_nopcid_cb); } static void pmap_invalidate_all_curcpu_cb(pmap_t pmap, vm_offset_t addr1 __unused, vm_offset_t addr2 __unused) { - - pmap_invalidate_all_mode(pmap); + pmap_invalidate_all_cb(pmap); } void pmap_invalidate_all(pmap_t pmap) { - if (pmap_type_guest(pmap)) { pmap_invalidate_ept(pmap); return; @@ -3106,6 +3091,7 @@ pmap_invalidate_all(pmap_t pmap) KASSERT(pmap->pm_type == PT_X86, ("pmap_invalidate_all: invalid type %d", pmap->pm_type)); + pmap_invalidate_preipi(pmap); smp_masked_invltlb(pmap_invalidate_cpu_mask(pmap), pmap, pmap_invalidate_all_curcpu_cb); } @@ -3114,14 +3100,13 @@ static void pmap_invalidate_cache_curcpu_cb(pmap_t pmap __unused, vm_offset_t va __unused, vm_offset_t addr2 __unused) { - wbinvd(); } void pmap_invalidate_cache(void) { - + sched_pin(); smp_cache_flush(pmap_invalidate_cache_curcpu_cb); } From owner-svn-src-head@freebsd.org Mon Dec 14 22:54: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 8DD934C95C2; Mon, 14 Dec 2020 22:54:33 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CvxXn1TCTz4TwB; Mon, 14 Dec 2020 22:54:33 +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 23CAF11F1; Mon, 14 Dec 2020 22:54:33 +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 0BEMsW7B086968; Mon, 14 Dec 2020 22:54:32 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BEMsW9D086967; Mon, 14 Dec 2020 22:54:32 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202012142254.0BEMsW9D086967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 14 Dec 2020 22:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368651 - head/sys/netpfil/ipfw X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/netpfil/ipfw X-SVN-Commit-Revision: 368651 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.34 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, 14 Dec 2020 22:54:33 -0000 Author: melifaro Date: Mon Dec 14 22:54:32 2020 New Revision: 368651 URL: https://svnweb.freebsd.org/changeset/base/368651 Log: Fix LINT-NOINET6 build after r368571. Reported by: mjg Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table_algo.c Mon Dec 14 22:53:19 2020 (r368650) +++ head/sys/netpfil/ipfw/ip_fw_table_algo.c Mon Dec 14 22:54:32 2020 (r368651) @@ -3935,16 +3935,24 @@ static int ta_find_kfib_tentry(void *ta_state, struct table_info *ti, ipfw_obj_tentry *tent) { - struct rtentry *rt; + struct rtentry *rt = NULL; struct route_nhop_data rnd; struct epoch_tracker et; int error; NET_EPOCH_ENTER(et); - if (tent->subtype == AF_INET) { + + switch (tent->subtype) { +#ifdef INET + case AF_INET: rt = fib4_lookup_rt(ti->data, tent->k.addr, 0, 0, &rnd); - } else { + break; +#endif +#ifdef INET6 + case AF_INET6: rt = fib6_lookup_rt(ti->data, &tent->k.addr6, 0, 0, &rnd); + break; +#endif } if (rt != NULL) error = ta_dump_kfib_tentry_int(tent->subtype, rt, tent); From owner-svn-src-head@freebsd.org Tue Dec 15 01:45: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 6DCAF4CCBDC; Tue, 15 Dec 2020 01:45:20 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cw1Kr2SqJz4fw8; Tue, 15 Dec 2020 01:45:20 +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 38CC03B6B; Tue, 15 Dec 2020 01:45:20 +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 0BF1jKgu093648; Tue, 15 Dec 2020 01:45:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BF1jKZs093647; Tue, 15 Dec 2020 01:45:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012150145.0BF1jKZs093647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 15 Dec 2020 01:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368652 - head/tools/kerneldoc/subsys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/kerneldoc/subsys X-SVN-Commit-Revision: 368652 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.34 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, 15 Dec 2020 01:45:20 -0000 Author: emaste Date: Tue Dec 15 01:45:19 2020 New Revision: 368652 URL: https://svnweb.freebsd.org/changeset/base/368652 Log: Remove more cx,ctau leftovers Missed in r359178 Deleted: head/tools/kerneldoc/subsys/Doxyfile-dev_ctau head/tools/kerneldoc/subsys/Doxyfile-dev_cx From owner-svn-src-head@freebsd.org Tue Dec 15 09:43: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 5991E4AF6B3; Tue, 15 Dec 2020 09:43:19 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwCxM24dSz3PHh; Tue, 15 Dec 2020 09:43:19 +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 3A5D51201E; Tue, 15 Dec 2020 09:43:19 +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 0BF9hJ8k094574; Tue, 15 Dec 2020 09:43:19 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BF9hJCx094573; Tue, 15 Dec 2020 09:43:19 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202012150943.0BF9hJCx094573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 15 Dec 2020 09:43:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368657 - head/libexec/tftpd X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/libexec/tftpd X-SVN-Commit-Revision: 368657 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.34 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, 15 Dec 2020 09:43:19 -0000 Author: tuexen Date: Tue Dec 15 09:43:18 2020 New Revision: 368657 URL: https://svnweb.freebsd.org/changeset/base/368657 Log: When receiving a file having a length, which is a mulitple of the blocksize, close the file once it is received. Reported by: Timo Voelker MFC after: 1 week Modified: head/libexec/tftpd/tftp-transfer.c Modified: head/libexec/tftpd/tftp-transfer.c ============================================================================== --- head/libexec/tftpd/tftp-transfer.c Tue Dec 15 08:29:45 2020 (r368656) +++ head/libexec/tftpd/tftp-transfer.c Tue Dec 15 09:43:18 2020 (r368657) @@ -397,9 +397,9 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st send_error(peer, ENOSPACE); goto abort; } - if (n_data != segsize) - write_close(); } + if (n_data != segsize) + write_close(); windowblock++; /* Only send ACKs for the last block in the window. */ From owner-svn-src-head@freebsd.org Tue Dec 15 11:51: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 46D7D4B2984; Tue, 15 Dec 2020 11:51:18 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwGn21c8xz3lc1; Tue, 15 Dec 2020 11:51:18 +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 2A47A13736; Tue, 15 Dec 2020 11:51:18 +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 0BFBpIdu073791; Tue, 15 Dec 2020 11:51:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFBpIUP073790; Tue, 15 Dec 2020 11:51:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012151151.0BFBpIUP073790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 15 Dec 2020 11:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368658 - head/sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb X-SVN-Commit-Revision: 368658 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.34 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, 15 Dec 2020 11:51:18 -0000 Author: hselasky Date: Tue Dec 15 11:51:17 2020 New Revision: 368658 URL: https://svnweb.freebsd.org/changeset/base/368658 Log: Improve handling of alternate settings in the USB stack. Limit the number of alternate settings to 256. Else the alternate index variable may wrap around. PR: 251856 MFC after: 1 week Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/usb/usb_parse.c Modified: head/sys/dev/usb/usb_parse.c ============================================================================== --- head/sys/dev/usb/usb_parse.c Tue Dec 15 09:43:18 2020 (r368657) +++ head/sys/dev/usb/usb_parse.c Tue Dec 15 11:51:17 2020 (r368658) @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -141,8 +141,20 @@ usb_idesc_foreach(struct usb_config_descriptor *cd, break; if ((id->bDescriptorType == UDESC_INTERFACE) && (id->bLength >= sizeof(*id))) { - if (ps->iface_no_last == id->bInterfaceNumber) + if (ps->iface_no_last == id->bInterfaceNumber) { + /* + * Don't allow more than 256 alternate + * settings to avoid overflowing the + * alternate index which is a 8-bit + * variable. + */ + if (ps->iface_index_alt == 255) { + DPRINTF("Interface(%u) has more than 256 alternate settings\n", + id->bInterfaceNumber); + continue; + } new_iface = 0; + } ps->iface_no_last = id->bInterfaceNumber; break; } From owner-svn-src-head@freebsd.org Tue Dec 15 12:05: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 C37BA4B3E70; Tue, 15 Dec 2020 12:05: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwH505Bzsz3mlt; Tue, 15 Dec 2020 12:05: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 A0D76138BB; Tue, 15 Dec 2020 12:05: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 0BFC58xq083034; Tue, 15 Dec 2020 12:05:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFC57bU083029; Tue, 15 Dec 2020 12:05:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012151205.0BFC57bU083029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 15 Dec 2020 12:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368659 - in head/sys: compat/linuxkpi/common/src dev/usb sys X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys: compat/linuxkpi/common/src dev/usb sys X-SVN-Commit-Revision: 368659 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.34 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, 15 Dec 2020 12:05:08 -0000 Author: hselasky Date: Tue Dec 15 12:05:07 2020 New Revision: 368659 URL: https://svnweb.freebsd.org/changeset/base/368659 Log: Improve handling of alternate settings in the USB stack. Allow setting the alternate interface number to fail when there is only one alternate setting present, to comply with the USB specification. Refactor how iface->num_altsetting is computed. Bump the __FreeBSD_version due to change of core USB structure. PR: 251856 MFC after: 1 week Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/compat/linuxkpi/common/src/linux_usb.c head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_request.c head/sys/dev/usb/usbdi.h head/sys/sys/param.h Modified: head/sys/compat/linuxkpi/common/src/linux_usb.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_usb.c Tue Dec 15 11:51:17 2020 (r368658) +++ head/sys/compat/linuxkpi/common/src/linux_usb.c Tue Dec 15 12:05:07 2020 (r368659) @@ -931,17 +931,12 @@ usb_linux_create_usb_device(struct usb_device *udev, d if (p_ui) { p_ui->altsetting = p_uhi - 1; p_ui->cur_altsetting = p_uhi - 1; - p_ui->num_altsetting = 1; p_ui->bsd_iface_index = iface_index; p_ui->linux_udev = udev; p_ui++; } iface_no_curr = iface_no; iface_index++; - } else { - if (p_ui) { - (p_ui - 1)->num_altsetting++; - } } break; Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Tue Dec 15 11:51:17 2020 (r368658) +++ head/sys/dev/usb/usb_device.c Tue Dec 15 12:05:07 2020 (r368659) @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -905,6 +905,10 @@ usb_config_parse(struct usb_device *udev, uint8_t ifac /* update current number of endpoints */ ep_curr = ep_max; } + /* update number of alternate settings, if any */ + if (iface_index == USB_IFACE_INDEX_ANY) + iface->num_altsetting = ips.iface_index_alt + 1; + /* check for init */ if (do_init) { /* setup the USB interface structure */ Modified: head/sys/dev/usb/usb_request.c ============================================================================== --- head/sys/dev/usb/usb_request.c Tue Dec 15 11:51:17 2020 (r368658) +++ head/sys/dev/usb/usb_request.c Tue Dec 15 12:05:07 2020 (r368659) @@ -4,7 +4,7 @@ * * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1436,6 +1436,7 @@ usbd_req_set_alt_interface_no(struct usb_device *udev, { struct usb_interface *iface = usbd_get_iface(udev, iface_index); struct usb_device_request req; + usb_error_t err; if ((iface == NULL) || (iface->idesc == NULL)) return (USB_ERR_INVAL); @@ -1447,7 +1448,17 @@ usbd_req_set_alt_interface_no(struct usb_device *udev, req.wIndex[0] = iface->idesc->bInterfaceNumber; req.wIndex[1] = 0; USETW(req.wLength, 0); - return (usbd_do_request(udev, mtx, &req, 0)); + err = usbd_do_request(udev, mtx, &req, 0); + if (err == USB_ERR_STALLED && iface->num_altsetting == 1) { + /* + * The USB specification chapter 9.4.10 says that USB + * devices having only one alternate setting are + * allowed to STALL this request. Ignore this failure. + */ + err = 0; + DPRINTF("Setting default alternate number failed. (ignored)\n"); + } + return (err); } /*------------------------------------------------------------------------* Modified: head/sys/dev/usb/usbdi.h ============================================================================== --- head/sys/dev/usb/usbdi.h Tue Dec 15 11:51:17 2020 (r368658) +++ head/sys/dev/usb/usbdi.h Tue Dec 15 12:05:07 2020 (r368659) @@ -174,6 +174,9 @@ struct usb_endpoint { struct usb_interface { struct usb_interface_descriptor *idesc; device_t subdev; + /* Total number of alternate settings, from 1 to 256 */ + uint16_t num_altsetting; + /* Current alternate interface index, from 0 to 255 */ uint8_t alt_index; uint8_t parent_iface_index; @@ -183,7 +186,6 @@ struct usb_interface { struct usb_device *linux_udev; void *bsd_priv_sc; /* device specific information */ char *pnpinfo; /* additional PnP-info for this interface */ - uint8_t num_altsetting; /* number of alternate settings */ uint8_t bsd_iface_index; }; Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Dec 15 11:51:17 2020 (r368658) +++ head/sys/sys/param.h Tue Dec 15 12:05:07 2020 (r368659) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300131 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300132 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Tue Dec 15 12:59: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 A77624B5C17; Tue, 15 Dec 2020 12:59:42 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CwJHx43wTz3qm6; Tue, 15 Dec 2020 12:59:41 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (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 mail.turbocat.net (Postfix) with ESMTPSA id 0E67C260266; Tue, 15 Dec 2020 13:59:32 +0100 (CET) Subject: Re: svn commit: r368523 - head/sys/vm To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012102044.0BAKiTHh011767@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Tue, 15 Dec 2020 13:59:22 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <202012102044.0BAKiTHh011767@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CwJHx43wTz3qm6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-1.72 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; 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]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:4f8:c17:6c4b::2:from]; DMARC_NA(0.00)[selasky.org]; SPAMHAUS_ZRD(0.00)[2a01:4f8:c17:6c4b::2:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.58)[0.580]; NEURAL_HAM_LONG(-1.00)[-1.000]; 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]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 15 Dec 2020 12:59:42 -0000 On 12/10/20 9:44 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Dec 10 20:44:29 2020 > New Revision: 368523 > URL: https://svnweb.freebsd.org/changeset/base/368523 > > Log: > contig allocs: Don't retry forever on M_WAITOK. > > This restores behavior from before domain iterators were added in > r327895 and r327896. > > The vm_domainset_iter_policy() will do a vm_wait_doms() and then > restart its iterator when M_WAITOK is set. It will also force > the containing loop to have M_NOWAIT. So we get an unbounded > retry loop rather than the intended bounded retries that > kmem_alloc_contig_pages() already handles. > > This also restores M_WAITOK to the vmem_alloc() call in > kmem_alloc_attr_domain() and kmem_alloc_contig_domain(). > > Reviewed by: markj, kib > MFC after: 2 weeks > Sponsored by: Dell EMC > Differential Revision: https://reviews.freebsd.org/D27507 > > Modified: > head/sys/vm/vm_kern.c > > Modified: head/sys/vm/vm_kern.c > ============================================================================== > --- head/sys/vm/vm_kern.c Thu Dec 10 20:44:05 2020 (r368522) > +++ head/sys/vm/vm_kern.c Thu Dec 10 20:44:29 2020 (r368523) > @@ -264,9 +264,15 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_siz > { > struct vm_domainset_iter di; > vm_offset_t addr; > - int domain; > + int domain, iflags; > > - vm_domainset_iter_policy_init(&di, ds, &domain, &flags); > + /* > + * Do not allow the domainset iterator to override wait flags. The > + * contiguous memory allocator defines special semantics for M_WAITOK > + * that do not match the iterator's implementation. > + */ > + iflags = (flags & ~M_WAITOK) | M_NOWAIT; > + vm_domainset_iter_policy_init(&di, ds, &domain, &iflags); > do { > addr = kmem_alloc_attr_domain(domain, size, flags, low, high, > memattr); > @@ -346,9 +352,15 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_s > { > struct vm_domainset_iter di; > vm_offset_t addr; > - int domain; > + int domain, iflags; > > - vm_domainset_iter_policy_init(&di, ds, &domain, &flags); > + /* > + * Do not allow the domainset iterator to override wait flags. The > + * contiguous memory allocator defines special semantics for M_WAITOK > + * that do not match the iterator's implementation. > + */ > + iflags = (flags & ~M_WAITOK) | M_NOWAIT; > + vm_domainset_iter_policy_init(&di, ds, &domain, &iflags); > do { > addr = kmem_alloc_contig_domain(domain, size, flags, low, high, > alignment, boundary, memattr); > Hi, Should "iflags" also be passed to kmem_alloc_contig_domain() !? I'm seeing the following panic: panic("vm_wait in early boot") vm_wait_domain() kmem_alloc_contig_pages() kmem_alloc_contig_domainset() kmem_alloc_contig() contigmalloc() x86bios_alloc() vesa_configure() vesa_mod_event() vesa_module_register_init() mi_startup() --HPS From owner-svn-src-head@freebsd.org Tue Dec 15 14:27: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 4FBAF4B7C8B; Tue, 15 Dec 2020 14:27:43 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwLFW1WNPz3vvq; Tue, 15 Dec 2020 14:27:43 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x72c.google.com with SMTP id 22so8959912qkf.9; Tue, 15 Dec 2020 06:27: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=37vbU/++S5+OutWJQnE4KZOGX8voI4GQablWFgtbTtg=; b=Zaq43VdAL56H0TYJPg7AxKXL5KZLdVABWdLROQVY8YiPPj49+i0v3o1fjsmIchBwCH W2iyqMboYjB9Gp94G5+tJT8svZUt5ySwwOUuZxKpYtf6Ck3DGFoObVGgYxvjIB54kDxk oRXf7QvLi7vXLCj9UhX03+cZ153pEvTKgBLQ6ARNLiXX1Qj+adomzLVKqrOgVncCQasP xwiEocIDeze2YpXFiUr+MqPETfbuzwSOCEEZvvG8N9yN4zc699H9vrSVaBcwCuJ8EDyI TSmEkFf5gkf9Q/a7A40dgsRPF+V8Vr8tUPBTtK5RVlk9A0z+rTVYoj03sroYILCyeAwy xYUQ== 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=37vbU/++S5+OutWJQnE4KZOGX8voI4GQablWFgtbTtg=; b=kWOtDvAR60MSUp7bcvRu+plGOdtBAfCyfOdS0IEAutQa3j3JvC6FdcoUeyHTLaiaVR 61G29+5rAE4WbH79N7+H7i4lRueBZjXbgVVp6EIkRVEB4G+M2JBMNHKPxhYWIbaplHXQ +KH/uIl399AT8Z6mV/m1DMl19Kzpulqw5BbDVOd8YM231+s8FcBSFJu7Z2NnT8thsizo bodj2TMPm52tC3sinfbZwJS0ui/LGqN84gzy1GLkyKiLMrD8nnzljnqkIH0oHUv4mdCG btKDmQtnsTwf2ErNXD40ySfR24juDQoKqbIi1I6nVgF/wyx4cbUQK9FR6NZIR4bhq8MH M+Yg== X-Gm-Message-State: AOAM533yJb+uak8cSLOWuhCtm3mjaZ67XIkscOmtEOjIrWrlXo6qYu29 YI2YXV30uJbTDlptqUgMwdgOG5KySEU= X-Google-Smtp-Source: ABdhPJzVElht788OUEGR6Yb3EwWDzO+j23BojWT6fYKgi65HiNNiM3RcZnnHIFlt0Xet8WihjvwWkw== X-Received: by 2002:a37:5103:: with SMTP id f3mr38624172qkb.460.1608042462272; Tue, 15 Dec 2020 06:27:42 -0800 (PST) Received: from raichu ([142.126.164.150]) by smtp.gmail.com with ESMTPSA id c20sm2481161qtj.29.2020.12.15.06.27.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 06:27:41 -0800 (PST) Sender: Mark Johnston Date: Tue, 15 Dec 2020 09:27:39 -0500 From: Mark Johnston To: Hans Petter Selasky Cc: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r368523 - head/sys/vm Message-ID: References: <202012102044.0BAKiTHh011767@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4CwLFW1WNPz3vvq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 15 Dec 2020 14:27:43 -0000 On Tue, Dec 15, 2020 at 01:59:22PM +0100, Hans Petter Selasky wrote: > On 12/10/20 9:44 PM, Bryan Drewery wrote: > > Author: bdrewery > > Date: Thu Dec 10 20:44:29 2020 > > New Revision: 368523 > > URL: https://svnweb.freebsd.org/changeset/base/368523 > > > > Log: > > contig allocs: Don't retry forever on M_WAITOK. > > > > This restores behavior from before domain iterators were added in > > r327895 and r327896. > > > > The vm_domainset_iter_policy() will do a vm_wait_doms() and then > > restart its iterator when M_WAITOK is set. It will also force > > the containing loop to have M_NOWAIT. So we get an unbounded > > retry loop rather than the intended bounded retries that > > kmem_alloc_contig_pages() already handles. > > > > This also restores M_WAITOK to the vmem_alloc() call in > > kmem_alloc_attr_domain() and kmem_alloc_contig_domain(). > > > > Reviewed by: markj, kib > > MFC after: 2 weeks > > Sponsored by: Dell EMC > > Differential Revision: https://reviews.freebsd.org/D27507 > > > > Modified: > > head/sys/vm/vm_kern.c > > > > Modified: head/sys/vm/vm_kern.c > > ============================================================================== > > --- head/sys/vm/vm_kern.c Thu Dec 10 20:44:05 2020 (r368522) > > +++ head/sys/vm/vm_kern.c Thu Dec 10 20:44:29 2020 (r368523) > > @@ -264,9 +264,15 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_siz > > { > > struct vm_domainset_iter di; > > vm_offset_t addr; > > - int domain; > > + int domain, iflags; > > > > - vm_domainset_iter_policy_init(&di, ds, &domain, &flags); > > + /* > > + * Do not allow the domainset iterator to override wait flags. The > > + * contiguous memory allocator defines special semantics for M_WAITOK > > + * that do not match the iterator's implementation. > > + */ > > + iflags = (flags & ~M_WAITOK) | M_NOWAIT; > > + vm_domainset_iter_policy_init(&di, ds, &domain, &iflags); > > do { > > addr = kmem_alloc_attr_domain(domain, size, flags, low, high, > > memattr); > > @@ -346,9 +352,15 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_s > > { > > struct vm_domainset_iter di; > > vm_offset_t addr; > > - int domain; > > + int domain, iflags; > > > > - vm_domainset_iter_policy_init(&di, ds, &domain, &flags); > > + /* > > + * Do not allow the domainset iterator to override wait flags. The > > + * contiguous memory allocator defines special semantics for M_WAITOK > > + * that do not match the iterator's implementation. > > + */ > > + iflags = (flags & ~M_WAITOK) | M_NOWAIT; > > + vm_domainset_iter_policy_init(&di, ds, &domain, &iflags); > > do { > > addr = kmem_alloc_contig_domain(domain, size, flags, low, high, > > alignment, boundary, memattr); > > > > Hi, > > Should "iflags" also be passed to kmem_alloc_contig_domain() !? It is intentional, iflags is modified to ensure that the domainset iterator does not loop until the allocation is successful, and kmem_alloc_contig_pages() implements its own M_WAITOK handling. > I'm seeing the following panic: > > panic("vm_wait in early boot") > vm_wait_domain() > kmem_alloc_contig_pages() > kmem_alloc_contig_domainset() > kmem_alloc_contig() > contigmalloc() > x86bios_alloc() > vesa_configure() > vesa_mod_event() > vesa_module_register_init() > mi_startup() Is it on a NUMA system? I see that the new logic won't work properly if there are empty domains, so this suggests that we really do need a special contig iterator as discussed in the review. From owner-svn-src-head@freebsd.org Tue Dec 15 14:33: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 AB6AD4B7F09; Tue, 15 Dec 2020 14:33:26 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CwLN63y6hz3wMH; Tue, 15 Dec 2020 14:33:26 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 1E1D3260266; Tue, 15 Dec 2020 15:33:19 +0100 (CET) Subject: Re: svn commit: r368523 - head/sys/vm To: Mark Johnston Cc: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012102044.0BAKiTHh011767@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Tue, 15 Dec 2020 15:33:09 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CwLN63y6hz3wMH X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 15 Dec 2020 14:33:26 -0000 On 12/15/20 3:27 PM, Mark Johnston wrote: >> I'm seeing the following panic: >> >> panic("vm_wait in early boot") >> vm_wait_domain() >> kmem_alloc_contig_pages() >> kmem_alloc_contig_domainset() >> kmem_alloc_contig() >> contigmalloc() >> x86bios_alloc() >> vesa_configure() >> vesa_mod_event() >> vesa_module_register_init() >> mi_startup() > Is it on a NUMA system? I see that the new logic won't work properly if > there are empty domains, so this suggests that we really do need a > special contig iterator as discussed in the review. Yes, this is a numa system. I just noticed, that before r368523 "flags" was updated by _vm_domainset_iter_policy_init() to always contain M_NOWAIT and that avoids the wait logic, but I think x86bios_alloc() doesn't get its memory then. I'm not sure if x86bios_alloc() needs to be attached a bit later anyway? --HPS From owner-svn-src-head@freebsd.org Tue Dec 15 15:04:07 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 DEAA44B9104; Tue, 15 Dec 2020 15:04:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwM3W5mDMz4SX9; Tue, 15 Dec 2020 15:04:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x82a.google.com with SMTP id z9so14748070qtn.4; Tue, 15 Dec 2020 07:04:07 -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=8bgmmcFyaMUkmk84gpJqLR1XgwAslkAlmtfM3Cn8B84=; b=Z0x6ZOiPARKpeaIZZ6WeWPzhK0eG3p+leEmPZjnyzJyWGbcPqSY9nebocSScX/LuXz RF0mlHmq0OpU0qU1TIciMF8QCawZf4qYttUueCQyFNk6Tp3JksP0Ik2b2bn4WToIacZf 2ZiSW71CKSZFAwLZEaEhmX3J4mKnau8J5YqoCOpVfIDnekBKeUFWWSsU9S5aAivpo4+0 HZxn5JFdF/cbomoQZCyVartYFZjUYwtkPT8bcolgmXNNngdbT4wZrGJVcWz11L8lyOQx Lgkf0l2QMpw6AaMFt4/R1Kdkk2PvC/B2UBwM7gs87x7dF4xPyByj2He4PpVd6mci7Lx4 +9TQ== 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=8bgmmcFyaMUkmk84gpJqLR1XgwAslkAlmtfM3Cn8B84=; b=bGkjLclxFGA+yFPCTPMyLSMkRfMLiDH2pMagTLr80l/ARvzc38MUlhTpWhAusnElky UHzXerzPjJz6uRWNItCxwunhfP+Mey1IuSY2IQepOz9hqNn505+l3upGeK/LtdwoPpSb MAdxIEN7LDefEZX/pMZDit2iIH/hInekpjj9M1r03F8LFMyyhHCn7aSrRBT/04C2kgF5 CxtbOdYTRQ2JadkLA2/E/lf+SnbGbpVDeA40sqzPcxUcZmIl7AvvwddmBAEtcioiaPsd J5FMcvBvKdGqoEWM8JrqBNTVh7wVYBxjt64u5+hrtYUE2eTgkeHyrqGS6IMGFa1ZeqP0 FCew== X-Gm-Message-State: AOAM533SprXHmIqbibYIrzh8X8xNM+v+sqlej90qg+qYDjpiAtq+TyBq xk/cA6Y+yQ37Mk8Qv/kozydUiHLkxyA= X-Google-Smtp-Source: ABdhPJyz+FEwk0bizssd8wZBPeVXFTDkQh7jdFzdtU1Tsze9ddHsRRus3+n9SZxpSeNjprxsg8yQhQ== X-Received: by 2002:ac8:71c7:: with SMTP id i7mr35884480qtp.47.1608044646878; Tue, 15 Dec 2020 07:04:06 -0800 (PST) Received: from raichu ([142.126.164.150]) by smtp.gmail.com with ESMTPSA id l191sm16118169qke.7.2020.12.15.07.04.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 07:04:06 -0800 (PST) Sender: Mark Johnston Date: Tue, 15 Dec 2020 10:04:03 -0500 From: Mark Johnston To: Hans Petter Selasky Cc: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r368523 - head/sys/vm Message-ID: References: <202012102044.0BAKiTHh011767@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4CwM3W5mDMz4SX9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 15 Dec 2020 15:04:07 -0000 On Tue, Dec 15, 2020 at 03:33:09PM +0100, Hans Petter Selasky wrote: > On 12/15/20 3:27 PM, Mark Johnston wrote: > >> I'm seeing the following panic: > >> > >> panic("vm_wait in early boot") > >> vm_wait_domain() > >> kmem_alloc_contig_pages() > >> kmem_alloc_contig_domainset() > >> kmem_alloc_contig() > >> contigmalloc() > >> x86bios_alloc() > >> vesa_configure() > >> vesa_mod_event() > >> vesa_module_register_init() > >> mi_startup() > > Is it on a NUMA system? I see that the new logic won't work properly if > > there are empty domains, so this suggests that we really do need a > > special contig iterator as discussed in the review. > > Yes, this is a numa system. > > I just noticed, that before r368523 "flags" was updated by > _vm_domainset_iter_policy_init() to always contain M_NOWAIT and that > avoids the wait logic, but I think x86bios_alloc() doesn't get its > memory then. Yes, but note that vm_domainset_iter_policy() will also call vm_wait_doms() if a M_NOWAIT allocation from each domain fails. x86bios_alloc() requests memory from the first 1MB of physical memory, but because contigmalloc() uses a round-robin iterator initialized from per-thread state it may try from the "wrong" domain first. So really a different solution to the original problem is needed. > I'm not sure if x86bios_alloc() needs to be attached a bit later anyway? > > --HPS From owner-svn-src-head@freebsd.org Tue Dec 15 15:13: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 C99284B914D; Tue, 15 Dec 2020 15:13:06 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwMFt5Bn9z4Sxc; Tue, 15 Dec 2020 15:13:06 +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 A56F516195; Tue, 15 Dec 2020 15:13:06 +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 0BFFD6ps000811; Tue, 15 Dec 2020 15:13:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFFD6wG000810; Tue, 15 Dec 2020 15:13:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202012151513.0BFFD6wG000810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 15 Dec 2020 15:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368662 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 368662 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.34 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, 15 Dec 2020 15:13:06 -0000 Author: manu Date: Tue Dec 15 15:13:06 2020 New Revision: 368662 URL: https://svnweb.freebsd.org/changeset/base/368662 Log: release: Rename arm64/RPI3.conf to arm64/RPI.conf We now have a u-boot port and config.txt for booting on all 64bits variant of the RPI boards (RPI2v1.1, RPI3* and RPI4*) so use the new u-boot-rpi-arm64 and the config_arm64.txt files. Discussed with: karels, kevans Added: head/release/arm64/RPI.conf - copied, changed from r368661, head/release/arm64/RPI3.conf Deleted: head/release/arm64/RPI3.conf Copied and modified: head/release/arm64/RPI.conf (from r368661, head/release/arm64/RPI3.conf) ============================================================================== --- head/release/arm64/RPI3.conf Tue Dec 15 14:58:40 2020 (r368661, copy source) +++ head/release/arm64/RPI.conf Tue Dec 15 15:13:06 2020 (r368662) @@ -8,7 +8,7 @@ DTB="bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-r EMBEDDED_TARGET_ARCH="aarch64" EMBEDDED_TARGET="arm64" EMBEDDEDBUILD=1 -EMBEDDEDPORTS="sysutils/u-boot-rpi3 sysutils/rpi-firmware" +EMBEDDEDPORTS="sysutils/u-boot-rpi-arm64 sysutils/rpi-firmware" FAT_SIZE="50m -b 1m" FAT_TYPE="16" IMAGE_SIZE="3072M" @@ -18,10 +18,10 @@ NODOC=1 OL_DIR="${DTB_DIR}/overlays" OVERLAYS="mmc.dtbo pwm.dtbo disable-bt.dtbo" PART_SCHEME="MBR" -export BOARDNAME="RPI3" +export BOARDNAME="RPI" arm_install_uboot() { - UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi3" + UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi-arm64" UBOOT_FILES="README u-boot.bin" DTB_FILES="armstub8.bin armstub8-gic.bin bootcode.bin fixup_cd.dat \ fixup_db.dat fixup_x.dat fixup.dat LICENCE.broadcom \ @@ -39,9 +39,7 @@ arm_install_uboot() { chroot ${CHROOTDIR} cp -p ${DTB_DIR}/${_DF} \ ${FATMOUNT}/${_DF} done - chroot ${CHROOTDIR} cp -p ${DTB_DIR}/config_rpi4.txt \ - ${FATMOUNT} - chroot ${CHROOTDIR} cp -p ${DTB_DIR}/config_rpi3.txt \ + chroot ${CHROOTDIR} cp -p ${DTB_DIR}/config_arm64.txt \ ${FATMOUNT}/config.txt chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/overlays for _OL in ${OVERLAYS}; do From owner-svn-src-head@freebsd.org Tue Dec 15 15: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 591054B9ACF; Tue, 15 Dec 2020 15:36:42 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwMn61rjWz4Vwd; Tue, 15 Dec 2020 15:36:42 +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 326A21617E; Tue, 15 Dec 2020 15:36:42 +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 0BFFagGm013319; Tue, 15 Dec 2020 15:36:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFFaguD013318; Tue, 15 Dec 2020 15:36:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012151536.0BFFaguD013318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 15 Dec 2020 15:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368664 - head/sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb X-SVN-Commit-Revision: 368664 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.34 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, 15 Dec 2020 15:36:42 -0000 Author: hselasky Date: Tue Dec 15 15:36:41 2020 New Revision: 368664 URL: https://svnweb.freebsd.org/changeset/base/368664 Log: Improve handling of alternate settings in the USB stack. Move initialization of num_altsetting under USB_CFG_INIT, else there will be a page fault when enumerating USB devices. PR: 251856 MFC after: 1 week Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Tue Dec 15 15:33:28 2020 (r368663) +++ head/sys/dev/usb/usb_device.c Tue Dec 15 15:36:41 2020 (r368664) @@ -897,6 +897,9 @@ usb_config_parse(struct usb_device *udev, uint8_t ifac /* initialise interface */ do_init = 1; } + /* update number of alternate settings, if any */ + if (iface_index == USB_IFACE_INDEX_ANY) + iface->num_altsetting = ips.iface_index_alt + 1; } else do_init = 0; @@ -905,9 +908,6 @@ usb_config_parse(struct usb_device *udev, uint8_t ifac /* update current number of endpoints */ ep_curr = ep_max; } - /* update number of alternate settings, if any */ - if (iface_index == USB_IFACE_INDEX_ANY) - iface->num_altsetting = ips.iface_index_alt + 1; /* check for init */ if (do_init) { From owner-svn-src-head@freebsd.org Tue Dec 15 17:44: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 300E24BD24F; Tue, 15 Dec 2020 17:44:20 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwQcN0vzMz4dH9; Tue, 15 Dec 2020 17:44:20 +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 0789717E2D; Tue, 15 Dec 2020 17:44:20 +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 0BFHiJiC093839; Tue, 15 Dec 2020 17:44:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFHiJfd093834; Tue, 15 Dec 2020 17:44:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012151744.0BFHiJfd093834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 15 Dec 2020 17:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368667 - in head: . gnu/usr.bin gnu/usr.bin/binutils gnu/usr.bin/gdb tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: . gnu/usr.bin gnu/usr.bin/binutils gnu/usr.bin/gdb tools/build/mk X-SVN-Commit-Revision: 368667 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.34 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, 15 Dec 2020 17:44:20 -0000 Author: emaste Date: Tue Dec 15 17:44:19 2020 New Revision: 368667 URL: https://svnweb.freebsd.org/changeset/base/368667 Log: Retire obsolete GDB 6.1.1 GDB 6.1.1 was released in June 2004 and is long obsolete. It does not support all of the architectures that FreeBSD does, and imposes limitations on the FreeBSD kernel build, such as the continued use of DWARF2 debugging information. It was kept (in /usr/libexec/) only for use by crashinfo(8), which extracts some basic information from a kernel core dump after a crash. Crashinfo already prefers gdb from port/package if installed. Future work may add kernel debug support to LLDB or find another path for crashinfo's needs, but in any case we do not want to ship the excessively outdated GDB in FreeBSD 13. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27610 Deleted: head/gnu/usr.bin/binutils/ head/gnu/usr.bin/gdb/ Modified: head/ObsoleteFiles.inc head/UPDATING head/gnu/usr.bin/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 15 16:15:25 2020 (r368666) +++ head/ObsoleteFiles.inc Tue Dec 15 17:44:19 2020 (r368667) @@ -36,6 +36,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20201215: in-tree gdb removed +OLD_FILES+=usr/libexec/gdb +OLD_FILES+=usr/libexec/kgdb + # 20201211: hme(4) removed OLD_FILES+=usr/share/man/man4/hme.4.gz OLD_FILES+=usr/share/man/man4/if_hme.4.gz Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Dec 15 16:15:25 2020 (r368666) +++ head/UPDATING Tue Dec 15 17:44:19 2020 (r368667) @@ -26,6 +26,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20201215: + Obsolete in-tree GDB 6.1.1 has been removed. GDB (including kgdb) + may be installed from ports or packages. + 20201124: ping6 has been merged into ping. It can now be called as "ping -6". See ping(8) for details. Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Tue Dec 15 16:15:25 2020 (r368666) +++ head/gnu/usr.bin/Makefile Tue Dec 15 17:44:19 2020 (r368667) @@ -5,8 +5,6 @@ SUBDIR.${MK_DIALOG}+= dialog SUBDIR.${MK_GNU_DIFF}+= diff3 SUBDIR.${MK_GNU_GREP}+= grep -SUBDIR.${MK_GDB}+= binutils gdb -SUBDIR_DEPEND_gdb= binutils SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Dec 15 16:15:25 2020 (r368666) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Dec 15 17:44:19 2020 (r368667) @@ -2143,11 +2143,6 @@ OLD_FILES+=usr/share/man/man1/llvm-cov.1.gz OLD_FILES+=usr/share/man/man1/llvm-profdata.1.gz .endif -.if ${MK_GDB} == no -OLD_FILES+=usr/libexec/gdb -OLD_FILES+=usr/libexec/kgdb -.endif - .if ${MK_GOOGLETEST} == no OLD_FILES+=usr/include/gmock/gmock-actions.h OLD_FILES+=usr/include/gmock/gmock-cardinalities.h From owner-svn-src-head@freebsd.org Tue Dec 15 17:52: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 461CB4BD3C0; Tue, 15 Dec 2020 17:52:05 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwQnK1VDpz4dpr; Tue, 15 Dec 2020 17:52:05 +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 26794180B9; Tue, 15 Dec 2020 17:52:05 +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 0BFHq5lM099993; Tue, 15 Dec 2020 17:52:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFHq55Q099992; Tue, 15 Dec 2020 17:52:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012151752.0BFHq55Q099992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 15 Dec 2020 17:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368668 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 368668 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.34 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, 15 Dec 2020 17:52:05 -0000 Author: emaste Date: Tue Dec 15 17:52:04 2020 New Revision: 368668 URL: https://svnweb.freebsd.org/changeset/base/368668 Log: Add relnote for r368667, GDB 6.1.1 removal Modified: head/RELNOTES Modified: head/RELNOTES ============================================================================== --- head/RELNOTES Tue Dec 15 17:44:19 2020 (r368667) +++ head/RELNOTES Tue Dec 15 17:52:04 2020 (r368668) @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r368667: + GDB 6.1.1 was removed. Users of crashinfo(8) should install the + gdb package or devel/gdb port. + r368559: The hme(4) driver was removed. From owner-svn-src-head@freebsd.org Tue Dec 15 18:12: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 E89504BDE03; Tue, 15 Dec 2020 18:12:04 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwRDN6Km1z4gbK; Tue, 15 Dec 2020 18:12:04 +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 CC51A187FC; Tue, 15 Dec 2020 18:12:04 +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 0BFIC489013288; Tue, 15 Dec 2020 18:12:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFIC4x5012838; Tue, 15 Dec 2020 18:12:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012151812.0BFIC4x5012838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 15 Dec 2020 18:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368669 - in head: . gnu/lib share/mk X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: . gnu/lib share/mk X-SVN-Commit-Revision: 368669 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.34 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, 15 Dec 2020 18:12:05 -0000 Author: emaste Date: Tue Dec 15 18:12:03 2020 New Revision: 368669 URL: https://svnweb.freebsd.org/changeset/base/368669 Log: Remove additional GDB leftovers missed in r368667 Modified: head/Makefile.inc1 head/gnu/lib/Makefile head/share/mk/src.opts.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Dec 15 17:52:04 2020 (r368668) +++ head/Makefile.inc1 Tue Dec 15 18:12:03 2020 (r368669) @@ -761,7 +761,7 @@ TMAKE= \ XMAKE= ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ MK_CLANG_IS_CC=${MK_CLANG_BOOTSTRAP} \ - MK_GDB=no MK_TESTS=no + MK_TESTS=no # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ @@ -2729,7 +2729,6 @@ NXBMAKEARGS+= \ MK_CLANG_FULL=no \ MK_CTF=no \ MK_DEBUG_FILES=no \ - MK_GDB=no \ MK_HTML=no \ MK_LLDB=no \ MK_MAN=no \ Modified: head/gnu/lib/Makefile ============================================================================== --- head/gnu/lib/Makefile Tue Dec 15 17:52:04 2020 (r368668) +++ head/gnu/lib/Makefile Tue Dec 15 18:12:03 2020 (r368669) @@ -6,7 +6,7 @@ SUBDIR= SUBDIR.${MK_DIALOG}+= libdialog SUBDIR.${MK_TESTS}+= tests -.if ${MK_GNU_GREP} != "no" || ${MK_GDB} != "no" +.if ${MK_GNU_GREP} != "no" SUBDIR+= libregex .endif Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Dec 15 17:52:04 2020 (r368668) +++ head/share/mk/src.opts.mk Tue Dec 15 18:12:03 2020 (r368669) @@ -206,7 +206,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_FORMAT \ DTRACE_TESTS \ EXPERIMENTAL \ - GDB \ GNU_GREP \ HESIOD \ LIBSOFT \ @@ -289,10 +288,6 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF .include -# In-tree gdb is an older versions without modern architecture support. -.if ${__T} == "aarch64" || ${__T:Mriscv*} != "" -BROKEN_OPTIONS+=GDB -.endif .if ${__T:Mriscv*} != "" BROKEN_OPTIONS+=OFED .endif @@ -481,7 +476,6 @@ MK_LLD_BOOTSTRAP:= no .if ${MK_TOOLCHAIN} == "no" MK_CLANG:= no -MK_GDB:= no MK_INCLUDES:= no MK_LLD:= no MK_LLDB:= no From owner-svn-src-head@freebsd.org Tue Dec 15 18:44: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 3FE924BE9F2; Tue, 15 Dec 2020 18:44:42 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwRy16Xp9z4jg4; Tue, 15 Dec 2020 18:44:41 +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 D37D118B96; Tue, 15 Dec 2020 18:44:41 +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 0BFIif8q033562; Tue, 15 Dec 2020 18:44:41 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFIif2O033561; Tue, 15 Dec 2020 18:44:41 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202012151844.0BFIif2O033561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 15 Dec 2020 18:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368670 - head/tools/kerneldoc/subsys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/tools/kerneldoc/subsys X-SVN-Commit-Revision: 368670 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.34 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, 15 Dec 2020 18:44:42 -0000 Author: brooks Date: Tue Dec 15 18:44:41 2020 New Revision: 368670 URL: https://svnweb.freebsd.org/changeset/base/368670 Log: Remove Doxyfiles for removed drivers Reported by: emaste Deleted: head/tools/kerneldoc/subsys/Doxyfile-dev_auxio head/tools/kerneldoc/subsys/Doxyfile-dev_bktr head/tools/kerneldoc/subsys/Doxyfile-dev_bm head/tools/kerneldoc/subsys/Doxyfile-dev_cs head/tools/kerneldoc/subsys/Doxyfile-dev_cy head/tools/kerneldoc/subsys/Doxyfile-dev_de head/tools/kerneldoc/subsys/Doxyfile-dev_ed head/tools/kerneldoc/subsys/Doxyfile-dev_ep head/tools/kerneldoc/subsys/Doxyfile-dev_ex head/tools/kerneldoc/subsys/Doxyfile-dev_fe head/tools/kerneldoc/subsys/Doxyfile-dev_hme head/tools/kerneldoc/subsys/Doxyfile-dev_nand head/tools/kerneldoc/subsys/Doxyfile-dev_pcn head/tools/kerneldoc/subsys/Doxyfile-dev_rc head/tools/kerneldoc/subsys/Doxyfile-dev_rp head/tools/kerneldoc/subsys/Doxyfile-dev_sf head/tools/kerneldoc/subsys/Doxyfile-dev_sio head/tools/kerneldoc/subsys/Doxyfile-dev_sn head/tools/kerneldoc/subsys/Doxyfile-dev_tl head/tools/kerneldoc/subsys/Doxyfile-dev_trm head/tools/kerneldoc/subsys/Doxyfile-dev_tx head/tools/kerneldoc/subsys/Doxyfile-dev_txp head/tools/kerneldoc/subsys/Doxyfile-dev_vx head/tools/kerneldoc/subsys/Doxyfile-dev_wb head/tools/kerneldoc/subsys/Doxyfile-dev_xe From owner-svn-src-head@freebsd.org Tue Dec 15 18:46: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 137024BECFD; Tue, 15 Dec 2020 18:46:24 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwS0006Cdz4jh5; Tue, 15 Dec 2020 18:46:24 +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 E08B518B53; Tue, 15 Dec 2020 18:46:23 +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 0BFIkNGe033690; Tue, 15 Dec 2020 18:46:23 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFIkNDf033689; Tue, 15 Dec 2020 18:46:23 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202012151846.0BFIkNDf033689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 15 Dec 2020 18:46:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368671 - in head/sys: dev/hme modules/hme X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: dev/hme modules/hme X-SVN-Commit-Revision: 368671 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.34 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, 15 Dec 2020 18:46:24 -0000 Author: brooks Date: Tue Dec 15 18:46:23 2020 New Revision: 368671 URL: https://svnweb.freebsd.org/changeset/base/368671 Log: hme(4): remove stray directories Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27526 Deleted: head/sys/dev/hme/ head/sys/modules/hme/ From owner-svn-src-head@freebsd.org Tue Dec 15 19:38: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 58B3D4BFF71; Tue, 15 Dec 2020 19:38:17 +0000 (UTC) (envelope-from bdrewery@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwT7s22Dpz4mNY; Tue, 15 Dec 2020 19:38:17 +0000 (UTC) (envelope-from bdrewery@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 389AE196A6; Tue, 15 Dec 2020 19:38:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BFJcHKR064672; Tue, 15 Dec 2020 19:38:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFJcG5X064671; Tue, 15 Dec 2020 19:38:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <202012151938.0BFJcG5X064671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 15 Dec 2020 19:38:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368673 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 368673 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.34 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, 15 Dec 2020 19:38:17 -0000 Author: bdrewery Date: Tue Dec 15 19:38:16 2020 New Revision: 368673 URL: https://svnweb.freebsd.org/changeset/base/368673 Log: Revert r368523 which fixed contig allocs waiting forever. This needs to account for empty NUMA domains or domains which do not satisfy the requested range. Discussed with: markj Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Tue Dec 15 18:51:11 2020 (r368672) +++ head/sys/vm/vm_kern.c Tue Dec 15 19:38:16 2020 (r368673) @@ -264,15 +264,9 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_siz { struct vm_domainset_iter di; vm_offset_t addr; - int domain, iflags; + int domain; - /* - * Do not allow the domainset iterator to override wait flags. The - * contiguous memory allocator defines special semantics for M_WAITOK - * that do not match the iterator's implementation. - */ - iflags = (flags & ~M_WAITOK) | M_NOWAIT; - vm_domainset_iter_policy_init(&di, ds, &domain, &iflags); + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); do { addr = kmem_alloc_attr_domain(domain, size, flags, low, high, memattr); @@ -352,15 +346,9 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_s { struct vm_domainset_iter di; vm_offset_t addr; - int domain, iflags; + int domain; - /* - * Do not allow the domainset iterator to override wait flags. The - * contiguous memory allocator defines special semantics for M_WAITOK - * that do not match the iterator's implementation. - */ - iflags = (flags & ~M_WAITOK) | M_NOWAIT; - vm_domainset_iter_policy_init(&di, ds, &domain, &iflags); + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); do { addr = kmem_alloc_contig_domain(domain, size, flags, low, high, alignment, boundary, memattr); From owner-svn-src-head@freebsd.org Tue Dec 15 19:39: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 BA9CF4C0202; Tue, 15 Dec 2020 19:39:38 +0000 (UTC) (envelope-from bdrewery@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwT9Q4dxcz4m6l; Tue, 15 Dec 2020 19:39:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1608061178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FjLNjF3jwoT9gb5N/U3zA7vTiKojInAE8fOU8Nn68W4=; b=Mp6ZhJ6qUK0ktrb0g86m4r3HoJhEvS7VwCrPtp2m1QEHRn5FOhei3lZaPcjO0Y9jvOADZ4 PN5J0pFQFAQnj+xshDCJXKeL95Cpwg0y5zO/nXyQdy+6EKQ9KCj+RHj0Xkl29O5tGuimU7 MwMLzxJAIdWByQclTdI2iUu29nvHRUtcdyRNVZTapBFbVbKarmcYBMlf68MowStJnfZe/n Pl/QEAXw9GIZGLtaZNJNsm7ICoSTyXZBOwHjWOfHN8hgCz/ttPl83We0z0gHI/SBqC8Cnm 9r5RG9pVvBbJ3qxuXECjg/jUg3oPRq1oaD7r4fwnYejWBrMQVteridFZ1k4Mtg== Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 702D216C85; Tue, 15 Dec 2020 19:39:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 6FF6A524F; Tue, 15 Dec 2020 19:39:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id bsmDAbXebrRn; Tue, 15 Dec 2020 19:39:34 +0000 (UTC) Subject: Re: svn commit: r368523 - head/sys/vm DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com AD25A5246 To: Mark Johnston , Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012102044.0BAKiTHh011767@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: Date: Tue, 15 Dec 2020 11:39:34 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gnRroaiJmggqThfUt1wReLq4WxTTUkNY3" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1608061178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FjLNjF3jwoT9gb5N/U3zA7vTiKojInAE8fOU8Nn68W4=; b=ivaTaj4K7Dmq7eFCmZ02wVNXVQv3ztxy9Ox0N3xgS82YrS8tWw0vbqLnIPu9dCPIiOETCW lxUEywcxZOjz4wWvoCWzLXgnkBIEIPBzTF3SN1leZUUoMbj6LmJihqxBB/Pvz9SDvyUGal iRVYq5ZGPYEdjqTnXYEoPUbinFvQgBmC44VoTxSFPTZBbifxXvV5J8M/fEn1WuXXbFW4ZO r0ARCwYk3D3lTFOYeQny1dX7ok5/hHahRAHeXMlBUPQU0gdou+O+DfXB7MMzawvjQxmd5x MNaefGOC94PMk9IzdGWw4ydv21/8n1fZwyLT5USvdUqxoBNs2GRtvTOwM67frw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1608061178; a=rsa-sha256; cv=none; b=Kq3sWKZNyahSRrqbLJ4atZJEdjm/Q3uM5q/IGK+oiXTLUFDwfm5cRXfD7LBggoR5J1LuBF +jaRvaUBQA6+tjKXD7yxmxlehMkww2RLw8Ym+7L0Ijm+/O6llzmvYg5bY6lX4OiRSBJcJb /xODvL1O2jA1fdan6VQ3Ws1/0Vo7mQ3LNaLTj9lZ25XK0rLCVJ90W0Ti2JwC/hUaKvLi2+ bJTcTwje2poFKsvywOHw3ed5h7/3BWhSyjTItZPXU65yYjTbOrttGnBWBJXdtPOlgHwu2W jTz1Ds2aJp8XMnAeAohuUF0CI0O7V7QparBdB+gWcOlVEc9KNO+OvYRCwqkVtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 15 Dec 2020 19:39:38 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gnRroaiJmggqThfUt1wReLq4WxTTUkNY3 Content-Type: multipart/mixed; boundary="G8bN0TsR2GXK9oUy9Q6kXg4Wjb3qgftFo"; protected-headers="v1" From: Bryan Drewery To: Mark Johnston , Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r368523 - head/sys/vm References: <202012102044.0BAKiTHh011767@repo.freebsd.org> In-Reply-To: --G8bN0TsR2GXK9oUy9Q6kXg4Wjb3qgftFo Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 12/15/2020 7:04 AM, Mark Johnston wrote: > On Tue, Dec 15, 2020 at 03:33:09PM +0100, Hans Petter Selasky wrote: >> On 12/15/20 3:27 PM, Mark Johnston wrote: >>>> I'm seeing the following panic: >>>> >>>> panic("vm_wait in early boot") >>>> vm_wait_domain() >>>> kmem_alloc_contig_pages() >>>> kmem_alloc_contig_domainset() >>>> kmem_alloc_contig() >>>> contigmalloc() >>>> x86bios_alloc() >>>> vesa_configure() >>>> vesa_mod_event() >>>> vesa_module_register_init() >>>> mi_startup() >>> Is it on a NUMA system? I see that the new logic won't work properly= if >>> there are empty domains, so this suggests that we really do need a >>> special contig iterator as discussed in the review. >> >> Yes, this is a numa system. >> >> I just noticed, that before r368523 "flags" was updated by=20 >> _vm_domainset_iter_policy_init() to always contain M_NOWAIT and that=20 >> avoids the wait logic, but I think x86bios_alloc() doesn't get its=20 >> memory then. >=20 > Yes, but note that vm_domainset_iter_policy() will also call > vm_wait_doms() if a M_NOWAIT allocation from each domain fails. > x86bios_alloc() requests memory from the first 1MB of physical memory, > but because contigmalloc() uses a round-robin iterator initialized from= > per-thread state it may try from the "wrong" domain first. So really a= > different solution to the original problem is needed. >=20 >> I'm not sure if x86bios_alloc() needs to be attached a bit later anywa= y? >> >> --HPS I have reverted the change in r368673 until we come up with a more comprehensive fix. --=20 Regards, Bryan Drewery --G8bN0TsR2GXK9oUy9Q6kXg4Wjb3qgftFo-- --gnRroaiJmggqThfUt1wReLq4WxTTUkNY3 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEE+Rc8ssOq6npcih8JNddxu25Gl88FAl/ZEPYFAwAAAAAACgkQNddxu25Gl899 gggA0dD7mNfQlb3+ZZ4PKtn2Vt+H1gPQaXG6ZQDQgjnopUOiFDJVKSZhs93RZM4n3B7zcjLn4aND IcETuRAy/kmktwTgJfQRyWxyqOodI8KDEmyltBTg90GIqspF7bHwaamHMa63iQwwJ4Yerm03jOC2 gLlAhQ7wN1PzDZJoaS5rWt0STCSKoH7qoGAnUv2eoJl2N7vv4tNZej5Q1p06rFCqjZEN5WNNMT6H ei0q9H4lW9KNLznHlHWOj7KY2sIzYVCBjMU/L6E8FdVuwHeLvlzREfeRypVNBIbJRkA5zzZ4cfnB Aycs4oZcLsAN0cxIrRXrY4S6yR/wGJ/070K5IqTxYg== =pxKg -----END PGP SIGNATURE----- --gnRroaiJmggqThfUt1wReLq4WxTTUkNY3-- From owner-svn-src-head@freebsd.org Tue Dec 15 20:56: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 3E7AA4C2749; Tue, 15 Dec 2020 20:56:36 +0000 (UTC) (envelope-from jamie@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwVtD0S52z4s1f; Tue, 15 Dec 2020 20:56:36 +0000 (UTC) (envelope-from jamie@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 028131A0E0; Tue, 15 Dec 2020 20:56:36 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BFKuZao015421; Tue, 15 Dec 2020 20:56:35 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFKuZZa015420; Tue, 15 Dec 2020 20:56:35 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <202012152056.0BFKuZZa015420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Tue, 15 Dec 2020 20:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368676 - head/usr.sbin/jls X-SVN-Group: head X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: head/usr.sbin/jls X-SVN-Commit-Revision: 368676 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.34 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, 15 Dec 2020 20:56:36 -0000 Author: jamie Date: Tue Dec 15 20:56:35 2020 New Revision: 368676 URL: https://svnweb.freebsd.org/changeset/base/368676 Log: Bugfix to not hide jailparam flags, which for example changes the output "vnet=2" to the less opaque "vnet=inherit" Reported by: kevans MFC after: 5 days Modified: head/usr.sbin/jls/jls.c Modified: head/usr.sbin/jls/jls.c ============================================================================== --- head/usr.sbin/jls/jls.c Tue Dec 15 20:02:40 2020 (r368675) +++ head/usr.sbin/jls/jls.c Tue Dec 15 20:56:35 2020 (r368676) @@ -323,7 +323,7 @@ add_param(const char *name, void *value, size_t valuel } xo_errx(1, "%s", jail_errmsg); } - param->jp_flags = flags; + param->jp_flags |= flags; return param - params; } From owner-svn-src-head@freebsd.org Tue Dec 15 21:48: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 BC9364C4B18; Tue, 15 Dec 2020 21:48:35 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwX2C4Yj9z3DCq; Tue, 15 Dec 2020 21:48:35 +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 8DDC11AF48; Tue, 15 Dec 2020 21:48:35 +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 0BFLmZek046971; Tue, 15 Dec 2020 21:48:35 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFLmZ7I046970; Tue, 15 Dec 2020 21:48:35 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202012152148.0BFLmZ7I046970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 15 Dec 2020 21:48:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368677 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 368677 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.34 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, 15 Dec 2020 21:48:35 -0000 Author: tsoome Date: Tue Dec 15 21:48:35 2020 New Revision: 368677 URL: https://svnweb.freebsd.org/changeset/base/368677 Log: loader: allow loader to accept zfs feature com.datto:bookmark_v2 We do not need to actually read bookmarks, just whitelist this feature Reported by: jpaetzel Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Tue Dec 15 20:56:35 2020 (r368676) +++ head/stand/libsa/zfs/zfsimpl.c Tue Dec 15 21:48:35 2020 (r368677) @@ -127,6 +127,7 @@ static const char *features_for_read[] = { "com.delphix:zpool_checkpoint", "com.delphix:spacemap_v2", "com.datto:encryption", + "com.datto:bookmark_v2", "org.zfsonlinux:allocation_classes", "com.datto:resilver_defer", "com.delphix:device_removal", From owner-svn-src-head@freebsd.org Tue Dec 15 22:37: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 EE15F4C6AA3; Tue, 15 Dec 2020 22:37:03 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwY676TRTz3Jw1; Tue, 15 Dec 2020 22:37:03 +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 D1A871B56E; Tue, 15 Dec 2020 22:37:03 +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 0BFMb3JF079170; Tue, 15 Dec 2020 22:37:03 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BFMb3jq079169; Tue, 15 Dec 2020 22:37:03 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202012152237.0BFMb3jq079169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 15 Dec 2020 22:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368684 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 368684 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.34 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, 15 Dec 2020 22:37:04 -0000 Author: tsoome Date: Tue Dec 15 22:37:03 2020 New Revision: 368684 URL: https://svnweb.freebsd.org/changeset/base/368684 Log: loader: allow loader to accept zfs feature com.delphix:bookmark_written We do not need to actually read bookmarks, just whitelist this feature. Reported by: mjg Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Tue Dec 15 21:54:31 2020 (r368683) +++ head/stand/libsa/zfs/zfsimpl.c Tue Dec 15 22:37:03 2020 (r368684) @@ -134,6 +134,7 @@ static const char *features_for_read[] = { "com.delphix:obsolete_counts", "com.intel:allocation_classes", "org.freebsd:zstd_compress", + "com.delphix:bookmark_written", NULL }; From owner-svn-src-head@freebsd.org Tue Dec 15 23:25: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 3EAC94C7C3E; Tue, 15 Dec 2020 23:25:57 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwZBY0rWyz3M4d; Tue, 15 Dec 2020 23:25:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:a4c5:833e:8ae:3fad]) (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 92ECF183A; Tue, 15 Dec 2020 23:25:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r368667 - in head: . gnu/usr.bin gnu/usr.bin/binutils gnu/usr.bin/gdb tools/build/mk To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012151744.0BFHiJfd093834@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: <7b56af12-94db-5ed0-1fc7-866d33a8b1e7@FreeBSD.org> Date: Tue, 15 Dec 2020 15:25:55 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <202012151744.0BFHiJfd093834@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.34 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, 15 Dec 2020 23:25:57 -0000 On 12/15/20 9:44 AM, Ed Maste wrote: > Author: emaste > Date: Tue Dec 15 17:44:19 2020 > New Revision: 368667 > URL: https://svnweb.freebsd.org/changeset/base/368667 > > Log: > Retire obsolete GDB 6.1.1 > > GDB 6.1.1 was released in June 2004 and is long obsolete. It does not > support all of the architectures that FreeBSD does, and imposes > limitations on the FreeBSD kernel build, such as the continued use of > DWARF2 debugging information. > > It was kept (in /usr/libexec/) only for use by crashinfo(8), which > extracts some basic information from a kernel core dump after a crash. > Crashinfo already prefers gdb from port/package if installed. > > Future work may add kernel debug support to LLDB or find another path > for crashinfo's needs, but in any case we do not want to ship the > excessively outdated GDB in FreeBSD 13. > > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D27610 Are you going to remove the -gdwarf-2 bits from kern.mk now? (Does ctfconvert support newer DWARF?) -- John Baldwin From owner-svn-src-head@freebsd.org Wed Dec 16 00:06: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 507E34A91CA for ; Wed, 16 Dec 2020 00:06:32 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cwb5N0ykpz3Nwv for ; Wed, 16 Dec 2020 00:06:31 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f54.google.com with SMTP id c133so780438wme.4 for ; Tue, 15 Dec 2020 16:06:31 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=bbdtNIZ97GbSj7RCgqggf2GAf76WdvG/v3dt1vUNITs=; b=BT9SGCV6zpLz8Z1yDbyQidZxJmMz9/qM66GfnP1k5m5jCC6LZ2vzjexK+WizoNViBq VlE7pyAz5Cvcx2llTIjoL/SgHzKVsD2VIU0PDlj8KP/VE1Hhjozqe9Z4pg0ycgpqg7eQ ydf8pRJ7BlHdAhPVYxnIlmLXKEyFMVS+dpK6uKyhe9IsPcGd2NOKNBzzvDjcUUZpwo0G l5rYQPFT7kppKBrnRQazvVJSelD/kzQXrsWYffBZEkIKoh/NAIE566OFdn2m2G+e6x0U JtQy09D1loe2EaEa/7KI9JUaJAm2dCVokLO0HVZbQ+0VDPlRLW0dQGb/4JrqP/2+s+fP 9oiA== X-Gm-Message-State: AOAM533ESUWz1amlgpMyQ0eKg4nhTSnIEHbbRmKBkz4YVa/n+pNVTc5d Tvn4bVNZd2XTk967su+MnnGP9Q== X-Google-Smtp-Source: ABdhPJwjc8wksvAV0XjoDAV1QEchhsB0EsSTqGTZQFVXhMEO8CMxdS/UfdxsY2BwPNNhtv5oQ00qEw== X-Received: by 2002:a1c:8115:: with SMTP id c21mr825415wmd.1.1608077190217; Tue, 15 Dec 2020 16:06:30 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id y11sm93206wmi.0.2020.12.15.16.06.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Dec 2020 16:06:29 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: svn commit: r368667 - in head: . gnu/usr.bin gnu/usr.bin/binutils gnu/usr.bin/gdb tools/build/mk From: Jessica Clarke In-Reply-To: <7b56af12-94db-5ed0-1fc7-866d33a8b1e7@FreeBSD.org> Date: Wed, 16 Dec 2020 00:06:27 +0000 Cc: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <202012151744.0BFHiJfd093834@repo.freebsd.org> <7b56af12-94db-5ed0-1fc7-866d33a8b1e7@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4Cwb5N0ykpz3Nwv X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 16 Dec 2020 00:06:32 -0000 On 15 Dec 2020, at 23:25, John Baldwin wrote: > On 12/15/20 9:44 AM, Ed Maste wrote: >> Author: emaste >> Date: Tue Dec 15 17:44:19 2020 >> New Revision: 368667 >> URL: https://svnweb.freebsd.org/changeset/base/368667 >> >> Log: >> Retire obsolete GDB 6.1.1 >> >> GDB 6.1.1 was released in June 2004 and is long obsolete. It does not >> support all of the architectures that FreeBSD does, and imposes >> limitations on the FreeBSD kernel build, such as the continued use of >> DWARF2 debugging information. >> >> It was kept (in /usr/libexec/) only for use by crashinfo(8), which >> extracts some basic information from a kernel core dump after a crash. >> Crashinfo already prefers gdb from port/package if installed. >> >> Future work may add kernel debug support to LLDB or find another path >> for crashinfo's needs, but in any case we do not want to ship the >> excessively outdated GDB in FreeBSD 13. >> >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D27610 > > Are you going to remove the -gdwarf-2 bits from kern.mk now? > > (Does ctfconvert support newer DWARF?) cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c:1964-1968: debug(1, "DWARF version: %d\n", vers); if (vers < 2 || vers > 4) { terminate("file contains incompatible version %d DWARF code " "(version 2, 3 or 4 required)\n", vers); } (since r261025) Though that doesn't mean it works... Jess From owner-svn-src-head@freebsd.org Wed Dec 16 00:11: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 45F714A949E; Wed, 16 Dec 2020 00:11:31 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwbC71Z4fz3Pjq; Wed, 16 Dec 2020 00:11:31 +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 288A51CAC0; Wed, 16 Dec 2020 00:11:31 +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 0BG0BVsa039552; Wed, 16 Dec 2020 00:11:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BG0BVDi039551; Wed, 16 Dec 2020 00:11:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012160011.0BG0BVDi039551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 16 Dec 2020 00:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368685 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 368685 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.34 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, 16 Dec 2020 00:11:31 -0000 Author: jhb Date: Wed Dec 16 00:11:30 2020 New Revision: 368685 URL: https://svnweb.freebsd.org/changeset/base/368685 Log: Use the 't' modifier to print a ptrdiff_t. Reviewed by: imp Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27576 Modified: head/sys/compat/linuxkpi/common/include/linux/printk.h Modified: head/sys/compat/linuxkpi/common/include/linux/printk.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/printk.h Tue Dec 15 22:37:03 2020 (r368684) +++ head/sys/compat/linuxkpi/common/include/linux/printk.h Wed Dec 16 00:11:30 2020 (r368685) @@ -68,7 +68,7 @@ print_hex_dump(const char *level, const char *prefix_s printf("[%p] ", buf); break; case DUMP_PREFIX_OFFSET: - printf("[%p] ", (const char *)((const char *)buf - + printf("[%#tx] ", ((const char *)buf - (const char *)buf_old)); break; default: From owner-svn-src-head@freebsd.org Wed Dec 16 00:13: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 341C84A978C; Wed, 16 Dec 2020 00:13: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwbFS71qHz3Q3R; Wed, 16 Dec 2020 00:13:32 +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 E40981CC76; Wed, 16 Dec 2020 00:13:32 +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 0BG0DW6R040705; Wed, 16 Dec 2020 00:13:32 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BG0DWXn040704; Wed, 16 Dec 2020 00:13:32 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012160013.0BG0DWXn040704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 16 Dec 2020 00:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368686 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 368686 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.34 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, 16 Dec 2020 00:13:33 -0000 Author: jhb Date: Wed Dec 16 00:13:32 2020 New Revision: 368686 URL: https://svnweb.freebsd.org/changeset/base/368686 Log: Use uintptr_t instead of unsigned long for pointers. The sense_ptr thing is quite broken. As near as I can tell, the driver tries to copyout to a physical address rather than whatever user address the sense buffer should be copied to. It is not immediately obvious what user address the sense buffer should be copied to. Reviewed by: imp Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27578 Modified: head/sys/dev/mrsas/mrsas_ioctl.c Modified: head/sys/dev/mrsas/mrsas_ioctl.c ============================================================================== --- head/sys/dev/mrsas/mrsas_ioctl.c Wed Dec 16 00:11:30 2020 (r368685) +++ head/sys/dev/mrsas/mrsas_ioctl.c Wed Dec 16 00:13:32 2020 (r368686) @@ -136,7 +136,7 @@ mrsas_passthru(struct mrsas_softc *sc, void *arg, u_lo * iocpacket itself. */ kern_sge32 = (struct mrsas_sge32 *) - ((unsigned long)cmd->frame + user_ioc->sgl_off); + ((uintptr_t)cmd->frame + user_ioc->sgl_off); memset(ioctl_data_tag, 0, (sizeof(bus_dma_tag_t) * MAX_IOCTL_SGE)); memset(ioctl_data_dmamap, 0, (sizeof(bus_dmamap_t) * MAX_IOCTL_SGE)); @@ -243,7 +243,7 @@ mrsas_passthru(struct mrsas_softc *sc, void *arg, u_lo goto out; } sense_ptr = - (unsigned long *)((unsigned long)cmd->frame + user_ioc->sense_off); + (unsigned long *)((uintptr_t)cmd->frame + user_ioc->sense_off); *sense_ptr = ioctl_sense_phys_addr; } /* @@ -290,9 +290,9 @@ mrsas_passthru(struct mrsas_softc *sc, void *arg, u_lo * sense_buff points to the location that has the user sense * buffer address */ - sense_ptr = (unsigned long *)((unsigned long)user_ioc->frame.raw + + sense_ptr = (unsigned long *)((uintptr_t)user_ioc->frame.raw + user_ioc->sense_off); - ret = copyout(ioctl_sense_mem, (unsigned long *)*sense_ptr, + ret = copyout(ioctl_sense_mem, (unsigned long *)(uintptr_t)*sense_ptr, user_ioc->sense_len); if (ret) { device_printf(sc->mrsas_dev, "IOCTL sense copyout failed!\n"); From owner-svn-src-head@freebsd.org Wed Dec 16 00:17: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 A09754A97D9; Wed, 16 Dec 2020 00:17:55 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwbLW46Kpz3Q98; Wed, 16 Dec 2020 00:17:55 +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 803971CC7B; Wed, 16 Dec 2020 00:17:55 +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 0BG0HtP5040958; Wed, 16 Dec 2020 00:17:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BG0HtGN040957; Wed, 16 Dec 2020 00:17:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012160017.0BG0HtGN040957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 16 Dec 2020 00:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368687 - head/sys/dev/mxge X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/mxge X-SVN-Commit-Revision: 368687 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.34 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, 16 Dec 2020 00:17:55 -0000 Author: jhb Date: Wed Dec 16 00:17:54 2020 New Revision: 368687 URL: https://svnweb.freebsd.org/changeset/base/368687 Log: Use uintptr_t instead of unsigned long for integers holding pointers. Reviewed by: imp, gallatin Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27580 Modified: head/sys/dev/mxge/if_mxge.c Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Wed Dec 16 00:13:32 2020 (r368686) +++ head/sys/dev/mxge/if_mxge.c Wed Dec 16 00:17:54 2020 (r368687) @@ -772,7 +772,7 @@ mxge_dummy_rdma(mxge_softc_t *sc, int enable) uint32_t *buf, dma_low, dma_high; int i; - buf = (uint32_t *)((unsigned long)(buf_bytes + 7) & ~7UL); + buf = (uint32_t *)((uintptr_t)(buf_bytes + 7) & ~7UL); /* clear confirmation addr */ confirm = (volatile uint32_t *)sc->cmd; @@ -825,7 +825,7 @@ mxge_send_cmd(mxge_softc_t *sc, uint32_t cmd, mxge_cmd int err, sleep_total = 0; /* ensure buf is aligned to 8 bytes */ - buf = (mcp_cmd_t *)((unsigned long)(buf_bytes + 7) & ~7UL); + buf = (mcp_cmd_t *)((uintptr_t)(buf_bytes + 7) & ~7UL); buf->data0 = htobe32(data->data0); buf->data1 = htobe32(data->data1); @@ -944,7 +944,7 @@ mxge_load_firmware(mxge_softc_t *sc, int adopt) uint32_t *buf, size, dma_low, dma_high; int status, i; - buf = (uint32_t *)((unsigned long)(buf_bytes + 7) & ~7UL); + buf = (uint32_t *)((uintptr_t)(buf_bytes + 7) & ~7UL); size = sc->sram_size; status = mxge_load_firmware_helper(sc, &size); @@ -3373,7 +3373,7 @@ mxge_alloc_slice_rings(struct mxge_slice_state *ss, in ss->tx.req_bytes = malloc(bytes, M_DEVBUF, M_WAITOK); /* ensure req_list entries are aligned to 8 bytes */ ss->tx.req_list = (mcp_kreq_ether_send_t *) - ((unsigned long)(ss->tx.req_bytes + 7) & ~7UL); + ((uintptr_t)(ss->tx.req_bytes + 7) & ~7UL); /* allocate the tx busdma segment list */ bytes = sizeof (*ss->tx.seg_list) * ss->tx.max_desc; From owner-svn-src-head@freebsd.org Wed Dec 16 00:27: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 852774A995A; Wed, 16 Dec 2020 00:27:29 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwbYY3J5rz3QdK; Wed, 16 Dec 2020 00:27:29 +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 6417C1CAF5; Wed, 16 Dec 2020 00:27:29 +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 0BG0RTCI047536; Wed, 16 Dec 2020 00:27:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BG0RTBa047535; Wed, 16 Dec 2020 00:27:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012160027.0BG0RTBa047535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 16 Dec 2020 00:27:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368688 - head/sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/usb X-SVN-Commit-Revision: 368688 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.34 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, 16 Dec 2020 00:27:29 -0000 Author: jhb Date: Wed Dec 16 00:27:28 2020 New Revision: 368688 URL: https://svnweb.freebsd.org/changeset/base/368688 Log: Use more standard types for manipulating pointers. - Use a uintptr_t cast to get the virtual address of a pointer in USB_P2U() instead of a ptrdiff_t. - Add offsets to a char * pointer directly without roundtripping the pointer through a ptrdiff_t in USB_ADD_BYTES(). Reviewed by: imp, hselasky Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27581 Modified: head/sys/dev/usb/usb_core.h Modified: head/sys/dev/usb/usb_core.h ============================================================================== --- head/sys/dev/usb/usb_core.h Wed Dec 16 00:17:54 2020 (r368687) +++ head/sys/dev/usb/usb_core.h Wed Dec 16 00:27:28 2020 (r368688) @@ -58,11 +58,11 @@ /* helper for converting pointers to integers */ #define USB_P2U(ptr) \ - (((const uint8_t *)(ptr)) - ((const uint8_t *)0)) + ((uintptr_t)(ptr)) /* helper for computing offsets */ #define USB_ADD_BYTES(ptr,size) \ - ((void *)(USB_P2U(ptr) + (size))) + ((void *)(__DECONST(char *, (ptr)) + (size))) /* debug macro */ #define USB_ASSERT KASSERT From owner-svn-src-head@freebsd.org Wed Dec 16 09:02: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 90D254B554A; Wed, 16 Dec 2020 09:02:11 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwpzR3kcNz4cXJ; Wed, 16 Dec 2020 09:02:11 +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 72D8023A0C; Wed, 16 Dec 2020 09:02:11 +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 0BG92BEw072708; Wed, 16 Dec 2020 09:02:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BG92A19072702; Wed, 16 Dec 2020 09:02:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012160902.0BG92A19072702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 16 Dec 2020 09:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string X-SVN-Commit-Revision: 368692 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.34 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, 16 Dec 2020 09:02:11 -0000 Author: kib Date: Wed Dec 16 09:02:09 2020 New Revision: 368692 URL: https://svnweb.freebsd.org/changeset/base/368692 Log: Implement strerror_l(). Only for the arches that provide user-mode TLS. PR: 251651 Requested by: yuri Discussed with: emaste, jilles, tijl Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27495 MFC after: 2 weeks Modified: head/include/xlocale/_string.h head/lib/libc/include/libc_private.h head/lib/libc/nls/msgcat.c head/lib/libc/string/Makefile.inc head/lib/libc/string/Symbol.map head/lib/libc/string/strerror.3 head/lib/libc/string/strerror.c Modified: head/include/xlocale/_string.h ============================================================================== --- head/include/xlocale/_string.h Wed Dec 16 08:43:38 2020 (r368691) +++ head/include/xlocale/_string.h Wed Dec 16 09:02:09 2020 (r368692) @@ -46,6 +46,7 @@ typedef struct _xlocale *locale_t; * POSIX2008 functions */ int strcoll_l(const char *, const char *, locale_t); +char *strerror_l(int num, locale_t); size_t strxfrm_l(char *, const char *, size_t, locale_t); #endif /* _XLOCALE_STRING1_H */ Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Wed Dec 16 08:43:38 2020 (r368691) +++ head/lib/libc/include/libc_private.h Wed Dec 16 09:02:09 2020 (r368692) @@ -431,4 +431,9 @@ void ___pthread_cleanup_pop_imp(int); void __throw_constraint_handler_s(const char * restrict msg, int error); +struct __nl_cat_d; +struct _xlocale; +struct __nl_cat_d *__catopen_l(const char *name, int type, + struct _xlocale *locale); + #endif /* _LIBC_PRIVATE_H_ */ Modified: head/lib/libc/nls/msgcat.c ============================================================================== --- head/lib/libc/nls/msgcat.c Wed Dec 16 08:43:38 2020 (r368691) +++ head/lib/libc/nls/msgcat.c Wed Dec 16 09:02:09 2020 (r368692) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "../locale/xlocale_private.h" +#include "libc_private.h" #define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:" \ _PATH_LOCALBASE "/share/nls/%L/%N.cat:" \ @@ -122,6 +123,12 @@ SLIST_HEAD(listhead, catentry) cache = nl_catd catopen(const char *name, int type) { + return (__catopen_l(name, type, __get_locale())); +} + +nl_catd +__catopen_l(const char *name, int type, locale_t locale) +{ struct stat sbuf; struct catentry *np; char *base, *cptr, *cptr1, *nlspath, *pathP, *pcode; @@ -139,7 +146,7 @@ catopen(const char *name, int type) lang = NULL; else { if (type == NL_CAT_LOCALE) - lang = querylocale(LC_MESSAGES_MASK, __get_locale()); + lang = querylocale(LC_MESSAGES_MASK, locale); else lang = getenv("LANG"); Modified: head/lib/libc/string/Makefile.inc ============================================================================== --- head/lib/libc/string/Makefile.inc Wed Dec 16 08:43:38 2020 (r368691) +++ head/lib/libc/string/Makefile.inc Wed Dec 16 09:02:09 2020 (r368692) @@ -64,6 +64,7 @@ MLINKS+=strcpy.3 stpcpy.3 \ strcpy.3 strncpy.3 MLINKS+=strdup.3 strndup.3 MLINKS+=strerror.3 perror.3 \ + strerror.3 strerror_l.3 \ strerror.3 strerror_r.3 \ strerror.3 sys_errlist.3 \ strerror.3 sys_nerr.3 Modified: head/lib/libc/string/Symbol.map ============================================================================== --- head/lib/libc/string/Symbol.map Wed Dec 16 08:43:38 2020 (r368691) +++ head/lib/libc/string/Symbol.map Wed Dec 16 09:02:09 2020 (r368692) @@ -110,6 +110,10 @@ FBSD_1.5 { timingsafe_memcmp; }; +FBSD_1.6 { + strerror_l; +}; + FBSDprivate_1.0 { __strtok_r; }; Modified: head/lib/libc/string/strerror.3 ============================================================================== --- head/lib/libc/string/strerror.3 Wed Dec 16 08:43:38 2020 (r368691) +++ head/lib/libc/string/strerror.3 Wed Dec 16 09:02:09 2020 (r368692) @@ -32,12 +32,13 @@ .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd April 5, 2011 +.Dd December 7, 2020 .Dt STRERROR 3 .Os .Sh NAME .Nm perror , .Nm strerror , +.Nm strerror_l , .Nm strerror_r , .Nm sys_errlist , .Nm sys_nerr @@ -53,12 +54,15 @@ .In string.h .Ft "char *" .Fn strerror "int errnum" +.Ft "char *" +.Fn strerror_l "int errnum" "locale_t" .Ft int .Fn strerror_r "int errnum" "char *strerrbuf" "size_t buflen" .Sh DESCRIPTION The .Fn strerror , -.Fn strerror_r +.Fn strerror_l , +.Fn strerror_r , and .Fn perror functions look up the error message string corresponding to an @@ -68,10 +72,30 @@ The .Fn strerror function accepts an error number argument .Fa errnum -and returns a pointer to the corresponding -message string. +and returns a pointer to the corresponding message string +in the current locale. +.Fn strerror +is not thread-safe. +It returns a pointer to an internal static buffer that could be +overwritten by a +.Fn strerror +call from another thread. .Pp The +.Fn strerror_l +function accepts +.Fa errnum +error number and +.Fa locale +locale handle arguments and returns a pointer to a string +corresponding to the specified error in the given locale. +.Fn strerror_l +is thread-safe, its result can be only overwritten by +another call to +.Fn strerror_l +from the current thread. +.Pp +The .Fn strerror_r function renders the same result into .Fa strerrbuf @@ -141,7 +165,8 @@ The external value contains a count of the messages in .Va sys_errlist . The use of these variables is deprecated; -.Fn strerror +.Fn strerror , +.Fn strerror_l , or .Fn strerror_r should be used instead. @@ -160,6 +185,10 @@ The .Fn strerror_r function conforms to .St -p1003.1-2001 . +The +.Fn strerror_l +function conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn strerror @@ -173,18 +202,21 @@ function was implemented in .Fx 4.4 by .An Wes Peters Aq Mt wes@FreeBSD.org . +The +.Fn strerror_l +function was added in +.Fx 13.0 . .Sh BUGS The .Fn strerror function returns its result in a static buffer which will be overwritten by subsequent calls. .Pp -The return type for -.Fn strerror -is missing a type-qualifier; it should actually be -.Vt const char * . -.Pp Programs that use the deprecated .Va sys_errlist variable often fail to compile because they declare it inconsistently. +Size of the +.Va sys_errlist +object might increase during FreeBSD lifetime, +breaking some ABI stability guarantees. Modified: head/lib/libc/string/strerror.c ============================================================================== --- head/lib/libc/string/strerror.c Wed Dec 16 08:43:38 2020 (r368691) +++ head/lib/libc/string/strerror.c Wed Dec 16 09:02:09 2020 (r368692) @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include #include "errlst.h" +#include "../locale/xlocale_private.h" +#include "libc_private.h" /* * Define buffer big enough to contain delimiter (": ", 2 bytes), @@ -78,34 +80,35 @@ errstr(int num, const char *uprefix, char *buf, size_t strlcat(buf, t, len); } -int -strerror_r(int errnum, char *strerrbuf, size_t buflen) +static int +strerror_rl(int errnum, char *strerrbuf, size_t buflen, locale_t locale) { int retval = 0; #if defined(NLS) int saved_errno = errno; nl_catd catd; - catd = catopen("libc", NL_CAT_LOCALE); + + catd = __catopen_l("libc", NL_CAT_LOCALE, locale); #endif if (errnum < 0 || errnum >= __hidden_sys_nerr) { errstr(errnum, #if defined(NLS) - catgets(catd, 1, 0xffff, __uprefix), + catgets(catd, 1, 0xffff, __uprefix), #else - __uprefix, + __uprefix, #endif - strerrbuf, buflen); + strerrbuf, buflen); retval = EINVAL; } else { if (strlcpy(strerrbuf, #if defined(NLS) - catgets(catd, 1, errnum, __hidden_sys_errlist[errnum]), + catgets(catd, 1, errnum, __hidden_sys_errlist[errnum]), #else - __hidden_sys_errlist[errnum], + __hidden_sys_errlist[errnum], #endif - buflen) >= buflen) - retval = ERANGE; + buflen) >= buflen) + retval = ERANGE; } #if defined(NLS) @@ -116,12 +119,33 @@ strerror_r(int errnum, char *strerrbuf, size_t buflen) return (retval); } +int +strerror_r(int errnum, char *strerrbuf, size_t buflen) +{ + return (strerror_rl(errnum, strerrbuf, buflen, __get_locale())); +} + char * +strerror_l(int num, locale_t locale) +{ +#ifndef __NO_TLS + static _Thread_local char ebuf[NL_TEXTMAX]; + + if (strerror_rl(num, ebuf, sizeof(ebuf), locale) != 0) + errno = EINVAL; + return (ebuf); +#else + errno = ENOTSUP; + return (NULL); +#endif +} + +char * strerror(int num) { static char ebuf[NL_TEXTMAX]; - if (strerror_r(num, ebuf, sizeof(ebuf)) != 0) + if (strerror_rl(num, ebuf, sizeof(ebuf), __get_locale()) != 0) errno = EINVAL; return (ebuf); } From owner-svn-src-head@freebsd.org Wed Dec 16 09:15: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 7FCE84B5BA1 for ; Wed, 16 Dec 2020 09:15:39 +0000 (UTC) (envelope-from raquel.carvalho@persuitflow.com) Received: from server1.mail.persuitflow.com (mail.persuitflow.com [89.46.74.132]) (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 4CwqGz1v16z4dlp for ; Wed, 16 Dec 2020 09:15:39 +0000 (UTC) (envelope-from raquel.carvalho@persuitflow.com) Received: by server1.mail.persuitflow.com (Postfix, from userid 1001) id 4893CA37F2; Wed, 16 Dec 2020 09:15:36 +0000 (GMT) Received: by mail.persuitflow.com for ; Wed, 16 Dec 2020 09:15:30 GMT Message-ID: <20201216074501-0.1.21.9o7r.0.b067ymuo1x@persuitflow.com> Date: Wed, 16 Dec 2020 09:15:30 GMT From: "Raquel Carvalho" To: Subject: Desinfetante X-Mailer: mail.persuitflow.com MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4CwqGz1v16z4dlp X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.69 / 15.00]; XM_UA_NO_VERSION(0.01)[]; R_SPF_ALLOW(-0.20)[+mx:c]; TO_DN_NONE(0.00)[]; HFILTER_HELO_IP_A(1.00)[server1.mail.persuitflow.com]; HFILTER_HELO_NORES_A_OR_MX(0.30)[server1.mail.persuitflow.com]; DKIM_TRACE(0.00)[persuitflow.com:+]; DMARC_POLICY_ALLOW(-0.50)[persuitflow.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[89.46.74.132:from]; ASN(0.00)[asn:31034, ipnet:89.46.72.0/21, country:IT]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[persuitflow.com:s=mail]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[89.46.74.132:from:127.0.2.255]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 16 Dec 2020 09:15:39 -0000 Bom Dia, A demanda por desinfetantes eficazes que permitam a elimina=C3=A7=C3=A3o = de microrganismos prejudiciais =C3=A9 continuamente alta em todo o mundo. Expandir a oferta com uma gama profissional de produtos com atividade vir= icida e bactericida permite aumentar a posi=C3=A7=C3=A3o competitiva da e= mpresa e construir novas redes de vendas. Diversificamos a linha de atacadistas e distribuidores com sabonetes, l=C3= =ADquidos e g=C3=A9is para desinfec=C3=A7=C3=A3o das m=C3=A3os e outros p= rodutos de limpeza, entre eles: g=C3=A9is de banho, shampoos e condiciona= dores de cabelo, al=C3=A9m de detergentes concentrados. Nossos parceiros de neg=C3=B3cios est=C3=A3o aumentando sua participa=C3=A7= =C3=A3o no mercado externo devido =C3=A0 crescente satisfa=C3=A7=C3=A3o d= o cliente e oferta diversificada. O potencial de crescimento de nossas solu=C3=A7=C3=B5es resulta de pre=C3= =A7os acess=C3=ADveis, alto desempenho e versatilidade para se adaptar a = todos os tipos de pele. A extens=C3=A3o da gama de produtos proposta =C3=A9 um campo interessante= para a coopera=C3=A7=C3=A3o? Cumprimentos, Raquel Carvalho Conselheiro do Cliente From owner-svn-src-head@freebsd.org Wed Dec 16 14:00: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 721ED4BDA02; Wed, 16 Dec 2020 14:00:43 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cwxbv2s2lz3CDM; Wed, 16 Dec 2020 14:00:43 +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 550452715C; Wed, 16 Dec 2020 14:00: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 0BGE0hPL053460; Wed, 16 Dec 2020 14:00:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BGE0hnr053459; Wed, 16 Dec 2020 14:00:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012161400.0BGE0hnr053459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 16 Dec 2020 14:00:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368695 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 368695 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.34 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, 16 Dec 2020 14:00:43 -0000 Author: emaste Date: Wed Dec 16 14:00:42 2020 New Revision: 368695 URL: https://svnweb.freebsd.org/changeset/base/368695 Log: src.conf.5: regen after r368667, GDB retirement Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Dec 16 11:02:25 2020 (r368694) +++ head/share/man/man5/src.conf.5 Wed Dec 16 14:00:42 2020 (r368695) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd December 10, 2020 +.Dd December 15, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -656,9 +656,6 @@ and .Xr ftpd 8 . .It Va WITHOUT_GAMES Set to not build games. -.It Va WITH_GDB -Set to build -.Xr gdb 1 . .It Va WITHOUT_GH_BC Set to not build and install the enhanced .Xr bc 1 @@ -1633,8 +1630,6 @@ When set, it enforces these options: .Va WITHOUT_CLANG_FORMAT .It .Va WITHOUT_CLANG_FULL -.It -.Va WITHOUT_GDB .It .Va WITHOUT_INCLUDES .It From owner-svn-src-head@freebsd.org Wed Dec 16 14: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 AFDBA4BD4FC; Wed, 16 Dec 2020 14:01:04 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwxcJ4bC8z3C8V; Wed, 16 Dec 2020 14:01:04 +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 85F9A27415; Wed, 16 Dec 2020 14:01:04 +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 0BGE14DV053522; Wed, 16 Dec 2020 14:01:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BGE14fk053521; Wed, 16 Dec 2020 14:01:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012161401.0BGE14fk053521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 16 Dec 2020 14:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368696 - head/contrib/binutils X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/binutils X-SVN-Commit-Revision: 368696 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.34 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, 16 Dec 2020 14:01:04 -0000 Author: emaste Date: Wed Dec 16 14:01:04 2020 New Revision: 368696 URL: https://svnweb.freebsd.org/changeset/base/368696 Log: Remove contrib/binutils, unused after r368667 Deleted: head/contrib/binutils/ From owner-svn-src-head@freebsd.org Wed Dec 16 14:36: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 9BDED4BE25E; Wed, 16 Dec 2020 14:36:58 +0000 (UTC) (envelope-from mmel@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwyPk40Lwz3FBg; Wed, 16 Dec 2020 14:36:58 +0000 (UTC) (envelope-from mmel@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 7291B277F1; Wed, 16 Dec 2020 14:36:58 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BGEawY7078070; Wed, 16 Dec 2020 14:36:58 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BGEawOe078069; Wed, 16 Dec 2020 14:36:58 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202012161436.0BGEawOe078069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 16 Dec 2020 14:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368697 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 368697 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.34 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, 16 Dec 2020 14:36:58 -0000 Author: mmel Date: Wed Dec 16 14:36:57 2020 New Revision: 368697 URL: https://svnweb.freebsd.org/changeset/base/368697 Log: Allocate right number of pages for the bounced buffers crossing the page. One of the disadvantages of our current busdma code is the fact that we process the bounced buffer in a page-by-page manner. This means that the short (subpage) buffer allocated across page boundaries is bounced to 2 separate pages. This suboptimal behavior is consistent across all platforms and can be related to (probably unimplementable or incompatible with bouncing) BUS_DMA_KEEP_PG_OFFSET flag. Therefore, allocate one additional page to be fully comply with this requirement. Discused with: markj PR: 251018 Modified: head/sys/arm64/arm64/busdma_bounce.c Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Wed Dec 16 14:01:04 2020 (r368696) +++ head/sys/arm64/arm64/busdma_bounce.c Wed Dec 16 14:36:57 2020 (r368697) @@ -297,6 +297,12 @@ bounce_bus_dma_tag_create(bus_dma_tag_t parent, bus_si if ((flags & BUS_DMA_ALLOCNOW) != 0) { struct bounce_zone *bz; + /* + * Round size up to a full page, and add one more page because + * there can always be one more boundary crossing than the + * number of pages in a transfer. + */ + maxsize = roundup2(maxsize, PAGE_SIZE) + PAGE_SIZE; /* Must bounce */ if ((error = alloc_bounce_zone(newtag)) != 0) { @@ -308,7 +314,7 @@ bounce_bus_dma_tag_create(bus_dma_tag_t parent, bus_si if (ptoa(bz->total_bpages) < maxsize) { int pages; - pages = atop(round_page(maxsize)) - bz->total_bpages; + pages = atop(maxsize) + 1 - bz->total_bpages; /* Add pages to our bounce pool */ if (alloc_bounce_pages(newtag, pages) < pages) @@ -436,8 +442,10 @@ bounce_bus_dmamap_create(bus_dma_tag_t dmat, int flags bz = dmat->bounce_zone; /* - * Attempt to add pages to our pool on a per-instance - * basis up to a sane limit. + * Attempt to add pages to our pool on a per-instancebasis up to a sane + * limit. Even if the tag isn't subject of bouncing due to alignment + * and boundary constraints, it could still auto-bounce due to + * cacheline alignment, which requires at most two bounce pages. */ if (dmat->common.alignment > 1) maxpages = MAX_BPAGES; @@ -446,9 +454,9 @@ bounce_bus_dmamap_create(bus_dma_tag_t dmat, int flags atop(dmat->common.lowaddr)); if ((dmat->bounce_flags & BF_MIN_ALLOC_COMP) == 0 || (bz->map_count > 0 && bz->total_bpages < maxpages)) { - pages = MAX(atop(dmat->common.maxsize), 1); + pages = atop(roundup2(dmat->common.maxsize, PAGE_SIZE)) + 1; pages = MIN(maxpages - bz->total_bpages, pages); - pages = MAX(pages, 1); + pages = MAX(pages, 2); if (alloc_bounce_pages(dmat, pages) < pages) error = ENOMEM; if ((dmat->bounce_flags & BF_MIN_ALLOC_COMP) == 0) { From owner-svn-src-head@freebsd.org Wed Dec 16 14:39: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 B1D1C4BE63C; Wed, 16 Dec 2020 14:39:25 +0000 (UTC) (envelope-from mmel@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwySY4jXkz3FRp; Wed, 16 Dec 2020 14:39:25 +0000 (UTC) (envelope-from mmel@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 94FA827A28; Wed, 16 Dec 2020 14:39:25 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BGEdPf3078230; Wed, 16 Dec 2020 14:39:25 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BGEdPue078228; Wed, 16 Dec 2020 14:39:25 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202012161439.0BGEdPue078228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 16 Dec 2020 14:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368698 - head/sys/dev/e1000 X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/dev/e1000 X-SVN-Commit-Revision: 368698 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.34 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, 16 Dec 2020 14:39:25 -0000 Author: mmel Date: Wed Dec 16 14:39:24 2020 New Revision: 368698 URL: https://svnweb.freebsd.org/changeset/base/368698 Log: Use the standard method for localizing of MSI-X table bar. Current way, hardcoded value plus heuristic is not conform to the PCI(e) specification and it fails on systems where MSI-X bar is not initialized by BIOS/ACPI (many arm or arm64 systems for example). Instead, use the standard PCI(e) capability for determining of MSIX table bar address. MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D27265 Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Dec 16 14:36:57 2020 (r368697) +++ head/sys/dev/e1000/if_em.c Wed Dec 16 14:39:24 2020 (r368698) @@ -847,9 +847,7 @@ em_if_attach_pre(if_ctx_t ctx) ** use a different BAR, so we need to keep ** track of which is used. */ - scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); - if (pci_read_config(dev, scctx->isc_msix_bar, 4) == 0) - scctx->isc_msix_bar += 4; + scctx->isc_msix_bar = pci_msix_table_bar(dev); } else if (adapter->hw.mac.type >= em_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); @@ -883,7 +881,7 @@ em_if_attach_pre(if_ctx_t ctx) * that it shall give MSI at least a try with other devices. */ if (adapter->hw.mac.type == e1000_82574) { - scctx->isc_msix_bar = PCIR_BAR(EM_MSIX_BAR); + scctx->isc_msix_bar = pci_msix_table_bar(dev);; } else { scctx->isc_msix_bar = -1; scctx->isc_disable_msix = 1; Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Wed Dec 16 14:36:57 2020 (r368697) +++ head/sys/dev/e1000/if_em.h Wed Dec 16 14:39:24 2020 (r368698) @@ -316,7 +316,6 @@ #define EM_BAR_MEM_TYPE_MASK 0x00000006 #define EM_BAR_MEM_TYPE_32BIT 0x00000000 #define EM_BAR_MEM_TYPE_64BIT 0x00000004 -#define EM_MSIX_BAR 3 /* On 82575 */ /* More backward compatibility */ #if __FreeBSD_version < 900000 From owner-svn-src-head@freebsd.org Wed Dec 16 14:47: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 466634BEAE9; Wed, 16 Dec 2020 14:47:50 +0000 (UTC) (envelope-from jrtc27@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwyfG1WNqz3GD1; Wed, 16 Dec 2020 14:47:50 +0000 (UTC) (envelope-from jrtc27@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 270C227B4B; Wed, 16 Dec 2020 14:47:50 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BGElo6A084386; Wed, 16 Dec 2020 14:47:50 GMT (envelope-from jrtc27@FreeBSD.org) Received: (from jrtc27@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BGElohm084385; Wed, 16 Dec 2020 14:47:50 GMT (envelope-from jrtc27@FreeBSD.org) Message-Id: <202012161447.0BGElohm084385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrtc27 set sender to jrtc27@FreeBSD.org using -f From: Jessica Clarke Date: Wed, 16 Dec 2020 14:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368699 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: jrtc27 X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 368699 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.34 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, 16 Dec 2020 14:47:50 -0000 Author: jrtc27 Date: Wed Dec 16 14:47:49 2020 New Revision: 368699 URL: https://svnweb.freebsd.org/changeset/base/368699 Log: Fix whitespace in comment modified by r368697 Modified: head/sys/arm64/arm64/busdma_bounce.c Modified: head/sys/arm64/arm64/busdma_bounce.c ============================================================================== --- head/sys/arm64/arm64/busdma_bounce.c Wed Dec 16 14:39:24 2020 (r368698) +++ head/sys/arm64/arm64/busdma_bounce.c Wed Dec 16 14:47:49 2020 (r368699) @@ -442,7 +442,7 @@ bounce_bus_dmamap_create(bus_dma_tag_t dmat, int flags bz = dmat->bounce_zone; /* - * Attempt to add pages to our pool on a per-instancebasis up to a sane + * Attempt to add pages to our pool on a per-instance basis up to a sane * limit. Even if the tag isn't subject of bouncing due to alignment * and boundary constraints, it could still auto-bounce due to * cacheline alignment, which requires at most two bounce pages. From owner-svn-src-head@freebsd.org Wed Dec 16 14:48: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 EAC994BEE08; Wed, 16 Dec 2020 14:48:46 +0000 (UTC) (envelope-from jrtc27@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwygL6N01z3GHV; Wed, 16 Dec 2020 14:48:46 +0000 (UTC) (envelope-from jrtc27@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 CDC74278F9; Wed, 16 Dec 2020 14:48:46 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BGEmkbZ084482; Wed, 16 Dec 2020 14:48:46 GMT (envelope-from jrtc27@FreeBSD.org) Received: (from jrtc27@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BGEmk8i084481; Wed, 16 Dec 2020 14:48:46 GMT (envelope-from jrtc27@FreeBSD.org) Message-Id: <202012161448.0BGEmk8i084481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrtc27 set sender to jrtc27@FreeBSD.org using -f From: Jessica Clarke Date: Wed, 16 Dec 2020 14:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368700 - head/sys/dev/e1000 X-SVN-Group: head X-SVN-Commit-Author: jrtc27 X-SVN-Commit-Paths: head/sys/dev/e1000 X-SVN-Commit-Revision: 368700 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.34 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, 16 Dec 2020 14:48:47 -0000 Author: jrtc27 Date: Wed Dec 16 14:48:46 2020 New Revision: 368700 URL: https://svnweb.freebsd.org/changeset/base/368700 Log: Fix whitespace in r368698 MFC with: r368698 Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Dec 16 14:47:49 2020 (r368699) +++ head/sys/dev/e1000/if_em.c Wed Dec 16 14:48:46 2020 (r368700) @@ -847,7 +847,7 @@ em_if_attach_pre(if_ctx_t ctx) ** use a different BAR, so we need to keep ** track of which is used. */ - scctx->isc_msix_bar = pci_msix_table_bar(dev); + scctx->isc_msix_bar = pci_msix_table_bar(dev); } else if (adapter->hw.mac.type >= em_mac_min) { scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); From owner-svn-src-head@freebsd.org Wed Dec 16 14:58: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 4C9954BF296; Wed, 16 Dec 2020 14:58:20 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CwytN1BC1z3H8W; Wed, 16 Dec 2020 14:58:19 +0000 (UTC) (envelope-from meloun.michal@gmail.com) Received: by mail-wm1-x32f.google.com with SMTP id x22so2629455wmc.5; Wed, 16 Dec 2020 06:58:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CzTTDDEXM8yXhMENcOcV+za4VqPw3/q7EuO+suYrLPI=; b=O0WKIA+GqVQcJBtG/zC0TYJDLj5Vx+EHBCYJScI4JylUNRrAfrqj4Otr6ZjVHc1Y04 lug/kTWuYZ2eIPS2Yn0SgRDhseYpNRU7EoINDKqlBIRzCEPaiRUV84PGbLaHFBkl8Q55 bXj0ZNTOAyHbqHv+iSpz7HLF8ZCuSVMwJkT4uiduudzDffNAFNZtQz9/JPm9FiCwEdzn TAUkVHTtCu3MhVw4o9z9ex+5Lzj/0jkPLtFxBEElVybiJObyp8hhR+SOojh9axMPVcLr CSswEVjiPn070U3LtJnEHFQQCdb0nrmuR7prji3YyrF7uZjZ02KXO6Uja3JPAZ2NIrJ0 0mAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=CzTTDDEXM8yXhMENcOcV+za4VqPw3/q7EuO+suYrLPI=; b=bDRtayrCHjg8i2PqBvqXFD0wiVYg/YKFPvxR+rJMme8bzZLrIJdxbWjiN/Ic5Tk90s sNxGniCyEjAfM47VTYyozoM5Ig8+sPqEIT5GeC7uzY5WgyKZzwY/8HGHJH+FR89jt+/j mx8tia5i1rixfG4VVFQIwQkEYXQNX4dq0y27q6QpiVlipwYSbeAeJ8K5QKLEWgd5ZKl1 zF1mdBjkVYZ7tL4O2YfNaV9A5UFX38nZhi3hRWydLSwIASpnPZ3K+cldkfE0ba4TA9l7 q/uzOakFebjIKQMui55Ra5/DdKx38ne4OeRmYTUKWUAkV6uZ8KmMbT56kEKVBx0w1BCl AQlw== X-Gm-Message-State: AOAM5307KjVITR39jU88vlpFNdu+p+PfWKuRPDRXMh6y3BuKr4kBpGSX WfHmZ1XgRBgffiGxXNTyBD3Pe8/lq6GeGg== X-Google-Smtp-Source: ABdhPJxoo3dTiYzeL9z3Jpe6RCGPQDNhob6PVnPS+kYfc+rfuhOVIaP8RPKntXRo+x4KSSuhYbzUqQ== X-Received: by 2002:a1c:f70f:: with SMTP id v15mr3672730wmh.38.1608130698292; Wed, 16 Dec 2020 06:58:18 -0800 (PST) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id k18sm4007890wrd.45.2020.12.16.06.58.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Dec 2020 06:58:17 -0800 (PST) Sender: Michal Meloun Reply-To: meloun.michal@gmail.com Subject: Re: svn commit: r368700 - head/sys/dev/e1000 To: Jessica Clarke , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012161448.0BGEmk8i084481@repo.freebsd.org> From: Michal Meloun Message-ID: <4934efdf-f89d-aecd-1b98-2ad3aeab64e5@gmail.com> Date: Wed, 16 Dec 2020 15:58:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <202012161448.0BGEmk8i084481@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CwytN1BC1z3H8W X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 16 Dec 2020 14:58:20 -0000 On 16.12.2020 15:48, Jessica Clarke wrote: > Author: jrtc27 > Date: Wed Dec 16 14:48:46 2020 > New Revision: 368700 > URL: https://svnweb.freebsd.org/changeset/base/368700 > > Log: > Fix whitespace in r368698 > > MFC with: r368698 I just started to be ashamed :( Thanks for fixing the bugs created by my tangled fingers. Michal > Modified: > head/sys/dev/e1000/if_em.c > > Modified: head/sys/dev/e1000/if_em.c > ============================================================================== > --- head/sys/dev/e1000/if_em.c Wed Dec 16 14:47:49 2020 (r368699) > +++ head/sys/dev/e1000/if_em.c Wed Dec 16 14:48:46 2020 (r368700) > @@ -847,7 +847,7 @@ em_if_attach_pre(if_ctx_t ctx) > ** use a different BAR, so we need to keep > ** track of which is used. > */ > - scctx->isc_msix_bar = pci_msix_table_bar(dev); > + scctx->isc_msix_bar = pci_msix_table_bar(dev); > } else if (adapter->hw.mac.type >= em_mac_min) { > scctx->isc_txqsizes[0] = roundup2(scctx->isc_ntxd[0]* sizeof(struct e1000_tx_desc), EM_DBA_ALIGN); > scctx->isc_rxqsizes[0] = roundup2(scctx->isc_nrxd[0] * sizeof(union e1000_rx_desc_extended), EM_DBA_ALIGN); > From owner-svn-src-head@freebsd.org Wed Dec 16 16:59: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 0748B4C1A81; Wed, 16 Dec 2020 16:59:53 +0000 (UTC) (envelope-from otis@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cx1Zc6md5z3PS5; Wed, 16 Dec 2020 16:59:52 +0000 (UTC) (envelope-from otis@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 D6FED13E9; Wed, 16 Dec 2020 16:59:52 +0000 (UTC) (envelope-from otis@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BGGxqqh065572; Wed, 16 Dec 2020 16:59:52 GMT (envelope-from otis@FreeBSD.org) Received: (from otis@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BGGxqUs065570; Wed, 16 Dec 2020 16:59:52 GMT (envelope-from otis@FreeBSD.org) Message-Id: <202012161659.0BGGxqUs065570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: otis set sender to otis@FreeBSD.org using -f From: Juraj Lutter Date: Wed, 16 Dec 2020 16:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368701 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: otis X-SVN-Commit-Paths: in head: share/misc usr.bin/calendar/calendars X-SVN-Commit-Revision: 368701 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.34 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, 16 Dec 2020 16:59:53 -0000 Author: otis (ports committer) Date: Wed Dec 16 16:59:52 2020 New Revision: 368701 URL: https://svnweb.freebsd.org/changeset/base/368701 Log: Complete steps 5 and 9 from Committer's guide Reviewed by: osa (mentor) Approved by: osa (mentor) Differential Revision: https://reviews.freebsd.org/D27632 Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Dec 16 14:48:46 2020 (r368700) +++ head/share/misc/committers-ports.dot Wed Dec 16 16:59:52 2020 (r368701) @@ -214,6 +214,7 @@ obrien [label="David E. O'Brien\nobrien@FreeBSD.org\n1 olivier [label="Olivier Cochard-Labbe\nolivier@FreeBSD.org\n2016/02/02"] olivierd [label="Olivier Duchateau\nolivierd@FreeBSD.org\n2012/05/29"] osa [label="Sergey A. Osokin\nosa@FreeBSD.org\n2003/06/04"] +otis [label="Juraj Lutter\notis@FreeBSD.org\n2020/12/12"] pat [label="Patrick Li\npat@FreeBSD.org\n2001/11/14"] pav [label="Pav Lucistnik\npav@FreeBSD.org\n2003/11/12"] pawel [label="Pawel Pekala\npawel@FreeBSD.org\n2011/03/11"] @@ -636,6 +637,7 @@ obrien -> gerald olivier -> pizzamig +osa -> otis osa -> vg pat -> adamw @@ -718,6 +720,7 @@ swills -> jsm swills -> lbartoletti swills -> mfechner swills -> milki +swills -> otis swills -> pclin swills -> rezny swills -> robak Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Wed Dec 16 14:48:46 2020 (r368700) +++ head/usr.bin/calendar/calendars/calendar.freebsd Wed Dec 16 16:59:52 2020 (r368701) @@ -214,6 +214,7 @@ 05/22 Michael Bushkov born in Rostov-on-Don, Russian Federation, 1985 05/22 Rui Paulo born in Evora, Portugal, 1986 05/22 David Naylor born in Johannesburg, South Africa, 1988 +05/22 Juraj Lutter born in Trnava, Slovakia, 1979 05/23 Munechika Sumikawa born in Osaka, Osaka, Japan, 1972 05/24 Duncan McLennan Barclay born in London, Middlesex, United Kingdom, 1970 05/24 Oliver Lehmann born in Karlsburg, Germany, 1981 From owner-svn-src-head@freebsd.org Wed Dec 16 17:41: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 D50314C2DD3; Wed, 16 Dec 2020 17:41:30 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cx2Vf5fYxz3hb1; Wed, 16 Dec 2020 17:41:30 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f179.google.com with SMTP id p5so23322305iln.8; Wed, 16 Dec 2020 09:41:30 -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=BP6YRvOxpPQyFWkWDfA3yX/5Brl05ovfyJDG1F8sppA=; b=JIou+bYsusmeGcEpJ6YTbjtFlK/3UDPzYjrp+J9B+aU2xw/Ut47Wx9bNoAsjlIGuwu +b7Uv0LsoYAaUcxoDOayG2L/lL6CvlJtEdtW5foRzXQ4cD03WOaEcXCgfPON2EBgPdS4 DaGZQNBe/zIFLx43KdEuIWZvkp7VImtkzg4fZKGM4HsJfl4iVIDPeK7VIeh3O1NMCbSM yk9p7sEHcqQ/g3mMPDJopb7S1M/sSVyd50veFUwEs9UArq8x+WvVtcvjBzOzv2/JIodd rLCirGkS1q8o/RhOc0J80H+6YqpSLUrJU12ZYtMFtlTcwv/H7ZN2jUxvv2y0vV38Wmv0 w2jg== X-Gm-Message-State: AOAM532AoMRO7sfey1HKwU7ulYhT4AX5UTRy3V1mPBrdYd/HdSZCeVWl 01ynH57XCjaErQISOualG3Yj6yVjpT5IKNifB1+lbZBbHtA= X-Google-Smtp-Source: ABdhPJyX4KD8oesUBLRip0cAAPw3ehbrmuAYlHxxkNKkr0jhOCCNtCBVFZd+wyITBesoz0XnDy8O3hUBelIxVij5TsI= X-Received: by 2002:a92:8419:: with SMTP id l25mr46771606ild.100.1608140488598; Wed, 16 Dec 2020 09:41:28 -0800 (PST) MIME-Version: 1.0 References: <202012151744.0BFHiJfd093834@repo.freebsd.org> <7b56af12-94db-5ed0-1fc7-866d33a8b1e7@FreeBSD.org> In-Reply-To: <7b56af12-94db-5ed0-1fc7-866d33a8b1e7@FreeBSD.org> From: Ed Maste Date: Wed, 16 Dec 2020 12:41:16 -0500 Message-ID: Subject: Re: svn commit: r368667 - in head: . gnu/usr.bin gnu/usr.bin/binutils gnu/usr.bin/gdb tools/build/mk To: John Baldwin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Cx2Vf5fYxz3hb1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 16 Dec 2020 17:41:30 -0000 On Tue, 15 Dec 2020 at 18:25, John Baldwin wrote: > > On 12/15/20 9:44 AM, Ed Maste wrote: > > Author: emaste > > Date: Tue Dec 15 17:44:19 2020 > > New Revision: 368667 > > URL: https://svnweb.freebsd.org/changeset/base/368667 > > > > Log: > > Retire obsolete GDB 6.1.1 > > Are you going to remove the -gdwarf-2 bits from kern.mk now? Yes, soon. We probably need to change it to explicit -gdwarf-4 (not just remove it and rely on the compiler's default) as we'll see DWARF5 by default before long and will need to update ctfconvert again. From owner-svn-src-head@freebsd.org Wed Dec 16 18:01: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 B932F4C32A6; Wed, 16 Dec 2020 18:01:41 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cx2xx4qnBz3jv6; Wed, 16 Dec 2020 18:01:41 +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 98CDA1EEF; Wed, 16 Dec 2020 18:01:41 +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 0BGI1ffL006315; Wed, 16 Dec 2020 18:01:41 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BGI1flE006314; Wed, 16 Dec 2020 18:01:41 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012161801.0BGI1flE006314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 16 Dec 2020 18:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368703 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368703 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.34 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, 16 Dec 2020 18:01:41 -0000 Author: mjg Date: Wed Dec 16 18:01:41 2020 New Revision: 368703 URL: https://svnweb.freebsd.org/changeset/base/368703 Log: fd: remove redundant saturation check from fget_unlocked_seq refcount_acquire_if_not_zero returns true on saturation. The case of 0 is handled by looping again, after which the originally found pointer will no longer be there. Noted by: kib Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Dec 16 17:09:38 2020 (r368702) +++ head/sys/kern/kern_descrip.c Wed Dec 16 18:01:41 2020 (r368703) @@ -3022,13 +3022,6 @@ fget_unlocked_seq(struct filedesc *fdp, int fd, cap_ri #endif if (__predict_false(!refcount_acquire_if_not_zero(&fp->f_count))) { /* - * The count was found either saturated or zero. - * This re-read is not any more racy than using the - * return value from fcmpset. - */ - if (refcount_load(&fp->f_count) != 0) - return (EBADF); - /* * Force a reload. Other thread could reallocate the * table before this fd was closed, so it is possible * that there is a stale fp pointer in cached version. From owner-svn-src-head@freebsd.org Wed Dec 16 18:40: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 768484C4086; Wed, 16 Dec 2020 18:40:09 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cx3pK2mWDz3mKh; Wed, 16 Dec 2020 18:40:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:891d:fb18:e1d8:8a71]) (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 D2257B3B5; Wed, 16 Dec 2020 18:40:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r368667 - in head: . gnu/usr.bin gnu/usr.bin/binutils gnu/usr.bin/gdb tools/build/mk To: Ed Maste Cc: src-committers , svn-src-all , svn-src-head References: <202012151744.0BFHiJfd093834@repo.freebsd.org> <7b56af12-94db-5ed0-1fc7-866d33a8b1e7@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: <63a5c28a-82dd-795c-820e-fd99d933134b@FreeBSD.org> Date: Wed, 16 Dec 2020 10:40:07 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 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.34 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, 16 Dec 2020 18:40:09 -0000 On 12/16/20 9:41 AM, Ed Maste wrote: > On Tue, 15 Dec 2020 at 18:25, John Baldwin wrote: >> >> On 12/15/20 9:44 AM, Ed Maste wrote: >>> Author: emaste >>> Date: Tue Dec 15 17:44:19 2020 >>> New Revision: 368667 >>> URL: https://svnweb.freebsd.org/changeset/base/368667 >>> >>> Log: >>> Retire obsolete GDB 6.1.1 >> >> Are you going to remove the -gdwarf-2 bits from kern.mk now? > > Yes, soon. We probably need to change it to explicit -gdwarf-4 (not > just remove it and rely on the compiler's default) as we'll see DWARF5 > by default before long and will need to update ctfconvert again. We already don't bother doing that for userland, so I think I'd rather us just drop the option and fix ctfconvert once there is a need. -- John Baldwin From owner-svn-src-head@freebsd.org Wed Dec 16 18:40: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 8B3304C3CF1; Wed, 16 Dec 2020 18:40:50 +0000 (UTC) (envelope-from gjb@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cx3q63QT5z3mdt; Wed, 16 Dec 2020 18:40:50 +0000 (UTC) (envelope-from gjb@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 6861D2DC3; Wed, 16 Dec 2020 18:40:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BGIeogd029542; Wed, 16 Dec 2020 18:40:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BGIenOJ029539; Wed, 16 Dec 2020 18:40:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202012161840.0BGIenOJ029539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 16 Dec 2020 18:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368704 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 368704 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.34 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, 16 Dec 2020 18:40:50 -0000 Author: gjb Date: Wed Dec 16 18:40:49 2020 New Revision: 368704 URL: https://svnweb.freebsd.org/changeset/base/368704 Log: Append the branch commit count to _SNAP_SUFFIX for development snapshot builds. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/Makefile.inc1 head/release/Makefile.mirrors Modified: head/release/Makefile.inc1 ============================================================================== --- head/release/Makefile.inc1 Wed Dec 16 18:01:41 2020 (r368703) +++ head/release/Makefile.inc1 Wed Dec 16 18:40:49 2020 (r368704) @@ -21,11 +21,17 @@ GITBRANCH!= ${GIT_CMD} -C ${.CURDIR} rev-parse --abbre GITREV!= ${GIT_CMD} -C ${.CURDIR} rev-parse --verify --short HEAD 2>/dev/null || true . export GITREV . endif +. if !defined(GITCOUNT) || empty(GITCOUNT) +GITCOUNT!= ${GIT_CMD} -C ${.CURDIR} rev-list --count HEAD 2>/dev/null || true +. export GITCOUNT +. endif .else GITBRANCH= nullbranch GITREV= nullhash +GITCOUNT= nullcount . export GITBRANCH . export GITREV +. export GITCOUNT .endif # Set the build date, primarily for snapshot builds. Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Wed Dec 16 18:01:41 2020 (r368703) +++ head/release/Makefile.mirrors Wed Dec 16 18:40:49 2020 (r368704) @@ -33,7 +33,7 @@ TLD?= ${FTPDIR}/snapshots .if !defined(BUILDDATE) || empty(BUILDDATE) BUILDDATE!= date +%Y%m%d .endif -_SNAP_SUFFIX:= ${BUILDDATE}-${GITREV} +_SNAP_SUFFIX:= ${BUILDDATE}-${GITREV}-${GITCOUNT} .else # release SNAPSHOT= From owner-svn-src-head@freebsd.org Wed Dec 16 20:21: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 807344C5EBB; Wed, 16 Dec 2020 20:21:57 +0000 (UTC) (envelope-from mhorne@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cx63n3Grjz3s1M; Wed, 16 Dec 2020 20:21:57 +0000 (UTC) (envelope-from mhorne@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 635CE46F8; Wed, 16 Dec 2020 20:21:57 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BGKLvCr096552; Wed, 16 Dec 2020 20:21:57 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BGKLvE2096551; Wed, 16 Dec 2020 20:21:57 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012162021.0BGKLvE2096551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Wed, 16 Dec 2020 20:21:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368705 - head/release/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/release/riscv X-SVN-Commit-Revision: 368705 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.34 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, 16 Dec 2020 20:21:57 -0000 Author: mhorne Date: Wed Dec 16 20:21:56 2020 New Revision: 368705 URL: https://svnweb.freebsd.org/changeset/base/368705 Log: riscv: increase GENERICSD gap Leave more room for bootloaders at the beginning of the image. In particular, the u-boot files for the HiFive Unleashed are ~5MB in size. Modified: head/release/riscv/GENERICSD.conf Modified: head/release/riscv/GENERICSD.conf ============================================================================== --- head/release/riscv/GENERICSD.conf Wed Dec 16 18:40:49 2020 (r368704) +++ head/release/riscv/GENERICSD.conf Wed Dec 16 20:21:56 2020 (r368705) @@ -6,7 +6,7 @@ EMBEDDED_TARGET_ARCH="riscv64" EMBEDDED_TARGET="riscv" EMBEDDEDBUILD=1 -FAT_SIZE="54m -b 1m" +FAT_SIZE="54m -b 8m" FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" From owner-svn-src-head@freebsd.org Thu Dec 17 00:00: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 AA0524CA025; Thu, 17 Dec 2020 00:00:21 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxBvn4Tdmz4YRQ; Thu, 17 Dec 2020 00:00:21 +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 8C4E96CF6; Thu, 17 Dec 2020 00:00:21 +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 0BH00LkA027588; Thu, 17 Dec 2020 00:00:21 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BH00L3v027587; Thu, 17 Dec 2020 00:00:21 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202012170000.0BH00L3v027587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 17 Dec 2020 00:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368709 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 368709 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.34 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, 17 Dec 2020 00:00:21 -0000 Author: brooks Date: Thu Dec 17 00:00:21 2020 New Revision: 368709 URL: https://svnweb.freebsd.org/changeset/base/368709 Log: newvers.sh: Speed up git_tree_modified We're looking for file content differences, so ask the question of git more directly. This helps a lot, saving tens of thousands of fork()s, when the builder and editor see different stat() results (e.g., UIDs), as they might with containers. Submitted by: Nathaniel Wesley Filardo Reviewed by: bdrewery, emaste, imp Obtained from: CheriBSD MFC after: 3 days Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27646 Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Wed Dec 16 22:25:40 2020 (r368708) +++ head/sys/conf/newvers.sh Thu Dec 17 00:00:21 2020 (r368709) @@ -162,29 +162,7 @@ findvcs() git_tree_modified() { - # git diff-index lists both files that are known to have changes as - # well as those with metadata that does not match what is recorded in - # git's internal state. The latter case is indicated by an all-zero - # destination file hash. - - local fifo - - fifo=$(mktemp -u) - mkfifo -m 600 $fifo || exit 1 - $git_cmd --work-tree=${VCSTOP} diff-index HEAD > $fifo & - while read smode dmode ssha dsha status file; do - if ! expr $dsha : '^00*$' >/dev/null; then - rm $fifo - return 0 - fi - if ! $git_cmd --work-tree=${VCSTOP} diff --quiet -- "${file}"; then - rm $fifo - return 0 - fi - done < $fifo - # No files with content differences. - rm $fifo - return 1 + $git_cmd "--work-tree=${VCSTOP}" -c core.checkStat=minimal -c core.fileMode=off diff --quiet } LC_ALL=C; export LC_ALL From owner-svn-src-head@freebsd.org Thu Dec 17 00:20: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 19CA44CACA4; Thu, 17 Dec 2020 00:20:58 +0000 (UTC) (envelope-from rmacklem@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxCMZ0HJfz4b9B; Thu, 17 Dec 2020 00:20:58 +0000 (UTC) (envelope-from rmacklem@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 EA6B7744F; Thu, 17 Dec 2020 00:20:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BH0KvDN041921; Thu, 17 Dec 2020 00:20:57 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BH0KvgL041920; Thu, 17 Dec 2020 00:20:57 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202012170020.0BH0KvgL041920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 17 Dec 2020 00:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368710 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 368710 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.34 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, 17 Dec 2020 00:20:58 -0000 Author: rmacklem Date: Thu Dec 17 00:20:57 2020 New Revision: 368710 URL: https://svnweb.freebsd.org/changeset/base/368710 Log: Make mountcritremote dependent upon nfscbd. Although it is not often needed, the nfscbd(8) should be running when NFSv4 mounts are done if callback functionality is required. Callback functionality is required for the NFSv4 server to issue delegations or pNFS layouts. This patch adds nfscbd to the mountcritremote's REQUIRED line to ensure it is started before NFS mounts specified in /etc/fstab are done. Reviewed by: 0mp Differential Revision: https://reviews.freebsd.org/D27506 Modified: head/libexec/rc/rc.d/mountcritremote Modified: head/libexec/rc/rc.d/mountcritremote ============================================================================== --- head/libexec/rc/rc.d/mountcritremote Thu Dec 17 00:00:21 2020 (r368709) +++ head/libexec/rc/rc.d/mountcritremote Thu Dec 17 00:20:57 2020 (r368710) @@ -4,7 +4,7 @@ # # PROVIDE: mountcritremote -# REQUIRE: NETWORKING FILESYSTEMS ipsec netwait +# REQUIRE: NETWORKING FILESYSTEMS ipsec netwait nfscbd # KEYWORD: nojail . /etc/rc.subr From owner-svn-src-head@freebsd.org Thu Dec 17 01:55: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 D9A8E4CDCF6 for ; Thu, 17 Dec 2020 01:55:33 +0000 (UTC) (envelope-from 3kLraXwoJDHUlnUpTrbkdlZfTbe.Vhflog-lkV-aXTWYkXXUlW.hkZ@trix.bounces.google.com) Received: from mail-il1-x146.google.com (mail-il1-x146.google.com [IPv6:2607:f8b0:4864:20::146]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxFSj1BmDz4h6n for ; Thu, 17 Dec 2020 01:55:33 +0000 (UTC) (envelope-from 3kLraXwoJDHUlnUpTrbkdlZfTbe.Vhflog-lkV-aXTWYkXXUlW.hkZ@trix.bounces.google.com) Received: by mail-il1-x146.google.com with SMTP id z15so19453073ilb.3 for ; Wed, 16 Dec 2020 17:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:message-id:date:subject:from:to; bh=xyK0/BZqobQ/mefGZW+WN2CBM/O9kQrjP80+gb3VEj8=; b=uqBOUcCpA6GRYio0iY9j+mZDs8sbRJAsC+f8nl/6Lesc6ttyygUg4HvtucUyj48Ebv 8bPHYgfFAKRPla/DxVj7XrTeGDa8RgW187UsTjk7UcRXe3sMVpJsspMib0MF85TZsghe G+3PKO8LUBzBTwKmuPEXPIH40KUPBN+IgVIzjn9l09a2/1CxdqPZ9MSvnMtVwJYbtYSp p4RJEFeMCxd9djxA+dN9KvrijPshEjB2eIM0PZ7YnlWbRisoPG2hMVDwia+3RE+XFZ/1 CoOiIMXbcgm70UpDCeyG09PH781s4kiiOlqE4kffgH7FbnfmnKiIXh7M9r9WsOjL04xR hA9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:message-id:date:subject :from:to; bh=xyK0/BZqobQ/mefGZW+WN2CBM/O9kQrjP80+gb3VEj8=; b=HYKsKC0S3eMds57Qqx/QlMb/0/K2Sx1M9xM07soHOEsh5jfGfJq8A1LzWmtKM9ewv4 jJ6fNZ1c47cuGl1UOfbF39Jw/ZkYOPwstugo/vtuHkDvABBny09pOwV0d/afjL/55PtB m8VV/JQ9HirkMOBr9UzLElVGOBOOYc0YCNMj2QMptpzrODp8JzLtNySg/0NL0JiZ2p/c KulWamLM8OQ7+As5eOQvGMw8BYbFqgVTqfAaZ+8tE6ZcaY0TtXKDUuj/4HgBFnm7C+3H 4VVProzLNWWsNwu/XItErNb4wHGw92b+T619BESnbUkh4XMc+wFdDPJ7lI+xr9aYNMtD CsVQ== X-Gm-Message-State: AOAM532H9/zj7ZO0JMEvJWMRvr3nSmAqSKMieMf4YOB8YVtWVFRC9HGO QdvHXAXcnrDa/BPRttBmqVwL3IgGVaw33n3DIysz MIME-Version: 1.0 X-Received: by 2002:a05:6602:5d9:: with SMTP id w25mt46942465iox.206.1608170128046; Wed, 16 Dec 2020 17:55:28 -0800 (PST) Reply-To: subwayirks@gmail.com X-No-Auto-Attachment: 1 Message-ID: <00000000000038c29905b69f4903@google.com> Date: Thu, 17 Dec 2020 01:55:32 +0000 Subject: RE: From: subwayirks@gmail.com To: svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4CxFSj1BmDz4h6n X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=uqBOUcCp; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of 3kLraXwoJDHUlnUpTrbkdlZfTbe.Vhflog-lkV-aXTWYkXXUlW.hkZ@trix.bounces.google.com designates 2607:f8b0:4864:20::146 as permitted sender) smtp.mailfrom=3kLraXwoJDHUlnUpTrbkdlZfTbe.Vhflog-lkV-aXTWYkXXUlW.hkZ@trix.bounces.google.com X-Spamd-Result: default: False [-2.28 / 15.00]; HAS_REPLYTO(0.00)[subwayirks@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MIME_BASE64_TEXT(0.10)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; SUBJ_ALL_CAPS(0.23)[3]; FORGED_SENDER(0.30)[subwayirks@gmail.com,3kLraXwoJDHUlnUpTrbkdlZfTbe.Vhflog-lkV-aXTWYkXXUlW.hkZ@trix.bounces.google.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::146:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[subwayirks@gmail.com,3kLraXwoJDHUlnUpTrbkdlZfTbe.Vhflog-lkV-aXTWYkXXUlW.hkZ@trix.bounces.google.com]; R_PARTS_DIFFER(0.09)[54.7%]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; FAKE_REPLY(1.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::146:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FROM_NO_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::146:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-head] Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 01:55:33 -0000 5oiR5bey6YKA6K+35oKo5aGr5YaZ5Lul5LiL6KGo5Y2V77yaDQpSRToNCg0K6KaB5aGr5YaZ5q2k 6KGo5Y2V77yM6K+36K6/6Zeu77yaDQpodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9mb3Jtcy9kL2Uv MUZBSXBRTFNjOEZXNXBKQWFnVGtIeGlUNWZvMG1scUhoemxiOFdrbWNPZGRlV0FKempVWGpYMkEv dmlld2Zvcm0/dmM9MCZhbXA7Yz0wJmFtcDt3PTEmYW1wO2Zscj0wJmFtcDt1c3A9bWFpbF9mb3Jt X2xpbmsNCg0K5oiR5bey6YKA6K+35oKo5aGr5YaZ6KGo5Y2V77yaDQoNCkdvb2dsZeihqOWNle+8 muWIm+W7uuiwg+afpemXruWNt+W5tuWIhuaekOiwg+afpee7k+aenOOAgg0K From owner-svn-src-head@freebsd.org Thu Dec 17 02:33: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 14B504CECF3; Thu, 17 Dec 2020 02:33:53 +0000 (UTC) (envelope-from yuripv@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxGJx052Jz4k94; Thu, 17 Dec 2020 02:33:53 +0000 (UTC) (envelope-from yuripv@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 E9FFB1147B; Thu, 17 Dec 2020 02:33:52 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BH2Xqgw026551; Thu, 17 Dec 2020 02:33:52 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BH2Xqkn026550; Thu, 17 Dec 2020 02:33:52 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202012170233.0BH2Xqkn026550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Thu, 17 Dec 2020 02:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368711 - head/lib/libc/locale X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/lib/libc/locale X-SVN-Commit-Revision: 368711 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.34 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, 17 Dec 2020 02:33:53 -0000 Author: yuripv Date: Thu Dec 17 02:33:52 2020 New Revision: 368711 URL: https://svnweb.freebsd.org/changeset/base/368711 Log: nl_langinfo(3): document recognized item names While here, remove .Tn macro usage (prompted by mandoc lint). PR: 251468 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D27606 Modified: head/lib/libc/locale/nl_langinfo.3 Modified: head/lib/libc/locale/nl_langinfo.3 ============================================================================== --- head/lib/libc/locale/nl_langinfo.3 Thu Dec 17 00:20:57 2020 (r368710) +++ head/lib/libc/locale/nl_langinfo.3 Thu Dec 17 02:33:52 2020 (r368711) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2012 +.Dd December 14, 2020 .Dt NL_LANGINFO 3 .Os .Sh NAME @@ -46,10 +46,6 @@ the particular language or cultural area defined in th locale, or in the case of .Fn nl_langinfo_l , the locale passed as the second argument. -The manifest constant names and values of -.Fa item -are defined in -.In langinfo.h . .Pp Calls to .Fn setlocale @@ -59,12 +55,102 @@ or to the category .Dv LC_ALL , may overwrite the buffer pointed to by the return value. +.Pp +The manifest constant names and values of +.Fa item +are defined in +.In langinfo.h . +.Pp +The following standard constants are recognized: +.Bl -column "Constant" "Category" +.It Sy Constant Ta Sy Category Ta Sy Description +.It Dv CODESET Ta Dv LC_CTYPE Ta codeset name +.It Dv D_T_FMT Ta Dv LC_TIME Ta string for formatting date and time +.It Dv D_FMT Ta Dv LC_TIME Ta date format string +.It Dv T_FMT Ta Dv LC_TIME Ta time format string +.It Dv T_FMT_AMPM Ta Dv LC_TIME Ta a.m. or p.m. time format string +.It Dv AM_STR Ta Dv LC_TIME Ta ante-meridiem affix +.It Dv PM_STR Ta Dv LC_TIME Ta post-meridiem affix +.It Dv DAY_1 Ta Dv LC_TIME Ta name of the first day of the week +.It Dv DAY_2 Ta Dv LC_TIME Ta name of the second day of the week +.It Dv DAY_3 Ta Dv LC_TIME Ta name of the third day of the week +.It Dv DAY_4 Ta Dv LC_TIME Ta name of the fourth day of the week +.It Dv DAY_5 Ta Dv LC_TIME Ta name of the fifth day of the week +.It Dv DAY_6 Ta Dv LC_TIME Ta name of the sixth day of the week +.It Dv DAY_7 Ta Dv LC_TIME Ta name of the seventh day of the week +.It Dv ABDAY_1 Ta Dv LC_TIME Ta abbreviated name of the first day of the week +.It Dv ABDAY_2 Ta Dv LC_TIME Ta abbreviated name of the second day of the week +.It Dv ABDAY_3 Ta Dv LC_TIME Ta abbreviated name of the third day of the week +.It Dv ABDAY_4 Ta Dv LC_TIME Ta abbreviated name of the fourth day of the week +.It Dv ABDAY_5 Ta Dv LC_TIME Ta abbreviated name of the fifth day of the week +.It Dv ABDAY_6 Ta Dv LC_TIME Ta abbreviated name of the sixth day of the week +.It Dv ABDAY_7 Ta Dv LC_TIME Ta abbreviated name of the seventh day of the week +.It Dv MON_1 Ta Dv LC_TIME Ta name of the first month of the year +.It Dv MON_2 Ta Dv LC_TIME Ta name of the second month +.It Dv MON_3 Ta Dv LC_TIME Ta name of the third month +.It Dv MON_4 Ta Dv LC_TIME Ta name of the fourth month +.It Dv MON_5 Ta Dv LC_TIME Ta name of the fifth month +.It Dv MON_6 Ta Dv LC_TIME Ta name of the sixth month +.It Dv MON_7 Ta Dv LC_TIME Ta name of the seventh month +.It Dv MON_8 Ta Dv LC_TIME Ta name of the eighth month +.It Dv MON_9 Ta Dv LC_TIME Ta name of the ninth month +.It Dv MON_10 Ta Dv LC_TIME Ta name of the tenth month +.It Dv MON_11 Ta Dv LC_TIME Ta name of the eleventh month +.It Dv MON_12 Ta Dv LC_TIME Ta name of the twelfth month +.It Dv ABMON_1 Ta Dv LC_TIME Ta abbreviated name of the first month +.It Dv ABMON_2 Ta Dv LC_TIME Ta abbreviated name of the second month +.It Dv ABMON_3 Ta Dv LC_TIME Ta abbreviated name of the third month +.It Dv ABMON_4 Ta Dv LC_TIME Ta abbreviated name of the fourth month +.It Dv ABMON_5 Ta Dv LC_TIME Ta abbreviated name of the fifth month +.It Dv ABMON_6 Ta Dv LC_TIME Ta abbreviated name of the sixth month +.It Dv ABMON_7 Ta Dv LC_TIME Ta abbreviated name of the seventh month +.It Dv ABMON_8 Ta Dv LC_TIME Ta abbreviated name of the eighth month +.It Dv ABMON_9 Ta Dv LC_TIME Ta abbreviated name of the ninth month +.It Dv ABMON_10 Ta Dv LC_TIME Ta abbreviated name of the tenth month +.It Dv ABMON_11 Ta Dv LC_TIME Ta abbreviated name of the eleventh month +.It Dv ABMON_12 Ta Dv LC_TIME Ta abbreviated name of the twelfth month +.It Dv ERA Ta Dv LC_TIME Ta era description segments +.It Dv ERA_D_FMT Ta Dv LC_TIME Ta era date format string +.It Dv ERA_D_T_FMT Ta Dv LC_TIME Ta era date and time format string +.It Dv ERA_T_FMT Ta Dv LC_TIME Ta era time format string +.It Dv ALT_DIGITS Ta Dv LC_TIME Ta alternative symbols for digits +.It Dv RADIXCHAR Ta Dv LC_NUMERIC Ta radix character +.It Dv THOUSEP Ta Dv LC_NUMERIC Ta separator for thousands +.It Dv YESEXPR Ta Dv LC_MESSAGES Ta affirmative response extended regular +expression +.It Dv NOEXPR Ta Dv LC_MESSAGES Ta negative response extended regular expression +.It Dv CRNCYSTR Ta Dv LC_MONETARY Ta local currency symbol, preceded by '-' if the +symbol should appear before the value, '+' if the symbol should appear after the +value, or '.' if the symbol should replace the radix character; if the local +currency symbol is the empty string, implementations may return the empty string +.Pq Qq +.El +.Pp +The following non-standard +.Fx +extensions are recognized: +.Bl -column "Constant" "Category" +.It Sy Constant Ta Sy Category Ta Sy Description +.It Dv D_MD_ORDER Ta Dv LC_TIME Ta month/day order +.It Dv ALTMON_1 Ta Dv LC_TIME Ta standalone name of the first month +.It Dv ALTMON_2 Ta Dv LC_TIME Ta standalone name of the second month +.It Dv ALTMON_3 Ta Dv LC_TIME Ta standalone name of the third month +.It Dv ALTMON_4 Ta Dv LC_TIME Ta standalone name of the fourth month +.It Dv ALTMON_5 Ta Dv LC_TIME Ta standalone name of the fifth month +.It Dv ALTMON_6 Ta Dv LC_TIME Ta standalone name of the sixth month +.It Dv ALTMON_7 Ta Dv LC_TIME Ta standalone name of the seventh month +.It Dv ALTMON_8 Ta Dv LC_TIME Ta standalone name of the eighth month +.It Dv ALTMON_9 Ta Dv LC_TIME Ta standalone name of the ninth month +.It Dv ALTMON_10 Ta Dv LC_TIME Ta standalone name of the tenth month +.It Dv ALTMON_11 Ta Dv LC_TIME Ta standalone name of the eleventh month +.It Dv ALTMON_12 Ta Dv LC_TIME Ta standalone name of the twelfth month +.It Dv YESSTR Ta Dv LC_MESSAGES Ta affirmative response string +.It Dv NOSTR Ta Dv LC_MESSAGES Ta negative response string +.El .Sh RETURN VALUES In a locale where langinfo data is not defined, .Fn nl_langinfo -returns a pointer to the corresponding string in the -.Tn POSIX -locale. +returns a pointer to the corresponding string in the POSIX locale. .Fn nl_langinfo_l returns the same values as .Fn nl_langinfo . From owner-svn-src-head@freebsd.org Thu Dec 17 02:54: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 336894CF683; Thu, 17 Dec 2020 02:54:33 +0000 (UTC) (envelope-from pfg@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxGmn0qPsz4kkR; Thu, 17 Dec 2020 02:54:33 +0000 (UTC) (envelope-from pfg@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 0AABB11532; Thu, 17 Dec 2020 02:54:33 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BH2sWsU039036; Thu, 17 Dec 2020 02:54:32 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BH2sWZv039034; Thu, 17 Dec 2020 02:54:32 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <202012170254.0BH2sWZv039034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 17 Dec 2020 02:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368712 - in head: . usr.sbin/services_mkdb X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: in head: . usr.sbin/services_mkdb X-SVN-Commit-Revision: 368712 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.34 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, 17 Dec 2020 02:54:33 -0000 Author: pfg Date: Thu Dec 17 02:54:32 2020 New Revision: 368712 URL: https://svnweb.freebsd.org/changeset/base/368712 Log: /etc/services: attempt to bring the database to this century 2/2. This is the final half of splitting r358153 in two, in order to avoid a build system bugs and being able to merge an earlier change to previous releases. Add a note to UPDATING to avoid people building from very old systems from having issues with mergemaster MFC after: 3 days (only 12-stable) Differential Revision: https://reviews.freebsd.org/D23621 Modified: head/UPDATING head/usr.sbin/services_mkdb/services Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Dec 17 02:33:52 2020 (r368711) +++ head/UPDATING Thu Dec 17 02:54:32 2020 (r368712) @@ -26,6 +26,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20201216: + The services database has been updated to cover more of the basic + services expected in a modern system. The database is big enough + that it will cause issues in mergemaster in Releases previous to + 12.2 and 11.3, or in very old current systems from before r358154. + 20201215: Obsolete in-tree GDB 6.1.1 has been removed. GDB (including kgdb) may be installed from ports or packages. Modified: head/usr.sbin/services_mkdb/services ============================================================================== --- head/usr.sbin/services_mkdb/services Thu Dec 17 02:33:52 2020 (r368711) +++ head/usr.sbin/services_mkdb/services Thu Dec 17 02:54:32 2020 (r368712) @@ -1613,8 +1613,8 @@ tr-rsrb-p2 1988/udp #cisco RSRB Priority 2 port tr-rsrb-p3 1989/tcp #cisco RSRB Priority 3 port tr-rsrb-p3 1989/udp #cisco RSRB Priority 3 port #PROBLEMS!=================================================== -mshnet 1989/tcp #MHSnet system -mshnet 1989/udp #MHSnet system +#mshnet 1989/tcp #MHSnet system +#mshnet 1989/udp #MHSnet system #PROBLEMS!=================================================== stun-p1 1990/tcp #cisco STUN Priority 1 port stun-p1 1990/udp #cisco STUN Priority 1 port @@ -1640,129 +1640,86 @@ x25-svc-port 1998/tcp #cisco X.25 service (XOT) x25-svc-port 1998/udp #cisco X.25 service (XOT) tcp-id-port 1999/tcp #cisco identification port tcp-id-port 1999/udp #cisco identification port -callbook 2000/tcp -callbook 2000/udp -dc 2001/tcp -wizard 2001/udp #curry -globe 2002/tcp -globe 2002/udp cfingerd 2003/tcp #GNU finger mailbox 2004/tcp -emce 2004/udp #CCWS mm conf -berknet 2005/tcp oracle 2005/udp -invokator 2006/tcp raid-cc 2006/udp #raid -dectalk 2007/tcp raid-am 2007/udp -conf 2008/tcp -terminaldb 2008/udp -news 2009/tcp -whosockami 2009/udp -search 2010/tcp -pipe_server 2010/udp raid-cc 2011/tcp #raid -servserv 2011/udp -ttyinfo 2012/tcp -raid-ac 2012/udp -raid-am 2013/tcp -raid-cd 2013/udp -troff 2014/tcp -raid-sf 2014/udp -cypress 2015/tcp -raid-cs 2015/udp -bootserver 2016/tcp -bootserver 2016/udp -cypress-stat 2017/tcp -bootclient 2017/udp -terminaldb 2018/tcp -rellpack 2018/udp -whosockami 2019/tcp -about 2019/udp -xinupageserver 2020/tcp -xinupageserver 2020/udp -servexec 2021/tcp -xinuexpansion1 2021/udp -down 2022/tcp -xinuexpansion2 2022/udp -xinuexpansion3 2023/tcp -xinuexpansion3 2023/udp -xinuexpansion4 2024/tcp -xinuexpansion4 2024/udp -ellpack 2025/tcp -xribs 2025/udp -scrabble 2026/tcp -scrabble 2026/udp -shadowserver 2027/tcp -shadowserver 2027/udp -submitserver 2028/tcp -submitserver 2028/udp -device2 2030/tcp -device2 2030/udp -blackboard 2032/tcp -blackboard 2032/udp -glogger 2033/tcp -glogger 2033/udp -scoremgr 2034/tcp -scoremgr 2034/udp -imsldoc 2035/tcp -imsldoc 2035/udp -objectmanager 2038/tcp -objectmanager 2038/udp lam 2040/tcp lam 2040/udp interbase 2041/tcp interbase 2041/udp -isis 2042/tcp -isis 2042/udp -isis-bcast 2043/tcp -isis-bcast 2043/udp -rimsl 2044/tcp -rimsl 2044/udp -cdfunc 2045/tcp -cdfunc 2045/udp -sdfunc 2046/tcp -sdfunc 2046/udp -#dls 2047/tcp -#dls 2047/udp -dls-monitor 2048/tcp -dls-monitor 2048/udp -nfsd 2049/sctp nfs # NFS server daemon -nfsd 2049/tcp nfs # NFS server daemon -nfsd 2049/udp nfs # NFS server daemon #PROBLEMS!============================================================= #shilp 2049/tcp #shilp 2049/udp #PROBLEMS!============================================================= +nfsd 2049/tcp nfs # NFS server daemon +nfsd 2049/udp nfs # NFS server daemon +nfsd 2049/sctp nfs # NFS server daemon dlsrpn 2065/tcp #Data Link Switch Read Port Number dlsrpn 2065/udp #Data Link Switch Read Port Number dlswpn 2067/tcp #Data Link Switch Write Port Number dlswpn 2067/udp #Data Link Switch Write Port Number +gnunet 2086/tcp #GNUnet +gnunet 2086/udp #GNUnet +descent3 2092/tcp #Descent 3 +descent3 2092/udp #Descent 3 +h2250-annex-g 2099/tcp #H.225.0 Annex G +h2250-annex-g 2099/udp #H.225.0 Annex G +rtcm-sc104 2101/tcp #rtcm-sc104 +rtcm-sc104 2101/udp #rtcm-sc104 +zephyr-srv 2102/tcp #Zephyr server +zephyr-srv 2102/udp #Zephyr server zephyr-clt 2103/udp #Zephyr serv-hm connection zephyr-hm 2104/udp #Zephyr hostmanager +minipay 2105/tcp #MiniPay +minipay 2105/udp #MiniPay +mzap 2106/tcp #MZAP +mzap 2106/udp #MZAP #PROBLEMS!============================================================= -#zephyr-hm-srv 2105/udp #Zephyr hm-serv connection -#PROBLEMS!============================================================= eklogin 2105/tcp #Kerberos (v4) encrypted rlogin eklogin 2105/udp #Kerberos (v4) encrypted rlogin ekshell 2106/tcp #Kerberos (v4) encrypted rshell ekshell 2106/udp #Kerberos (v4) encrypted rshell -rkinit 2108/tcp #Kerberos (v4) remote initialization -rkinit 2108/udp #Kerberos (v4) remote initialization -ats 2201/tcp #Advanced Training System Program -ats 2201/udp #Advanced Training System Program +#PROBLEMS!============================================================= +gdbremote 2159/tcp #GDB Remote Debug Port +gdbremote 2159/udp #GDB Remote Debug Port +apc-2160 2160/tcp #APC 2160 +apc-2160 2160/udp #APC 2160 +apc-2161 2161/tcp #APC 2161 +apc-2161 2161/udp #APC 2161 +msfw-storage 2171/tcp #MS Firewall Storage +msfw-storage 2171/udp #MS Firewall Storage +msfw-s-storage 2172/tcp #MS Firewall SecureStorage +msfw-s-storage 2172/udp #MS Firewall SecureStorage +msfw-replica 2173/tcp #MS Firewall Replication +msfw-replica 2173/udp #MS Firewall Replication +msfw-array 2174/tcp #MS Firewall Intra Array +msfw-array 2174/udp #MS Firewall Intra Array +airsync 2175/tcp #Microsoft Desktop AirSync Protocol +airsync 2175/udp #Microsoft Desktop AirSync Protocol +rapi 2176/tcp #Microsoft ActiveSync Remote API +rapi 2176/udp #Microsoft ActiveSync Remote API +vmrdp 2179/tcp #Microsoft RDP for virtual machines +vmrdp 2179/udp #Microsoft RDP for virtual machines +jps 2205/tcp #Java Presentation Server +jps 2205/udp #Java Presentation Server +hpocbus 2206/tcp #HP OpenCall bus +hpocbus 2206/udp #HP OpenCall bus hpssd 2207/tcp #HP Status and Services hpssd 2207/udp #HP Status and Services hpiod 2208/tcp #HP I/O Backend hpiod 2208/udp #HP I/O Backend -rcip-itu 2225/sctp #Resource Connection Initiation Protocol -rcip-itu 2225/tcp #Resource Connection Initiation Protocol -ivs-video 2232/tcp #IVS Video default -ivs-video 2232/udp #IVS Video default -ivsd 2241/tcp #IVS Daemon -ivsd 2241/udp #IVS Daemon -pehelp 2307/tcp -pehelp 2307/udp +rimf-ps 2209/tcp #HP RIM for Files Portal Service +rimf-ps 2209/udp #HP RIM for Files Portal Service +# 2210-2212 Unassigned +mysql-im 2273/tcp #MySQL Instance Manager +mysql-im 2273/udp #MySQL Instance Manager +dbm 2345/tcp #dbm +dbm 2345/udp #dbm +rsmtp 2390/tcp #RSMTP +rsmtp 2390/udp #RSMTP cvspserver 2401/tcp #CVS network server cvspserver 2401/udp #CVS network server venus 2430/tcp #venus @@ -1773,116 +1730,135 @@ codasrv 2432/tcp #codasrv codasrv 2432/udp #codasrv codasrv-se 2433/tcp #codasrv-se codasrv-se 2433/udp #codasrv-se -rtsserv 2500/tcp #Resource Tracking system server -rtsserv 2500/udp #Resource Tracking system server -rtsclient 2501/tcp #Resource Tracking system client -rtsclient 2501/udp #Resource Tracking system client -hp-3000-telnet 2564/tcp #HP 3000 NS/VT block mode telnet -zebrasrv 2600/tcp #zebra service -zebra 2601/tcp #zebra vty -ripd 2602/tcp #RIPd vty -ripngd 2603/tcp #RIPngd vty -ospfd 2604/tcp #OSPFd vty -bgpd 2605/tcp #BGPd vty -ospf6d 2606/tcp #OSPF6d vty +sybasedbsynch 2439/tcp #SybaseDBSynch +sybasedbsynch 2439/udp #SybaseDBSynch +citrixima 2512/tcp #Citrix IMA +citrixima 2512/udp #Citrix IMA +citrixadmin 2513/tcp #Citrix ADMIN +citrixadmin 2513/udp #Citrix ADMIN +hpstgmgr 2600/tcp #HPSTGMGR +hpstgmgr 2600/udp #HPSTGMGR +discp-client 2601/tcp #discp client +discp-client 2601/udp #discp client +discp-server 2602/tcp #discp server +discp-server 2602/udp #discp server +servicemeter 2603/tcp #Service Meter +servicemeter 2603/udp #Service Meter +nsc-ccs 2604/tcp #NSC CCS +nsc-ccs 2604/udp #NSC CCS +nsc-posa 2605/tcp #NSC POSA +nsc-posa 2605/udp #NSC POSA +netmon 2606/tcp #Dell Netmon +netmon 2606/udp #Dell Netmon +connection 2607/tcp #Dell Connection +connection 2607/udp #Dell Connection +wag-service 2608/tcp #Wag Service +wag-service 2608/udp #Wag Service dict 2628/tcp #RFC 2229 dict 2628/udp #RFC 2229 -listen 2766/tcp #System V listener port smpp 2775/tcp #SMPP smpp 2775/udp #SMPP www-dev 2784/tcp #world wide web - development www-dev 2784/udp #world wide web - development -m2ua 2904/sctp #M2UA +citrix-rtmp 2897/tcp #Citrix RTMP +citrix-rtmp 2897/udp #Citrix RTMP m2ua 2904/tcp #M2UA m2ua 2904/udp #M2UA -m3ua 2905/sctp #M3UA +m2ua 2904/sctp #M2UA m3ua 2905/tcp #M3UA +m3ua 2905/sctp #M3UA megaco-h248 2944/tcp #Megaco H-248 megaco-h248 2944/udp #Megaco H-248 megaco-h248 2944/sctp #Megaco-H.248 text h248-binary 2945/tcp #H248 Binary h248-binary 2945/udp #H248 Binary h248-binary 2945/sctp #Megaco/H.248 binary +netplan 2983/tcp #NETPLAN +netplan 2983/udp #NETPLAN +cifs 3020/tcp #CIFS +cifs 3020/udp #CIFS eppc 3031/tcp #Remote AppleEvents/PPC Toolbox eppc 3031/udp #Remote AppleEvents/PPC Toolbox -NSWS 3049/tcp -NSWS 3049/udp gds_db 3050/tcp #InterBase Database Remote Protocol gds_db 3050/udp #InterBase Database Remote Protocol -sj3 3086/tcp #SJ3 (kanji input) itu-bicc-stc 3097/sctp #ITU-T Q.1902.1/Q.2150.3 -vmodem 3141/tcp -vmodem 3141/udp +grubd 3136/tcp #Grub Server Port +grubd 3136/udp #Grub Server Port iscsi-target 3260/tcp # iSCSI port iscsi-target 3260/udp # iSCSI port -ccmail 3264/tcp #cc:mail/lotus -ccmail 3264/udp #cc:mail/lotus mysql 3306/tcp #MySQL mysql 3306/udp #MySQL -dec-notes 3333/tcp #DEC Notes -dec-notes 3333/udp #DEC Notes -rdp 3389/tcp #Microsoft Remote Desktop Protocol -bmap 3421/tcp #Bull Apprise portmapper -bmap 3421/udp #Bull Apprise portmapper +ms-wbt-server 3389/tdp rdp #MS WBT Server +ms-wbt-server 3389/udp #MS WBT Server +efi-lm 3392/tcp #EFI License Management +efi-lm 3392/udp #EFI License Management prsvp 3455/tcp #RSVP Port prsvp 3455/udp rsvp-encap #RSVP Port -vat 3456/tcp #VAT default data -vat 3456/udp #VAT default data -vat-control 3457/tcp #VAT default control -vat-control 3457/udp #VAT default control +nppmp 3476/tcp #NVIDIA Mgmt Protocol +nppmp 3476/udp #NVIDIA Mgmt Protocol nut 3493/tcp #Network UPS Tools nut 3493/udp #Network UPS Tools -lsp-ping 3503/tcp #MPLS LSP-echo (RFC8029) -lsp-ping 3503/udp #MPLS LSP-echo (RFC8029) -m2pa 3565/tcp #M2PA +lsp-ping 3503/tcp #MPLS LSP-echo Port +lsp-ping 3503/udp #MPLS LSP-echo Port +802-11-iapp 3517/tcp #IEEE 802.11 WLANs WG IAPP +802-11-iapp 3517/udp #IEEE 802.11 WLANs WG IAPP +jboss-iiop 3528/tcp #JBoss IIOP +jboss-iiop 3528/udp #JBoss IIOP +jboss-iiop-ssl 3529/tcp #JBoss IIOP/SSL +jboss-iiop-ssl 3529/udp #JBoss IIOP/SSL m2pa 3565/sctp #M2PA +m2pa 3565/tcp #M2PA tsp 3653/tcp #Tunnel Setup Protocol tsp 3653/udp #Tunnel Setup Protocol +daap 3689/tcp #Digital Audio Access Protocol +daap 3689/udp #Digital Audio Access Protocol svn 3690/tcp #Subversion svn 3690/udp #Subversion -asap 3863/tcp #asap tcp port -asap 3863/udp #asap udp port -asap 3863/sctp #asap sctp -asap-tls 3864/tcp #asap/tls tcp port -asap-tls 3864/sctp #asap-sctp/tls +bfd-control 3784/tcp #BFD Control Protocol +bfd-control 3784/udp #BFD Control Protocol +bfd-echo 3785/tcp #BFD Echo Protocol +bfd-echo 3785/udp #BFD Echo Protocol +asap-tcp 3863/tcp #asap tcp port +asap-udp 3863/udp #asap udp port +asap-sctp 3863/sctp #asap sctp +asap-tcp-tls 3864/tcp #asap/tls tcp port +asap-sctp-tls 3864/sctp #asap-sctp/tls diameter 3868/tcp #DIAMETER diameter 3868/sctp #DIAMETER -udt_os 3900/tcp #Unidata UDT OS -udt_os 3900/udp #Unidata UDT OS mapper-nodemgr 3984/tcp #MAPPER network node manager mapper-nodemgr 3984/udp #MAPPER network node manager mapper-mapethd 3985/tcp #MAPPER TCP/IP server mapper-mapethd 3985/udp #MAPPER TCP/IP server mapper-ws_ethd 3986/tcp #MAPPER workstation server mapper-ws_ethd 3986/udp #MAPPER workstation server -netcheque 4008/tcp #NetCheque accounting -netcheque 4008/udp #NetCheque accounting +dnx 3998/tcp #Distributed Nagios Executor Service +dnx 3998/udp #Distributed Nagios Executor Service +#PROBLEM: Assigned to Network Paging Protocol ==================== lockd 4045/udp # NFS lock daemon/manager lockd 4045/tcp +#PROBLEM ========================================================= nuts_dem 4132/tcp #NUTS Daemon nuts_dem 4132/udp #NUTS Daemon nuts_bootp 4133/tcp #NUTS Bootp Server nuts_bootp 4133/udp #NUTS Bootp Server sieve 4190/tcp #ManageSieve Protocol sieve 4190/udp #ManageSieve Protocol +nss 4159/tcp #Network Security Service +nss 4159/udp #Network Security Service rwhois 4321/tcp #Remote Who Is rwhois 4321/udp #Remote Who Is -unicall 4343/tcp -unicall 4343/udp epmd 4369/tcp #Erlang Port Mapper Daemon epmd 4369/udp #Erlang Port Mapper Daemon -krb524 4444/tcp -krb524 4444/udp -# PROBLEM krb524 assigned the port, +krb524 4444/tcp #KRB524 +krb524 4444/udp #KRB524 # PROBLEM nv used it without an assignment nv-video 4444/tcp #NV Video default nv-video 4444/udp #NV Video default -sae-urn 4500/tcp -sae-urn 4500/udp -fax 4557/tcp #FAX transmission service -hylafax 4559/tcp #HylaFAX client-server protocol -rfa 4672/tcp #remote file access server -rfa 4672/udp #remote file access server +# PROBLEM ======================================================== +ipsec-nat-t 4500/tcp #IPsec NAT-Traversal +ipsec-nat-t 4500/udp #IPsec NAT-Traversal +hylafax 4559/tcp #HylaFAX +hylafax 4559/udp #HylaFAX ipfix 4739/tcp #IP Flow Info Export ipfix 4739/udp #IP Flow Info Export ipfix 4739/sctp #IP Flow Info Export @@ -1890,122 +1866,75 @@ ipfixs 4740/tcp #ipfix protocol over TLS ipfixs 4740/udp #ipfix protocol over DTLS ipfixs 4740/sctp #ipfix protocol over DTLS vxlan 4789/udp #Virtual eXtensible Local Area Network (VXLAN) -commplex-main 5000/tcp -commplex-main 5000/udp -commplex-link 5001/tcp -commplex-link 5001/udp +derby-repli 4851/tcp #Apache Derby Replication +derby-repli 4851/udp #Apache Derby Replication rfe 5002/tcp #radio free ethernet rfe 5002/udp #radio free ethernet -telelpathstart 5010/tcp -telelpathstart 5010/udp -telelpathattack 5011/tcp -telelpathattack 5011/udp mmcc 5050/tcp #multimedia conference control tool mmcc 5050/udp #multimedia conference control tool -sds 5059/tcp #SIP Directory Services -sds 5059/udp #SIP Directory Services sip 5060/tcp #Session Initialization Protocol (VoIP) sip 5060/udp #Session Initialization Protocol (VoIP) sip-tls 5061/tcp #SIP over TLS sip-tls 5061/udp #SIP over TLS car 5090/sctp #Candidate AR cxtp 5091/sctp #Context Transfer Protocol -rmonitor_secure 5145/tcp -rmonitor_secure 5145/udp -aol 5190/tcp #America-Online -aol 5190/udp #America-Online -aol-1 5191/tcp #AmericaOnline1 -aol-1 5191/udp #AmericaOnline1 -aol-2 5192/tcp #AmericaOnline2 -aol-2 5192/udp #AmericaOnline2 -aol-3 5193/tcp #AmericaOnline3 -aol-3 5193/udp #AmericaOnline3 xmpp-client 5222/tcp #XMPP Client Connection xmpp-client 5222/udp #XMPP Client Connection -padl2sim 5236/tcp -padl2sim 5236/udp xmpp-server 5269/tcp #XMPP Server Connection xmpp-server 5269/udp #XMPP Server Connection -hacl-hb 5300/tcp # HA cluster heartbeat -hacl-hb 5300/udp # HA cluster heartbeat -hacl-gs 5301/tcp # HA cluster general services -hacl-gs 5301/udp # HA cluster general services -hacl-cfg 5302/tcp # HA cluster configuration -hacl-cfg 5302/udp # HA cluster configuration -hacl-probe 5303/tcp # HA cluster probing -hacl-probe 5303/udp # HA cluster probing -hacl-local 5304/tcp -hacl-local 5304/udp -hacl-test 5305/tcp -hacl-test 5305/udp -cfengine 5308/tcp -cfengine 5308/udp +presence 5298/tcp #XMPP Link-Local Messaging +presence 5298/udp #XMPP Link-Local Messaging +cfengine 5308/tcp #CFengine +cfengine 5308/udp #CFengine mdns 5353/tcp #Multicast DNS mdns 5353/udp #Multicast DNS +mdnsresponder 5354/tcp #Multicast DNS Responder IPC +mdnsresponder 5354/udp #Multicast DNS Responder IPC postgresql 5432/tcp #PostgreSQL Database postgresql 5432/udp #PostgreSQL Database vami 5480/tcp #VMware Appliance Management Interface, HTTPS-like vami 5480/udp #VMware Appliance Management Interface, HTTPS-like +# PROBLEM Personal Agent assigned the port, but also used by HP Omniback +personal-agent 5555/tcp #Personal Agent rplay 5555/udp +# PROBLEM ======================================================== amqp 5672/tcp #AMQP amqp 5672/udp #AMQP amqp 5672/sctp #AMQP v5ua 5675/tcp #V5UA application port v5ua 5675/udp #V5UA application port v5ua 5675/sctp #V5UA application port +# PROBLEM Auriga Router Service assigned the port ================ canna 5680/tcp #Canna (Japanese Input) -proshareaudio 5713/tcp #proshare conf audio -proshareaudio 5713/udp #proshare conf audio -prosharevideo 5714/tcp #proshare conf video -prosharevideo 5714/udp #proshare conf video -prosharedata 5715/tcp #proshare conf data -prosharedata 5715/udp #proshare conf data -prosharerequest 5716/tcp #proshare conf request -prosharerequest 5716/udp #proshare conf request -prosharenotify 5717/tcp #proshare conf notify -prosharenotify 5717/udp #proshare conf notify -couchdb 5984/tcp #CouchDB database server -couchdb 5984/udp #CouchDB database server +auriga-router 5680/udp #Auriga Router Service +# PROBLEM ======================================================== +vnc-server 5900/tcp #VNC Server +vnc-server 5900/udp #VNC Server cvsup 5999/tcp #CVSup file transfer/John Polstra/FreeBSD x11 6000/tcp #6000-6063 are assigned to X Window System -x11 6000/udp +x11 6000/udp #X Window System x11-ssh 6010/tcp #Unofficial name, for convenience x11-ssh 6010/udp -softcm 6110/tcp #HP SoftBench CM -softcm 6110/udp #HP SoftBench CM -spc 6111/tcp #HP SoftBench Sub-Process Control -spc 6111/udp #HP SoftBench Sub-Process Control -meta-corp 6141/tcp #Meta Corporation License Manager -meta-corp 6141/udp #Meta Corporation License Manager -aspentec-lm 6142/tcp #Aspen Technology License Manager -aspentec-lm 6142/udp #Aspen Technology License Manager -watershed-lm 6143/tcp #Watershed License Manager -watershed-lm 6143/udp #Watershed License Manager -statsci1-lm 6144/tcp #StatSci License Manager - 1 -statsci1-lm 6144/udp #StatSci License Manager - 1 -statsci2-lm 6145/tcp #StatSci License Manager - 2 -statsci2-lm 6145/udp #StatSci License Manager - 2 -lonewolf-lm 6146/tcp #Lone Wolf Systems License Manager -lonewolf-lm 6146/udp #Lone Wolf Systems License Manager -montage-lm 6147/tcp #Montage License Manager -montage-lm 6147/udp #Montage License Manager -ricardo-lm 6148/tcp #Ricardo North America License Manager -ricardo-lm 6148/udp #Ricardo North America License Manager sge_qmaster 6444/tcp #Grid Engine Qmaster Service sge_qmaster 6444/udp #Grid Engine Qmaster Service sge_execd 6445/tcp #Grid Engine Execution Service sge_execd 6445/udp #Grid Engine Execution Service -xdsxdm 6558/tcp -xdsxdm 6558/udp sane-port 6566/tcp #Scanner Access Now Easy (SANE) Control Port sane-port 6566/udp #Scanner Access Now Easy (SANE) Control Port +kftp-data 6620/tcp #Kerberos V5 FTP Data +kftp-data 6620/udp #Kerberos V5 FTP Data +kftp 6621/tcp #Kerberos V5 FTP Control +kftp 6621/udp #Kerberos V5 FTP Control +ktelnet 6623/tcp #Kerberos V5 Telnet +ktelnet 6623/udp #Kerberos V5 Telnet +afesc-mc 6628/udp #AFE Stock Channel M/C +ircu 6665/tcp #IRCU +ircu 6665/udp #IRCU ircd 6667/tcp #Internet Relay Chat (unofficial) ircs-u 6697/tcp #Internet Relay Chat over TLS/SSL frc-hp 6704/sctp #ForCES HP (High Priority) channel frc-mp 6705/sctp #ForCES MP (Medium Priority) channel frc-lp 6706/sctp #ForCES LP (Low priority) channel -acmsoda 6969/tcp -acmsoda 6969/udp afs3-fileserver 7000/tcp #file server itself afs3-fileserver 7000/udp #file server itself afs3-callback 7001/tcp #callbacks to cache managers @@ -2034,34 +1963,58 @@ afs3-remio 7011/tcp #MR-AFS remote IO server afs3-remio 7011/udp #MR-AFS remote IO server font-service 7100/tcp #X Font Service font-service 7100/udp #X Font Service -fodms 7200/tcp #FODMS FLIP -fodms 7200/udp #FODMS FLIP -dlip 7201/tcp -dlip 7201/udp simco 7626/tcp #SImple Middlebox COnfiguration (SIMCO) Server simco 7626/sctp #SImple Middlebox COnfiguration (SIMCO) +# Problem: Intuit Entitlement Client assigned the port =========== ftp-proxy 8021/tcp # FTP proxy +intu-ec-client 8021/udp #Intuit Entitlement Client +# PROBLEM ======================================================== +http-alt 8080/tcp #HTTP Alternate (see port 80) +http-alt 8080/udp #HTTP Alternate (see port 80) +privoxy 8118/tcp #Privoxy HTTP proxy +privoxy 8118/udp #Privoxy HTTP proxy +puppet 8140/tcp #The Puppet master service pim 8471/tcp #PIM over Reliable Transport pim 8471/sctp #PIM over Reliable Transport +asterix 8600/tcp #Surveillance Data +asterix 8600/udp #Surveillance Data natd 8668/divert # Network Address Translation +ub-dns-control 8953/tcp #unbound dns nameserver lcs-ap 9082/sctp #LCS Application Protocol +aurora 9084/sctp #IBM AURORA Performance Visualizer aurora 9084/tcp #IBM AURORA Performance Visualizer aurora 9084/udp #IBM AURORA Performance Visualizer -aurora 9084/sctp #IBM AURORA Performance Visualizer -jetdirect 9100/tcp #HP JetDirect card +jetdirect 9100/tcp #HP JetDirect card +pdl-datastream 9100/tcp #Printer PDL Data Stream +pdl-datastream 9100/udp #Printer PDL Data Stream +bacula-dir 9101/tcp #Bacula Director +bacula-dir 9101/udp #Bacula Director +bacula-fd 9102/tcp #Bacula File Daemon +bacula-fd 9102/udp #Bacula File Daemon +bacula-sd 9103/tcp #Bacula Storage Daemon +bacula-sd 9103/udp #Bacula Storage Daemon prom-sysctl 9124/tcp #prometheus_sysctl_exporter(8) git 9418/tcp #git pack transfer service git 9418/udp #git pack transfer service -man 9535/tcp -man 9535/udp +odbcpathway 9628/tcp #ODBC Pathway Service +odbcpathway 9628/udp #ODBC Pathway Service +davsrc 9800/tcp #WebDav Source Port +davsrc 9800/udp #WebDav Source Port +davsrcs 9802/tcp #WebDAV Source TLS/SSL +davsrcs 9802/udp #WebDAV Source TLS/SSL sd 9876/tcp #Session Director sd 9876/udp #Session Director +iua 9900/sctp #IUA iua 9900/tcp #IUA iua 9900/udp #IUA -iua 9900/sctp #IUA -enrp 9901/udp #enrp server channel enrp 9901/sctp #enrp server channel +enrp 9901/udp #enrp server channel +enrp-sctp 9901/sctp #enrp server channel enrp-tls 9902/sctp #enrp/tls server channel +zabbix-agent 10050/tcp #Zabbix Agent +zabbix-agent 10050/udp #Zabbix Agent +zabbix-trapper 10051/tcp #Zabbix Trapper +zabbix-trapper 10051/udp #Zabbix Trapper amanda 10080/tcp #Dump server control amanda 10080/udp #Dump server control amandaidx 10082/tcp #Amanda indexing @@ -2069,10 +2022,18 @@ amidxtape 10083/tcp #Amanda tape indexing wmereceiving 11997/sctp #WorldMailExpress wmedistribution 11998/sctp #WorldMailExpress wmereporting 11999/sctp #WorldMailExpress -bpcd 13782/tcp #Veritas NetBackup -bpcd 13782/udp #Veritas NetBackup +bpcd 13782/tcp #VERITAS NetBackup +bpcd 13782/udp #VERITAS NetBackup sua 14001/tcp #SUA sua 14001/sctp #SUA +amt-soap-http 16992/tcp #Intel(R) AMT SOAP/HTTP +amt-soap-http 16992/udp #Intel(R) AMT SOAP/HTTP +amt-soap-https 16993/tcp #Intel(R) AMT SOAP/HTTPS +amt-soap-https 16993/udp #Intel(R) AMT SOAP/HTTPS +amt-redir-tcp 16994/tcp #Intel(R) AMT Redirection/TCP +amt-redir-tcp 16994/udp #Intel(R) AMT Redirection/TCP +amt-redir-tls 16995/tcp #Intel(R) AMT Redirection/TLS +amt-redir-tls 16995/udp #Intel(R) AMT Redirection/TLS isode-dua 17007/tcp isode-dua 17007/udp biimenu 18000/tcp #Beckman Instruments, Inc. @@ -2084,7 +2045,8 @@ wnn6 22273/tcp wnn4 #Wnn4 (Japanese input) wnn6_Cn 22289/tcp wnn4_Cn #Wnn4 (Chinese input) wnn6_Kr 22305/tcp wnn4_Kr #Wnn4 (Korean input) wnn6_Tw 22321/tcp wnn4_Tw #Wnn4 (Taiwanse input) -wnn6_DS 26208/tcp #Wnn6 (Dserver) +wnn6-ds 26208/tcp #Wnn6 (Dserver) +wnn6-ds 26208/udp #wnn6-ds sgsap 29118/sctp #SGsAP in 3GPP sbcap 29168/sctp #SBcAP in 3GPP iuhsctpassoc 29169/sctp #HNBAP and RUA Common Association From owner-svn-src-head@freebsd.org Thu Dec 17 03:42: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 E5D9B4A8B8E; Thu, 17 Dec 2020 03:42: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxHrZ6DgNz4nhS; Thu, 17 Dec 2020 03:42:54 +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 C88F61222F; Thu, 17 Dec 2020 03:42:54 +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 0BH3gsFo070848; Thu, 17 Dec 2020 03:42:54 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BH3gs5B070847; Thu, 17 Dec 2020 03:42:54 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012170342.0BH3gs5B070847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 17 Dec 2020 03:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368713 - head/usr.sbin/freebsd-update X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/freebsd-update X-SVN-Commit-Revision: 368713 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.34 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, 17 Dec 2020 03:42:55 -0000 Author: kevans Date: Thu Dec 17 03:42:54 2020 New Revision: 368713 URL: https://svnweb.freebsd.org/changeset/base/368713 Log: freebsd-update: unconditionally regenerate passwd/login.conf files The existing logic is nice in theory, but in practice freebsd-update will not preserve the timestamps on these files. When doing a major upgrade, e.g. from 12.1-RELEASE -> 12.2-RELEASE, pwd.mkdb et al. appear in the INDEX and we clobber the timestamp several times in the process of packaging up the existing system into /var/db/freebsd-update/files and extracting for comparisons. This leads to these files not getting regenerated when they're most likely to be needed. Measures could be taken to preserve timestamps, but it's unclear whether the complexity and overhead of doing so is really outweighed by the marginal benefit. I observed this issue when pkg subsequently failed to install a package that wanted to add a user, claiming that the user was removed in the process. bapt@ pointed to this pre-existing bug with freebsd-update as the cause. PR: 234014, 232921 Reviewed by: bapt, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27635 Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Thu Dec 17 02:54:32 2020 (r368712) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Thu Dec 17 03:42:54 2020 (r368713) @@ -2949,17 +2949,9 @@ Kernel updates have been installed. Please reboot and env DESTDIR=${BASEDIR} certctl rehash fi - # Rebuild generated pwd files. - if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || - [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ] || - [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/passwd ]; then - pwd_mkdb -d ${BASEDIR}/etc -p ${BASEDIR}/etc/master.passwd - fi - - # Rebuild /etc/login.conf.db if necessary. - if [ ${BASEDIR}/etc/login.conf -nt ${BASEDIR}/etc/login.conf.db ]; then - cap_mkdb ${BASEDIR}/etc/login.conf - fi + # Rebuild generated pwd files and /etc/login.conf.db. + pwd_mkdb -d ${BASEDIR}/etc -p ${BASEDIR}/etc/master.passwd + cap_mkdb ${BASEDIR}/etc/login.conf # Rebuild man page databases, if necessary. for D in /usr/share/man /usr/share/openssl/man; do From owner-svn-src-head@freebsd.org Thu Dec 17 03:44: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 1C1B14A8DB3 for ; Thu, 17 Dec 2020 03:44:05 +0000 (UTC) (envelope-from kevans@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxHsx0Hjqz4ngR for ; Thu, 17 Dec 2020 03:44:05 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (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: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id E8294F6EF for ; Thu, 17 Dec 2020 03:44:04 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f181.google.com with SMTP id c14so19274225qtn.0 for ; Wed, 16 Dec 2020 19:44:04 -0800 (PST) X-Gm-Message-State: AOAM533/GWyGSekEXC440xwmioFUuXdl0nuUzHgwPZ2ufPVmbmQbFX16 SxCSj0EmEt8Bj4vjVkSHMdIngAWe1lD9TZ3uCH0= X-Received: by 2002:ac8:4e87:: with SMTP id 7mt49367340qtp.310.1608176644443; Wed, 16 Dec 2020 19:44:04 -0800 (PST) MIME-Version: 1.0 References: <202012170342.0BH3gs5B070847@repo.freebsd.org> In-Reply-To: <202012170342.0BH3gs5B070847@repo.freebsd.org> From: Kyle Evans Date: Wed, 16 Dec 2020 21:43:53 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368713 - head/usr.sbin/freebsd-update Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 03:44:05 -0000 On Wed, Dec 16, 2020 at 9:43 PM Kyle Evans wrote: > > Author: kevans > Date: Thu Dec 17 03:42:54 2020 > New Revision: 368713 > URL: https://svnweb.freebsd.org/changeset/base/368713 > > Log: > freebsd-update: unconditionally regenerate passwd/login.conf files > > The existing logic is nice in theory, but in practice freebsd-update will > not preserve the timestamps on these files. When doing a major upgrade, e.g. > from 12.1-RELEASE -> 12.2-RELEASE, pwd.mkdb et al. appear in the INDEX and > we clobber the timestamp several times in the process of packaging up the > existing system into /var/db/freebsd-update/files and extracting for > comparisons. This leads to these files not getting regenerated when they're > most likely to be needed. > > Measures could be taken to preserve timestamps, but it's unclear whether > the complexity and overhead of doing so is really outweighed by the marginal > benefit. > > I observed this issue when pkg subsequently failed to install a package that > wanted to add a user, claiming that the user was removed in the process. > bapt@ pointed to this pre-existing bug with freebsd-update as the cause. > > PR: 234014, 232921 > Reviewed by: bapt, emaste > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D27635 > Bah, I found this one immediately after: PR: 235766 From owner-svn-src-head@freebsd.org Thu Dec 17 05:24: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 512404AB51D for ; Thu, 17 Dec 2020 05:24:24 +0000 (UTC) (envelope-from bounces+17430347-ce8c-svn-src-head=freebsd.org@em4842.fdc-k.africa) Received: from pnkfpfkc.outbound-mail.sendgrid.net (pnkfpfkc.outbound-mail.sendgrid.net [50.31.63.28]) (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 4CxL5g4bPqz4tlH for ; Thu, 17 Dec 2020 05:24:23 +0000 (UTC) (envelope-from bounces+17430347-ce8c-svn-src-head=freebsd.org@em4842.fdc-k.africa) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fdc-k.africa; h=content-transfer-encoding:content-type:from:mime-version:to:subject:list-unsubscribe; s=s1; bh=o11fT3Plac90wRmqpPJRrOqY+JWGYLvjJ0WX/z0Bd+8=; b=T0ErVkn SQHpDxMogMVSoPyaSVZY1nWkW4akxiXv77BbhcHui8Pf5KH5zsy2iCrqdVDLJmwX qFh7jt+JxQ03CJNOKrmhTcSImdMun15bur+i0QB/1cY23JA5bEjZhXzrpF153sTc x9YqB2+j1klR9RglT5XlaupoMop0Ezbqu/qs= Received: by filter2142p1las1.sendgrid.net with SMTP id filter2142p1las1-9889-5FDADFE6-1 2020-12-17 04:34:47.005234573 +0000 UTC m=+3168.656928624 Received: from MTc0MzAzNDc (unknown) by ismtpd0003p1sjc2.sendgrid.net (SG) with HTTP id OBygwgnbQg-qhyO6V0qP_w Thu, 17 Dec 2020 04:34:45.848 +0000 (UTC) Date: Thu, 17 Dec 2020 04:35:29 +0000 (UTC) From: "FDC Training" To: svn-src-head@freebsd.org Message-ID: Subject: Invitation to GIS for Monitoring and Evaluation training JAN 2021 X-SG-EID: EvYvoie/qnEezyq2t4eRKjDm9X7ZKbCMt75WvXA+XNH8i4uQZagn/h3cr9coebeEZw4hmE73mAPUR6 9JjAEFepETt83ctxlNUS1v56kH8YstdRxXL3n4wIskKScC4f+E0LFPRSAqluVKlmjxZwDOhXrv1mMx ROLpUl+9hRmtBFO0p77iJfA85Rf3P0REUqPKwzOMfPupsZQZmf72Pwg/4f5u/LPdzlMXoJFHbp33Ra M= X-Entity-ID: lgZohGoWIjvYsKzlUpYsxA== X-Rspamd-Queue-Id: 4CxL5g4bPqz4tlH X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fdc-k.africa header.s=s1 header.b=T0ErVkn ; dmarc=pass (policy=none) header.from=fdc-k.africa; spf=pass (mx1.freebsd.org: domain of bounces@em4842.fdc-k.africa designates 50.31.63.28 as permitted sender) smtp.mailfrom=bounces@em4842.fdc-k.africa X-Spamd-Result: default: False [6.05 / 15.00]; R_SPF_ALLOW(0.00)[+ip4:50.31.32.0/19:c]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[fdc-k.africa:+]; DMARC_POLICY_ALLOW(0.00)[fdc-k.africa,none]; FORGED_SENDER(0.30)[training@fdc-k.africa,bounces@em4842.fdc-k.africa]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[50.31.63.28:from]; ASN(0.00)[asn:11377, ipnet:50.31.48.0/20, country:US]; MIME_TRACE(0.00)[0:~]; TAGGED_FROM(0.00)[17430347-ce8c-svn-src-head=freebsd.org]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[fdc-k.africa:s=s1]; FROM_NEQ_ENVFROM(0.00)[training@fdc-k.africa,bounces@em4842.fdc-k.africa]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.97)[0.971]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[50.31.63.28:from:127.0.2.255]; NEURAL_SPAM_MEDIUM(0.99)[0.990]; BAD_REP_POLICIES(0.10)[]; NEURAL_SPAM_LONG(1.00)[1.000]; MIME_HTML_ONLY(0.20)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[50.31.63.28:from]; RBL_SENDERSCORE(2.00)[50.31.63.28:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-head] X-Spam: Yes MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 05:24:24 -0000 From owner-svn-src-head@freebsd.org Thu Dec 17 09:32: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 55DC64B1C5F; Thu, 17 Dec 2020 09:32:27 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxRbt3Jw2z58jl; Thu, 17 Dec 2020 09:32:26 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-ed1-f42.google.com with SMTP id r5so27876696eda.12; Thu, 17 Dec 2020 01:32:26 -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=FuHAq3WNMZflmP2MlnqrVJT0o50zG0BJAbe7B2JRFT8=; b=LSoYMxbvwITEoShr4oknZSoNcR6qsFsprYJo3rLdNKJDC4pJbyLwP+GCGreDwTt6tc LJ+BLOWAd1i3+LI2u7+0EQIBsncx7Ef/bdlua0uavAnJPpTVP/4WKAFzQcdQJM6uQerZ PynYFCa9KcZ7xt2W/4/4KnOiyrifytM7htpE4rEqSZDPqTmvLzZAZhvIJXL7Dam0Q63Y 5Qw7k/FTjtiBEgYxNURc6DCSS4kd0LY2g35LQrF7IKIKfDwfwjV7Yeh7YvS2he2nrBir ZqTuGsuicwQpv5IdtEidNVd6mpIWRem1vNYIdCcLCn6C2kA60uXaIDTZPeIYz2Kk3QjK zDAg== X-Gm-Message-State: AOAM531GKKsCtYwh5PrW1h7RvoHtoeTuIVItyXgDzzxHrF0xIpHxk3Op qsBQNhVhjpunQyWpKa652aAIBYXYvfYwlaAgdqHgGpcVFH4= X-Google-Smtp-Source: ABdhPJy8jeTrRYBBlo5HsDtWVojHPltR63CREKdX0ukXRMmZVi7dP4JY6REaL5XLpqd6+DbSI/SvY6ESjh0uOfco1N8= X-Received: by 2002:a05:6402:541:: with SMTP id i1mr2393778edx.289.1608197544996; Thu, 17 Dec 2020 01:32:24 -0800 (PST) MIME-Version: 1.0 References: <202012160902.0BG92A19072702@repo.freebsd.org> In-Reply-To: <202012160902.0BG92A19072702@repo.freebsd.org> From: Antoine Brodin Date: Thu, 17 Dec 2020 10:32:14 +0100 Message-ID: Subject: Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CxRbt3Jw2z58jl X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of antoinebrodinfreebsd@gmail.com designates 209.85.208.42 as permitted sender) smtp.mailfrom=antoinebrodinfreebsd@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; FROM_NEQ_ENVFROM(0.00)[antoine@freebsd.org,antoinebrodinfreebsd@gmail.com]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_TLS_ALL(0.00)[]; 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]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; ARC_NA(0.00)[]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.208.42:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.208.42:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.42:from]; FORGED_SENDER(0.30)[antoine@freebsd.org,antoinebrodinfreebsd@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.42:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 09:32:27 -0000 On Wed, Dec 16, 2020 at 10:02 AM Konstantin Belousov wrote: > > Author: kib > Date: Wed Dec 16 09:02:09 2020 > New Revision: 368692 > URL: https://svnweb.freebsd.org/changeset/base/368692 > > Log: > Implement strerror_l(). > > Only for the arches that provide user-mode TLS. > > PR: 251651 > Requested by: yuri > Discussed with: emaste, jilles, tijl > Sponsored by: The FreeBSD Foundation > Differential revision: https://reviews.freebsd.org/D27495 > MFC after: 2 weeks Hi, It seems that this change broke some ports. For instance: http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p558245_s368709/logs/errors/p11-kit-0.23.22.log Cheers, Antoine From owner-svn-src-head@freebsd.org Thu Dec 17 10:07: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 823A54B2A5B; Thu, 17 Dec 2020 10:07:55 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CxSNq1Myfz3DP4; Thu, 17 Dec 2020 10:07:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0BHA7fNT011075 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 17 Dec 2020 12:07:44 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BHA7fNT011075 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BHA7fi3011074; Thu, 17 Dec 2020 12:07:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 17 Dec 2020 12:07:41 +0200 From: Konstantin Belousov To: Antoine Brodin Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Subject: Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string Message-ID: References: <202012160902.0BG92A19072702@repo.freebsd.org> 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: 4CxSNq1Myfz3DP4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 10:07:55 -0000 On Thu, Dec 17, 2020 at 10:32:14AM +0100, Antoine Brodin wrote: > On Wed, Dec 16, 2020 at 10:02 AM Konstantin Belousov wrote: > > > > Author: kib > > Date: Wed Dec 16 09:02:09 2020 > > New Revision: 368692 > > URL: https://svnweb.freebsd.org/changeset/base/368692 > > > > Log: > > Implement strerror_l(). > > > > Only for the arches that provide user-mode TLS. > > > > PR: 251651 > > Requested by: yuri > > Discussed with: emaste, jilles, tijl > > Sponsored by: The FreeBSD Foundation > > Differential revision: https://reviews.freebsd.org/D27495 > > MFC after: 2 weeks > > Hi, > > It seems that this change broke some ports. > For instance: > http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p558245_s368709/logs/errors/p11-kit-0.23.22.log p11-kit does strange/stupid thing. It checks for strerror_l() without namespace restriction, but then in common/message.c, before actually using it, it does #define _POSIX_C_SOURCE 200112L Could you please try the following, which might be a right thing to do regardless p11-kit quirk. diff --git a/include/string.h b/include/string.h index 3c5cceaeb85..774cf5fe975 100644 --- a/include/string.h +++ b/include/string.h @@ -140,7 +140,7 @@ int timingsafe_bcmp(const void *, const void *, size_t); int timingsafe_memcmp(const void *, const void *, size_t); #endif /* __BSD_VISIBLE */ -#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_) #include #endif From owner-svn-src-head@freebsd.org Thu Dec 17 12:41: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 381684B70A5; Thu, 17 Dec 2020 12:41:48 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxWpN1561z3MnV; Thu, 17 Dec 2020 12:41:48 +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 184CE18867; Thu, 17 Dec 2020 12:41:48 +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 0BHCflEU008503; Thu, 17 Dec 2020 12:41:47 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHCfl1r008452; Thu, 17 Dec 2020 12:41:47 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202012171241.0BHCfl1r008452@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, 17 Dec 2020 12:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368714 - head/lib/libc/string X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/lib/libc/string X-SVN-Commit-Revision: 368714 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.34 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, 17 Dec 2020 12:41:48 -0000 Author: 0mp (doc,ports committer) Date: Thu Dec 17 12:41:47 2020 New Revision: 368714 URL: https://svnweb.freebsd.org/changeset/base/368714 Log: strerror.3: Add an example for perror() This is a nice and quick reference. Reviewed by: jilles, yuripv MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27623 Modified: head/lib/libc/string/strerror.3 Modified: head/lib/libc/string/strerror.3 ============================================================================== --- head/lib/libc/string/strerror.3 Thu Dec 17 03:42:54 2020 (r368713) +++ head/lib/libc/string/strerror.3 Thu Dec 17 12:41:47 2020 (r368714) @@ -32,7 +32,7 @@ .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd December 7, 2020 +.Dd December 17, 2020 .Dt STRERROR 3 .Os .Sh NAME @@ -170,6 +170,31 @@ The use of these variables is deprecated; or .Fn strerror_r should be used instead. +.Sh EXAMPLES +The following example shows how to use +.Fn perror +to report an error. +.Bd -literal -offset 2n +#include +#include +#include + +int +main(void) +{ + int fd; + + if ((fd = open("/nonexistent", O_RDONLY)) == -1) { + perror("open()"); + exit(1); + } + printf("File descriptor: %d\en", fd); + return (0); +} +.Ed +.Pp +When executed, the program will print an error message along the lines of +.Ql "open(): No such file or directory" . .Sh SEE ALSO .Xr intro 2 , .Xr err 3 , From owner-svn-src-head@freebsd.org Thu Dec 17 12:53: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 B8BEC4B6F71; Thu, 17 Dec 2020 12:53:54 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CxX4L3HC0z3NZ8; Thu, 17 Dec 2020 12:53:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0BHCreMG050865 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 17 Dec 2020 14:53:43 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BHCreMG050865 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BHCrdpu050864; Thu, 17 Dec 2020 14:53:39 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 17 Dec 2020 14:53:38 +0200 From: Konstantin Belousov To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r368714 - head/lib/libc/string Message-ID: References: <202012171241.0BHCfl1r008452@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202012171241.0BHCfl1r008452@repo.freebsd.org> 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: 4CxX4L3HC0z3NZ8 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 12:53:54 -0000 On Thu, Dec 17, 2020 at 12:41:47PM +0000, Mateusz Piotrowski wrote: > Author: 0mp (doc,ports committer) > Date: Thu Dec 17 12:41:47 2020 > New Revision: 368714 > URL: https://svnweb.freebsd.org/changeset/base/368714 > > Log: > strerror.3: Add an example for perror() > > This is a nice and quick reference. > > Reviewed by: jilles, yuripv > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D27623 > > Modified: > head/lib/libc/string/strerror.3 > > Modified: head/lib/libc/string/strerror.3 > ============================================================================== > --- head/lib/libc/string/strerror.3 Thu Dec 17 03:42:54 2020 (r368713) > +++ head/lib/libc/string/strerror.3 Thu Dec 17 12:41:47 2020 (r368714) > @@ -32,7 +32,7 @@ > .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 > .\" $FreeBSD$ > .\" > -.Dd December 7, 2020 > +.Dd December 17, 2020 > .Dt STRERROR 3 > .Os > .Sh NAME > @@ -170,6 +170,31 @@ The use of these variables is deprecated; > or > .Fn strerror_r > should be used instead. > +.Sh EXAMPLES > +The following example shows how to use > +.Fn perror > +to report an error. > +.Bd -literal -offset 2n > +#include > +#include > +#include > + > +int > +main(void) > +{ > + int fd; > + > + if ((fd = open("/nonexistent", O_RDONLY)) == -1) { > + perror("open()"); > + exit(1); > + } > + printf("File descriptor: %d\en", fd); This lines is indented with spaces, while other lines have tabs. > + return (0); return (0) is redundand. > +} > +.Ed > +.Pp > +When executed, the program will print an error message along the lines of > +.Ql "open(): No such file or directory" . > .Sh SEE ALSO > .Xr intro 2 , > .Xr err 3 , From owner-svn-src-head@freebsd.org Thu Dec 17 13:01: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 784B34B7461 for ; Thu, 17 Dec 2020 13:01:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxXDf2rVGz3P39 for ; Thu, 17 Dec 2020 13:01:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f45.google.com with SMTP id y17so26489410wrr.10 for ; Thu, 17 Dec 2020 05:01:06 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6FXZRWp6R4iqRtoSTlPJbSgjUGMnpwJuIxYqbKVuIFE=; b=MU4TfdH92XarAE2UkuiJQoRHp9fx9QBCXozRgTkaDrs4FkesH1a6GvPLuo6KdzsZGV q5Q/PfNka4tFqCtLwldWzI8KalbnF1DX1iuZlFEPWynIM6k1DzDtlgvQYPuDSAbhYCfk 1nB9iEwV4AhdBBlFYEOQ9wVRm1zJsgbVuYAaxH4iXU8ldXHW29wooSm4dVMXhg9P70H5 S+CdZAT9y/KxurOnHmVxgYJjt+TDx3lVSIrAerG2hDWcEGoA3awxLW7U5SybHu0//2Da Cj1V2CmKNCCbjNkgEwzq1ZjdAAeKepj91YWomjiCNr7yLaqknJPDVWgBPSWKHxXwlNjO jWkg== X-Gm-Message-State: AOAM530vku9hdIR5GeOfw/uCFrnLqozYF+/yq4vz/kwYJkMoiFJpk3A2 9H47LNRjg/qFhFCJgNZSslcuQQ== X-Google-Smtp-Source: ABdhPJx53M0QBxybAGMbqsgXfUWCqR8juVmuYOCKg/S0B3dCDLDrFkpogeqY9DetgDLFhYwG3p9d8g== X-Received: by 2002:adf:dc87:: with SMTP id r7mr44217533wrj.305.1608210064682; Thu, 17 Dec 2020 05:01:04 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id o23sm9336774wro.57.2020.12.17.05.01.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Dec 2020 05:01:03 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: svn commit: r368714 - head/lib/libc/string From: Jessica Clarke In-Reply-To: Date: Thu, 17 Dec 2020 13:01:01 +0000 Cc: Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <686CF2E6-1D3C-4A83-A323-02CD9F536675@freebsd.org> References: <202012171241.0BHCfl1r008452@repo.freebsd.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4CxXDf2rVGz3P39 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 13:01:06 -0000 On 17 Dec 2020, at 12:53, Konstantin Belousov = wrote: >=20 > On Thu, Dec 17, 2020 at 12:41:47PM +0000, Mateusz Piotrowski wrote: >> Author: 0mp (doc,ports committer) >> Date: Thu Dec 17 12:41:47 2020 >> New Revision: 368714 >> URL: https://svnweb.freebsd.org/changeset/base/368714 >>=20 >> Log: >> strerror.3: Add an example for perror() >>=20 >> This is a nice and quick reference. >>=20 >> Reviewed by: jilles, yuripv >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D27623 >>=20 >> Modified: >> head/lib/libc/string/strerror.3 >>=20 >> Modified: head/lib/libc/string/strerror.3 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/lib/libc/string/strerror.3 Thu Dec 17 03:42:54 2020 = (r368713) >> +++ head/lib/libc/string/strerror.3 Thu Dec 17 12:41:47 2020 = (r368714) >> @@ -32,7 +32,7 @@ >> .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 >> .\" $FreeBSD$ >> .\" >> -.Dd December 7, 2020 >> +.Dd December 17, 2020 >> .Dt STRERROR 3 >> .Os >> .Sh NAME >> @@ -170,6 +170,31 @@ The use of these variables is deprecated; >> or >> .Fn strerror_r >> should be used instead. >> +.Sh EXAMPLES >> +The following example shows how to use >> +.Fn perror >> +to report an error. >> +.Bd -literal -offset 2n >> +#include >> +#include >> +#include >> + >> +int >> +main(void) >> +{ >> + int fd; >> + >> + if ((fd =3D open("/nonexistent", O_RDONLY)) =3D=3D -1) { >> + perror("open()"); >> + exit(1); >> + } >> + printf("File descriptor: %d\en", fd); > This lines is indented with spaces, while other lines have tabs. >=20 >> + return (0); > return (0) is redundand. It's not required as per the standard, but omitting it is needlessly obfuscating it and bad practice. C lets you do a whole load of things that are a bad idea, and whilst this one is harmless, it is nonetheless confusing to anyone who is not intimately acquainted quirks like this special case in the standard. Jess From owner-svn-src-head@freebsd.org Thu Dec 17 14:20: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 679844B9594; Thu, 17 Dec 2020 14:20:37 +0000 (UTC) (envelope-from nwhitehorn@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxZ0P2KCcz3kKQ; Thu, 17 Dec 2020 14:20:37 +0000 (UTC) (envelope-from nwhitehorn@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 428C619E71; Thu, 17 Dec 2020 14:20:37 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BHEKbKv065247; Thu, 17 Dec 2020 14:20:37 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHEKbPM065246; Thu, 17 Dec 2020 14:20:37 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <202012171420.0BHEKbPM065246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 17 Dec 2020 14:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368718 - head/sys/modules/if_wg X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/modules/if_wg X-SVN-Commit-Revision: 368718 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.34 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, 17 Dec 2020 14:20:37 -0000 Author: nwhitehorn Date: Thu Dec 17 14:20:36 2020 New Revision: 368718 URL: https://svnweb.freebsd.org/changeset/base/368718 Log: Make non-debug kernels installable. Setting DEBUG_FLAGS results in make installkernel trying to install debug information that doesn't exist if the kernel was built without it. Modified: head/sys/modules/if_wg/Makefile Modified: head/sys/modules/if_wg/Makefile ============================================================================== --- head/sys/modules/if_wg/Makefile Thu Dec 17 13:17:26 2020 (r368717) +++ head/sys/modules/if_wg/Makefile Thu Dec 17 14:20:36 2020 (r368718) @@ -15,8 +15,6 @@ CFLAGS+= -I${INCDIR} CFLAGS+= -D__KERNEL__ -DEBUG_FLAGS=-g - SRCS= opt_inet.h opt_inet6.h device_if.h bus_if.h ifdi_if.h SRCS+= if_wg_session.c module.c From owner-svn-src-head@freebsd.org Thu Dec 17 15:00: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 A32D74BA609; Thu, 17 Dec 2020 15:00:19 +0000 (UTC) (envelope-from mhorne@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxZtC4FNxz3mGs; Thu, 17 Dec 2020 15:00:19 +0000 (UTC) (envelope-from mhorne@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 84B491A77E; Thu, 17 Dec 2020 15:00:19 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BHF0JQB090135; Thu, 17 Dec 2020 15:00:19 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHF0Jn2090134; Thu, 17 Dec 2020 15:00:19 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012171500.0BHF0Jn2090134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Thu, 17 Dec 2020 15:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368719 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/partedit X-SVN-Commit-Revision: 368719 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.34 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, 17 Dec 2020 15:00:19 -0000 Author: mhorne Date: Thu Dec 17 15:00:19 2020 New Revision: 368719 URL: https://svnweb.freebsd.org/changeset/base/368719 Log: bsdinstall: remove VTOC8 partition scheme option Now that sparc64 has been removed, there are no kernels built with support for the VTOC8 partitioning scheme by default. Remove the option from the installer, as it is unsupported on all installer images produced by re@. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D27641 Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Thu Dec 17 14:20:36 2020 (r368718) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Thu Dec 17 15:00:19 2020 (r368719) @@ -223,8 +223,6 @@ choose_part_type(const char *def_scheme) "Bootable on most x86 systems and EFI aware ARM64", 0 }, {"MBR", "DOS Partitions", "Bootable on most x86 systems", 0 }, - {"VTOC8", "Sun VTOC8 Partition Table", - "Bootable on Sun SPARC systems", 0 }, }; parttypemenu: @@ -724,11 +722,6 @@ set_default_part_metadata(const char *name, const char else if (mountpoint == NULL || strlen(mountpoint) == 0) mountpoint = default_bootmount; } - - /* VTOC8 needs partcode at the start of partitions */ - if (strcmp(scheme, "VTOC8") == 0 && (strcmp(type, "freebsd-ufs") == 0 - || strcmp(type, "freebsd-zfs") == 0)) - md->bootcode = 1; if (mountpoint == NULL || mountpoint[0] == '\0') { if (md->fstab != NULL) { From owner-svn-src-head@freebsd.org Thu Dec 17 15:02: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 62A724BA5E6; Thu, 17 Dec 2020 15:02:18 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxZwV2Jrjz3mMW; Thu, 17 Dec 2020 15:02:18 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-ej1-f42.google.com with SMTP id 6so23667488ejz.5; Thu, 17 Dec 2020 07:02:18 -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=3A29Ez4cnkuCUvXWh+TSEKm/nSgduU5+/WRJQC3X1Bo=; b=alo+1AC3U33DCkMEQ+xETiGBCXpioy6Fam7BEDwQhrmi+9P8hJaVaJNhKTPL1lqwwP 7MaFYPsDjxYqvFL6h06UguZmAVkcXlxB4xlecTEeIx6Ht2wPA3963KaaS8HyECRah4O7 KeGP2TfrI0vuV0TR4JVCWUmCErpm72kCeIA9ZU/tzGuC06n3cKFk5XUNfr5x57GcdBNR MEJGzn8JXnXlzSd+zOsr4xnGGAf63CYiCtiKzPFaNQWywHSyT7WZoXA7VvcddOsyNXvD audVvW8+Jy9BTgqofbdawynHHLO0Jl1kDiv8B2VFjNN8emITWz+MvyfT8qIuW9PdDXMb PiVg== X-Gm-Message-State: AOAM533vH7bTDHN/+wfxYHxkKCjmlZFd7rIEkClLQBoFn5DuU653uiZL JjJ3sdjLgJJSoJmyxCTgJ277icdwwomow6CAFlQ= X-Google-Smtp-Source: ABdhPJzEAJM+Q7O8zR9LPy4oGvLqSO0tY7+Qe1mKsAJn8xRHOwm9eZ4hPnZOEfYjs5ouz//P8tkO51GvV3Jpa0G6dPY= X-Received: by 2002:a17:906:cecd:: with SMTP id si13mr15552929ejb.441.1608217336635; Thu, 17 Dec 2020 07:02:16 -0800 (PST) MIME-Version: 1.0 References: <202012160902.0BG92A19072702@repo.freebsd.org> In-Reply-To: From: Antoine Brodin Date: Thu, 17 Dec 2020 16:02:05 +0100 Message-ID: Subject: Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4CxZwV2Jrjz3mMW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 15:02:18 -0000 On Thu, Dec 17, 2020 at 11:07 AM Konstantin Belousov wrote: > > On Thu, Dec 17, 2020 at 10:32:14AM +0100, Antoine Brodin wrote: > > On Wed, Dec 16, 2020 at 10:02 AM Konstantin Belousov wrote: > > > > > > Author: kib > > > Date: Wed Dec 16 09:02:09 2020 > > > New Revision: 368692 > > > URL: https://svnweb.freebsd.org/changeset/base/368692 > > > > > > Log: > > > Implement strerror_l(). > > > > > > Only for the arches that provide user-mode TLS. > > > > > > PR: 251651 > > > Requested by: yuri > > > Discussed with: emaste, jilles, tijl > > > Sponsored by: The FreeBSD Foundation > > > Differential revision: https://reviews.freebsd.org/D27495 > > > MFC after: 2 weeks > > > > Hi, > > > > It seems that this change broke some ports. > > For instance: > > http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p558245_s368709/logs/errors/p11-kit-0.23.22.log > > p11-kit does strange/stupid thing. It checks for strerror_l() without > namespace restriction, but then in common/message.c, before actually using it, > it does > #define _POSIX_C_SOURCE 200112L > > Could you please try the following, which might be a right thing to do > regardless p11-kit quirk. Hi, This change fixes p11-kit. Cheers, Antoine > diff --git a/include/string.h b/include/string.h > index 3c5cceaeb85..774cf5fe975 100644 > --- a/include/string.h > +++ b/include/string.h > @@ -140,7 +140,7 @@ int timingsafe_bcmp(const void *, const void *, size_t); > int timingsafe_memcmp(const void *, const void *, size_t); > #endif /* __BSD_VISIBLE */ > > -#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) > +#if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_) > #include > #endif > From owner-svn-src-head@freebsd.org Thu Dec 17 15:53: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 17E914BB376; Thu, 17 Dec 2020 15:53:57 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cxc445cLqz3pgY; Thu, 17 Dec 2020 15:53:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0BHFrjs1093578 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 17 Dec 2020 17:53:48 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BHFrjs1093578 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BHFrjAg093577; Thu, 17 Dec 2020 17:53:45 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 17 Dec 2020 17:53:45 +0200 From: Konstantin Belousov To: Antoine Brodin Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Subject: Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string Message-ID: References: <202012160902.0BG92A19072702@repo.freebsd.org> 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: 4Cxc445cLqz3pgY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 15:53:57 -0000 On Thu, Dec 17, 2020 at 04:02:05PM +0100, Antoine Brodin wrote: > On Thu, Dec 17, 2020 at 11:07 AM Konstantin Belousov > wrote: > > Could you please try the following, which might be a right thing to do > > regardless p11-kit quirk. > > Hi, > > This change fixes p11-kit. Initially you said that there are ports broken by the change, and reply mention only p11-kit as fixed. Are there more broken ports ? From owner-svn-src-head@freebsd.org Thu Dec 17 16: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 42F6A4BC025; Thu, 17 Dec 2020 16:22:25 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cxchw6kjxz3rh6; Thu, 17 Dec 2020 16:22:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0BHGMDZJ000818 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 17 Dec 2020 18:22:16 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BHGMDZJ000818 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BHGMDdI000817; Thu, 17 Dec 2020 18:22:13 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 17 Dec 2020 18:22:13 +0200 From: Konstantin Belousov To: Jessica Clarke Cc: Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r368714 - head/lib/libc/string Message-ID: References: <202012171241.0BHCfl1r008452@repo.freebsd.org> <686CF2E6-1D3C-4A83-A323-02CD9F536675@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <686CF2E6-1D3C-4A83-A323-02CD9F536675@freebsd.org> 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: 4Cxchw6kjxz3rh6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 16:22:25 -0000 On Thu, Dec 17, 2020 at 01:01:01PM +0000, Jessica Clarke wrote: > On 17 Dec 2020, at 12:53, Konstantin Belousov wrote: > > > > On Thu, Dec 17, 2020 at 12:41:47PM +0000, Mateusz Piotrowski wrote: > >> Author: 0mp (doc,ports committer) > >> Date: Thu Dec 17 12:41:47 2020 > >> New Revision: 368714 > >> URL: https://svnweb.freebsd.org/changeset/base/368714 > >> > >> Log: > >> strerror.3: Add an example for perror() > >> > >> This is a nice and quick reference. > >> > >> Reviewed by: jilles, yuripv > >> MFC after: 2 weeks > >> Differential Revision: https://reviews.freebsd.org/D27623 > >> > >> Modified: > >> head/lib/libc/string/strerror.3 > >> > >> Modified: head/lib/libc/string/strerror.3 > >> ============================================================================== > >> --- head/lib/libc/string/strerror.3 Thu Dec 17 03:42:54 2020 (r368713) > >> +++ head/lib/libc/string/strerror.3 Thu Dec 17 12:41:47 2020 (r368714) > >> @@ -32,7 +32,7 @@ > >> .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 > >> .\" $FreeBSD$ > >> .\" > >> -.Dd December 7, 2020 > >> +.Dd December 17, 2020 > >> .Dt STRERROR 3 > >> .Os > >> .Sh NAME > >> @@ -170,6 +170,31 @@ The use of these variables is deprecated; > >> or > >> .Fn strerror_r > >> should be used instead. > >> +.Sh EXAMPLES > >> +The following example shows how to use > >> +.Fn perror > >> +to report an error. > >> +.Bd -literal -offset 2n > >> +#include > >> +#include > >> +#include > >> + > >> +int > >> +main(void) > >> +{ > >> + int fd; > >> + > >> + if ((fd = open("/nonexistent", O_RDONLY)) == -1) { > >> + perror("open()"); > >> + exit(1); > >> + } > >> + printf("File descriptor: %d\en", fd); > > This lines is indented with spaces, while other lines have tabs. > > > >> + return (0); > > return (0) is redundand. > > It's not required as per the standard, but omitting it is needlessly > obfuscating it and bad practice. C lets you do a whole load of things > that are a bad idea, and whilst this one is harmless, it is nonetheless > confusing to anyone who is not intimately acquainted quirks like this > special case in the standard. Why it is bad practice ? C is a small language, and while knowing some quirks (like this one) seems to be optional, others are not. And worse, that other quirks are essential for writing correct code at all. Consequence is that ignoring details indicates insufficient knowledge of the fundamentals and lowers the trust in the provided suggestion. From owner-svn-src-head@freebsd.org Thu Dec 17 16:33: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 C262D4BBFC4 for ; Thu, 17 Dec 2020 16:33:10 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound5a.ore.mailhop.org (outbound5a.ore.mailhop.org [44.233.67.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CxcxL3YDnz3s9f for ; Thu, 17 Dec 2020 16:33:10 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1608222782; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=YM9r4gY3sbh+ZAQb4cQgw/KjRTHk2l4dMZ2LY6EkmgAmVYk84vK4S3+L/iFwYEGHV9tzz1s7jyGxD 3mG9bpkVTUmgia/a53AIZseDTdDJMCZFH6worzwPsu+NO2tbkmqtnepQAXhAH04kK+2mBWmvsIOcSj UrUjeCFMftRzVxpzhkKbbkkAU2+sfYUR9CGPW4PsB0AdubF/8/gCpm9Qj2etpRmTBDSkiZCUXv/yc/ 2rYU5JLnW/G66dMDkjXRSup14cTyrN8gLXrHR+b0RirAr4racBkvT1zAgcFfOoTia1kYSIYxc/yG/y IVr7sbCASFdHCCdEki3uDJWoR5DnLpQ== 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=vq503+VYc8S5q/eKo0WZV+GDM8zM/+LzhShQvaBiBuE=; b=AxqTGfK2ytIh959CVxOfHBNGTRMavBypbB79C3kFrnr+EJ7RSZJEb5PoyEen+8SiqepQ4Uw4E5J26 Hvx/bO6QhoxQhJQPIbB3ddrIt0OGlqzCjk8IV5+YtoGx3K0CoHmZfgTDsd4DesbAXoZMJoWHLdQ2G4 vYvghqYgb5ySIZui9n72eJhqbvLpHErr/Rx+CPon8gRwkwLWw9mCZvoy8tW6RzV7rpP58gf9TRO33T kl+S5MaYNd58kHeTz9X1DXBrZGsouOqpAel8Sjvbuxj+SVceC+R75HWodzQ9wlqMSG7cfnFZDDy8EO 0Tj5lYzA6PsgmxnG6KspE1UVO0l7otQ== 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=vq503+VYc8S5q/eKo0WZV+GDM8zM/+LzhShQvaBiBuE=; b=StjK4Ryg+A8Jh/ULfMRUwBfJ8CGBI90WKiHWrN4U/rxzSHzDsARhnMQrWbQFWqe8679+UDZDuh0JV bBjBysmKWvSXbnlvmTlyYwNsqwZPZb6uhOR6T68BMsagzKkrgnZ+4TZBNrF9JS78iVsZMjAMFQ1pRm oHk84ju1h4GFLOw6tzxlsIWw4z/kJQi7yhQDs8MU1w0S7fppRghZazUJFRVbodoRB6VRLuZaoy7zhn A5zO43oMTI/niUEKuW6JMLcVHQ2ii4nvZL0QRKSFC5h0DNrsNQPPZaBww5Ak+VyH8As7LFmBdMwbYE SZ9iiNiK+b8tYB8Ct0FBNEkWbJlECmw== X-MHO-RoutePath: aGlwcGll X-MHO-User: 7b6ff382-4085-11eb-8b5f-614106969e8d 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 (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 7b6ff382-4085-11eb-8b5f-614106969e8d; Thu, 17 Dec 2020 16:32:45 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 0BHGWeLM058596; Thu, 17 Dec 2020 09:32:40 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <452cbb1060b7134315999c2323ed431714dc03fe.camel@freebsd.org> Subject: Re: svn commit: r368714 - head/lib/libc/string From: Ian Lepore To: Konstantin Belousov , Jessica Clarke Cc: Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 17 Dec 2020 09:32:40 -0700 In-Reply-To: References: <202012171241.0BHCfl1r008452@repo.freebsd.org> <686CF2E6-1D3C-4A83-A323-02CD9F536675@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: 4CxcxL3YDnz3s9f X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 16:33:10 -0000 On Thu, 2020-12-17 at 18:22 +0200, Konstantin Belousov wrote: > On Thu, Dec 17, 2020 at 01:01:01PM +0000, Jessica Clarke wrote: > > On 17 Dec 2020, at 12:53, Konstantin Belousov > > wrote: > > > > > > On Thu, Dec 17, 2020 at 12:41:47PM +0000, Mateusz Piotrowski > > > wrote: > > > > Author: 0mp (doc,ports committer) > > > > Date: Thu Dec 17 12:41:47 2020 > > > > New Revision: 368714 > > > > URL: https://svnweb.freebsd.org/changeset/base/368714 > > > > > > > > Log: > > > > strerror.3: Add an example for perror() > > > > > > > > This is a nice and quick reference. > > > > > > > > Reviewed by: jilles, yuripv > > > > MFC after: 2 weeks > > > > Differential Revision: https://reviews.freebsd.org/D27623 > > > > > > > > Modified: > > > > head/lib/libc/string/strerror.3 > > > > > > > > Modified: head/lib/libc/string/strerror.3 > > > > =============================================================== > > > > =============== > > > > --- head/lib/libc/string/strerror.3 Thu Dec 17 03:42:54 > > > > 2020 (r368713) > > > > +++ head/lib/libc/string/strerror.3 Thu Dec 17 12:41:47 > > > > 2020 (r368714) > > > > @@ -32,7 +32,7 @@ > > > > .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 > > > > .\" $FreeBSD$ > > > > .\" > > > > -.Dd December 7, 2020 > > > > +.Dd December 17, 2020 > > > > .Dt STRERROR 3 > > > > .Os > > > > .Sh NAME > > > > @@ -170,6 +170,31 @@ The use of these variables is deprecated; > > > > or > > > > .Fn strerror_r > > > > should be used instead. > > > > +.Sh EXAMPLES > > > > +The following example shows how to use > > > > +.Fn perror > > > > +to report an error. > > > > +.Bd -literal -offset 2n > > > > +#include > > > > +#include > > > > +#include > > > > + > > > > +int > > > > +main(void) > > > > +{ > > > > + int fd; > > > > + > > > > + if ((fd = open("/nonexistent", O_RDONLY)) == -1) { > > > > + perror("open()"); > > > > + exit(1); > > > > + } > > > > + printf("File descriptor: %d\en", fd); > > > > > > This lines is indented with spaces, while other lines have tabs. > > > > > > > + return (0); > > > > > > return (0) is redundand. > > > > It's not required as per the standard, but omitting it is needlessly > > obfuscating it and bad practice. C lets you do a whole load of things > > that are a bad idea, and whilst this one is harmless, it is nonetheless > > confusing to anyone who is not intimately acquainted quirks like this > > special case in the standard. > > Why it is bad practice ? > > C is a small language, and while knowing some quirks (like this one) > seems to be optional, others are not. And worse, that other quirks are > essential for writing correct code at all. Consequence is that ignoring > details indicates insufficient knowledge of the fundamentals and lowers > the trust in the provided suggestion. I completely disagree. Writing example code where you fail to return a value and just fall out the bottom of some function that declares it returns an int is just Bad Code. Using some obscure quirk of the language as justification for that bad code doesn't help the situation at all. How obscure is this quirk? I've been writing C code since 1983, including having released a freeware compiler (pre-gcc days) and working on a commercial C compiler. I used to moderate the c_language conference on BIX (back when that was a thing). I make my living writing C and C++ code every day. And yet, I had completely forgotten about this quirk. Example code shouldn't be used to establish how much more clever you are than the reader, it should be as easy to understand as possible. -- Ian From owner-svn-src-head@freebsd.org Thu Dec 17 16: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 0377C4BC0FD for ; Thu, 17 Dec 2020 16:35:18 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxczn6RPGz3s8n for ; Thu, 17 Dec 2020 16:35:17 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f50.google.com with SMTP id 91so27214683wrj.7 for ; Thu, 17 Dec 2020 08:35:17 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3v8V9Y8578pQvBzfjczMk65qiNep9/uGTiBqwuCC+t8=; b=s+2zrC0lIIdbCqZHnJkuYCeRhyXQEJdd7t8y1Mqi7nW8O8Z4HNiOmnizhV005tZv5I zg+w6X4jdpkqjWcZf5c/fV1VRFrVGfl8qeOBTORww8FSXg9PVo3gRojJ0ap3tHpnY5I1 t52hDiBEFIjas+hUglrI9FiZryEZaFxWc30DT7yzJoVp9w/2tRgXeG2a0vA+Cd/aYAfW vxZIrOjg6hJxRBlr3weKkcz5Dev+YxxnxYUeSaIQlPejex+3lABohphdA3ixnZJX9KFK cR31hq5SmtSB1ixpdeJRFrL1Jon/hqCHonh0tK4vvD7Drzj6l/IYMirNym6hjB1y3iJ8 KOuw== X-Gm-Message-State: AOAM533bXPao+O3Z6j1UFLvGZK/gn9YyAYtYy0mAEQKgN/wpO45O7ILp 9cSQ/j+Z5nafHgd91/6o2bf00g== X-Google-Smtp-Source: ABdhPJxX1wYTEfbiAFTUZfNP9IYvVreQue6V3LNQTcXhrrSuUT41FRN66ROHF+XPLEwYW1eF9sc8GA== X-Received: by 2002:adf:ec41:: with SMTP id w1mr3850341wrn.12.1608222916370; Thu, 17 Dec 2020 08:35:16 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id h14sm9840668wrx.37.2020.12.17.08.35.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Dec 2020 08:35:15 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: svn commit: r368714 - head/lib/libc/string From: Jessica Clarke In-Reply-To: Date: Thu, 17 Dec 2020 16:35:15 +0000 Cc: Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <871DEE71-F3DD-4E1C-BAAA-12CCF5C2FADE@freebsd.org> References: <202012171241.0BHCfl1r008452@repo.freebsd.org> <686CF2E6-1D3C-4A83-A323-02CD9F536675@freebsd.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4Cxczn6RPGz3s8n X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 16:35:18 -0000 On 17 Dec 2020, at 16:22, Konstantin Belousov = wrote: > On Thu, Dec 17, 2020 at 01:01:01PM +0000, Jessica Clarke wrote: >> On 17 Dec 2020, at 12:53, Konstantin Belousov = wrote: >>>=20 >>> On Thu, Dec 17, 2020 at 12:41:47PM +0000, Mateusz Piotrowski wrote: >>>> Author: 0mp (doc,ports committer) >>>> Date: Thu Dec 17 12:41:47 2020 >>>> New Revision: 368714 >>>> URL: https://svnweb.freebsd.org/changeset/base/368714 >>>>=20 >>>> Log: >>>> strerror.3: Add an example for perror() >>>>=20 >>>> This is a nice and quick reference. >>>>=20 >>>> Reviewed by: jilles, yuripv >>>> MFC after: 2 weeks >>>> Differential Revision: https://reviews.freebsd.org/D27623 >>>>=20 >>>> Modified: >>>> head/lib/libc/string/strerror.3 >>>>=20 >>>> Modified: head/lib/libc/string/strerror.3 >>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/lib/libc/string/strerror.3 Thu Dec 17 03:42:54 2020 = (r368713) >>>> +++ head/lib/libc/string/strerror.3 Thu Dec 17 12:41:47 2020 = (r368714) >>>> @@ -32,7 +32,7 @@ >>>> .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 >>>> .\" $FreeBSD$ >>>> .\" >>>> -.Dd December 7, 2020 >>>> +.Dd December 17, 2020 >>>> .Dt STRERROR 3 >>>> .Os >>>> .Sh NAME >>>> @@ -170,6 +170,31 @@ The use of these variables is deprecated; >>>> or >>>> .Fn strerror_r >>>> should be used instead. >>>> +.Sh EXAMPLES >>>> +The following example shows how to use >>>> +.Fn perror >>>> +to report an error. >>>> +.Bd -literal -offset 2n >>>> +#include >>>> +#include >>>> +#include >>>> + >>>> +int >>>> +main(void) >>>> +{ >>>> + int fd; >>>> + >>>> + if ((fd =3D open("/nonexistent", O_RDONLY)) =3D=3D -1) { >>>> + perror("open()"); >>>> + exit(1); >>>> + } >>>> + printf("File descriptor: %d\en", fd); >>> This lines is indented with spaces, while other lines have tabs. >>>=20 >>>> + return (0); >>> return (0) is redundand. >>=20 >> It's not required as per the standard, but omitting it is needlessly >> obfuscating it and bad practice. C lets you do a whole load of things >> that are a bad idea, and whilst this one is harmless, it is = nonetheless >> confusing to anyone who is not intimately acquainted quirks like this >> special case in the standard. > Why it is bad practice ? >=20 > C is a small language, and while knowing some quirks (like this one) > seems to be optional, others are not. And worse, that other quirks are > essential for writing correct code at all. Consequence is that = ignoring > details indicates insufficient knowledge of the fundamentals and = lowers > the trust in the provided suggestion. Small does not mean simple. You admit that the language has quirks you need to know in order to be able to write correct code, so why should we confound the problem by forcing people to be aware of additional optional quirks? This is just another kind of code golfing that achieves nothing other than confuse some people (how many C courses do you know of that actually teach you that you can omit the final return statement from main?) and possibly mask a bug if you meant to return a non-zero value (generally unlikely as error conditions will be handled early, but maybe you have a final ret value lying around you meant to return), when the alternative is just to add a single extra line to be explicit about what you want. Especially since this is example code, we should be seeking to provide as simple and clear code as is possible, though I would not like to see this kind of code enter the base system either. Jess From owner-svn-src-head@freebsd.org Thu Dec 17 16:40: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 B9D514BC527; Thu, 17 Dec 2020 16:40:21 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxd5d4sMGz3sjx; Thu, 17 Dec 2020 16:40:21 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-ej1-f48.google.com with SMTP id d17so38830556ejy.9; Thu, 17 Dec 2020 08:40:21 -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=LXjUhnTJ/yG5kLQGfWr1l7UUpQEGRxqB3NDK7k85Bjw=; b=OpIf56/BsDam7QS0HXz6Ukii2ckJHpxcgmOaNGMV2hHQN0MCEUlHb4gO3NkzJ/GVQo /+/cefL+udm61krLL4axKcKJiric0yrW7s+szo1UDu3w/lYIK/STS5FyIuvjz+hnvmc0 mtBVxI/I35itYFqeTJczJTfqf60g3eoShKZt/cHhtJ5/jTlTZekE3jC+eld7xT1u0V/t 34QqDimuyy7TFZYqFCxtk005WTJszTKLRWNumThdbCoKsqUwB3KVeuG6qmPAwpgCvwuC EJHoQfl/omI8Yq3d7j+XT0LxcTPa05Hb4ZC+m2i4Wooy3A3FfUuL3zG7Ctk5ikF8T173 kPTw== X-Gm-Message-State: AOAM530NfHFPxVDkSuy527pM+3y6X7zeJSoMY2KFFsoattBErA6G7SzU rhiRybiXm8lGGXEYzQb8W0aOuZfOF4xMiCUK/LY= X-Google-Smtp-Source: ABdhPJzlCZHl865FsE1f6LjuqBM0o7sfVoyXlcArTpDiBoRNqobcR+RyxM162m9dlZjgu980lnZnNmM0w5BOs1DmV7k= X-Received: by 2002:a17:907:60a:: with SMTP id wp10mr36409166ejb.205.1608223220340; Thu, 17 Dec 2020 08:40:20 -0800 (PST) MIME-Version: 1.0 References: <202012160902.0BG92A19072702@repo.freebsd.org> In-Reply-To: From: Antoine Brodin Date: Thu, 17 Dec 2020 17:40:09 +0100 Message-ID: Subject: Re: svn commit: r368692 - in head: include/xlocale lib/libc/include lib/libc/nls lib/libc/string To: Konstantin Belousov Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Cxd5d4sMGz3sjx X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 16:40:21 -0000 On Thu, Dec 17, 2020 at 4:53 PM Konstantin Belousov wrote: > > On Thu, Dec 17, 2020 at 04:02:05PM +0100, Antoine Brodin wrote: > > On Thu, Dec 17, 2020 at 11:07 AM Konstantin Belousov > > wrote: > > > Could you please try the following, which might be a right thing to do > > > regardless p11-kit quirk. > > > > Hi, > > > > This change fixes p11-kit. > Initially you said that there are ports broken by the change, and reply > mention only p11-kit as fixed. Are there more broken ports ? I don't know, it takes 2 or 3 days for bulk -a to complete. Antoine From owner-svn-src-head@freebsd.org Thu Dec 17 16:52: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 BAD1F4BCAAA; Thu, 17 Dec 2020 16:52:40 +0000 (UTC) (envelope-from afedorov@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxdMr4vbxz3tw0; Thu, 17 Dec 2020 16:52:40 +0000 (UTC) (envelope-from afedorov@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 9B83D1C015; Thu, 17 Dec 2020 16:52:40 +0000 (UTC) (envelope-from afedorov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BHGqeWZ066458; Thu, 17 Dec 2020 16:52:40 GMT (envelope-from afedorov@FreeBSD.org) Received: (from afedorov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHGqeor066457; Thu, 17 Dec 2020 16:52:40 GMT (envelope-from afedorov@FreeBSD.org) Message-Id: <202012171652.0BHGqeor066457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: afedorov set sender to afedorov@FreeBSD.org using -f From: Aleksandr Fedorov Date: Thu, 17 Dec 2020 16:52:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368720 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: afedorov X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 368720 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.34 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, 17 Dec 2020 16:52:40 -0000 Author: afedorov Date: Thu Dec 17 16:52:40 2020 New Revision: 368720 URL: https://svnweb.freebsd.org/changeset/base/368720 Log: [bhyve] virtio-net: Do not allow receiving packets until features have been negotiated. Enforce the requirement that the RX callback cannot be called after a reset until the features have been negotiated. This fixes a race condition where the receive callback is called during a device reset. Reviewed by: vmaffione, grehan Approved by: vmaffione (mentor) Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D27381 Modified: head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Thu Dec 17 15:00:19 2020 (r368719) +++ head/usr.sbin/bhyve/pci_virtio_net.c Thu Dec 17 16:52:40 2020 (r368720) @@ -111,6 +111,8 @@ struct pci_vtnet_softc { net_backend_t *vsc_be; + bool features_negotiated; /* protected by rx_mtx */ + int resetting; /* protected by tx_mtx */ uint64_t vsc_features; /* negotiated features */ @@ -176,6 +178,7 @@ pci_vtnet_reset(void *vsc) * Receive operation will be enabled again once the guest adds * the first receive buffers and kicks us. */ + sc->features_negotiated = false; netbe_rx_disable(sc->vsc_be); /* Set sc->resetting and give a chance to the TX thread to stop. */ @@ -246,6 +249,12 @@ pci_vtnet_rx(struct pci_vtnet_softc *sc) struct vqueue_info *vq; vq = &sc->vsc_queues[VTNET_RXQ]; + + /* Features must be negotiated */ + if (!sc->features_negotiated) { + return; + } + for (;;) { struct virtio_net_rxhdr *hdr; uint32_t riov_bytes; @@ -406,8 +415,14 @@ pci_vtnet_ping_rxq(void *vsc, struct vqueue_info *vq) /* * A qnotify means that the rx process can now begin. + * Enable RX only if features are negotiated. */ pthread_mutex_lock(&sc->rx_mtx); + if (!sc->features_negotiated) { + pthread_mutex_unlock(&sc->rx_mtx); + return; + } + vq_kick_disable(vq); netbe_rx_enable(sc->vsc_be); pthread_mutex_unlock(&sc->rx_mtx); @@ -750,6 +765,10 @@ pci_vtnet_neg_features(void *vsc, uint64_t negotiated_ netbe_set_cap(sc->vsc_be, negotiated_features, sc->vhdrlen); sc->be_vhdrlen = netbe_get_vnet_hdr_len(sc->vsc_be); assert(sc->be_vhdrlen == 0 || sc->be_vhdrlen == sc->vhdrlen); + + pthread_mutex_lock(&sc->rx_mtx); + sc->features_negotiated = true; + pthread_mutex_unlock(&sc->rx_mtx); } #ifdef BHYVE_SNAPSHOT From owner-svn-src-head@freebsd.org Thu Dec 17 17:02: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 412C04BC77B; Thu, 17 Dec 2020 17:02:10 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxdZn71yfz3vZx; Thu, 17 Dec 2020 17:02:09 +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 E46861C0E2; Thu, 17 Dec 2020 17:02:09 +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 0BHH29tD071109; Thu, 17 Dec 2020 17:02:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHH29kD071108; Thu, 17 Dec 2020 17:02:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202012171702.0BHH29kD071108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 17 Dec 2020 17:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368721 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 368721 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.34 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, 17 Dec 2020 17:02:10 -0000 Author: imp Date: Thu Dec 17 17:02:09 2020 New Revision: 368721 URL: https://svnweb.freebsd.org/changeset/base/368721 Log: Drop EFI_STAGING_SIZE back down to 64M vmware can't cope with anything larger than 64MB. Drop this back to 64MB everywhere but arm. PR: 251866 MFC After: 1 week Modified: head/stand/efi/loader/copy.c Modified: head/stand/efi/loader/copy.c ============================================================================== --- head/stand/efi/loader/copy.c Thu Dec 17 16:52:40 2020 (r368720) +++ head/stand/efi/loader/copy.c Thu Dec 17 17:02:09 2020 (r368721) @@ -174,9 +174,7 @@ out: #endif /* __i386__ || __amd64__ */ #ifndef EFI_STAGING_SIZE -#if defined(__amd64__) -#define EFI_STAGING_SIZE 100 -#elif defined(__arm__) +#if defined(__arm__) #define EFI_STAGING_SIZE 32 #else #define EFI_STAGING_SIZE 64 From owner-svn-src-head@freebsd.org Thu Dec 17 17:06: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 68DDA4BD2DE; Thu, 17 Dec 2020 17:06:58 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxdhL2MVyz3wB3; Thu, 17 Dec 2020 17:06:58 +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 3E8A51C19D; Thu, 17 Dec 2020 17:06:58 +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 0BHH6w7h073124; Thu, 17 Dec 2020 17:06:58 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHH6wRw073123; Thu, 17 Dec 2020 17:06:58 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202012171706.0BHH6wRw073123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 17 Dec 2020 17:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368722 - head/usr.bin/kyua X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/usr.bin/kyua X-SVN-Commit-Revision: 368722 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.34 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, 17 Dec 2020 17:06:58 -0000 Author: manu Date: Thu Dec 17 17:06:57 2020 New Revision: 368722 URL: https://svnweb.freebsd.org/changeset/base/368722 Log: kyua: Only install examples if requested Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D27638 Modified: head/usr.bin/kyua/Makefile Modified: head/usr.bin/kyua/Makefile ============================================================================== --- head/usr.bin/kyua/Makefile Thu Dec 17 17:02:09 2020 (r368721) +++ head/usr.bin/kyua/Makefile Thu Dec 17 17:06:57 2020 (r368722) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .include "${SRCTOP}/lib/kyua/Makefile.kyua" .PATH: ${KYUA_SRCDIR} @@ -28,7 +30,11 @@ CFLAGS+= -I${KYUA_SRCDIR} # kyua uses auto_ptr CFLAGS+= -Wno-deprecated-declarations -FILESGROUPS= DOCS EXAMPLES MISC STORE +FILESGROUPS= DOCS MISC STORE + +.if ${MK_EXAMPLES} != "no" +FILESGROUPS+= EXAMPLES +.endif # Install a minimal default config that uses the 'tests' user. # The examples config is not appropriate for general use. From owner-svn-src-head@freebsd.org Thu Dec 17 17:08: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 ADE8E4BD417; Thu, 17 Dec 2020 17:08:25 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxdk14Yzcz3wJB; Thu, 17 Dec 2020 17:08:25 +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 8B9A51C19E; Thu, 17 Dec 2020 17:08:25 +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 0BHH8PVN073242; Thu, 17 Dec 2020 17:08:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHH8Pct073241; Thu, 17 Dec 2020 17:08:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012171708.0BHH8Pct073241@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 17 Dec 2020 17:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368723 - head/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/include X-SVN-Commit-Revision: 368723 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.34 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, 17 Dec 2020 17:08:25 -0000 Author: kib Date: Thu Dec 17 17:08:25 2020 New Revision: 368723 URL: https://svnweb.freebsd.org/changeset/base/368723 Log: Change POSIX compliance level for visibility of strerror_l(3). Third-party code tests for strerror_l(3) without specifying _POSIX_SOURCE, and then expects that the function is prototyped with _POSIX_SOURCE set to 200112. Reported and tested by: antoine Sponsored by: The FreeBSD Foundation MFC after: 13 days Modified: head/include/string.h Modified: head/include/string.h ============================================================================== --- head/include/string.h Thu Dec 17 17:06:57 2020 (r368722) +++ head/include/string.h Thu Dec 17 17:08:25 2020 (r368723) @@ -140,7 +140,7 @@ int timingsafe_bcmp(const void *, const void *, size_ int timingsafe_memcmp(const void *, const void *, size_t); #endif /* __BSD_VISIBLE */ -#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_) #include #endif From owner-svn-src-head@freebsd.org Thu Dec 17 17: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 02FF94BD4CF; Thu, 17 Dec 2020 17:09:44 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxdlW6h2Kz4Qrf; Thu, 17 Dec 2020 17:09:43 +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 CDB301C282; Thu, 17 Dec 2020 17:09:43 +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 0BHH9hXZ073349; Thu, 17 Dec 2020 17:09:43 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHH9hff073348; Thu, 17 Dec 2020 17:09:43 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202012171709.0BHH9hff073348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 17 Dec 2020 17:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368724 - head/sys/arm/samsung X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/samsung X-SVN-Commit-Revision: 368724 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.34 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, 17 Dec 2020 17:09:44 -0000 Author: manu Date: Thu Dec 17 17:09:43 2020 New Revision: 368724 URL: https://svnweb.freebsd.org/changeset/base/368724 Log: arm: Remove samsung exnynos port Remove the exynos SoC support, this haven't been updated in a while, isn't present in GENERIC and nobody is motivated to resurect it. Differential Revision: https://reviews.freebsd.org/D24444 Deleted: head/sys/arm/samsung/ From owner-svn-src-head@freebsd.org Thu Dec 17 17:11: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 6A26C4BD4EF; Thu, 17 Dec 2020 17:11:15 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxdnH2dZ8z4RHq; Thu, 17 Dec 2020 17:11:15 +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 4D8C61C212; Thu, 17 Dec 2020 17:11:15 +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 0BHHBFM4076090; Thu, 17 Dec 2020 17:11:15 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHHBEeZ076088; Thu, 17 Dec 2020 17:11:14 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202012171711.0BHHBEeZ076088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 17 Dec 2020 17:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368725 - head/sys/dev/spibus X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/spibus X-SVN-Commit-Revision: 368725 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.34 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, 17 Dec 2020 17:11:15 -0000 Author: manu Date: Thu Dec 17 17:11:14 2020 New Revision: 368725 URL: https://svnweb.freebsd.org/changeset/base/368725 Log: Add IRQ resource to SPIBUS Add capability to SPIBUS to have child device with IRQ. For example many ADC chip have a dedicated pin to signal "data ready" and the host can just wait for a interrupt to go out and read the result. It is the same code as in R282674 and R282702 for IICBUS by Michal Meloun Submitted by: Oskar Holmund Differential Revision: https://reviews.freebsd.org/D27396 Modified: head/sys/dev/spibus/ofw_spibus.c head/sys/dev/spibus/spibus.c head/sys/dev/spibus/spibusvar.h Modified: head/sys/dev/spibus/ofw_spibus.c ============================================================================== --- head/sys/dev/spibus/ofw_spibus.c Thu Dec 17 17:09:43 2020 (r368724) +++ head/sys/dev/spibus/ofw_spibus.c Thu Dec 17 17:11:14 2020 (r368725) @@ -152,6 +152,10 @@ ofw_spibus_attach(device_t dev) continue; } childdev = device_add_child(dev, NULL, -1); + + resource_list_init(&dinfo->opd_dinfo.rl); + ofw_bus_intr_to_rl(childdev, child, + &dinfo->opd_dinfo.rl, NULL); device_set_ivars(childdev, dinfo); } @@ -198,6 +202,15 @@ ofw_spibus_get_devinfo(device_t bus, device_t dev) return (&dinfo->opd_obdinfo); } +static struct resource_list * +ofw_spibus_get_resource_list(device_t bus __unused, device_t child) +{ + struct spibus_ivar *devi; + + devi = SPIBUS_IVAR(child); + return (&devi->rl); +} + static device_method_t ofw_spibus_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ofw_spibus_probe), @@ -206,6 +219,7 @@ static device_method_t ofw_spibus_methods[] = { /* Bus interface */ DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), DEVMETHOD(bus_add_child, ofw_spibus_add_child), + DEVMETHOD(bus_get_resource_list, ofw_spibus_get_resource_list), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, ofw_spibus_get_devinfo), Modified: head/sys/dev/spibus/spibus.c ============================================================================== --- head/sys/dev/spibus/spibus.c Thu Dec 17 17:09:43 2020 (r368724) +++ head/sys/dev/spibus/spibus.c Thu Dec 17 17:11:14 2020 (r368725) @@ -101,6 +101,8 @@ spibus_print_child(device_t dev, device_t child) retval += bus_print_child_header(dev, child); retval += printf(" at cs %d", devi->cs); retval += printf(" mode %d", devi->mode); + retval += resource_list_print_type(&devi->rl, "irq", + SYS_RES_IRQ, "%jd"); retval += bus_print_child_footer(dev, child); return (retval); @@ -202,6 +204,7 @@ spibus_add_child(device_t dev, u_int order, const char device_delete_child(dev, child); return (0); } + resource_list_init(&devi->rl); device_set_ivars(child, devi); return (child); } @@ -210,6 +213,7 @@ static void spibus_hinted_child(device_t bus, const char *dname, int dunit) { device_t child; + int irq; struct spibus_ivar *devi; child = BUS_ADD_CHILD(bus, 0, dname, dunit); @@ -218,8 +222,22 @@ spibus_hinted_child(device_t bus, const char *dname, i resource_int_value(dname, dunit, "clock", &devi->clock); resource_int_value(dname, dunit, "cs", &devi->cs); resource_int_value(dname, dunit, "mode", &devi->mode); + if (resource_int_value(dname, dunit, "irq", &irq) == 0) { + if (bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1) != 0) + device_printf(bus, + "Warning: bus_set_resource() failed\n"); + } } +static struct resource_list * +spibus_get_resource_list(device_t bus __unused, device_t child) +{ + struct spibus_ivar *devi; + + devi = SPIBUS_IVAR(child); + return (&devi->rl); +} + static int spibus_transfer_impl(device_t dev, device_t child, struct spi_command *cmd) { @@ -236,6 +254,17 @@ static device_method_t spibus_methods[] = { DEVMETHOD(device_resume, spibus_resume), /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), + DEVMETHOD(bus_get_resource_list, spibus_get_resource_list), + DEVMETHOD(bus_add_child, spibus_add_child), DEVMETHOD(bus_print_child, spibus_print_child), DEVMETHOD(bus_probe_nomatch, spibus_probe_nomatch), Modified: head/sys/dev/spibus/spibusvar.h ============================================================================== --- head/sys/dev/spibus/spibusvar.h Thu Dec 17 17:09:43 2020 (r368724) +++ head/sys/dev/spibus/spibusvar.h Thu Dec 17 17:11:14 2020 (r368725) @@ -43,6 +43,7 @@ struct spibus_ivar uint32_t cs; uint32_t mode; uint32_t clock; + struct resource_list rl; }; #define SPIBUS_CS_HIGH (1U << 31) From owner-svn-src-head@freebsd.org Thu Dec 17 18:15:07 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 ED3A64BE6D3; Thu, 17 Dec 2020 18:15:07 +0000 (UTC) (envelope-from afedorov@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxgBz6F68z4VxN; Thu, 17 Dec 2020 18:15:07 +0000 (UTC) (envelope-from afedorov@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 C91361CC54; Thu, 17 Dec 2020 18:15:07 +0000 (UTC) (envelope-from afedorov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BHIF76n017246; Thu, 17 Dec 2020 18:15:07 GMT (envelope-from afedorov@FreeBSD.org) Received: (from afedorov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHIF7x1017245; Thu, 17 Dec 2020 18:15:07 GMT (envelope-from afedorov@FreeBSD.org) Message-Id: <202012171815.0BHIF7x1017245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: afedorov set sender to afedorov@FreeBSD.org using -f From: Aleksandr Fedorov Date: Thu, 17 Dec 2020 18:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368727 - head/sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: afedorov X-SVN-Commit-Paths: head/sys/netgraph X-SVN-Commit-Revision: 368727 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.34 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, 17 Dec 2020 18:15:08 -0000 Author: afedorov Date: Thu Dec 17 18:15:07 2020 New Revision: 368727 URL: https://svnweb.freebsd.org/changeset/base/368727 Log: [ng_socket] Don't take the SOCKBUF_LOCK() twice in the RX data path. This is just a minor optimization, but it's sensitive. This gives an improvement of 30-50 kpps. Reviewed by: kp, markj, glebius, lutz_donnerhacke.de Approved by: vmaffione (mentor) Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D27382 Modified: head/sys/netgraph/ng_socket.c Modified: head/sys/netgraph/ng_socket.c ============================================================================== --- head/sys/netgraph/ng_socket.c Thu Dec 17 17:21:12 2020 (r368726) +++ head/sys/netgraph/ng_socket.c Thu Dec 17 18:15:07 2020 (r368727) @@ -987,6 +987,8 @@ ngs_rcvmsg(node_p node, item_p item, hook_p lasthook) m_freem(m); return (ENOBUFS); } + + /* sorwakeup_locked () releases the lock internally. */ sorwakeup_locked(so); return (error); @@ -1025,12 +1027,17 @@ ngs_rcvdata(hook_p hook, item_p item) addr->sg_data[addrlen] = '\0'; /* Try to tell the socket which hook it came in on. */ - if (sbappendaddr(&so->so_rcv, (struct sockaddr *)addr, m, NULL) == 0) { + SOCKBUF_LOCK(&so->so_rcv); + if (sbappendaddr_locked(&so->so_rcv, (struct sockaddr *)addr, m, + NULL) == 0) { + SOCKBUF_UNLOCK(&so->so_rcv); m_freem(m); TRAP_ERROR; return (ENOBUFS); } - sorwakeup(so); + + /* sorwakeup_locked () releases the lock internally. */ + sorwakeup_locked(so); return (0); } From owner-svn-src-head@freebsd.org Thu Dec 17 18:24: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 F1DED4BF70F; Thu, 17 Dec 2020 18:24:37 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxgPx6VdRz4Wyy; Thu, 17 Dec 2020 18:24:37 +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 D21751D06C; Thu, 17 Dec 2020 18:24:37 +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 0BHIObef023500; Thu, 17 Dec 2020 18:24:37 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHIOboB023497; Thu, 17 Dec 2020 18:24:37 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012171824.0BHIOboB023497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 17 Dec 2020 18:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368728 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 368728 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.34 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, 17 Dec 2020 18:24:38 -0000 Author: kevans Date: Thu Dec 17 18:24:36 2020 New Revision: 368728 URL: https://svnweb.freebsd.org/changeset/base/368728 Log: lualoader: cli: provide a show-module-options loader command This effectively dumps everything lualoader knows about to the console using the libsa pager; that particular lua interface was added in r368591. A pager stub implementation has been added that just dumps the output as-is as a compat shim for older loader binaries that do not have lpager. This stub should be moved into a more appropriate .lua file if we add anything else that needs the pager. Modified: head/stand/lua/cli.lua head/stand/lua/cli.lua.8 head/stand/lua/config.lua head/stand/lua/config.lua.8 Modified: head/stand/lua/cli.lua ============================================================================== --- head/stand/lua/cli.lua Thu Dec 17 18:15:07 2020 (r368727) +++ head/stand/lua/cli.lua Thu Dec 17 18:24:36 2020 (r368728) @@ -32,6 +32,18 @@ local core = require("core") local cli = {} +if not pager then + -- shim for the pager module that just doesn't do it. + -- XXX Remove after 12.2 goes EoL. + pager = { + open = function() end, + close = function() end, + output = function(str) + printc(str) + end, + } +end + -- Internal function -- Parses arguments to boot and returns two values: kernel_name, argstr -- Defaults to nil and "" respectively. @@ -171,6 +183,61 @@ cli["toggle-module"] = function(...) local module = argv[1] setModule(module, not config.isModuleEnabled(module)) +end + +cli["show-module-options"] = function() + local module_info = config.getModuleInfo() + local modules = module_info['modules'] + local blacklist = module_info['blacklist'] + local lines = {} + + for module, info in pairs(modules) do + if #lines > 0 then + lines[#lines + 1] = "" + end + + lines[#lines + 1] = "Name: " .. module + if info.name then + lines[#lines + 1] = "Path: " .. info.name + end + + if info.type then + lines[#lines + 1] = "Type: " .. info.type + end + + if info.flags then + lines[#lines + 1] = "Flags: " .. info.flags + end + + if info.before then + lines[#lines + 1] = "Before load: " .. info.before + end + + if info.after then + lines[#lines + 1] = "After load: " .. info.after + end + + if info.error then + lines[#lines + 1] = "Error: " .. info.error + end + + local status + if blacklist[module] and not info.force then + status = "Blacklisted" + elseif info.load == "YES" then + status = "Load" + else + status = "Don't load" + end + + lines[#lines + 1] = "Status: " .. status + end + + pager.open() + for i, v in ipairs(lines) do + pager.output(v .. "\n") + end + pager.close() end -- Used for splitting cli varargs into cmd_name and the rest of argv Modified: head/stand/lua/cli.lua.8 ============================================================================== --- head/stand/lua/cli.lua.8 Thu Dec 17 18:15:07 2020 (r368727) +++ head/stand/lua/cli.lua.8 Thu Dec 17 18:24:36 2020 (r368728) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2020 +.Dd December 17, 2020 .Dt CLI.LUA 8 .Os .Sh NAME @@ -96,6 +96,8 @@ module provides the following default commands: .Ic disable-module .It .Ic toggle-module +.It +.Ic show-module-options .El .Pp For @@ -125,6 +127,10 @@ commands manipulate the list of modules to be loaded a Modules blacklisted are considered disabled by .Ic toggle-module . These commands will override any such restriction as needed. +The +.Ic show-module-options +command will dump the list of modules that loader has been made aware of and +any applicable options using paged output. .Ss Exported Functions The following functions are exported from .Nm : Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Thu Dec 17 18:15:07 2020 (r368727) +++ head/stand/lua/config.lua Thu Dec 17 18:24:36 2020 (r368728) @@ -721,6 +721,13 @@ function config.isModuleEnabled(modname) return not blacklist[modname] end +function config.getModuleInfo() + return { + modules = modules, + blacklist = getBlacklist() + } +end + hook.registerType("config.loaded") hook.registerType("config.reloaded") hook.registerType("kernel.loaded") Modified: head/stand/lua/config.lua.8 ============================================================================== --- head/stand/lua/config.lua.8 Thu Dec 17 18:15:07 2020 (r368727) +++ head/stand/lua/config.lua.8 Thu Dec 17 18:24:36 2020 (r368728) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2020 +.Dd December 17, 2020 .Dt CONFIG.LUA 8 .Os .Sh NAME @@ -203,6 +203,15 @@ will be loaded during .Fn config.loadelf . It checks both that the module is marked for loading and that it is either forced or not blacklisted. +.It Fn config.getModuleInfo +Returns a table with +.Dq modules +and +.Dq blacklist +tables describing the modules that the config module has been made aware of via +.Xr loader.conf 5 +as well as a representation of +.Ar module_blacklist . .El .Ss Defined Hooks The following hooks are defined in From owner-svn-src-head@freebsd.org Thu Dec 17 18:29: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 D93BE4BF5A1; Thu, 17 Dec 2020 18:29:30 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxgWZ5mWQz4X12; Thu, 17 Dec 2020 18:29:30 +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 B370C1D3CC; Thu, 17 Dec 2020 18:29:30 +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 0BHITUb6023767; Thu, 17 Dec 2020 18:29:30 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHITU4f023765; Thu, 17 Dec 2020 18:29:30 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012171829.0BHITU4f023765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 17 Dec 2020 18:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368729 - in head: stand/lua tools/boot X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: stand/lua tools/boot X-SVN-Commit-Revision: 368729 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.34 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, 17 Dec 2020 18:29:30 -0000 Author: kevans Date: Thu Dec 17 18:29:30 2020 New Revision: 368729 URL: https://svnweb.freebsd.org/changeset/base/368729 Log: lualoader: fix lua-lint run luacheck rightfully complains that i is unused in the show-module-options loop at the end (it was used for some debugging in the process). We've added a new pager module that's compiled in, so declare that as an acceptable global. Modified: head/stand/lua/cli.lua head/tools/boot/lua-lint.sh Modified: head/stand/lua/cli.lua ============================================================================== --- head/stand/lua/cli.lua Thu Dec 17 18:24:36 2020 (r368728) +++ head/stand/lua/cli.lua Thu Dec 17 18:29:30 2020 (r368729) @@ -234,7 +234,7 @@ cli["show-module-options"] = function() end pager.open() - for i, v in ipairs(lines) do + for _, v in ipairs(lines) do pager.output(v .. "\n") end pager.close() Modified: head/tools/boot/lua-lint.sh ============================================================================== --- head/tools/boot/lua-lint.sh Thu Dec 17 18:24:36 2020 (r368728) +++ head/tools/boot/lua-lint.sh Thu Dec 17 18:29:30 2020 (r368729) @@ -17,4 +17,5 @@ LUACHECK=$(which luacheck) cd $(make -V SRCTOP)/stand ${LUACHECK} . --globals loader --globals lfs --globals io.getchar \ --globals io.ischar --globals printc --globals cli_execute \ - --globals cli_execute_unparsed --globals try_include --std lua53 + --globals cli_execute_unparsed --globals try_include \ + --globals pager --std lua53 From owner-svn-src-head@freebsd.org Thu Dec 17 18:51: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 D48514BFF67; Thu, 17 Dec 2020 18:51:09 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxh0Y5kbfz4ZPb; Thu, 17 Dec 2020 18:51:09 +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 B7AA61D4E2; Thu, 17 Dec 2020 18:51:09 +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 0BHIp9RK037918; Thu, 17 Dec 2020 18:51:09 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHIp9Nb037917; Thu, 17 Dec 2020 18:51:09 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012171851.0BHIp9Nb037917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 17 Dec 2020 18:51:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368730 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368730 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.34 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, 17 Dec 2020 18:51:09 -0000 Author: mjg Date: Thu Dec 17 18:51:09 2020 New Revision: 368730 URL: https://svnweb.freebsd.org/changeset/base/368730 Log: fd: refactor closefp in preparation for close_range rework Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Dec 17 18:29:30 2020 (r368729) +++ head/sys/kern/kern_descrip.c Thu Dec 17 18:51:09 2020 (r368730) @@ -107,7 +107,7 @@ __read_mostly uma_zone_t pwd_zone; VFS_SMR_DECLARE; static int closefp(struct filedesc *fdp, int fd, struct file *fp, - struct thread *td, int holdleaders); + struct thread *td, bool holdleaders); static int fd_first_free(struct filedesc *fdp, int low, int size); static void fdgrowtable(struct filedesc *fdp, int nfd); static void fdgrowtable_exp(struct filedesc *fdp, int nfd); @@ -998,7 +998,7 @@ kern_dup(struct thread *td, u_int mode, int flags, int error = 0; if (delfp != NULL) { - (void) closefp(fdp, new, delfp, td, 1); + (void) closefp(fdp, new, delfp, td, true); FILEDESC_UNLOCK_ASSERT(fdp); } else { unlock: @@ -1239,29 +1239,13 @@ fgetown(struct sigio **sigiop) return (pgid); } -/* - * Function drops the filedesc lock on return. - */ static int -closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, - int holdleaders) +closefp_impl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td) { int error; FILEDESC_XLOCK_ASSERT(fdp); - if (holdleaders) { - if (td->td_proc->p_fdtol != NULL) { - /* - * Ask fdfree() to sleep to ensure that all relevant - * process leaders can be traversed in closef(). - */ - fdp->fd_holdleaderscount++; - } else { - holdleaders = 0; - } - } - /* * We now hold the fp reference that used to be owned by the * descriptor array. We have to unlock the FILEDESC *AFTER* @@ -1288,7 +1272,31 @@ closefp(struct filedesc *fdp, int fd, struct file *fp, if (error == ERESTART) error = EINTR; + return (error); +} + +static int +closefp_hl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, + bool holdleaders) +{ + int error; + + FILEDESC_XLOCK_ASSERT(fdp); + if (holdleaders) { + if (td->td_proc->p_fdtol != NULL) { + /* + * Ask fdfree() to sleep to ensure that all relevant + * process leaders can be traversed in closef(). + */ + fdp->fd_holdleaderscount++; + } else { + holdleaders = false; + } + } + + error = closefp_impl(fdp, fd, fp, td); + if (holdleaders) { FILEDESC_XLOCK(fdp); fdp->fd_holdleaderscount--; if (fdp->fd_holdleaderscount == 0 && @@ -1301,6 +1309,20 @@ closefp(struct filedesc *fdp, int fd, struct file *fp, return (error); } +static int +closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, + bool holdleaders) +{ + + FILEDESC_XLOCK_ASSERT(fdp); + + if (__predict_false(td->td_proc->p_fdtol != NULL)) { + return (closefp_hl(fdp, fd, fp, td, holdleaders)); + } else { + return (closefp_impl(fdp, fd, fp, td)); + } +} + /* * Close a file descriptor. */ @@ -1335,7 +1357,7 @@ kern_close(struct thread *td, int fd) fdfree(fdp, fd); /* closefp() drops the FILEDESC lock for us. */ - return (closefp(fdp, fd, fp, td, 1)); + return (closefp(fdp, fd, fp, td, true)); } int @@ -2649,7 +2671,7 @@ fdcloseexec(struct thread *td) (fde->fde_flags & UF_EXCLOSE))) { FILEDESC_XLOCK(fdp); fdfree(fdp, i); - (void) closefp(fdp, i, fp, td, 0); + (void) closefp(fdp, i, fp, td, false); FILEDESC_UNLOCK_ASSERT(fdp); } } From owner-svn-src-head@freebsd.org Thu Dec 17 18:52: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 E9D4E4C041B; Thu, 17 Dec 2020 18:52:05 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxh1d6LT6z4Zq7; Thu, 17 Dec 2020 18:52:05 +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 CBC551D769; Thu, 17 Dec 2020 18:52:05 +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 0BHIq5xt040544; Thu, 17 Dec 2020 18:52:05 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHIq5RU040541; Thu, 17 Dec 2020 18:52:05 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012171852.0BHIq5RU040541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 17 Dec 2020 18:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368731 - in head/sys: kern security/audit X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern security/audit X-SVN-Commit-Revision: 368731 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.34 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, 17 Dec 2020 18:52:06 -0000 Author: mjg Date: Thu Dec 17 18:52:04 2020 New Revision: 368731 URL: https://svnweb.freebsd.org/changeset/base/368731 Log: audit: rework AUDIT_SYSCLOSE This in particular avoids spurious lookups on close. Modified: head/sys/kern/kern_descrip.c head/sys/security/audit/audit.h head/sys/security/audit/audit_arg.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Dec 17 18:51:09 2020 (r368730) +++ head/sys/kern/kern_descrip.c Thu Dec 17 18:52:04 2020 (r368731) @@ -107,7 +107,7 @@ __read_mostly uma_zone_t pwd_zone; VFS_SMR_DECLARE; static int closefp(struct filedesc *fdp, int fd, struct file *fp, - struct thread *td, bool holdleaders); + struct thread *td, bool holdleaders, bool audit); static int fd_first_free(struct filedesc *fdp, int low, int size); static void fdgrowtable(struct filedesc *fdp, int nfd); static void fdgrowtable_exp(struct filedesc *fdp, int nfd); @@ -998,7 +998,7 @@ kern_dup(struct thread *td, u_int mode, int flags, int error = 0; if (delfp != NULL) { - (void) closefp(fdp, new, delfp, td, true); + (void) closefp(fdp, new, delfp, td, true, false); FILEDESC_UNLOCK_ASSERT(fdp); } else { unlock: @@ -1240,7 +1240,8 @@ fgetown(struct sigio **sigiop) } static int -closefp_impl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td) +closefp_impl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, + bool audit) { int error; @@ -1262,6 +1263,10 @@ closefp_impl(struct filedesc *fdp, int fd, struct file mq_fdclose(td, fd, fp); FILEDESC_XUNLOCK(fdp); +#ifdef AUDIT + if (AUDITING_TD(td) && audit) + audit_sysclose(td, fd, fp); +#endif error = closef(fp, td); /* @@ -1277,7 +1282,7 @@ closefp_impl(struct filedesc *fdp, int fd, struct file static int closefp_hl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, - bool holdleaders) + bool holdleaders, bool audit) { int error; @@ -1295,7 +1300,7 @@ closefp_hl(struct filedesc *fdp, int fd, struct file * } } - error = closefp_impl(fdp, fd, fp, td); + error = closefp_impl(fdp, fd, fp, td, audit); if (holdleaders) { FILEDESC_XLOCK(fdp); fdp->fd_holdleaderscount--; @@ -1311,15 +1316,15 @@ closefp_hl(struct filedesc *fdp, int fd, struct file * static int closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, - bool holdleaders) + bool holdleaders, bool audit) { FILEDESC_XLOCK_ASSERT(fdp); if (__predict_false(td->td_proc->p_fdtol != NULL)) { - return (closefp_hl(fdp, fd, fp, td, holdleaders)); + return (closefp_hl(fdp, fd, fp, td, holdleaders, audit)); } else { - return (closefp_impl(fdp, fd, fp, td)); + return (closefp_impl(fdp, fd, fp, td, audit)); } } @@ -1347,8 +1352,6 @@ kern_close(struct thread *td, int fd) fdp = td->td_proc->p_fd; - AUDIT_SYSCLOSE(td, fd); - FILEDESC_XLOCK(fdp); if ((fp = fget_locked(fdp, fd)) == NULL) { FILEDESC_XUNLOCK(fdp); @@ -1357,7 +1360,7 @@ kern_close(struct thread *td, int fd) fdfree(fdp, fd); /* closefp() drops the FILEDESC lock for us. */ - return (closefp(fdp, fd, fp, td, true)); + return (closefp(fdp, fd, fp, td, true, true)); } int @@ -2671,7 +2674,7 @@ fdcloseexec(struct thread *td) (fde->fde_flags & UF_EXCLOSE))) { FILEDESC_XLOCK(fdp); fdfree(fdp, i); - (void) closefp(fdp, i, fp, td, false); + (void) closefp(fdp, i, fp, td, false, false); FILEDESC_UNLOCK_ASSERT(fdp); } } Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Thu Dec 17 18:51:09 2020 (r368730) +++ head/sys/security/audit/audit.h Thu Dec 17 18:52:04 2020 (r368731) @@ -140,7 +140,7 @@ void audit_arg_argv(char *argv, int argc, int length) void audit_arg_envv(char *envv, int envc, int length); void audit_arg_rights(cap_rights_t *rightsp); void audit_arg_fcntl_rights(uint32_t fcntlrights); -void audit_sysclose(struct thread *td, int fd); +void audit_sysclose(struct thread *td, int fd, struct file *fp); void audit_cred_copy(struct ucred *src, struct ucred *dest); void audit_cred_destroy(struct ucred *cred); void audit_cred_init(struct ucred *cred); Modified: head/sys/security/audit/audit_arg.c ============================================================================== --- head/sys/security/audit/audit_arg.c Thu Dec 17 18:51:09 2020 (r368730) +++ head/sys/security/audit/audit_arg.c Thu Dec 17 18:52:04 2020 (r368731) @@ -995,12 +995,10 @@ audit_arg_fcntl_rights(uint32_t fcntlrights) * call itself. */ void -audit_sysclose(struct thread *td, int fd) +audit_sysclose(struct thread *td, int fd, struct file *fp) { - cap_rights_t rights; struct kaudit_record *ar; struct vnode *vp; - struct file *fp; KASSERT(td != NULL, ("audit_sysclose: td == NULL")); @@ -1010,12 +1008,10 @@ audit_sysclose(struct thread *td, int fd) audit_arg_fd(fd); - if (getvnode(td, fd, cap_rights_init(&rights), &fp) != 0) - return; - vp = fp->f_vnode; + if (vp == NULL) + return; vn_lock(vp, LK_SHARED | LK_RETRY); audit_arg_vnode1(vp); VOP_UNLOCK(vp); - fdrop(fp, td); } From owner-svn-src-head@freebsd.org Thu Dec 17 18:52: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 D4DFC4C03BC; Thu, 17 Dec 2020 18:52:30 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxh265hDXz4b2j; Thu, 17 Dec 2020 18:52:30 +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 B668B1DA83; Thu, 17 Dec 2020 18:52:30 +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 0BHIqU45042268; Thu, 17 Dec 2020 18:52:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHIqUBA042267; Thu, 17 Dec 2020 18:52:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202012171852.0BHIqUBA042267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 17 Dec 2020 18:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368732 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368732 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.34 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, 17 Dec 2020 18:52:30 -0000 Author: mjg Date: Thu Dec 17 18:52:30 2020 New Revision: 368732 URL: https://svnweb.freebsd.org/changeset/base/368732 Log: fd: reimplement close_range to avoid spurious relocking Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Dec 17 18:52:04 2020 (r368731) +++ head/sys/kern/kern_descrip.c Thu Dec 17 18:52:30 2020 (r368732) @@ -307,6 +307,7 @@ fdfree(struct filedesc *fdp, int fd) { struct filedescent *fde; + FILEDESC_XLOCK_ASSERT(fdp); fde = &fdp->fd_ofiles[fd]; #ifdef CAPABILITIES seqc_write_begin(&fde->fde_seqc); @@ -1367,12 +1368,10 @@ int kern_close_range(struct thread *td, u_int lowfd, u_int highfd) { struct filedesc *fdp; - int fd, ret, lastfile; + const struct fdescenttbl *fdt; + struct file *fp; + int fd; - ret = 0; - fdp = td->td_proc->p_fd; - FILEDESC_SLOCK(fdp); - /* * Check this prior to clamping; closefrom(3) with only fd 0, 1, and 2 * open should not be a usage error. From a close_range() perspective, @@ -1380,30 +1379,36 @@ kern_close_range(struct thread *td, u_int lowfd, u_int * be a usage error as all fd above 3 are in-fact already closed. */ if (highfd < lowfd) { - ret = EINVAL; - goto out; + return (EINVAL); } - /* - * If lastfile == -1, we're dealing with either a fresh file - * table or one in which every fd has been closed. Just return - * successful; there's nothing left to do. - */ - lastfile = fdlastfile(fdp); - if (lastfile == -1) - goto out; - /* Clamped to [lowfd, lastfile] */ - highfd = MIN(highfd, lastfile); - for (fd = lowfd; fd <= highfd; fd++) { - if (fdp->fd_ofiles[fd].fde_file != NULL) { - FILEDESC_SUNLOCK(fdp); - (void)kern_close(td, fd); - FILEDESC_SLOCK(fdp); + fdp = td->td_proc->p_fd; + FILEDESC_XLOCK(fdp); + fdt = atomic_load_ptr(&fdp->fd_files); + highfd = MIN(highfd, fdt->fdt_nfiles - 1); + fd = lowfd; + if (__predict_false(fd > highfd)) { + goto out_locked; + } + for (;;) { + fp = fdt->fdt_ofiles[fd].fde_file; + if (fp == NULL) { + if (fd == highfd) + goto out_locked; + } else { + fdfree(fdp, fd); + (void) closefp(fdp, fd, fp, td, true, true); + if (fd == highfd) + goto out_unlocked; + FILEDESC_XLOCK(fdp); + fdt = atomic_load_ptr(&fdp->fd_files); } + fd++; } -out: - FILEDESC_SUNLOCK(fdp); - return (ret); +out_locked: + FILEDESC_XUNLOCK(fdp); +out_unlocked: + return (0); } #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-head@freebsd.org Thu Dec 17 19:47: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 D4CC14C1BBE; Thu, 17 Dec 2020 19:47:29 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (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 4CxjFY5YvFz4fLr; Thu, 17 Dec 2020 19:47:29 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.1.2] (pool-74-110-137-7.rcmdva.fios.verizon.net [74.110.137.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 98E122700191; Thu, 17 Dec 2020 14:47:26 -0500 (EST) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 98E122700191 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1608234446; bh=mUXW+DisqSfennp2FFQyZYy27AyWrJ4h72pKTB4VY9w=; h=Subject:To:From:Date:From; b=kh4oRUEKOoyqJdAFcDebD0CoImL4BOtoQ8BKRXgcBxLGW/owHtQF+qtugVM6Gp/oa /h3nXJobu7Ic9BXlJMidvcvm6VKBWUgtkB9JX7e3Ptl6m0SI/q9maIfwB1UXegHUWq uInPx8pWbR9EE8vaq13+nTS3q6+FxtAIrj5CJgD8VT0qMWzcgHUe01EXMi+LWjYiy/ gcXq4xbIMNiMcvddUCj6EyD/+fxoAEE3/my5CTGLDx+qkoc8MmS+R34KZs8yKPF7/0 Inhok5R8muuSbN+gMl5++6DruzrL/3cg3S6qceuyyIeULn8YaxTXf/WFwMQVtE8023 EQYFRHWvVkRPg== Subject: Re: svn commit: r368721 - head/stand/efi/loader To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012171702.0BHH29kD071108@repo.freebsd.org> From: Andrew Gallatin Message-ID: <58a91a8e-70e9-19a2-5164-55bd126e59d1@cs.duke.edu> Date: Thu, 17 Dec 2020 14:47:26 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <202012171702.0BHH29kD071108@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CxjFY5YvFz4fLr X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 19:47:29 -0000 On 12/17/20 12:02 PM, Warner Losh wrote: > Author: imp > Date: Thu Dec 17 17:02:09 2020 > New Revision: 368721 > URL: https://urldefense.com/v3/__https://svnweb.freebsd.org/changeset/base/368721__;!!OToaGQ!5c1mLnhtRtEV6Cv_MTWpzXWaGZEYYDp4TJ6wVDzjVZiehAItts7ZWC15uNnQYRa5Fg$ > > Log: > Drop EFI_STAGING_SIZE back down to 64M > > vmware can't cope with anything larger than 64MB. Drop this back to > 64MB everywhere but arm. There were all kinds of booting problems before this was bumped up. In fact, I still have EFI_STAGING_SIZE=128 in src.conf because I needed it be be able to boot when using Nvidia graphics. By reducing this, I feel like we're just playing whack-a-mole. Drew From owner-svn-src-head@freebsd.org Thu Dec 17 19:49: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 730714C18FB; Thu, 17 Dec 2020 19:49:37 +0000 (UTC) (envelope-from kevans@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxjJ12rSwz4frd; Thu, 17 Dec 2020 19:49:37 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (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: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4B39526AE0; Thu, 17 Dec 2020 19:49:37 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f172.google.com with SMTP id 186so27583934qkj.3; Thu, 17 Dec 2020 11:49:37 -0800 (PST) X-Gm-Message-State: AOAM531TM37j2HLV7P2aQ124WcuK27UjjkPb1JofIhxJNZVTUtkBdZLe yhoTFYp5SlxvNflnLcmqZSUn/9Ny6SXDWiF3DnQ= X-Google-Smtp-Source: ABdhPJz3sAuJTmwtr8tSSHP04Gaq1cjqPWmqQy9Ds1GQHYdhQ81ZPpZG7lFJefGOGkJ5EzXMHt/nhnPo2HjwqRaWbWc= X-Received: by 2002:a37:346:: with SMTP id 67mr973994qkd.430.1608234576747; Thu, 17 Dec 2020 11:49:36 -0800 (PST) MIME-Version: 1.0 References: <202012171702.0BHH29kD071108@repo.freebsd.org> <58a91a8e-70e9-19a2-5164-55bd126e59d1@cs.duke.edu> In-Reply-To: <58a91a8e-70e9-19a2-5164-55bd126e59d1@cs.duke.edu> From: Kyle Evans Date: Thu, 17 Dec 2020 13:49:23 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368721 - head/stand/efi/loader To: Andrew Gallatin Cc: Warner Losh , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 19:49:37 -0000 On Thu, Dec 17, 2020 at 1:47 PM Andrew Gallatin wrote: > > On 12/17/20 12:02 PM, Warner Losh wrote: > > Author: imp > > Date: Thu Dec 17 17:02:09 2020 > > New Revision: 368721 > > URL: https://urldefense.com/v3/__https://svnweb.freebsd.org/changeset/base/368721__;!!OToaGQ!5c1mLnhtRtEV6Cv_MTWpzXWaGZEYYDp4TJ6wVDzjVZiehAItts7ZWC15uNnQYRa5Fg$ > > > > Log: > > Drop EFI_STAGING_SIZE back down to 64M > > > > vmware can't cope with anything larger than 64MB. Drop this back to > > 64MB everywhere but arm. > > There were all kinds of booting problems before this was bumped up. > In fact, I still have EFI_STAGING_SIZE=128 in src.conf because I needed > it be be able to boot when using Nvidia graphics. By reducing this, I > feel like we're just playing whack-a-mole. > IIRC those have long since become OBE as we'll now grow the staging area to accommodate nvidia. From owner-svn-src-head@freebsd.org Thu Dec 17 19:50: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 DD12C4C1CFF; Thu, 17 Dec 2020 19:50:41 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxjKF5vskz4fnJ; Thu, 17 Dec 2020 19:50:41 +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 BDCD31E3EA; Thu, 17 Dec 2020 19:50:41 +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 0BHJof6N073917; Thu, 17 Dec 2020 19:50:41 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHJofr3073916; Thu, 17 Dec 2020 19:50:41 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202012171950.0BHJofr3073916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 17 Dec 2020 19:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368734 - head/usr.sbin/unbound X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/usr.sbin/unbound X-SVN-Commit-Revision: 368734 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.34 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, 17 Dec 2020 19:50:41 -0000 Author: cy Date: Thu Dec 17 19:50:41 2020 New Revision: 368734 URL: https://svnweb.freebsd.org/changeset/base/368734 Log: Update the unbound version number from r368478. Updating the version number is an extra manual step. Pointy hat to: cy Reported by: Herbert J. Skuhra MFC after: 3 days Modified: head/usr.sbin/unbound/config.h Modified: head/usr.sbin/unbound/config.h ============================================================================== --- head/usr.sbin/unbound/config.h Thu Dec 17 19:49:17 2020 (r368733) +++ head/usr.sbin/unbound/config.h Thu Dec 17 19:50:41 2020 (r368734) @@ -731,7 +731,7 @@ #define PACKAGE_NAME "unbound" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "unbound 1.12.0" +#define PACKAGE_STRING "unbound 1.13.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "unbound" @@ -740,7 +740,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.12.0" +#define PACKAGE_VERSION "1.13.0" /* default pidfile location */ #define PIDFILE "/var/unbound/unbound.pid" @@ -762,7 +762,7 @@ #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" /* version number for resource files */ -#define RSRC_PACKAGE_VERSION 1,12,0,0 +#define RSRC_PACKAGE_VERSION 1,13,0,0 /* Directory to chdir to */ #define RUN_DIR "/var/unbound" From owner-svn-src-head@freebsd.org Thu Dec 17 19:51: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 B0DF74C202D; Thu, 17 Dec 2020 19:51:39 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxjLM4jg0z4g0G; Thu, 17 Dec 2020 19:51:39 +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 94D831E683; Thu, 17 Dec 2020 19:51:39 +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 0BHJpd58077087; Thu, 17 Dec 2020 19:51:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHJpdVa077086; Thu, 17 Dec 2020 19:51:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012171951.0BHJpdVa077086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 17 Dec 2020 19:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368735 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368735 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.34 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, 17 Dec 2020 19:51:39 -0000 Author: kib Date: Thu Dec 17 19:51:39 2020 New Revision: 368735 URL: https://svnweb.freebsd.org/changeset/base/368735 Log: Fix a race in tty_signal_sessleader() with unlocked read of s_leader. Since we do not own the session lock, a parallel killjobc() might reset s_leader to NULL after we checked it. Read s_leader only once and ensure that compiler is not allowed to reload. While there, make access to t_session somewhat more pretty by using local variable. PR: 251915 Submitted by: Jakub Piecuch MFC after: 1 week Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Thu Dec 17 19:50:41 2020 (r368734) +++ head/sys/kern/tty.c Thu Dec 17 19:51:39 2020 (r368735) @@ -1474,6 +1474,7 @@ void tty_signal_sessleader(struct tty *tp, int sig) { struct proc *p; + struct session *s; tty_assert_locked(tp); MPASS(sig >= 1 && sig < NSIG); @@ -1482,8 +1483,14 @@ tty_signal_sessleader(struct tty *tp, int sig) tp->t_flags &= ~TF_STOPPED; tp->t_termios.c_lflag &= ~FLUSHO; - if (tp->t_session != NULL && tp->t_session->s_leader != NULL) { - p = tp->t_session->s_leader; + /* + * Load s_leader exactly once to avoid race where s_leader is + * set to NULL by a concurrent invocation of killjobc() by the + * session leader. Note that we are not holding t_session's + * lock for the read. + */ + if ((s = tp->t_session) != NULL && + (p = atomic_load_ptr(&s->s_leader)) != NULL) { PROC_LOCK(p); kern_psignal(p, sig); PROC_UNLOCK(p); From owner-svn-src-head@freebsd.org Thu Dec 17 19:58: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 2A4444C26CF; Thu, 17 Dec 2020 19:58:30 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxjVG0js9z4gxD; Thu, 17 Dec 2020 19:58:30 +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 0B91A1E35A; Thu, 17 Dec 2020 19:58:30 +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 0BHJwT6F079851; Thu, 17 Dec 2020 19:58:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHJwT9X079850; Thu, 17 Dec 2020 19:58:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012171958.0BHJwT9X079850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 17 Dec 2020 19:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368736 - head/tools/tools/git/hooks X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/tools/git/hooks X-SVN-Commit-Revision: 368736 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.34 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, 17 Dec 2020 19:58:30 -0000 Author: emaste Date: Thu Dec 17 19:58:29 2020 New Revision: 368736 URL: https://svnweb.freebsd.org/changeset/base/368736 Log: Add initial version of git commit message preparation hook Start with a slightly modified version of the SVN commit template, to allow developers to experiment. This will be updated in the future as our process and techniques evolve. This can be installed by copying or symlinking into the .git/hooks/ directory. Feedback from: cem, jhb Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27633 Added: head/tools/tools/git/hooks/ head/tools/tools/git/hooks/prepare-commit-msg (contents, props changed) Added: head/tools/tools/git/hooks/prepare-commit-msg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/git/hooks/prepare-commit-msg Thu Dec 17 19:58:29 2020 (r368736) @@ -0,0 +1,55 @@ +#!/bin/sh + +case "$2" in +commit|message) + # It appears git invokes this script for interactive rebase but does + # not remove commented lines, so just exit if we're not called with the + # default (comment-containing) template. + egrep -q '^#' "$1" || return 0 + ;; +template) + return 0 + ;; +merge) + return 0 + ;; +esac + +outfile=$(mktemp /tmp/freebsd-git-commit.XXXXXXXX) +cat >$outfile </pull/### (*full* GitHub URL needed). +# Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed). +$(awk '/^#$/,EOF' $1) +EOF + +mv $outfile $1 From owner-svn-src-head@freebsd.org Thu Dec 17 20:00: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 ED8504C278D; Thu, 17 Dec 2020 20:00:38 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (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 4CxjXk57MKz4gyD; Thu, 17 Dec 2020 20:00:38 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.1.2] (pool-74-110-137-7.rcmdva.fios.verizon.net [74.110.137.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id CD6442700191; Thu, 17 Dec 2020 15:00:37 -0500 (EST) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu CD6442700191 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1608235238; bh=DYOWNqbCJz79GhX6mqpP7RbwuMOnplnmJHwbH44FpQk=; h=Subject:To:From:Date:From; b=MyxeKLC7Vr0fCWqLKaMeUXmdDA1ZKcrI4KbnislQfLB+TmtGbqYxGo0UZXEtqx8qg Bv+63j109Qo47nLwXe81J4ue/R0vU47aCy3ogjAmsRodWrDLlE7RqAXLxQG0EtqNRa TIiDCsNhf8dQyNVRYysOJgPTwe3eDFwQ4dP+Ue2k5JuQIuTxkLeoOYgwWrV/wwoUbk ELzh5kP7uozdDhmZLVcEkgUrdv3nmPXQjwEhllF1O9A6NhZDVXQda39ErJi8Tn2c9G Buz7DdXHPugp9Rm14KCzM/yjofT7rwfVNOLJmIyVgm8aj642y1oGE0AMQVGWhbnxjp 9vLkGtWxRrOkg== Subject: Re: svn commit: r368721 - head/stand/efi/loader To: Kyle Evans Cc: Warner Losh , src-committers , svn-src-all , svn-src-head References: <202012171702.0BHH29kD071108@repo.freebsd.org> <58a91a8e-70e9-19a2-5164-55bd126e59d1@cs.duke.edu> From: Andrew Gallatin Message-ID: Date: Thu, 17 Dec 2020 15:00:37 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CxjXk57MKz4gyD X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 20:00:39 -0000 On 12/17/20 2:49 PM, Kyle Evans wrote: > On Thu, Dec 17, 2020 at 1:47 PM Andrew Gallatin wrote: >> >> On 12/17/20 12:02 PM, Warner Losh wrote: >>> Author: imp >>> Date: Thu Dec 17 17:02:09 2020 >>> New Revision: 368721 >>> URL: https://urldefense.com/v3/__https://svnweb.freebsd.org/changeset/base/368721__;!!OToaGQ!5c1mLnhtRtEV6Cv_MTWpzXWaGZEYYDp4TJ6wVDzjVZiehAItts7ZWC15uNnQYRa5Fg$ >>> >>> Log: >>> Drop EFI_STAGING_SIZE back down to 64M >>> >>> vmware can't cope with anything larger than 64MB. Drop this back to >>> 64MB everywhere but arm. >> >> There were all kinds of booting problems before this was bumped up. >> In fact, I still have EFI_STAGING_SIZE=128 in src.conf because I needed >> it be be able to boot when using Nvidia graphics. By reducing this, I >> feel like we're just playing whack-a-mole. >> > > IIRC those have long since become OBE as we'll now grow the staging > area to accommodate nvidia. > Ah, OK. cool! Thanks & sorry for the noise. Drew From owner-svn-src-head@freebsd.org Thu Dec 17 20:11: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 70D284C25F6; Thu, 17 Dec 2020 20:11:32 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxjnJ2rSVz4j28; Thu, 17 Dec 2020 20:11: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 4AC5F1E47B; Thu, 17 Dec 2020 20:11:32 +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 0BHKBWlh089992; Thu, 17 Dec 2020 20:11:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHKBW9l089991; Thu, 17 Dec 2020 20:11:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012172011.0BHKBW9l089991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 17 Dec 2020 20:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368737 - head/tools/tools/git/hooks X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/tools/git/hooks X-SVN-Commit-Revision: 368737 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.34 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, 17 Dec 2020 20:11:32 -0000 Author: emaste Date: Thu Dec 17 20:11:31 2020 New Revision: 368737 URL: https://svnweb.freebsd.org/changeset/base/368737 Log: chmod +x the git commit message prep hook Modified: Directory Properties: head/tools/tools/git/hooks/prepare-commit-msg (props changed) From owner-svn-src-head@freebsd.org Thu Dec 17 20:28: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 72D464C32AD; Thu, 17 Dec 2020 20:28:54 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxk9L2nhtz4jj3; Thu, 17 Dec 2020 20:28:54 +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 532B01EB1E; Thu, 17 Dec 2020 20:28:54 +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 0BHKSshD099203; Thu, 17 Dec 2020 20:28:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHKSsf4099202; Thu, 17 Dec 2020 20:28:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012172028.0BHKSsf4099202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 17 Dec 2020 20:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368738 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 368738 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.34 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, 17 Dec 2020 20:28:54 -0000 Author: jhb Date: Thu Dec 17 20:28:53 2020 New Revision: 368738 URL: https://svnweb.freebsd.org/changeset/base/368738 Log: Cleanups to *ERR* compat shims. - Use [u]intptr_t casts to convert pointers to integers. - Change IS_ERR* to return bool instead of long. Reviewed by: manu Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27577 Modified: head/sys/compat/linuxkpi/common/include/linux/err.h Modified: head/sys/compat/linuxkpi/common/include/linux/err.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/err.h Thu Dec 17 20:11:31 2020 (r368737) +++ head/sys/compat/linuxkpi/common/include/linux/err.h Thu Dec 17 20:28:53 2020 (r368738) @@ -37,30 +37,30 @@ #define MAX_ERRNO 4095 -#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) +#define IS_ERR_VALUE(x) unlikely((x) >= (uintptr_t)-MAX_ERRNO) static inline void * ERR_PTR(long error) { - return (void *)error; + return (void *)(intptr_t)error; } static inline long PTR_ERR(const void *ptr) { - return (long)ptr; + return (intptr_t)ptr; } -static inline long +static inline bool IS_ERR(const void *ptr) { - return IS_ERR_VALUE((unsigned long)ptr); + return IS_ERR_VALUE((uintptr_t)ptr); } -static inline long +static inline bool IS_ERR_OR_NULL(const void *ptr) { - return !ptr || IS_ERR_VALUE((unsigned long)ptr); + return !ptr || IS_ERR_VALUE((uintptr_t)ptr); } static inline void * From owner-svn-src-head@freebsd.org Thu Dec 17 20:31: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 2E01F4C342C; Thu, 17 Dec 2020 20:31:18 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxkD60v0kz4kBP; Thu, 17 Dec 2020 20:31:18 +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 11EC61ED09; Thu, 17 Dec 2020 20:31:18 +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 0BHKVH99002575; Thu, 17 Dec 2020 20:31:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHKVH4R001998; Thu, 17 Dec 2020 20:31:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012172031.0BHKVH4R001998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 17 Dec 2020 20:31:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368739 - in head/sys: conf kern tools X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: conf kern tools X-SVN-Commit-Revision: 368739 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.34 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, 17 Dec 2020 20:31:18 -0000 Author: jhb Date: Thu Dec 17 20:31:17 2020 New Revision: 368739 URL: https://svnweb.freebsd.org/changeset/base/368739 Log: Use a template assembly file for firmware object files. Similar to r366897, this uses the .incbin directive to pull in a firmware file's contents into a .fwo file. The same scheme for computing symbol names from the filename is used as before to maximize compatiblity and not require rebuilding existing .fwo files for NO_CLEAN builds. Using ld -o binary requires extra hacks in linkers to either specify ABI options (e.g. soft- vs hard-float) or to ignore ABI incompatiblities when linking certain objects (e.g. object files with only data). Using the compiler driver avoids the need for these hacks as the compiler driver is able to set all the appropriate ABI options. Reviewed by: imp, markj Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27579 Added: head/sys/kern/firmw.S (contents, props changed) Modified: head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk head/sys/tools/fw_stub.awk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Thu Dec 17 20:28:53 2020 (r368738) +++ head/sys/conf/kern.pre.mk Thu Dec 17 20:31:17 2020 (r368739) @@ -184,8 +184,9 @@ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c NORMAL_FW= uudecode -o ${.TARGET} ${.ALLSRC} -NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \ - -m ${LD_EMULATION} -o ${.TARGET} ${.ALLSRC:M*.fw} +NORMAL_FWO= ${CC:N${CCACHE_BIN}} -c ${ASM_CFLAGS} ${WERROR} -o ${.TARGET} \ + $S/kern/firmw.S -DFIRMW_FILE="${.ALLSRC:M*.fw}" \ + -DFIRMW_SYMBOL="${.ALLSRC:M*.fw:C/[-.\/]/_/g}" # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS) ZSTD_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} -Wno-inline -Wno-missing-prototypes ${PROF} -U__BMI__ ${.IMPSRC} Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Thu Dec 17 20:28:53 2020 (r368738) +++ head/sys/conf/kmod.mk Thu Dec 17 20:31:17 2020 (r368739) @@ -187,19 +187,13 @@ SRCS+= ${KMOD:S/$/.c/} CLEANFILES+= ${KMOD:S/$/.c/} .for _firmw in ${FIRMWS} -${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\:.*$//} +${_firmw:C/\:.*$/.fwo/:T}: ${_firmw:C/\:.*$//} ${SYSDIR}/kern/firmw.S @${ECHO} ${_firmw:C/\:.*$//} ${.ALLSRC:M*${_firmw:C/\:.*$//}} - @if [ -e ${_firmw:C/\:.*$//} ]; then \ - ${LD} -b binary --no-warn-mismatch ${_LDFLAGS} \ - -m ${LD_EMULATION} -r -d \ - -o ${.TARGET} ${_firmw:C/\:.*$//}; \ - else \ - ln -s ${.ALLSRC:M*${_firmw:C/\:.*$//}} ${_firmw:C/\:.*$//}; \ - ${LD} -b binary --no-warn-mismatch ${_LDFLAGS} \ - -m ${LD_EMULATION} -r -d \ - -o ${.TARGET} ${_firmw:C/\:.*$//}; \ - rm ${_firmw:C/\:.*$//}; \ - fi + ${CC:N${CCACHE_BIN}} -c -x assembler-with-cpp -DLOCORE \ + ${CFLAGS} ${WERROR} \ + -DFIRMW_FILE="${.ALLSRC:M*${_firmw:C/\:.*$//}}" \ + -DFIRMW_SYMBOL="${_firmw:C/\:.*$//:C/[-.\/]/_/g}" \ + ${SYSDIR}/kern/firmw.S -o ${.TARGET} OBJS+= ${_firmw:C/\:.*$/.fwo/:T} .endfor Added: head/sys/kern/firmw.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/firmw.S Thu Dec 17 20:31:17 2020 (r368739) @@ -0,0 +1,49 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 John Baldwin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * 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$ + */ + +#include + +#define FIRMW_START(S) __CONCAT(_binary_, __CONCAT(S, _start)) +#define FIRMW_END(S) __CONCAT(_binary_, __CONCAT(S, _end)) + + .section rodata, "a", %progbits + .globl FIRMW_START(FIRMW_SYMBOL) + .type FIRMW_START(FIRMW_SYMBOL), %object +FIRMW_START(FIRMW_SYMBOL): + .incbin __XSTRING(FIRMW_FILE) + .size FIRMW_START(FIRMW_SYMBOL), . - FIRMW_START(FIRMW_SYMBOL) + .globl FIRMW_END(FIRMW_SYMBOL) + .type FIRMW_END(FIRMW_SYMBOL), %object +FIRMW_END(FIRMW_SYMBOL): + .size FIRMW_END(FIRMW_SYMBOL), . - FIRMW_END(FIRMW_SYMBOL) Modified: head/sys/tools/fw_stub.awk ============================================================================== --- head/sys/tools/fw_stub.awk Thu Dec 17 20:28:53 2020 (r368738) +++ head/sys/tools/fw_stub.awk Thu Dec 17 20:31:17 2020 (r368739) @@ -143,7 +143,7 @@ if (opt_l) { for (file_i = 0; file_i < num_files; file_i++) { symb = filenames[file_i]; - # '-', '.' and '/' are converted to '_' by ld/objcopy + # '-', '.' and '/' are converted to '_' gsub(/-|\.|\//, "_", symb); printc("extern char _binary_" symb "_start[], _binary_" symb "_end[];"); } @@ -170,7 +170,7 @@ for (file_i = 0; file_i < num_files; file_i++) { short = shortnames[file_i]; symb = filenames[file_i]; version = versions[file_i]; - # '-', '.' and '/' are converted to '_' by ld/objcopy + # '-', '.' and '/' are converted to '_' gsub(/-|\.|\//, "_", symb); reg = "\t\tfp = "; From owner-svn-src-head@freebsd.org Thu Dec 17 20:31: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 2CC794C3515; Thu, 17 Dec 2020 20:31: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxkDf0rYgz4klC; Thu, 17 Dec 2020 20:31: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 107ED1EEAA; Thu, 17 Dec 2020 20:31: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 0BHKVjOe002746; Thu, 17 Dec 2020 20:31:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHKVjUX002745; Thu, 17 Dec 2020 20:31:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202012172031.0BHKVjUX002745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 17 Dec 2020 20:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368740 - head/tools/tools/git/hooks X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/tools/git/hooks X-SVN-Commit-Revision: 368740 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.34 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, 17 Dec 2020 20:31:46 -0000 Author: emaste Date: Thu Dec 17 20:31:45 2020 New Revision: 368740 URL: https://svnweb.freebsd.org/changeset/base/368740 Log: Describe the commit message template our git hook script produces Reported by: rpokala Modified: head/tools/tools/git/hooks/prepare-commit-msg Modified: head/tools/tools/git/hooks/prepare-commit-msg ============================================================================== --- head/tools/tools/git/hooks/prepare-commit-msg Thu Dec 17 20:31:17 2020 (r368739) +++ head/tools/tools/git/hooks/prepare-commit-msg Thu Dec 17 20:31:45 2020 (r368740) @@ -16,8 +16,17 @@ merge) esac outfile=$(mktemp /tmp/freebsd-git-commit.XXXXXXXX) -cat >$outfile <$outfile < 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 A17FD4C3523 for ; Thu, 17 Dec 2020 20:32:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxkFV41mMz4krt for ; Thu, 17 Dec 2020 20:32:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f52.google.com with SMTP id d26so14679283wrb.12 for ; Thu, 17 Dec 2020 12:32:30 -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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=5UgfwXSTz7L5dfQEFuSU7T+cD6OLcoVadiJaoTXRLZo=; b=hFRshQFzfU2nfW/6t78z2wLy/2lCvT/ebiG/XIPE07GffKvt6vJfvialpiXH6DyyOT dXPhpOYl7Fjrr2NszBCbv+NxaYMBqgPVVHPvxk4fDFss1ZjYvhHVHA2GCZ+uXLLtAv1B +s/AtBd9CVE6Wqzb5ZzOTg7zxDs0m1DCc2Di8Hw2gdTV5CNSW4Elp4cI0VEY5D6gK/05 V2YFY2c7/7LjZ70u7Ku2KXwSjsaBOVJ1Nt1NNaVYp8XEwXkwp8Fgjkor16VV1tdsI1ME xMx0g0HIGrw6idL4wUBS1w7yr+5vR1UzpUeFcDIed9uAin5jl2UOJ2SHK8iPh0LfRbqb L7jA== X-Gm-Message-State: AOAM533H/kv/tjZ7p3q2xkg6J3nVYe955McyLpOzeYZO+PGMtWya6zEI w42baraPg5puWzOOMztEnXLA6w== X-Google-Smtp-Source: ABdhPJyoiqxDtCjnUU40aeSVtQrGinZ3z/WenSz2gx8llVIz444VqAALC9sIgAq8ThFJ0ezCR7DmTQ== X-Received: by 2002:adf:e688:: with SMTP id r8mr645171wrm.20.1608237148985; Thu, 17 Dec 2020 12:32:28 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id m4sm8928523wmi.41.2020.12.17.12.32.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Dec 2020 12:32:28 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: svn commit: r368738 - head/sys/compat/linuxkpi/common/include/linux From: Jessica Clarke In-Reply-To: <202012172028.0BHKSsf4099202@repo.freebsd.org> Date: Thu, 17 Dec 2020 20:32:26 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <085D2B00-C0DC-4D4F-80AC-C8754302ABB3@freebsd.org> References: <202012172028.0BHKSsf4099202@repo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4CxkFV41mMz4krt X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 20:32:30 -0000 On 17 Dec 2020, at 20:28, John Baldwin wrote: >=20 > Author: jhb > Date: Thu Dec 17 20:28:53 2020 > New Revision: 368738 > URL: https://svnweb.freebsd.org/changeset/base/368738 >=20 > Log: > Cleanups to *ERR* compat shims. >=20 > - Use [u]intptr_t casts to convert pointers to integers. >=20 > - Change IS_ERR* to return bool instead of long. >=20 > Reviewed by: manu > Obtained from: CheriBSD > Sponsored by: DARPA > Differential Revision: https://reviews.freebsd.org/D27577 >=20 > Modified: > head/sys/compat/linuxkpi/common/include/linux/err.h >=20 > Modified: head/sys/compat/linuxkpi/common/include/linux/err.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 > --- head/sys/compat/linuxkpi/common/include/linux/err.h Thu Dec = 17 20:11:31 2020 (r368737) > +++ head/sys/compat/linuxkpi/common/include/linux/err.h Thu Dec = 17 20:28:53 2020 (r368738) > @@ -37,30 +37,30 @@ >=20 > #define MAX_ERRNO 4095 >=20 > -#define IS_ERR_VALUE(x) unlikely((x) >=3D (unsigned long)-MAX_ERRNO) > +#define IS_ERR_VALUE(x) unlikely((x) >=3D (uintptr_t)-MAX_ERRNO) >=20 > static inline void * > ERR_PTR(long error) > { > - return (void *)error; > + return (void *)(intptr_t)error; > } >=20 > static inline long > PTR_ERR(const void *ptr) > { > - return (long)ptr; > + return (intptr_t)ptr; This should probably be (long)(intptr_t) after no longer changing the return type to intptr_t? Jess From owner-svn-src-head@freebsd.org Thu Dec 17 20:45: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 525954C40EC; Thu, 17 Dec 2020 20:45:12 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxkX81tZ9z4mBW; Thu, 17 Dec 2020 20:45:12 +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 2D7AF1EEE8; Thu, 17 Dec 2020 20:45:12 +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 0BHKjB5S012682; Thu, 17 Dec 2020 20:45:11 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHKjB9m012678; Thu, 17 Dec 2020 20:45:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012172045.0BHKjB9m012678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 17 Dec 2020 20:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368741 - in head/sys/dev/usb: . controller X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/dev/usb: . controller X-SVN-Commit-Revision: 368741 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.34 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, 17 Dec 2020 20:45:12 -0000 Author: jhb Date: Thu Dec 17 20:45:10 2020 New Revision: 368741 URL: https://svnweb.freebsd.org/changeset/base/368741 Log: Use __containerof() instead of home-rolled versions. Reviewed by: imp, hselasky Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27582 Modified: head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/usb_transfer.h Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Thu Dec 17 20:31:45 2020 (r368740) +++ head/sys/dev/usb/controller/ehci.c Thu Dec 17 20:45:10 2020 (r368741) @@ -90,8 +90,7 @@ #include #define EHCI_BUS2SC(bus) \ - ((ehci_softc_t *)(((uint8_t *)(bus)) - \ - ((uint8_t *)&(((ehci_softc_t *)0)->sc_bus)))) + __containerof(bus, ehci_softc_t, sc_bus) #ifdef USB_DEBUG static int ehcidebug = 0; Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Thu Dec 17 20:31:45 2020 (r368740) +++ head/sys/dev/usb/controller/ohci.c Thu Dec 17 20:45:10 2020 (r368741) @@ -79,8 +79,7 @@ #include #define OHCI_BUS2SC(bus) \ - ((ohci_softc_t *)(((uint8_t *)(bus)) - \ - ((uint8_t *)&(((ohci_softc_t *)0)->sc_bus)))) + __containerof(bus, ohci_softc_t, sc_bus) #ifdef USB_DEBUG static int ohcidebug = 0; Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Thu Dec 17 20:31:45 2020 (r368740) +++ head/sys/dev/usb/controller/uhci.c Thu Dec 17 20:45:10 2020 (r368741) @@ -83,8 +83,7 @@ #define alt_next next #define UHCI_BUS2SC(bus) \ - ((uhci_softc_t *)(((uint8_t *)(bus)) - \ - ((uint8_t *)&(((uhci_softc_t *)0)->sc_bus)))) + __containerof(bus, uhci_softc_t, sc_bus) #ifdef USB_DEBUG static int uhcidebug = 0; Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Thu Dec 17 20:31:45 2020 (r368740) +++ head/sys/dev/usb/controller/xhci.c Thu Dec 17 20:45:10 2020 (r368741) @@ -86,8 +86,7 @@ #include #define XHCI_BUS2SC(bus) \ - ((struct xhci_softc *)(((uint8_t *)(bus)) - \ - ((uint8_t *)&(((struct xhci_softc *)0)->sc_bus)))) + __containerof(bus, struct xhci_softc, sc_bus) static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB XHCI"); Modified: head/sys/dev/usb/usb_transfer.h ============================================================================== --- head/sys/dev/usb/usb_transfer.h Thu Dec 17 20:31:45 2020 (r368740) +++ head/sys/dev/usb/usb_transfer.h Thu Dec 17 20:45:10 2020 (r368741) @@ -153,9 +153,7 @@ struct usb_done_msg { }; #define USB_DMATAG_TO_XROOT(dpt) \ - ((struct usb_xfer_root *)( \ - ((uint8_t *)(dpt)) - \ - ((uint8_t *)&((struct usb_xfer_root *)0)->dma_parent_tag))) + __containerof(dpt, struct usb_xfer_root, dma_parent_tag) /* * The following structure is used to keep information about memory From owner-svn-src-head@freebsd.org Thu Dec 17 21:02: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 71CAD4C47AD; Thu, 17 Dec 2020 21:02:59 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxkwg2t7gz4nKw; Thu, 17 Dec 2020 21:02:59 +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 55C9B1EDF7; Thu, 17 Dec 2020 21:02:59 +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 0BHL2xY9024792; Thu, 17 Dec 2020 21:02:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHL2xQh024791; Thu, 17 Dec 2020 21:02:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202012172102.0BHL2xQh024791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 17 Dec 2020 21:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368742 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368742 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.34 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, 17 Dec 2020 21:02:59 -0000 Author: mav Date: Thu Dec 17 21:02:58 2020 New Revision: 368742 URL: https://svnweb.freebsd.org/changeset/base/368742 Log: Fix f_pkt_into_t typo. MFC after: 1 week Modified: head/share/man/man9/iflibtxrx.9 Modified: head/share/man/man9/iflibtxrx.9 ============================================================================== --- head/share/man/man9/iflibtxrx.9 Thu Dec 17 20:45:10 2020 (r368741) +++ head/share/man/man9/iflibtxrx.9 Thu Dec 17 21:02:58 2020 (r368742) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd April 16, 2019 +.Dd December 17, 2020 .Dt IFLIBTXTX 9 .Os .Sh NAME @@ -11,7 +11,7 @@ .Ft int .Fo isc_txd_encap .Fa "void *sc" -.Fa "if_pkt_into_t pi" +.Fa "if_pkt_info_t pi" .Fc .Ft void .Fo isc_txd_flush From owner-svn-src-head@freebsd.org Thu Dec 17 21:29: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 99F134C5353 for ; Thu, 17 Dec 2020 21:29:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxlW63m7mz4q4D for ; Thu, 17 Dec 2020 21:29:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72b.google.com with SMTP id c7so198957qke.1 for ; Thu, 17 Dec 2020 13:29: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=lkAW7DybTMs7vT6hFXT8ZKsliK7m4/cc3rbLvpLBbUs=; b=Kt/EM0nf2Cc5HhsjUhn6sP26hA0yiGsLxCzFad8FpmTm4Lh+noj/JbtjKmuzVtivIM d7koYgdy5XOVC/nt2AomN4TO2z+TzgPMjyeGKareMrmSzxpoWEHPeBBEyn82x5mEWNFs w2s/OhGKFyu2NfNW1bI5jC/Fc6gED56dKXAOdZ45xiVgDdz9fMOLMCRhizkjP5zGYlZb LQEyBkYCvlJ9aEnQqlosMzt2uYoAYwODfh4busuj0wxBFNgiVOztIZThZsD7ls3DPSLx v3TQ4txBGSSQOlFkvwIS9s2cBHXFfKF6gC0UWRU6g5a2/6vqPUfogov0DX+0dSAZMK2O W3kw== 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=lkAW7DybTMs7vT6hFXT8ZKsliK7m4/cc3rbLvpLBbUs=; b=X5/qMpD/LAXj57Dy0by2Vm7vEKmLwKhBW/bgBJQ8mLVXC0B/+0oQYm1Nrl8IatwvGC 8GgpXW6eme72xqnCQfFhw32cMrKbTxQW6Jm7NNqgy8CGg2mopYnbfbsz3nKl3TmG5tyq ehxRV95sqxb4EruE8I2ZR0nQFQgJS93eExfF8+4C9B+G35ZlWUEFZf/4VrohtKGtEMn5 JEKiszH/GhrZ1A3yh7Ommdc1aIM1l1GMiK0uNNtzPTpfHTvaWI6ptAuRcEIqDY98fn+i iNRu5H+Sho572ebGch3EZSNpeFen3BKigf8ceCTWS7ejqKIFO/z0XSGfb+0dzQefPSAx 8wQg== X-Gm-Message-State: AOAM532M8uvcDsNqOG4UFsQIuR/bul2rqgaoyRcX/t3FGAlQI8c1LgGQ 9mYz04Mf7pwsYxsBoHyJBLyNwQyTwHpkJNvtLvdndg== X-Google-Smtp-Source: ABdhPJwUjFAfBcj9hgJPQ/DCB1B8TZDXT6l6LViT4cfme1g2XIHGvO8Dy8H2Sdst2vnr67GeeZ8SWS4jUdZt+qTHzMY= X-Received: by 2002:ae9:ebd5:: with SMTP id b204mr1350904qkg.195.1608240561601; Thu, 17 Dec 2020 13:29:21 -0800 (PST) MIME-Version: 1.0 References: <202012171702.0BHH29kD071108@repo.freebsd.org> <58a91a8e-70e9-19a2-5164-55bd126e59d1@cs.duke.edu> In-Reply-To: From: Warner Losh Date: Thu, 17 Dec 2020 14:29:11 -0700 Message-ID: Subject: Re: svn commit: r368721 - head/stand/efi/loader To: Andrew Gallatin Cc: Kyle Evans , Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4CxlW63m7mz4q4D X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 17 Dec 2020 21:29:22 -0000 On Thu, Dec 17, 2020 at 1:00 PM Andrew Gallatin wrote: > On 12/17/20 2:49 PM, Kyle Evans wrote: > > On Thu, Dec 17, 2020 at 1:47 PM Andrew Gallatin > wrote: > >> > >> On 12/17/20 12:02 PM, Warner Losh wrote: > >>> Author: imp > >>> Date: Thu Dec 17 17:02:09 2020 > >>> New Revision: 368721 > >>> URL: > https://urldefense.com/v3/__https://svnweb.freebsd.org/changeset/base/368721__;!!OToaGQ!5c1mLnhtRtEV6Cv_MTWpzXWaGZEYYDp4TJ6wVDzjVZiehAItts7ZWC15uNnQYRa5Fg$ > >>> > >>> Log: > >>> Drop EFI_STAGING_SIZE back down to 64M > >>> > >>> vmware can't cope with anything larger than 64MB. Drop this back to > >>> 64MB everywhere but arm. > >> > >> There were all kinds of booting problems before this was bumped up. > >> In fact, I still have EFI_STAGING_SIZE=128 in src.conf because I needed > >> it be be able to boot when using Nvidia graphics. By reducing this, I > >> feel like we're just playing whack-a-mole. > >> > > > > IIRC those have long since become OBE as we'll now grow the staging > > area to accommodate nvidia. > > > > Ah, OK. cool! > > Thanks & sorry for the noise. > We added the 100 as a hack and then fixed the underlying problem. If 64 doesn't work for you, please let me know and I'll work with you to make it right. Warner From owner-svn-src-head@freebsd.org Thu Dec 17 21:54: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 8F1354C5AF3; Thu, 17 Dec 2020 21:54:26 +0000 (UTC) (envelope-from kp@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxm423dcKz4rHQ; Thu, 17 Dec 2020 21:54:26 +0000 (UTC) (envelope-from kp@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 700E71FFB9; Thu, 17 Dec 2020 21:54:26 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BHLsQXp056829; Thu, 17 Dec 2020 21:54:26 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHLsQlw056828; Thu, 17 Dec 2020 21:54:26 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202012172154.0BHLsQlw056828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 17 Dec 2020 21:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368743 - head/tests/sys/net X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys/net X-SVN-Commit-Revision: 368743 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.34 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, 17 Dec 2020 21:54:26 -0000 Author: kp Date: Thu Dec 17 21:54:25 2020 New Revision: 368743 URL: https://svnweb.freebsd.org/changeset/base/368743 Log: net tests: Re-enable most if_clone tests All but one of these (tap_ipv6_up_stress) currently pass, so we should enable them so we don't regress. Modified: head/tests/sys/net/if_clone_test.sh Modified: head/tests/sys/net/if_clone_test.sh ============================================================================== --- head/tests/sys/net/if_clone_test.sh Thu Dec 17 21:02:58 2020 (r368742) +++ head/tests/sys/net/if_clone_test.sh Thu Dec 17 21:54:25 2020 (r368743) @@ -47,9 +47,6 @@ epair_stress_head() } epair_stress_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/246443" - fi do_stress "epair" } epair_stress_cleanup() @@ -80,7 +77,6 @@ epair_ipv6_up_stress_head() } epair_ipv6_up_stress_body() { - atf_skip "Quickly panics: page fault in in6_unlink_ifa (PR 225438)" do_up_stress "epair" "6" "" } epair_ipv6_up_stress_cleanup() @@ -111,7 +107,6 @@ faith_up_stress_head() } faith_up_stress_body() { - atf_skip "Quickly panics: if_freemulti: protospec not NULL" do_up_stress "faith" "" "" } faith_up_stress_cleanup() @@ -127,7 +122,6 @@ faith_ipv6_up_stress_head() } faith_ipv6_up_stress_body() { - atf_skip "Quickly panics: if_freemulti: protospec not NULL" do_up_stress "faith" "6" "" } faith_ipv6_up_stress_cleanup() @@ -158,7 +152,6 @@ gif_up_stress_head() } gif_up_stress_body() { - atf_skip "Quickly panics: if_freemulti: protospec not NULL" do_up_stress "gif" "" "p2p" } gif_up_stress_cleanup() @@ -174,7 +167,6 @@ gif_ipv6_up_stress_head() } gif_ipv6_up_stress_body() { - atf_skip "Quickly panics: rt_tables_get_rnh_ptr: fam out of bounds." do_up_stress "gif" "6" "p2p" } gif_ipv6_up_stress_cleanup() @@ -205,7 +197,6 @@ lo_up_stress_head() } lo_up_stress_body() { - atf_skip "Quickly panics: GPF in rtsock_routemsg" do_up_stress "lo" "" "" } lo_up_stress_cleanup() @@ -221,7 +212,6 @@ lo_ipv6_up_stress_head() } lo_ipv6_up_stress_body() { - atf_skip "Quickly panics: page fault in rtsock_addrmsg" do_up_stress "lo" "6" "" } lo_ipv6_up_stress_cleanup() @@ -252,7 +242,6 @@ tap_up_stress_head() } tap_up_stress_body() { - atf_skip "Quickly panics: if_freemulti: protospec not NULL" do_up_stress "tap" "" "" } tap_up_stress_cleanup() @@ -299,7 +288,6 @@ tun_up_stress_head() } tun_up_stress_body() { - atf_skip "Quickly panics: if_freemulti: protospec not NULL" do_up_stress "tun" "" "p2p" } tun_up_stress_cleanup() @@ -315,7 +303,6 @@ tun_ipv6_up_stress_head() } tun_ipv6_up_stress_body() { - atf_skip "Quickly panics: if_freemulti: protospec not NULL" do_up_stress "tun" "6" "p2p" } tun_ipv6_up_stress_cleanup() @@ -346,7 +333,6 @@ vlan_up_stress_head() } vlan_up_stress_body() { - atf_skip "Quickly panics: if_freemulti: protospec not NULL" do_up_stress "vlan" "" "" } vlan_up_stress_cleanup() @@ -362,7 +348,6 @@ vlan_ipv6_up_stress_head() } vlan_ipv6_up_stress_body() { - atf_skip "Quickly panics: if_freemulti: protospec not NULL" do_up_stress "vlan" "6" "" } vlan_ipv6_up_stress_cleanup() @@ -408,7 +393,6 @@ vmnet_ipv6_up_stress_head() } vmnet_ipv6_up_stress_body() { - atf_skip "Quickly panics: if_freemulti: protospec not NULL" do_up_stress "vmnet" "6" "" } vmnet_ipv6_up_stress_cleanup() From owner-svn-src-head@freebsd.org Thu Dec 17 21:58: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 640784C5C43; Thu, 17 Dec 2020 21:58:11 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxm8M2NYQz4rr8; Thu, 17 Dec 2020 21:58:11 +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 44D721FE25; Thu, 17 Dec 2020 21:58:11 +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 0BHLwBfq057094; Thu, 17 Dec 2020 21:58:11 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHLwAFb057092; Thu, 17 Dec 2020 21:58:10 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202012172158.0BHLwAFb057092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 17 Dec 2020 21:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368744 - in head: share/man/man9 sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: share/man/man9 sys/fs/nfs X-SVN-Commit-Revision: 368744 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.34 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, 17 Dec 2020 21:58:11 -0000 Author: brooks Date: Thu Dec 17 21:58:10 2020 New Revision: 368744 URL: https://svnweb.freebsd.org/changeset/base/368744 Log: VFS_QUOTACTL: Remove needless casts of arg The argument is a void * so there's no need to cast it to caddr_t. Update documentation to match function decleration. Reviewed by: freqlabs Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27093 Modified: head/share/man/man9/VFS_QUOTACTL.9 head/sys/fs/nfs/nfs_commonsubs.c Modified: head/share/man/man9/VFS_QUOTACTL.9 ============================================================================== --- head/share/man/man9/VFS_QUOTACTL.9 Thu Dec 17 21:54:25 2020 (r368743) +++ head/share/man/man9/VFS_QUOTACTL.9 Thu Dec 17 21:58:10 2020 (r368744) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2009 +.Dd December 17, 2020 .Dt VFS_QUOTACTL 9 .Os .Sh NAME @@ -39,7 +39,7 @@ .In sys/mount.h .In sys/vnode.h .Ft int -.Fn VFS_QUOTACTL "struct mount *mp" "int cmds" "uid_t uid" "caddr_t arg" +.Fn VFS_QUOTACTL "struct mount *mp" "int cmds" "uid_t uid" "void *arg" .Sh DESCRIPTION Implement file system quotas. See Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Thu Dec 17 21:54:25 2020 (r368743) +++ head/sys/fs/nfs/nfs_commonsubs.c Thu Dec 17 21:58:10 2020 (r368744) @@ -1903,7 +1903,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, savuid = p->p_cred->p_ruid; p->p_cred->p_ruid = cred->cr_uid; if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA, - USRQUOTA), cred->cr_uid, (caddr_t)&dqb)) + USRQUOTA), cred->cr_uid, &dqb)) freenum = min(dqb.dqb_bhardlimit, freenum); p->p_cred->p_ruid = savuid; #endif /* QUOTA */ @@ -1932,7 +1932,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, savuid = p->p_cred->p_ruid; p->p_cred->p_ruid = cred->cr_uid; if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA, - USRQUOTA), cred->cr_uid, (caddr_t)&dqb)) + USRQUOTA), cred->cr_uid, &dqb)) freenum = min(dqb.dqb_bsoftlimit, freenum); p->p_cred->p_ruid = savuid; #endif /* QUOTA */ @@ -1958,7 +1958,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, savuid = p->p_cred->p_ruid; p->p_cred->p_ruid = cred->cr_uid; if (!VFS_QUOTACTL(vp->v_mount,QCMD(Q_GETQUOTA, - USRQUOTA), cred->cr_uid, (caddr_t)&dqb)) + USRQUOTA), cred->cr_uid, &dqb)) freenum = dqb.dqb_curblocks; p->p_cred->p_ruid = savuid; #endif /* QUOTA */ @@ -2704,7 +2704,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount savuid = p->p_cred->p_ruid; p->p_cred->p_ruid = cred->cr_uid; if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA), - cred->cr_uid, (caddr_t)&dqb)) + cred->cr_uid, &dqb)) freenum = min(dqb.dqb_isoftlimit-dqb.dqb_curinodes, freenum); p->p_cred->p_ruid = savuid; @@ -2811,7 +2811,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount savuid = p->p_cred->p_ruid; p->p_cred->p_ruid = cred->cr_uid; if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA), - cred->cr_uid, (caddr_t)&dqb)) + cred->cr_uid, &dqb)) freenum = min(dqb.dqb_bhardlimit, freenum); p->p_cred->p_ruid = savuid; #endif /* QUOTA */ @@ -2835,7 +2835,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount savuid = p->p_cred->p_ruid; p->p_cred->p_ruid = cred->cr_uid; if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA), - cred->cr_uid, (caddr_t)&dqb)) + cred->cr_uid, &dqb)) freenum = min(dqb.dqb_bsoftlimit, freenum); p->p_cred->p_ruid = savuid; #endif /* QUOTA */ @@ -2856,7 +2856,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount savuid = p->p_cred->p_ruid; p->p_cred->p_ruid = cred->cr_uid; if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA), - cred->cr_uid, (caddr_t)&dqb)) + cred->cr_uid, &dqb)) freenum = dqb.dqb_curblocks; p->p_cred->p_ruid = savuid; #endif /* QUOTA */ From owner-svn-src-head@freebsd.org Thu Dec 17 22:53: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 7DAA24C69EF; Thu, 17 Dec 2020 22:53:46 +0000 (UTC) (envelope-from rlibby@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxnNV39Nrz4v7K; Thu, 17 Dec 2020 22:53:46 +0000 (UTC) (envelope-from rlibby@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 5FE3420B89; Thu, 17 Dec 2020 22:53:46 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BHMrkv3094124; Thu, 17 Dec 2020 22:53:46 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BHMrkvN094123; Thu, 17 Dec 2020 22:53:46 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012172253.0BHMrkvN094123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Thu, 17 Dec 2020 22:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368745 - head/sys/dev/ice X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/sys/dev/ice X-SVN-Commit-Revision: 368745 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.34 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, 17 Dec 2020 22:53:46 -0000 Author: rlibby Date: Thu Dec 17 22:53:45 2020 New Revision: 368745 URL: https://svnweb.freebsd.org/changeset/base/368745 Log: ice: quiet -Wredundant-decls Reapply r364240 after driver update in r365617. Reviewed by: lwhsu Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27561 Modified: head/sys/dev/ice/ice_common.h Modified: head/sys/dev/ice/ice_common.h ============================================================================== --- head/sys/dev/ice/ice_common.h Thu Dec 17 21:58:10 2020 (r368744) +++ head/sys/dev/ice/ice_common.h Thu Dec 17 22:53:45 2020 (r368745) @@ -46,15 +46,6 @@ enum ice_fw_modes { ICE_FW_MODE_ROLLBACK }; -/* prototype for functions used for SW locks */ -void ice_free_list(struct LIST_HEAD_TYPE *list); -void ice_init_lock(struct ice_lock *lock); -void ice_acquire_lock(struct ice_lock *lock); -void ice_release_lock(struct ice_lock *lock); -void ice_destroy_lock(struct ice_lock *lock); -void *ice_alloc_dma_mem(struct ice_hw *hw, struct ice_dma_mem *m, u64 size); -void ice_free_dma_mem(struct ice_hw *hw, struct ice_dma_mem *m); - void ice_idle_aq(struct ice_hw *hw, struct ice_ctl_q_info *cq); bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq); From owner-svn-src-head@freebsd.org Fri Dec 18 00:38: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 885074A8C3A; Fri, 18 Dec 2020 00:38:48 +0000 (UTC) (envelope-from grehan@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxqjh3VMpz3GhR; Fri, 18 Dec 2020 00:38:48 +0000 (UTC) (envelope-from grehan@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 6AC7A21F65; Fri, 18 Dec 2020 00:38:48 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BI0cmWf056572; Fri, 18 Dec 2020 00:38:48 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BI0cmhN056571; Fri, 18 Dec 2020 00:38:48 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <202012180038.0BI0cmhN056571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Fri, 18 Dec 2020 00:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368747 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: grehan X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 368747 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.34 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, 18 Dec 2020 00:38:48 -0000 Author: grehan Date: Fri Dec 18 00:38:48 2020 New Revision: 368747 URL: https://svnweb.freebsd.org/changeset/base/368747 Log: Fix issues with various VNC clients. - support VNC version 3.3 (macos "Screen Sharing" builtin client) - wait until client has requested an update prior to sending framebuffer data - don't send an update if no framebuffer updates detected - increase framebuffer poll frequency to 30Hz, and double that when kbd/mouse input detected - zero uninitialized array elements in rfb_send_server_init_msg() - fix overly large allocation in rfb_init() - use atomics for flags shared between input and output threads - use #defines for constants This work was contributed by Marko Kiiskila, with reuse of some earlier work by Henrik Gulbrandsen. Clients tested : FreeBSD-current - tightvnc - tigervnc - krdc - vinagre Linux (Ubuntu) - krdc - vinagre - tigervnc - xtightvncviewer - remmina MacOS - VNC Viewer - TigerVNC - Screen Sharing (builtin client) Windows 10 - Tiger VNC - VNC Viewer (cursor lag) - UltraVNC (cursor lag) o/s independent - noVNC (browser) using websockify relay PR: 250795 Submitted by: Marko Kiiskila Reviewed by: jhb (bhyve) MFC after: 3 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27605 Modified: head/usr.sbin/bhyve/rfb.c Modified: head/usr.sbin/bhyve/rfb.c ============================================================================== --- head/usr.sbin/bhyve/rfb.c Thu Dec 17 23:35:18 2020 (r368746) +++ head/usr.sbin/bhyve/rfb.c Fri Dec 18 00:38:48 2020 (r368747) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -72,6 +73,11 @@ __FBSDID("$FreeBSD$"); #include #endif +/* Delays in microseconds */ +#define CFD_SEL_DELAY 10000 +#define SCREEN_REFRESH_DELAY 33300 /* 30Hz */ +#define SCREEN_POLL_DELAY (SCREEN_REFRESH_DELAY / 2) + static int rfb_debug = 0; #define DPRINTF(params) if (rfb_debug) PRINTLN params #define WPRINTF(params) PRINTLN params @@ -80,6 +86,19 @@ static int rfb_debug = 0; #define AUTH_LENGTH 16 #define PASSWD_LENGTH 8 +/* Protocol versions */ +#define CVERS_3_3 '3' +#define CVERS_3_7 '7' +#define CVERS_3_8 '8' + +/* Client-to-server msg types */ +#define CS_SET_PIXEL_FORMAT 0 +#define CS_SET_ENCODINGS 2 +#define CS_UPDATE_MSG 3 +#define CS_KEY_EVENT 4 +#define CS_POINTER_EVENT 5 +#define CS_CUT_TEXT 6 + #define SECURITY_TYPE_NONE 1 #define SECURITY_TYPE_VNC_AUTH 2 @@ -96,16 +115,22 @@ struct rfb_softc { char *password; - bool enc_raw_ok; - bool enc_zlib_ok; - bool enc_resize_ok; + bool enc_raw_ok; + bool enc_zlib_ok; + bool enc_resize_ok; z_stream zstream; uint8_t *zbuf; int zbuflen; int conn_wait; - int sending; + int wrcount; + + atomic_bool sending; + atomic_bool pending; + atomic_bool update_all; + atomic_bool input_detected; + pthread_mutex_t mtx; pthread_cond_t cond; @@ -202,7 +227,6 @@ struct rfb_cuttext_msg { uint32_t length; }; - static void rfb_send_server_init_msg(int cfd) { @@ -223,6 +247,9 @@ rfb_send_server_init_msg(int cfd) sinfo.pixfmt.red_shift = 16; sinfo.pixfmt.green_shift = 8; sinfo.pixfmt.blue_shift = 0; + sinfo.pixfmt.pad[0] = 0; + sinfo.pixfmt.pad[1] = 0; + sinfo.pixfmt.pad[2] = 0; sinfo.namelen = htonl(strlen("bhyve")); (void)stream_write(cfd, &sinfo, sizeof(sinfo)); (void)stream_write(cfd, "bhyve", strlen("bhyve")); @@ -265,7 +292,6 @@ rfb_recv_set_encodings_msg(struct rfb_softc *rc, int c int i; uint32_t encoding; - assert((sizeof(enc_msg) - 1) == 3); (void)stream_read(cfd, ((void *)&enc_msg)+1, sizeof(enc_msg)-1); for (i = 0; i < htons(enc_msg.numencs); i++) { @@ -308,12 +334,23 @@ fast_crc32(void *buf, int len, uint32_t crcval) return (crcval); } +static int +rfb_send_update_header(struct rfb_softc *rc, int cfd, int numrects) +{ + struct rfb_srvr_updt_msg supdt_msg; + supdt_msg.type = 0; + supdt_msg.pad = 0; + supdt_msg.numrects = htons(numrects); + + return stream_write(cfd, &supdt_msg, + sizeof(struct rfb_srvr_updt_msg)); +} + static int rfb_send_rect(struct rfb_softc *rc, int cfd, struct bhyvegc_image *gc, int x, int y, int w, int h) { - struct rfb_srvr_updt_msg supdt_msg; struct rfb_srvr_rect_hdr srect_hdr; unsigned long zlen; ssize_t nwrite, total; @@ -325,16 +362,6 @@ rfb_send_rect(struct rfb_softc *rc, int cfd, struct bh * Send a single rectangle of the given x, y, w h dimensions. */ - /* Number of rectangles: 1 */ - supdt_msg.type = 0; - supdt_msg.pad = 0; - supdt_msg.numrects = htons(1); - nwrite = stream_write(cfd, &supdt_msg, - sizeof(struct rfb_srvr_updt_msg)); - if (nwrite <= 0) - return (nwrite); - - /* Rectangle header */ srect_hdr.x = htons(x); srect_hdr.y = htons(y); @@ -479,7 +506,7 @@ doraw: #define PIXCELL_MASK 0x1F static int -rfb_send_screen(struct rfb_softc *rc, int cfd, int all) +rfb_send_screen(struct rfb_softc *rc, int cfd) { struct bhyvegc_image *gc_image; ssize_t nwrite; @@ -492,35 +519,54 @@ rfb_send_screen(struct rfb_softc *rc, int cfd, int all int retval; uint32_t *crc_p, *orig_crc; int changes; + bool expected; + /* Return if another thread sending */ + expected = false; + if (atomic_compare_exchange_strong(&rc->sending, &expected, true) == false) + return (1); + + retval = 1; + + /* Updates require a preceding update request */ + if (atomic_exchange(&rc->pending, false) == false) + goto done; + console_refresh(); gc_image = console_get_image(); - pthread_mutex_lock(&rc->mtx); - if (rc->sending) { - pthread_mutex_unlock(&rc->mtx); - return (1); + /* Clear old CRC values when the size changes */ + if (rc->crc_width != gc_image->width || + rc->crc_height != gc_image->height) { + memset(rc->crc, 0, sizeof(uint32_t) * + howmany(RFB_MAX_WIDTH, PIX_PER_CELL) * + howmany(RFB_MAX_HEIGHT, PIX_PER_CELL)); + rc->crc_width = gc_image->width; + rc->crc_height = gc_image->height; } - rc->sending = 1; - pthread_mutex_unlock(&rc->mtx); - retval = 0; + /* A size update counts as an update in itself */ + if (rc->width != gc_image->width || + rc->height != gc_image->height) { + rc->width = gc_image->width; + rc->height = gc_image->height; + if (rc->enc_resize_ok) { + rfb_send_resize_update_msg(rc, cfd); + rc->update_all = true; + goto done; + } + } - if (all) { - retval = rfb_send_all(rc, cfd, gc_image); - goto done; - } + if (atomic_exchange(&rc->update_all, false) == true) { + retval = rfb_send_all(rc, cfd, gc_image); + goto done; + } /* * Calculate the checksum for each 32x32 cell. Send each that * has changed since the last scan. */ - /* Resolution changed */ - - rc->crc_width = gc_image->width; - rc->crc_height = gc_image->height; - w = rc->crc_width; h = rc->crc_height; xcells = howmany(rc->crc_width, PIX_PER_CELL); @@ -580,12 +626,24 @@ rfb_send_screen(struct rfb_softc *rc, int cfd, int all } } + /* + * We only send the update if there are changes. + * Restore the pending flag since it was unconditionally cleared + * above. + */ + if (!changes) { + rc->pending = true; + goto done; + } + /* If number of changes is > THRESH percent, send the whole screen */ if (((changes * 100) / (xcells * ycells)) >= RFB_SEND_ALL_THRESH) { retval = rfb_send_all(rc, cfd, gc_image); goto done; } - + + rfb_send_update_header(rc, cfd, changes); + /* Go through all cells, and send only changed ones */ crc_p = rc->crc_tmp; for (y = 0; y < h; y += PIX_PER_CELL) { @@ -613,45 +671,24 @@ rfb_send_screen(struct rfb_softc *rc, int cfd, int all } } } - retval = 1; done: - pthread_mutex_lock(&rc->mtx); - rc->sending = 0; - pthread_mutex_unlock(&rc->mtx); - + rc->sending = false; + return (retval); } static void -rfb_recv_update_msg(struct rfb_softc *rc, int cfd, int discardonly) +rfb_recv_update_msg(struct rfb_softc *rc, int cfd) { struct rfb_updt_msg updt_msg; - struct bhyvegc_image *gc_image; (void)stream_read(cfd, ((void *)&updt_msg) + 1 , sizeof(updt_msg) - 1); - console_refresh(); - gc_image = console_get_image(); - - updt_msg.x = htons(updt_msg.x); - updt_msg.y = htons(updt_msg.y); - updt_msg.width = htons(updt_msg.width); - updt_msg.height = htons(updt_msg.height); - - if (updt_msg.width != gc_image->width || - updt_msg.height != gc_image->height) { - rc->width = gc_image->width; - rc->height = gc_image->height; - if (rc->enc_resize_ok) - rfb_send_resize_update_msg(rc, cfd); - } - - if (discardonly) - return; - - rfb_send_screen(rc, cfd, 1); + rc->pending = true; + if (!updt_msg.incremental) + rc->update_all = true; } static void @@ -662,6 +699,7 @@ rfb_recv_key_msg(struct rfb_softc *rc, int cfd) (void)stream_read(cfd, ((void *)&key_msg) + 1, sizeof(key_msg) - 1); console_key_event(key_msg.down, htonl(key_msg.code)); + rc->input_detected = true; } static void @@ -672,6 +710,7 @@ rfb_recv_ptr_msg(struct rfb_softc *rc, int cfd) (void)stream_read(cfd, ((void *)&ptr_msg) + 1, sizeof(ptr_msg) - 1); console_ptr_event(ptr_msg.button, htons(ptr_msg.x), htons(ptr_msg.y)); + rc->input_detected = true; } static void @@ -719,7 +758,7 @@ rfb_wr_thr(void *arg) FD_ZERO(&rfds); FD_SET(cfd, &rfds); tv.tv_sec = 0; - tv.tv_usec = 10000; + tv.tv_usec = CFD_SEL_DELAY; err = select(cfd+1, &rfds, NULL, NULL, &tv); if (err < 0) @@ -728,15 +767,23 @@ rfb_wr_thr(void *arg) /* Determine if its time to push screen; ~24hz */ gettimeofday(&tv, NULL); tdiff = timeval_delta(&prev_tv, &tv); - if (tdiff > 40000) { + if (tdiff >= SCREEN_POLL_DELAY) { + bool input; prev_tv.tv_sec = tv.tv_sec; prev_tv.tv_usec = tv.tv_usec; - if (rfb_send_screen(rc, cfd, 0) <= 0) { - return (NULL); + input = atomic_exchange(&rc->input_detected, false); + /* + * Refresh the screen on every second trip through the loop, + * or if keyboard/mouse input has been detected. + */ + if ((++rc->wrcount & 1) || input) { + if (rfb_send_screen(rc, cfd) <= 0) { + return (NULL); + } } } else { /* sleep */ - usleep(40000 - tdiff); + usleep(SCREEN_POLL_DELAY - tdiff); } } @@ -758,7 +805,8 @@ rfb_handle(struct rfb_softc *rc, int cfd) DES_key_schedule ks; int i; #endif - + uint8_t client_ver; + uint8_t auth_type; pthread_t tid; uint32_t sres = 0; int len; @@ -771,27 +819,55 @@ rfb_handle(struct rfb_softc *rc, int cfd) /* 1b. Read client version */ len = stream_read(cfd, buf, VERSION_LENGTH); + if (len == VERSION_LENGTH && !strncmp(vbuf, buf, VERSION_LENGTH - 2)) { + client_ver = buf[VERSION_LENGTH - 2]; + } + if (client_ver != CVERS_3_8 && client_ver != CVERS_3_7) { + /* only recognize 3.3, 3.7 & 3.8. Others dflt to 3.3 */ + client_ver = CVERS_3_3; + } /* 2a. Send security type */ buf[0] = 1; + + /* In versions 3.7 & 3.8, it's 2-way handshake */ + /* For version 3.3, server says what the authentication type must be */ #ifndef NO_OPENSSL - if (rc->password) - buf[1] = SECURITY_TYPE_VNC_AUTH; - else - buf[1] = SECURITY_TYPE_NONE; + if (rc->password) { + auth_type = SECURITY_TYPE_VNC_AUTH; + } else { + auth_type = SECURITY_TYPE_NONE; + } #else - buf[1] = SECURITY_TYPE_NONE; + auth_type = SECURITY_TYPE_NONE; #endif - stream_write(cfd, buf, 2); + switch (client_ver) { + case CVERS_3_7: + case CVERS_3_8: + buf[0] = 1; + buf[1] = auth_type; + stream_write(cfd, buf, 2); - /* 2b. Read agreed security type */ - len = stream_read(cfd, buf, 1); + /* 2b. Read agreed security type */ + len = stream_read(cfd, buf, 1); + if (buf[0] != auth_type) { + /* deny */ + sres = htonl(1); + message = "Auth failed: authentication type mismatch"; + goto report_and_done; + } + break; + case CVERS_3_3: + default: + be32enc(buf, auth_type); + stream_write(cfd, buf, 4); + break; + } /* 2c. Do VNC authentication */ - switch (buf[0]) { + switch (auth_type) { case SECURITY_TYPE_NONE: - sres = 0; break; case SECURITY_TYPE_VNC_AUTH: /* @@ -839,26 +915,46 @@ rfb_handle(struct rfb_softc *rc, int cfd) if (memcmp(crypt_expected, buf, AUTH_LENGTH) != 0) { message = "Auth Failed: Invalid Password."; sres = htonl(1); - } else + } else { sres = 0; + } #else - sres = 0; + sres = htonl(1); WPRINTF(("Auth not supported, no OpenSSL in your system")); #endif break; } - /* 2d. Write back a status */ - stream_write(cfd, &sres, 4); + switch (client_ver) { + case CVERS_3_7: + case CVERS_3_8: +report_and_done: + /* 2d. Write back a status */ + stream_write(cfd, &sres, 4); - if (sres) { - be32enc(buf, strlen(message)); - stream_write(cfd, buf, 4); - stream_write(cfd, message, strlen(message)); - goto done; + if (sres) { + /* 3.7 does not want string explaining cause */ + if (client_ver == CVERS_3_8) { + be32enc(buf, strlen(message)); + stream_write(cfd, buf, 4); + stream_write(cfd, message, strlen(message)); + } + goto done; + } + break; + case CVERS_3_3: + default: + /* for VNC auth case send status */ + if (auth_type == SECURITY_TYPE_VNC_AUTH) { + /* 2d. Write back a status */ + stream_write(cfd, &sres, 4); + } + if (sres) { + goto done; + } + break; } - /* 3a. Read client shared-flag byte */ len = stream_read(cfd, buf, 1); @@ -870,8 +966,6 @@ rfb_handle(struct rfb_softc *rc, int cfd) assert(rc->zbuf != NULL); } - rfb_send_screen(rc, cfd, 1); - perror = pthread_create(&tid, NULL, rfb_wr_thr, rc); if (perror == 0) pthread_set_name_np(tid, "rfbout"); @@ -885,22 +979,22 @@ rfb_handle(struct rfb_softc *rc, int cfd) } switch (buf[0]) { - case 0: + case CS_SET_PIXEL_FORMAT: rfb_recv_set_pixfmt_msg(rc, cfd); break; - case 2: + case CS_SET_ENCODINGS: rfb_recv_set_encodings_msg(rc, cfd); break; - case 3: - rfb_recv_update_msg(rc, cfd, 1); + case CS_UPDATE_MSG: + rfb_recv_update_msg(rc, cfd); break; - case 4: + case CS_KEY_EVENT: rfb_recv_key_msg(rc, cfd); break; - case 5: + case CS_POINTER_EVENT: rfb_recv_ptr_msg(rc, cfd); break; - case 6: + case CS_CUT_TEXT: rfb_recv_cuttext_msg(rc, cfd); break; default: @@ -974,16 +1068,17 @@ rfb_init(char *hostname, int port, int wait, char *pas struct addrinfo *ai = NULL; struct addrinfo hints; int on = 1; + int cnt; #ifndef WITHOUT_CAPSICUM cap_rights_t rights; #endif rc = calloc(1, sizeof(struct rfb_softc)); - rc->crc = calloc(howmany(RFB_MAX_WIDTH * RFB_MAX_HEIGHT, 32), - sizeof(uint32_t)); - rc->crc_tmp = calloc(howmany(RFB_MAX_WIDTH * RFB_MAX_HEIGHT, 32), - sizeof(uint32_t)); + cnt = howmany(RFB_MAX_WIDTH, PIX_PER_CELL) * + howmany(RFB_MAX_HEIGHT, PIX_PER_CELL); + rc->crc = calloc(cnt, sizeof(uint32_t)); + rc->crc_tmp = calloc(cnt, sizeof(uint32_t)); rc->crc_width = RFB_MAX_WIDTH; rc->crc_height = RFB_MAX_HEIGHT; rc->sfd = -1; From owner-svn-src-head@freebsd.org Fri Dec 18 03:46: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 CA8E24ADE53; Fri, 18 Dec 2020 03:46:50 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxvtf5M2Fz3hXJ; Fri, 18 Dec 2020 03:46:50 +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 AAC0E241EC; Fri, 18 Dec 2020 03:46:50 +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 0BI3kodv075515; Fri, 18 Dec 2020 03:46:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BI3ko8o075514; Fri, 18 Dec 2020 03:46:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012180346.0BI3ko8o075514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Dec 2020 03:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368749 - head/sys/dev/pci X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/pci X-SVN-Commit-Revision: 368749 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.34 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, 18 Dec 2020 03:46:50 -0000 Author: kib Date: Fri Dec 18 03:46:50 2020 New Revision: 368749 URL: https://svnweb.freebsd.org/changeset/base/368749 Log: pci_iov: When pci_iov_detach(9) is called, destroy VF children instead of bailing out with EBUSY if there are any. If driver module is unloaded, or just device is forcibly detached from the driver, there is no way for driver to correctly unload otherwise. Esp. if there are resources dedicated to the VFs which prevent turning down other resources. Reviewed by: jhb Sponsored by: Mellanox Technologies / NVidia Networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27615 Modified: head/sys/dev/pci/pci_iov.c Modified: head/sys/dev/pci/pci_iov.c ============================================================================== --- head/sys/dev/pci/pci_iov.c Fri Dec 18 02:41:12 2020 (r368748) +++ head/sys/dev/pci/pci_iov.c Fri Dec 18 03:46:50 2020 (r368749) @@ -95,6 +95,7 @@ static void pci_iov_build_pf_schema(nvlist_t *schema, nvlist_t **driver_schema); static void pci_iov_build_vf_schema(nvlist_t *schema, nvlist_t **driver_schema); +static int pci_iov_delete_iov_children(struct pci_devinfo *dinfo); static nvlist_t *pci_iov_get_pf_subsystem_schema(void); static nvlist_t *pci_iov_get_vf_subsystem_schema(void); @@ -191,6 +192,7 @@ pci_iov_detach_method(device_t bus, device_t dev) { struct pci_devinfo *dinfo; struct pcicfg_iov *iov; + int error; mtx_lock(&Giant); dinfo = device_get_ivars(dev); @@ -201,11 +203,17 @@ pci_iov_detach_method(device_t bus, device_t dev) return (0); } - if (iov->iov_num_vfs != 0 || iov->iov_flags & IOV_BUSY) { + if ((iov->iov_flags & IOV_BUSY) != 0) { mtx_unlock(&Giant); return (EBUSY); } + error = pci_iov_delete_iov_children(dinfo); + if (error != 0) { + mtx_unlock(&Giant); + return (error); + } + dinfo->cfg.iov = NULL; if (iov->iov_cdev) { @@ -823,31 +831,20 @@ pci_iov_is_child_vf(struct pcicfg_iov *pf, device_t ch } static int -pci_iov_delete(struct cdev *cdev) +pci_iov_delete_iov_children(struct pci_devinfo *dinfo) { device_t bus, dev, vf, *devlist; - struct pci_devinfo *dinfo; struct pcicfg_iov *iov; int i, error, devcount; uint32_t iov_ctl; - mtx_lock(&Giant); - dinfo = cdev->si_drv1; + mtx_assert(&Giant, MA_OWNED); + iov = dinfo->cfg.iov; dev = dinfo->cfg.dev; bus = device_get_parent(dev); devlist = NULL; - if (iov->iov_flags & IOV_BUSY) { - mtx_unlock(&Giant); - return (EBUSY); - } - - if (iov->iov_num_vfs == 0) { - mtx_unlock(&Giant); - return (ECHILD); - } - iov->iov_flags |= IOV_BUSY; error = device_get_children(bus, &devlist, &devcount); @@ -905,6 +902,32 @@ pci_iov_delete(struct cdev *cdev) out: free(devlist, M_TEMP); iov->iov_flags &= ~IOV_BUSY; + return (error); +} + +static int +pci_iov_delete(struct cdev *cdev) +{ + struct pci_devinfo *dinfo; + struct pcicfg_iov *iov; + int error; + + mtx_lock(&Giant); + dinfo = cdev->si_drv1; + iov = dinfo->cfg.iov; + + if ((iov->iov_flags & IOV_BUSY) != 0) { + error = EBUSY; + goto out; + } + if (iov->iov_num_vfs == 0) { + error = ECHILD; + goto out; + } + + error = pci_iov_delete_iov_children(dinfo); + +out: mtx_unlock(&Giant); return (error); } From owner-svn-src-head@freebsd.org Fri Dec 18 04:01: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 91C034AE04F; Fri, 18 Dec 2020 04:01:06 +0000 (UTC) (envelope-from yuripv@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CxwC62tm6z3j2V; Fri, 18 Dec 2020 04:01:06 +0000 (UTC) (envelope-from yuripv@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 5672124643; Fri, 18 Dec 2020 04:01:06 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BI4164B084573; Fri, 18 Dec 2020 04:01:06 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BI4160l084572; Fri, 18 Dec 2020 04:01:06 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202012180401.0BI4160l084572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Fri, 18 Dec 2020 04:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368750 - head/tools/tools/locale X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/tools/tools/locale X-SVN-Commit-Revision: 368750 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.34 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, 18 Dec 2020 04:01:06 -0000 Author: yuripv Date: Fri Dec 18 04:01:05 2020 New Revision: 368750 URL: https://svnweb.freebsd.org/changeset/base/368750 Log: tools/tools/locale: install generated files in current src checkout Modified: head/tools/tools/locale/Makefile Modified: head/tools/tools/locale/Makefile ============================================================================== --- head/tools/tools/locale/Makefile Fri Dec 18 03:46:50 2020 (r368749) +++ head/tools/tools/locale/Makefile Fri Dec 18 04:01:05 2020 (r368750) @@ -11,7 +11,7 @@ .error Do make obj first. .endif -LOCALESRCDIR?= ${DESTDIR}/usr/src/share +LOCALESRCDIR?= ${SRCTOP}/share TMPDIR?= /tmp BASEDIR= ${.CURDIR} From owner-svn-src-head@freebsd.org Fri Dec 18 04: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 01AED4AE777; Fri, 18 Dec 2020 04:23:21 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cxwhn67F8z3k1W; Fri, 18 Dec 2020 04:23:21 +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 C4FF7248E7; Fri, 18 Dec 2020 04:23:21 +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 0BI4NLS6000497; Fri, 18 Dec 2020 04:23:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BI4NL9p000492; Fri, 18 Dec 2020 04:23:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202012180423.0BI4NL9p000492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 18 Dec 2020 04:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368751 - in head/contrib/unbound: services util X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head/contrib/unbound: services util X-SVN-Commit-Revision: 368751 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.34 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, 18 Dec 2020 04:23:22 -0000 Author: delphij Date: Fri Dec 18 04:23:20 2020 New Revision: 368751 URL: https://svnweb.freebsd.org/changeset/base/368751 Log: MFV r368746: Apply upstream fix 08968baec1122a58bb90d8f97ad948a75f8a5d69: Fix error cases when udp-connect is set and send() returns an error Obtained from: unbound git MFC after: 3 days Modified: head/contrib/unbound/services/authzone.c head/contrib/unbound/services/outside_network.c head/contrib/unbound/util/netevent.c head/contrib/unbound/util/netevent.h Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/services/authzone.c ============================================================================== --- head/contrib/unbound/services/authzone.c Fri Dec 18 04:01:05 2020 (r368750) +++ head/contrib/unbound/services/authzone.c Fri Dec 18 04:23:20 2020 (r368751) @@ -6093,7 +6093,7 @@ xfr_probe_send_probe(struct auth_xfer* xfr, struct mod /* send udp packet */ if(!comm_point_send_udp_msg(xfr->task_probe->cp, env->scratch_buffer, - (struct sockaddr*)&addr, addrlen)) { + (struct sockaddr*)&addr, addrlen, 0)) { char zname[255+1], as[256]; dname_str(xfr->name, zname); addr_to_str(&addr, addrlen, as, sizeof(as)); Modified: head/contrib/unbound/services/outside_network.c ============================================================================== --- head/contrib/unbound/services/outside_network.c Fri Dec 18 04:01:05 2020 (r368750) +++ head/contrib/unbound/services/outside_network.c Fri Dec 18 04:23:20 2020 (r368751) @@ -1870,17 +1870,10 @@ randomize_and_send_udp(struct pending* pend, sldns_buf log_assert(pend->pc && pend->pc->cp); /* send it over the commlink */ - if(outnet->udp_connect) { - if(!comm_point_send_udp_msg(pend->pc->cp, packet, NULL, 0)) { - portcomm_loweruse(outnet, pend->pc); - return 0; - } - } else { - if(!comm_point_send_udp_msg(pend->pc->cp, packet, - (struct sockaddr*)&pend->addr, pend->addrlen)) { - portcomm_loweruse(outnet, pend->pc); - return 0; - } + if(!comm_point_send_udp_msg(pend->pc->cp, packet, + (struct sockaddr*)&pend->addr, pend->addrlen, outnet->udp_connect)) { + portcomm_loweruse(outnet, pend->pc); + return 0; } /* system calls to set timeout after sending UDP to make roundtrip Modified: head/contrib/unbound/util/netevent.c ============================================================================== --- head/contrib/unbound/util/netevent.c Fri Dec 18 04:01:05 2020 (r368750) +++ head/contrib/unbound/util/netevent.c Fri Dec 18 04:23:20 2020 (r368751) @@ -333,7 +333,7 @@ int tcp_connect_errno_needs_log(struct sockaddr* addr, /* send a UDP reply */ int comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet, - struct sockaddr* addr, socklen_t addrlen) + struct sockaddr* addr, socklen_t addrlen, int is_connected) { ssize_t sent; log_assert(c->fd != -1); @@ -341,8 +341,8 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_bu if(sldns_buffer_remaining(packet) == 0) log_err("error: send empty UDP packet"); #endif - if(addr) { - log_assert(addr && addrlen > 0); + log_assert(addr && addrlen > 0); + if(!is_connected) { sent = sendto(c->fd, (void*)sldns_buffer_begin(packet), sldns_buffer_remaining(packet), 0, addr, addrlen); @@ -367,9 +367,14 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_bu #endif int e; fd_set_block(c->fd); - sent = sendto(c->fd, (void*)sldns_buffer_begin(packet), - sldns_buffer_remaining(packet), 0, - addr, addrlen); + if (!is_connected) { + sent = sendto(c->fd, (void*)sldns_buffer_begin(packet), + sldns_buffer_remaining(packet), 0, + addr, addrlen); + } else { + sent = send(c->fd, (void*)sldns_buffer_begin(packet), + sldns_buffer_remaining(packet), 0); + } e = errno; fd_set_nonblock(c->fd); errno = e; @@ -378,8 +383,12 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_bu if(sent == -1) { if(!udp_send_errno_needs_log(addr, addrlen)) return 0; - verbose(VERB_OPS, "sendto failed: %s", sock_strerror(errno)); - log_addr(VERB_OPS, "remote address is", + if (!is_connected) { + verbose(VERB_OPS, "sendto failed: %s", sock_strerror(errno)); + } else { + verbose(VERB_OPS, "send failed: %s", sock_strerror(errno)); + } + log_addr(VERB_OPS, "remote address is", (struct sockaddr_storage*)addr, addrlen); return 0; } else if((size_t)sent != sldns_buffer_remaining(packet)) { @@ -754,7 +763,7 @@ comm_point_udp_callback(int fd, short event, void* arg buffer = rep.c->buffer; #endif (void)comm_point_send_udp_msg(rep.c, buffer, - (struct sockaddr*)&rep.addr, rep.addrlen); + (struct sockaddr*)&rep.addr, rep.addrlen, 0); } if(!rep.c || rep.c->fd != fd) /* commpoint closed to -1 or reused for another UDP port. Note rep.c cannot be reused with TCP fd. */ @@ -3901,7 +3910,7 @@ comm_point_send_reply(struct comm_reply *repinfo) repinfo->addrlen, repinfo); else comm_point_send_udp_msg(repinfo->c, buffer, - (struct sockaddr*)&repinfo->addr, repinfo->addrlen); + (struct sockaddr*)&repinfo->addr, repinfo->addrlen, 0); #ifdef USE_DNSTAP if(repinfo->c->dtenv != NULL && repinfo->c->dtenv->log_client_response_messages) Modified: head/contrib/unbound/util/netevent.h ============================================================================== --- head/contrib/unbound/util/netevent.h Fri Dec 18 04:01:05 2020 (r368750) +++ head/contrib/unbound/util/netevent.h Fri Dec 18 04:23:20 2020 (r368751) @@ -633,10 +633,11 @@ void comm_point_drop_reply(struct comm_reply* repinfo) * @param addr: where to send it to. If NULL, send is performed, * for connected sockets, to the connected address. * @param addrlen: length of addr. + * @param is_connected: if the UDP socket is connect()ed. * @return: false on a failure. */ int comm_point_send_udp_msg(struct comm_point* c, struct sldns_buffer* packet, - struct sockaddr* addr, socklen_t addrlen); + struct sockaddr* addr, socklen_t addrlen,int is_connected); /** * Stop listening for input on the commpoint. No callbacks will happen. From owner-svn-src-head@freebsd.org Fri Dec 18 08:43:07 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 1E9174B2BE2; Fri, 18 Dec 2020 08:43:07 +0000 (UTC) (envelope-from yuripv@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cy2SW0MjDz3wG7; Fri, 18 Dec 2020 08:43:07 +0000 (UTC) (envelope-from yuripv@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 F37EE119; Fri, 18 Dec 2020 08:43:06 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BI8h6Iv061884; Fri, 18 Dec 2020 08:43:06 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BI8h6Lr061883; Fri, 18 Dec 2020 08:43:06 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <202012180843.0BI8h6Lr061883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Fri, 18 Dec 2020 08:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368754 - head/tools/tools/locale X-SVN-Group: head X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: head/tools/tools/locale X-SVN-Commit-Revision: 368754 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.34 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, 18 Dec 2020 08:43:07 -0000 Author: yuripv Date: Fri Dec 18 08:43:06 2020 New Revision: 368754 URL: https://svnweb.freebsd.org/changeset/base/368754 Log: tools/tools/locale: fix static-colldef Modified: head/tools/tools/locale/Makefile Modified: head/tools/tools/locale/Makefile ============================================================================== --- head/tools/tools/locale/Makefile Fri Dec 18 08:40:33 2020 (r368753) +++ head/tools/tools/locale/Makefile Fri Dec 18 08:43:06 2020 (r368754) @@ -126,9 +126,8 @@ build-colldef: static-colldef static-colldef: .for area enc in ${COLLATION_SPECIAL} -colldef.draft/${area}.${enc}.src: posix/${area}.${enc}.src awk -f ${TOOLSDIR}/extract-colldef.awk \ - ${.ALLSRC} > ${.TARGET} || (rm -f ${.TARGET} && false) + posix/${area}.${enc}.src > colldef.draft/${area}.${enc}.src .endfor BASE_LOCALES_OF_INTEREST?= \ From owner-svn-src-head@freebsd.org Fri Dec 18 10:09: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 D8DFC4B47BC; Fri, 18 Dec 2020 10:09:21 +0000 (UTC) (envelope-from mw@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cy4N15qxTz4V09; Fri, 18 Dec 2020 10:09:21 +0000 (UTC) (envelope-from mw@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 BB29D102B; Fri, 18 Dec 2020 10:09:21 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BIA9LTt012742; Fri, 18 Dec 2020 10:09:21 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIA9LvF012741; Fri, 18 Dec 2020 10:09:21 GMT (envelope-from mw@FreeBSD.org) Message-Id: <202012181009.0BIA9LvF012741@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Fri, 18 Dec 2020 10:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368756 - head/contrib/jemalloc/src X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/contrib/jemalloc/src X-SVN-Commit-Revision: 368756 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.34 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, 18 Dec 2020 10:09:21 -0000 Author: mw Date: Fri Dec 18 10:09:21 2020 New Revision: 368756 URL: https://svnweb.freebsd.org/changeset/base/368756 Log: Fix abort in jemalloc extent coalescing. Fix error in extent_try_coalesce_impl(), which could cause abort to happen when trying to coalesce extents backwards. The error could happen because of how extent_before_get() function works. This function gets address of previous extent, by subtracting page size from current extent address. If current extent is located at PAGE_SIZE offset, this address resolved to 0x0000. An assertion in rtree_leaf_elm_lookup then caused the running program to abort. This problem was discovered when trying to build world on 32-bit machines with ASLR and PIE enabled. The problem was encountered on armv7 and i386 machines, but most likely other 32-bit architectures are affected as well. While this patch fixes one problem with buildworld on 32-bit platforms with ASLR, the build still fails, however it happens much later and due to lack of memory. The change is aligned with accepted fix in the upstream Jemalloc repository (https://github.com/jemalloc/jemalloc/pull/1973). As it doesn't apply on top of Jemalloc tree, its updated version was eventually merged: https://github.com/jemalloc/jemalloc/pull/2003 PR: 249937 Submitted by: Dawid Gorecki Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D27025 Modified: head/contrib/jemalloc/src/extent.c Modified: head/contrib/jemalloc/src/extent.c ============================================================================== --- head/contrib/jemalloc/src/extent.c Fri Dec 18 10:08:11 2020 (r368755) +++ head/contrib/jemalloc/src/extent.c Fri Dec 18 10:09:21 2020 (r368756) @@ -1641,8 +1641,11 @@ extent_try_coalesce_impl(tsdn_t *tsdn, arena_t *arena, } /* Try to coalesce backward. */ - extent_t *prev = extent_lock_from_addr(tsdn, rtree_ctx, - extent_before_get(extent), inactive_only); + extent_t *prev = NULL; + if (extent_before_get(extent) != NULL) { + prev = extent_lock_from_addr(tsdn, rtree_ctx, + extent_before_get(extent), inactive_only); + } if (prev != NULL) { bool can_coalesce = extent_can_coalesce(arena, extents, extent, prev); From owner-svn-src-head@freebsd.org Fri Dec 18 15:07: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 B1E414BAF1C; Fri, 18 Dec 2020 15:07:14 +0000 (UTC) (envelope-from jrtc27@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyBzk4kbmz4m0r; Fri, 18 Dec 2020 15:07:14 +0000 (UTC) (envelope-from jrtc27@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 95A144F2E; Fri, 18 Dec 2020 15:07:14 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BIF7E2r004931; Fri, 18 Dec 2020 15:07:14 GMT (envelope-from jrtc27@FreeBSD.org) Received: (from jrtc27@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIF7ERX004930; Fri, 18 Dec 2020 15:07:14 GMT (envelope-from jrtc27@FreeBSD.org) Message-Id: <202012181507.0BIF7ERX004930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrtc27 set sender to jrtc27@FreeBSD.org using -f From: Jessica Clarke Date: Fri, 18 Dec 2020 15:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368761 - head/sys/dev/virtio/mmio X-SVN-Group: head X-SVN-Commit-Author: jrtc27 X-SVN-Commit-Paths: head/sys/dev/virtio/mmio X-SVN-Commit-Revision: 368761 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.34 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, 18 Dec 2020 15:07:14 -0000 Author: jrtc27 Date: Fri Dec 18 15:07:14 2020 New Revision: 368761 URL: https://svnweb.freebsd.org/changeset/base/368761 Log: virtio_mmio: Fix feature negotiation copy-paste issue in r361943 This caused us to write to the low half of the feature word twice, once with the high bits and once with the low bits. Common legacy device implementations seem to be fairly lenient about being able to write to the feature bits multiple times, but Arm's models use a stricter implementation that will ignore the second write. This fixes using vtnet(4) on those models. Reported by: Jean-Philippe Brucker Pointy hat: jrtc27 Modified: head/sys/dev/virtio/mmio/virtio_mmio.c Modified: head/sys/dev/virtio/mmio/virtio_mmio.c ============================================================================== --- head/sys/dev/virtio/mmio/virtio_mmio.c Fri Dec 18 12:40:19 2020 (r368760) +++ head/sys/dev/virtio/mmio/virtio_mmio.c Fri Dec 18 15:07:14 2020 (r368761) @@ -409,10 +409,10 @@ vtmmio_negotiate_features(device_t dev, uint64_t child vtmmio_describe_features(sc, "negotiated", features); - vtmmio_write_config_4(sc, VIRTIO_MMIO_HOST_FEATURES_SEL, 1); + vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_FEATURES_SEL, 1); vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_FEATURES, features >> 32); - vtmmio_write_config_4(sc, VIRTIO_MMIO_HOST_FEATURES_SEL, 0); + vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_FEATURES_SEL, 0); vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_FEATURES, features); return (features); From owner-svn-src-head@freebsd.org Fri Dec 18 16:02: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 61EC04BC4DF; Fri, 18 Dec 2020 16:02:29 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyDCT2Ph2z4qdG; Fri, 18 Dec 2020 16:02:29 +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 4522B5BC2; Fri, 18 Dec 2020 16:02:29 +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 0BIG2TqF042532; Fri, 18 Dec 2020 16:02:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIG2T3Y042531; Fri, 18 Dec 2020 16:02:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012181602.0BIG2T3Y042531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 18 Dec 2020 16:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368762 - head/libexec/rc/rc.d X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/libexec/rc/rc.d X-SVN-Commit-Revision: 368762 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.34 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, 18 Dec 2020 16:02:29 -0000 Author: markj Date: Fri Dec 18 16:02:28 2020 New Revision: 368762 URL: https://svnweb.freebsd.org/changeset/base/368762 Log: Fix the ipfw service status output when ipfw.ko isn't loaded Reported by: lme Reviewed by: lme MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27657 Modified: head/libexec/rc/rc.d/ipfw Modified: head/libexec/rc/rc.d/ipfw ============================================================================== --- head/libexec/rc/rc.d/ipfw Fri Dec 18 15:07:14 2020 (r368761) +++ head/libexec/rc/rc.d/ipfw Fri Dec 18 16:02:28 2020 (r368762) @@ -129,7 +129,9 @@ ipfw_status() status=$(sysctl -i -n net.inet.ip.fw.enable) : ${status:=0} if afexists inet6; then - status=$((${status} + $(sysctl -i -n net.inet6.ip6.fw.enable))) + status6=$(sysctl -i -n net.inet6.ip6.fw.enable) + : ${status6:=0} + status=$((${status} + ${status6})) fi if [ ${status} -eq 0 ]; then echo "ipfw is not enabled" From owner-svn-src-head@freebsd.org Fri Dec 18 16:04: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 7806A4BC64D; Fri, 18 Dec 2020 16:04:49 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyDG92y1Dz4qmd; Fri, 18 Dec 2020 16:04:49 +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 572FE5C9B; Fri, 18 Dec 2020 16:04:49 +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 0BIG4nrV042672; Fri, 18 Dec 2020 16:04:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIG4nex042671; Fri, 18 Dec 2020 16:04:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202012181604.0BIG4nex042671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 18 Dec 2020 16:04:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368763 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 368763 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.34 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, 18 Dec 2020 16:04:49 -0000 Author: markj Date: Fri Dec 18 16:04:48 2020 New Revision: 368763 URL: https://svnweb.freebsd.org/changeset/base/368763 Log: acpi: Ensure that adjacent memory affinity table entries are coalesced The SRAT may contain multiple distinct entries that together describe a contiguous region of physical memory. In this case we were not coalescing the corresponding entries in the memory affinity table, which led to fragmented phys_avail[] entries. Since r338431 the vm_phys_segs[] entries derived from phys_avail[] will be coalesced, resulting in a situation where vm_phys_segs[] entries do not have a covering phys_avail[] entry. vm_page_startup() will not add such segments to the physical memory allocator, leaving them unused. Reported by: Don Morris Reviewed by: kib, vangyzen MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27620 Modified: head/sys/dev/acpica/acpi_pxm.c Modified: head/sys/dev/acpica/acpi_pxm.c ============================================================================== --- head/sys/dev/acpica/acpi_pxm.c Fri Dec 18 16:02:28 2020 (r368762) +++ head/sys/dev/acpica/acpi_pxm.c Fri Dec 18 16:04:48 2020 (r368763) @@ -265,6 +265,7 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *ar ACPI_SRAT_MEM_AFFINITY *mem; ACPI_SRAT_GICC_AFFINITY *gicc; static struct cpu_info *cpup; + uint64_t base, length; int domain, i, slot; switch (entry->Type) { @@ -327,20 +328,22 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *ar break; case ACPI_SRAT_TYPE_MEMORY_AFFINITY: mem = (ACPI_SRAT_MEM_AFFINITY *)entry; + base = mem->BaseAddress; + length = mem->Length; + domain = mem->ProximityDomain; + if (bootverbose) printf( "SRAT: Found memory domain %d addr 0x%jx len 0x%jx: %s\n", - mem->ProximityDomain, (uintmax_t)mem->BaseAddress, - (uintmax_t)mem->Length, + domain, (uintmax_t)base, (uintmax_t)length, (mem->Flags & ACPI_SRAT_MEM_ENABLED) ? "enabled" : "disabled"); if (!(mem->Flags & ACPI_SRAT_MEM_ENABLED)) break; - if (mem->BaseAddress >= maxphyaddr || - !overlaps_phys_avail(mem->BaseAddress, - mem->BaseAddress + mem->Length)) { + if (base >= maxphyaddr || + !overlaps_phys_avail(base, base + length)) { printf("SRAT: Ignoring memory at addr 0x%jx\n", - (uintmax_t)mem->BaseAddress); + (uintmax_t)base); break; } if (num_mem == VM_PHYSSEG_MAX) { @@ -350,10 +353,20 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *ar } slot = num_mem; for (i = 0; i < num_mem; i++) { - if (mem_info[i].end <= mem->BaseAddress) + if (mem_info[i].domain == domain) { + /* Try to extend an existing segment. */ + if (base == mem_info[i].end) { + mem_info[i].end += length; + return; + } + if (base + length == mem_info[i].start) { + mem_info[i].start -= length; + return; + } + } + if (mem_info[i].end <= base) continue; - if (mem_info[i].start < - (mem->BaseAddress + mem->Length)) { + if (mem_info[i].start < base + length) { printf("SRAT: Overlapping memory entries\n"); *(int *)arg = ENXIO; return; @@ -362,9 +375,9 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *ar } for (i = num_mem; i > slot; i--) mem_info[i] = mem_info[i - 1]; - mem_info[slot].start = mem->BaseAddress; - mem_info[slot].end = mem->BaseAddress + mem->Length; - mem_info[slot].domain = mem->ProximityDomain; + mem_info[slot].start = base; + mem_info[slot].end = base + length; + mem_info[slot].domain = domain; num_mem++; break; } From owner-svn-src-head@freebsd.org Fri Dec 18 16:09: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 3F1094BCA96; Fri, 18 Dec 2020 16:09:25 +0000 (UTC) (envelope-from mhorne@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyDMT1CnGz4r1y; Fri, 18 Dec 2020 16:09:25 +0000 (UTC) (envelope-from mhorne@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 1C82656F8; Fri, 18 Dec 2020 16:09:25 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BIG9O0x042940; Fri, 18 Dec 2020 16:09:24 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIG9O74042936; Fri, 18 Dec 2020 16:09:24 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012181609.0BIG9O74042936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Fri, 18 Dec 2020 16:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368764 - in head/sys/amd64: amd64 include X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys/amd64: amd64 include X-SVN-Commit-Revision: 368764 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.34 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, 18 Dec 2020 16:09:25 -0000 Author: mhorne Date: Fri Dec 18 16:09:24 2020 New Revision: 368764 URL: https://svnweb.freebsd.org/changeset/base/368764 Log: amd64: allow gdb(4) to write to most registers Similar to the recent patch to arm's gdb stub in r368414, allow GDB to update the contents of most general purpose registers. Reviewed by: cem, jhb, markj MFC after: 2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 44 Differential Revision: https://reviews.freebsd.org/D27642 Modified: head/sys/amd64/amd64/gdb_machdep.c head/sys/amd64/include/gdb_machdep.h Modified: head/sys/amd64/amd64/gdb_machdep.c ============================================================================== --- head/sys/amd64/amd64/gdb_machdep.c Fri Dec 18 16:04:48 2020 (r368763) +++ head/sys/amd64/amd64/gdb_machdep.c Fri Dec 18 16:09:24 2020 (r368764) @@ -92,12 +92,42 @@ gdb_cpu_getreg(int regnum, size_t *regsz) void gdb_cpu_setreg(int regnum, void *val) { + register_t regval = *(register_t *)val; + /* + * Write registers to the trapframe and pcb, if applicable. + * Some scratch registers are not tracked by the pcb. + */ + if (kdb_thread == curthread) { + switch (regnum) { + case GDB_REG_RAX: kdb_frame->tf_rax = regval; break; + case GDB_REG_RBX: kdb_frame->tf_rbx = regval; break; + case GDB_REG_RCX: kdb_frame->tf_rcx = regval; break; + case GDB_REG_RDX: kdb_frame->tf_rdx = regval; break; + case GDB_REG_RSI: kdb_frame->tf_rsi = regval; break; + case GDB_REG_RDI: kdb_frame->tf_rdi = regval; break; + case GDB_REG_RBP: kdb_frame->tf_rbp = regval; break; + case GDB_REG_RSP: kdb_frame->tf_rsp = regval; break; + case GDB_REG_R8: kdb_frame->tf_r8 = regval; break; + case GDB_REG_R9: kdb_frame->tf_r9 = regval; break; + case GDB_REG_R10: kdb_frame->tf_r10 = regval; break; + case GDB_REG_R11: kdb_frame->tf_r11 = regval; break; + case GDB_REG_R12: kdb_frame->tf_r12 = regval; break; + case GDB_REG_R13: kdb_frame->tf_r13 = regval; break; + case GDB_REG_R14: kdb_frame->tf_r14 = regval; break; + case GDB_REG_R15: kdb_frame->tf_r15 = regval; break; + case GDB_REG_PC: kdb_frame->tf_rip = regval; break; + } + } switch (regnum) { - case GDB_REG_PC: - kdb_thrctx->pcb_rip = *(register_t *)val; - if (kdb_thread == curthread) - kdb_frame->tf_rip = *(register_t *)val; + case GDB_REG_RBX: kdb_thrctx->pcb_rbx = regval; break; + case GDB_REG_RBP: kdb_thrctx->pcb_rbp = regval; break; + case GDB_REG_RSP: kdb_thrctx->pcb_rsp = regval; break; + case GDB_REG_R12: kdb_thrctx->pcb_r12 = regval; break; + case GDB_REG_R13: kdb_thrctx->pcb_r13 = regval; break; + case GDB_REG_R14: kdb_thrctx->pcb_r14 = regval; break; + case GDB_REG_R15: kdb_thrctx->pcb_r15 = regval; break; + case GDB_REG_PC: kdb_thrctx->pcb_rip = regval; break; } } Modified: head/sys/amd64/include/gdb_machdep.h ============================================================================== --- head/sys/amd64/include/gdb_machdep.h Fri Dec 18 16:04:48 2020 (r368763) +++ head/sys/amd64/include/gdb_machdep.h Fri Dec 18 16:09:24 2020 (r368764) @@ -33,6 +33,22 @@ #define GDB_BUFSZ 4096 #define GDB_NREGS 56 +#define GDB_REG_RAX 0 +#define GDB_REG_RBX 1 +#define GDB_REG_RCX 2 +#define GDB_REG_RDX 3 +#define GDB_REG_RSI 4 +#define GDB_REG_RDI 5 +#define GDB_REG_RBP 6 +#define GDB_REG_RSP 7 +#define GDB_REG_R8 8 +#define GDB_REG_R9 9 +#define GDB_REG_R10 10 +#define GDB_REG_R11 11 +#define GDB_REG_R12 12 +#define GDB_REG_R13 13 +#define GDB_REG_R14 14 +#define GDB_REG_R15 15 #define GDB_REG_PC 16 _Static_assert(GDB_BUFSZ >= (GDB_NREGS * 16), "buffer fits 'g' regs"); From owner-svn-src-head@freebsd.org Fri Dec 18 16:16: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 115F24BCBC6; Fri, 18 Dec 2020 16:16:04 +0000 (UTC) (envelope-from mhorne@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyDW775Z4z4rVx; Fri, 18 Dec 2020 16:16:03 +0000 (UTC) (envelope-from mhorne@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 E1FD75CC9; Fri, 18 Dec 2020 16:16:03 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BIGG3v4048951; Fri, 18 Dec 2020 16:16:03 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIGG3XH048949; Fri, 18 Dec 2020 16:16:03 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012181616.0BIGG3XH048949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Fri, 18 Dec 2020 16:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368765 - in head/sys/amd64: amd64 include X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys/amd64: amd64 include X-SVN-Commit-Revision: 368765 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.34 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, 18 Dec 2020 16:16:04 -0000 Author: mhorne Date: Fri Dec 18 16:16:03 2020 New Revision: 368765 URL: https://svnweb.freebsd.org/changeset/base/368765 Log: amd64: use register macros for gdb_cpu_getreg() Prefer these newly-added definitions to bare values. MFC after: 2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Modified: head/sys/amd64/amd64/gdb_machdep.c head/sys/amd64/include/gdb_machdep.h Modified: head/sys/amd64/amd64/gdb_machdep.c ============================================================================== --- head/sys/amd64/amd64/gdb_machdep.c Fri Dec 18 16:09:24 2020 (r368764) +++ head/sys/amd64/amd64/gdb_machdep.c Fri Dec 18 16:16:03 2020 (r368765) @@ -60,31 +60,31 @@ gdb_cpu_getreg(int regnum, size_t *regsz) if (kdb_thread == curthread) { switch (regnum) { - case 0: return (&kdb_frame->tf_rax); - case 2: return (&kdb_frame->tf_rcx); - case 3: return (&kdb_frame->tf_rdx); - case 4: return (&kdb_frame->tf_rsi); - case 5: return (&kdb_frame->tf_rdi); - case 8: return (&kdb_frame->tf_r8); - case 9: return (&kdb_frame->tf_r9); - case 10: return (&kdb_frame->tf_r10); - case 11: return (&kdb_frame->tf_r11); - case 17: return (&kdb_frame->tf_rflags); - case 18: return (&kdb_frame->tf_cs); - case 19: return (&kdb_frame->tf_ss); + case GDB_REG_RAX: return (&kdb_frame->tf_rax); + case GDB_REG_RCX: return (&kdb_frame->tf_rcx); + case GDB_REG_RDX: return (&kdb_frame->tf_rdx); + case GDB_REG_RSI: return (&kdb_frame->tf_rsi); + case GDB_REG_RDI: return (&kdb_frame->tf_rdi); + case GDB_REG_R8: return (&kdb_frame->tf_r8); + case GDB_REG_R9: return (&kdb_frame->tf_r9); + case GDB_REG_R10: return (&kdb_frame->tf_r10); + case GDB_REG_R11: return (&kdb_frame->tf_r11); + case GDB_REG_RFLAGS: return (&kdb_frame->tf_rflags); + case GDB_REG_CS: return (&kdb_frame->tf_cs); + case GDB_REG_SS: return (&kdb_frame->tf_ss); } } switch (regnum) { - case 1: return (&kdb_thrctx->pcb_rbx); - case 6: return (&kdb_thrctx->pcb_rbp); - case 7: return (&kdb_thrctx->pcb_rsp); - case 12: return (&kdb_thrctx->pcb_r12); - case 13: return (&kdb_thrctx->pcb_r13); - case 14: return (&kdb_thrctx->pcb_r14); - case 15: return (&kdb_thrctx->pcb_r15); - case 16: return (&kdb_thrctx->pcb_rip); - case 18: return (&_kcodesel); - case 19: return (&_kdatasel); + case GDB_REG_RBX: return (&kdb_thrctx->pcb_rbx); + case GDB_REG_RBP: return (&kdb_thrctx->pcb_rbp); + case GDB_REG_RSP: return (&kdb_thrctx->pcb_rsp); + case GDB_REG_R12: return (&kdb_thrctx->pcb_r12); + case GDB_REG_R13: return (&kdb_thrctx->pcb_r13); + case GDB_REG_R14: return (&kdb_thrctx->pcb_r14); + case GDB_REG_R15: return (&kdb_thrctx->pcb_r15); + case GDB_REG_PC: return (&kdb_thrctx->pcb_rip); + case GDB_REG_CS: return (&_kcodesel); + case GDB_REG_SS: return (&_kdatasel); } return (NULL); } Modified: head/sys/amd64/include/gdb_machdep.h ============================================================================== --- head/sys/amd64/include/gdb_machdep.h Fri Dec 18 16:09:24 2020 (r368764) +++ head/sys/amd64/include/gdb_machdep.h Fri Dec 18 16:16:03 2020 (r368765) @@ -50,6 +50,9 @@ #define GDB_REG_R14 14 #define GDB_REG_R15 15 #define GDB_REG_PC 16 +#define GDB_REG_RFLAGS 17 +#define GDB_REG_CS 18 +#define GDB_REG_SS 19 _Static_assert(GDB_BUFSZ >= (GDB_NREGS * 16), "buffer fits 'g' regs"); static __inline size_t From owner-svn-src-head@freebsd.org Fri Dec 18 16:55: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 0FFBA4BD6D5; Fri, 18 Dec 2020 16:55:55 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyFP66zMQz4tcX; Fri, 18 Dec 2020 16:55:54 +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 E11EC6350; Fri, 18 Dec 2020 16:55:54 +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 0BIGtsG1073928; Fri, 18 Dec 2020 16:55:54 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIGtscO073927; Fri, 18 Dec 2020 16:55:54 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202012181655.0BIGtscO073927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 18 Dec 2020 16:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368766 - head/sys/arm64/rockchip/clk X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm64/rockchip/clk X-SVN-Commit-Revision: 368766 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.34 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, 18 Dec 2020 16:55:55 -0000 Author: manu Date: Fri Dec 18 16:55:54 2020 New Revision: 368766 URL: https://svnweb.freebsd.org/changeset/base/368766 Log: arm64: rk3399: Export the watchdog clock This clock is used by the watchdog IP and can be controlled only in the secure world. Modified: head/sys/arm64/rockchip/clk/rk3399_cru.c Modified: head/sys/arm64/rockchip/clk/rk3399_cru.c ============================================================================== --- head/sys/arm64/rockchip/clk/rk3399_cru.c Fri Dec 18 16:16:03 2020 (r368765) +++ head/sys/arm64/rockchip/clk/rk3399_cru.c Fri Dec 18 16:55:54 2020 (r368766) @@ -1212,6 +1212,11 @@ static struct rk_clk rk3399_clks[] = { FRACT(DCLK_VOP1_FRAC, "dclk_vop1_frac", "dclk_vop1_div", 0, 107), + /* + * This clock is controlled in the secure world + */ + FFACT(PCLK_WDT, "pclk_wdt", "pclk_alive", 1, 1), + /* Not yet implemented yet * MMC(SCLK_SDMMC_DRV, "sdmmc_drv", "clk_sdmmc", RK3399_SDMMC_CON0, 1), * MMC(SCLK_SDMMC_SAMPLE, "sdmmc_sample", "clk_sdmmc", RK3399_SDMMC_CON1, 1), From owner-svn-src-head@freebsd.org Fri Dec 18 20:10: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 C973E4C57D1; Fri, 18 Dec 2020 20:10:30 +0000 (UTC) (envelope-from mhorne@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyKjf5Ldvz3NPy; Fri, 18 Dec 2020 20:10:30 +0000 (UTC) (envelope-from mhorne@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 A5DCF10F74; Fri, 18 Dec 2020 20:10:30 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BIKAUOT093513; Fri, 18 Dec 2020 20:10:30 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIKAUSS093512; Fri, 18 Dec 2020 20:10:30 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202012182010.0BIKAUSS093512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Fri, 18 Dec 2020 20:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368767 - in head/sys/riscv: include riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys/riscv: include riscv X-SVN-Commit-Revision: 368767 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.34 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, 18 Dec 2020 20:10:30 -0000 Author: mhorne Date: Fri Dec 18 20:10:30 2020 New Revision: 368767 URL: https://svnweb.freebsd.org/changeset/base/368767 Log: riscv: report additional known SBI implementations These implementation IDs are defined in the SBI spec, so we should print their name if detected. Submitted by: Danjel Qyteza Reviewed by: jhb, kp Differential Revision: https://reviews.freebsd.org/D27660 Modified: head/sys/riscv/include/sbi.h head/sys/riscv/riscv/sbi.c Modified: head/sys/riscv/include/sbi.h ============================================================================== --- head/sys/riscv/include/sbi.h Fri Dec 18 16:55:54 2020 (r368766) +++ head/sys/riscv/include/sbi.h Fri Dec 18 20:10:30 2020 (r368767) @@ -47,6 +47,10 @@ /* SBI Implementation IDs */ #define SBI_IMPL_ID_BBL 0 #define SBI_IMPL_ID_OPENSBI 1 +#define SBI_IMPL_ID_XVISOR 2 +#define SBI_IMPL_ID_KVM 3 +#define SBI_IMPL_ID_RUSTSBI 4 +#define SBI_IMPL_ID_DIOSIX 5 /* SBI Error Codes */ #define SBI_SUCCESS 0 Modified: head/sys/riscv/riscv/sbi.c ============================================================================== --- head/sys/riscv/riscv/sbi.c Fri Dec 18 16:55:54 2020 (r368766) +++ head/sys/riscv/riscv/sbi.c Fri Dec 18 20:10:30 2020 (r368767) @@ -110,6 +110,18 @@ sbi_print_version(void) case (SBI_IMPL_ID_BBL): printf("SBI: Berkely Boot Loader %lu\n", sbi_impl_version); break; + case (SBI_IMPL_ID_XVISOR): + printf("SBI: eXtensible Versatile hypervISOR %lu\n", sbi_impl_version); + break; + case (SBI_IMPL_ID_KVM): + printf("SBI: Kernel-based Virtual Machine %lu\n", sbi_impl_version); + break; + case (SBI_IMPL_ID_RUSTSBI): + printf("SBI: RustSBI %lu\n", sbi_impl_version); + break; + case (SBI_IMPL_ID_DIOSIX): + printf("SBI: Diosix %lu\n", sbi_impl_version); + break; case (SBI_IMPL_ID_OPENSBI): major = sbi_impl_version >> OPENSBI_VERSION_MAJOR_OFFSET; minor = sbi_impl_version & OPENSBI_VERSION_MINOR_MASK; From owner-svn-src-head@freebsd.org Fri Dec 18 20:41: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 0EFE74A8CAF; Fri, 18 Dec 2020 20:41:25 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyLPJ73fwz3QSF; Fri, 18 Dec 2020 20:41:24 +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 DAFC7112C8; Fri, 18 Dec 2020 20:41:24 +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 0BIKfO4D014649; Fri, 18 Dec 2020 20:41:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIKfOXm013905; Fri, 18 Dec 2020 20:41:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202012182041.0BIKfOXm013905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 18 Dec 2020 20:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368768 - in head/sys: amd64/amd64 arm64/arm64 i386/i386 riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm64/arm64 i386/i386 riscv/riscv X-SVN-Commit-Revision: 368768 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.34 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, 18 Dec 2020 20:41:25 -0000 Author: jhb Date: Fri Dec 18 20:41:23 2020 New Revision: 368768 URL: https://svnweb.freebsd.org/changeset/base/368768 Log: Skip the vm.pmap.kernel_maps sysctl by default. This sysctl node can generate very verbose output, so don't trigger it for sysctl -a or sysctl vm.pmap. Reviewed by: markj, kib Differential Revision: https://reviews.freebsd.org/D27504 Modified: head/sys/amd64/amd64/pmap.c head/sys/arm64/arm64/pmap.c head/sys/i386/i386/pmap_base.c head/sys/riscv/riscv/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Dec 18 20:10:30 2020 (r368767) +++ head/sys/amd64/amd64/pmap.c Fri Dec 18 20:41:23 2020 (r368768) @@ -11271,7 +11271,7 @@ restart: return (error); } SYSCTL_OID(_vm_pmap, OID_AUTO, kernel_maps, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_SKIP, NULL, 0, sysctl_kmaps, "A", "Dump kernel address layout"); Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Fri Dec 18 20:10:30 2020 (r368767) +++ head/sys/arm64/arm64/pmap.c Fri Dec 18 20:41:23 2020 (r368768) @@ -7168,6 +7168,6 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_OID(_vm_pmap, OID_AUTO, kernel_maps, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_SKIP, NULL, 0, sysctl_kmaps, "A", "Dump kernel address layout"); Modified: head/sys/i386/i386/pmap_base.c ============================================================================== --- head/sys/i386/i386/pmap_base.c Fri Dec 18 20:10:30 2020 (r368767) +++ head/sys/i386/i386/pmap_base.c Fri Dec 18 20:41:23 2020 (r368768) @@ -265,7 +265,7 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) return (pmap_methods_ptr->pm_sysctl_kmaps(oidp, arg1, arg2, req)); } SYSCTL_OID(_vm_pmap, OID_AUTO, kernel_maps, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_SKIP, NULL, 0, sysctl_kmaps, "A", "Dump kernel address layout"); Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Fri Dec 18 20:10:30 2020 (r368767) +++ head/sys/riscv/riscv/pmap.c Fri Dec 18 20:41:23 2020 (r368768) @@ -4638,6 +4638,6 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_OID(_vm_pmap, OID_AUTO, kernel_maps, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_SKIP, NULL, 0, sysctl_kmaps, "A", "Dump kernel address layout"); From owner-svn-src-head@freebsd.org Fri Dec 18 22:00: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 0C58F4AF312; Fri, 18 Dec 2020 22:00:58 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyN9570fzz3ldv; Fri, 18 Dec 2020 22:00:57 +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 E32D3123C9; Fri, 18 Dec 2020 22:00:57 +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 0BIM0vuP062122; Fri, 18 Dec 2020 22:00:57 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIM0vIt062121; Fri, 18 Dec 2020 22:00:57 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202012182200.0BIM0vIt062121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 18 Dec 2020 22:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368769 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 368769 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.34 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, 18 Dec 2020 22:00:58 -0000 Author: melifaro Date: Fri Dec 18 22:00:57 2020 New Revision: 368769 URL: https://svnweb.freebsd.org/changeset/base/368769 Log: Switch direct rt fields access in rtsock.c to newly-create field acessors. rtsock code was build around the assumption that each rtentry record in the system radix tree is a ready-to-use sockaddr. This assumptions turned out to be not quite true: * masks have their length tweaked, so we have rtsock_fix_netmask() hack * IPv6 addresses have their scope embedded, so we have another explicit deembedding hack. Change the code to decouple rtentry internals from rtsock code using newly-created rtentry accessors. This will allow to eventually eliminate both of the hacks and change rtentry dst/mask format. Differential Revision: https://reviews.freebsd.org/D27451 Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Dec 18 20:41:23 2020 (r368768) +++ head/sys/net/rtsock.c Fri Dec 18 22:00:57 2020 (r368769) @@ -158,10 +158,13 @@ MTX_SYSINIT(rtsock, &rtsock_mtx, "rtsock route_cb lock SYSCTL_NODE(_net, OID_AUTO, route, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); struct walkarg { + int family; int w_tmemsize; int w_op, w_arg; caddr_t w_tmem; struct sysctl_req *w_req; + struct sockaddr *dst; + struct sockaddr *mask; }; static void rts_input(struct mbuf *m); @@ -170,7 +173,7 @@ static int rtsock_msg_buffer(int type, struct rt_addri struct walkarg *w, int *plen); static int rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo); -static int sysctl_dumpentry(struct radix_node *rn, void *vw); +static int sysctl_dumpentry(struct rtentry *rt, void *vw); static int sysctl_dumpnhop(struct rtentry *rt, struct nhop_object *nh, uint32_t weight, struct walkarg *w); static int sysctl_iflist(int af, struct walkarg *w); @@ -187,7 +190,8 @@ static int update_rtm_from_rc(struct rt_addrinfo *info static void send_rtm_reply(struct socket *so, struct rt_msghdr *rtm, struct mbuf *m, sa_family_t saf, u_int fibnum, int rtm_errno); -static int can_export_rte(struct ucred *td_ucred, const struct rtentry *rt); +static bool can_export_rte(struct ucred *td_ucred, bool rt_is_host, + const struct sockaddr *rt_dst); static struct netisr_handler rtsock_nh = { .nh_name = "rtsock", @@ -707,7 +711,7 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, return (ESRCH); } - nh = select_nhop(rc->rc_rt->rt_nhop, info->rti_info[RTAX_GATEWAY]); + nh = select_nhop(rt_get_raw_nhop(rc->rc_rt), info->rti_info[RTAX_GATEWAY]); if (nh == NULL) { RIB_RUNLOCK(rnh); return (ESRCH); @@ -721,9 +725,7 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, */ if (rtm->rtm_flags & RTF_ANNOUNCE) { struct sockaddr laddr; - struct nhop_object *nh; - nh = rc->rc_rt->rt_nhop; if (nh->nh_ifp != NULL && nh->nh_ifp->if_type == IFT_PROPVIRTUAL) { struct ifaddr *ifa; @@ -747,7 +749,7 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, RIB_RUNLOCK(rnh); return (ESRCH); } - nh = select_nhop(rc->rc_rt->rt_nhop, info->rti_info[RTAX_GATEWAY]); + nh = select_nhop(rt_get_raw_nhop(rc->rc_rt), info->rti_info[RTAX_GATEWAY]); if (nh == NULL) { RIB_RUNLOCK(rnh); return (ESRCH); @@ -760,6 +762,66 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, return (0); } +static void +init_sockaddrs_family(int family, struct sockaddr *dst, struct sockaddr *mask) +{ +#ifdef INET + if (family == AF_INET) { + struct sockaddr_in *dst4 = (struct sockaddr_in *)dst; + struct sockaddr_in *mask4 = (struct sockaddr_in *)mask; + + bzero(dst4, sizeof(struct sockaddr_in)); + bzero(mask4, sizeof(struct sockaddr_in)); + + dst4->sin_family = AF_INET; + dst4->sin_len = sizeof(struct sockaddr_in); + mask4->sin_family = AF_INET; + mask4->sin_len = sizeof(struct sockaddr_in); + } +#endif +#ifdef INET6 + if (family == AF_INET6) { + struct sockaddr_in6 *dst6 = (struct sockaddr_in6 *)dst; + struct sockaddr_in6 *mask6 = (struct sockaddr_in6 *)mask; + + bzero(dst6, sizeof(struct sockaddr_in6)); + bzero(mask6, sizeof(struct sockaddr_in6)); + + dst6->sin6_family = AF_INET6; + dst6->sin6_len = sizeof(struct sockaddr_in6); + mask6->sin6_family = AF_INET6; + mask6->sin6_len = sizeof(struct sockaddr_in6); + } +#endif +} + +static void +export_rtaddrs(const struct rtentry *rt, struct sockaddr *dst, + struct sockaddr *mask) +{ + uint32_t scopeid = 0; +#ifdef INET + if (dst->sa_family == AF_INET) { + struct sockaddr_in *dst4 = (struct sockaddr_in *)dst; + struct sockaddr_in *mask4 = (struct sockaddr_in *)mask; + rt_get_inet_prefix_pmask(rt, &dst4->sin_addr, &mask4->sin_addr, + &scopeid); + return; + } +#endif +#ifdef INET6 + if (dst->sa_family == AF_INET6) { + struct sockaddr_in6 *dst6 = (struct sockaddr_in6 *)dst; + struct sockaddr_in6 *mask6 = (struct sockaddr_in6 *)mask; + rt_get_inet6_prefix_pmask(rt, &dst6->sin6_addr, &mask6->sin6_addr, + &scopeid); + dst6->sin6_scope_id = scopeid; + return; + } +#endif +} + + /* * Update sockaddrs, flags, etc in @prtm based on @rc data. * rtm can be reallocated. @@ -772,7 +834,6 @@ static int update_rtm_from_rc(struct rt_addrinfo *info, struct rt_msghdr **prtm, int alloc_len, struct rib_cmd_info *rc, struct nhop_object *nh) { - struct sockaddr_storage netmask_ss; struct walkarg w; union sockaddr_union saun; struct rt_msghdr *rtm, *orig_rtm = NULL; @@ -780,11 +841,14 @@ update_rtm_from_rc(struct rt_addrinfo *info, struct rt int error, len; rtm = *prtm; + union sockaddr_union sa_dst, sa_mask; + int family = info->rti_info[RTAX_DST]->sa_family; + init_sockaddrs_family(family, &sa_dst.sa, &sa_mask.sa); + export_rtaddrs(rc->rc_rt, &sa_dst.sa, &sa_mask.sa); - info->rti_info[RTAX_DST] = rt_key(rc->rc_rt); + info->rti_info[RTAX_DST] = &sa_dst.sa; + info->rti_info[RTAX_NETMASK] = rt_is_host(rc->rc_rt) ? NULL : &sa_mask.sa; info->rti_info[RTAX_GATEWAY] = &nh->gw_sa; - info->rti_info[RTAX_NETMASK] = rtsock_fix_netmask(rt_key(rc->rc_rt), - rt_mask(rc->rc_rt), &netmask_ss); info->rti_info[RTAX_GENMASK] = 0; ifp = nh->nh_ifp; if (rtm->rtm_addrs & (RTA_IFP | RTA_IFA)) { @@ -994,7 +1058,9 @@ route_output(struct mbuf *m, struct socket *so, ...) nh = rc.rc_nh_new; report: - if (!can_export_rte(curthread->td_ucred, rc.rc_rt)) { + if (!can_export_rte(curthread->td_ucred, + info.rti_info[RTAX_NETMASK] == NULL, + info.rti_info[RTAX_DST])) { senderr(ESRCH); } @@ -1730,35 +1796,34 @@ rt_dispatch(struct mbuf *m, sa_family_t saf) * * Returns 1 if it can, 0 otherwise. */ -static int -can_export_rte(struct ucred *td_ucred, const struct rtentry *rt) +static bool +can_export_rte(struct ucred *td_ucred, bool rt_is_host, + const struct sockaddr *rt_dst) { - if ((rt->rte_flags & RTF_HOST) == 0 - ? jailed_without_vnet(td_ucred) - : prison_if(td_ucred, rt_key_const(rt)) != 0) - return (0); - return (1); + if ((!rt_is_host) ? jailed_without_vnet(td_ucred) + : prison_if(td_ucred, rt_dst) != 0) + return (false); + return (true); } + /* * This is used in dumping the kernel table via sysctl(). */ static int -sysctl_dumpentry(struct radix_node *rn, void *vw) +sysctl_dumpentry(struct rtentry *rt, void *vw) { struct walkarg *w = vw; - struct rtentry *rt = (struct rtentry *)rn; struct nhop_object *nh; int error = 0; NET_EPOCH_ASSERT(); - if (w->w_op == NET_RT_FLAGS && !(rt->rte_flags & w->w_arg)) - return 0; - if (!can_export_rte(w->w_req->td->td_ucred, rt)) + export_rtaddrs(rt, w->dst, w->mask); + if (!can_export_rte(w->w_req->td->td_ucred, rt_is_host(rt), w->dst)) return (0); - nh = rt->rt_nhop; + nh = rt_get_raw_nhop(rt); #ifdef ROUTE_MPATH if (NH_IS_NHGRP(nh)) { struct weightened_nhop *wn; @@ -1783,13 +1848,17 @@ sysctl_dumpnhop(struct rtentry *rt, struct nhop_object { struct rt_addrinfo info; int error = 0, size; - struct sockaddr_storage ss; + uint32_t rtflags; + rtflags = nhop_get_rtflags(nh); + + if (w->w_op == NET_RT_FLAGS && !(rtflags & w->w_arg)) + return (0); + bzero((caddr_t)&info, sizeof(info)); - info.rti_info[RTAX_DST] = rt_key(rt); + info.rti_info[RTAX_DST] = w->dst; info.rti_info[RTAX_GATEWAY] = &nh->gw_sa; - info.rti_info[RTAX_NETMASK] = rtsock_fix_netmask(rt_key(rt), - rt_mask(rt), &ss); + info.rti_info[RTAX_NETMASK] = (rtflags & RTF_HOST) ? NULL : w->mask; info.rti_info[RTAX_GENMASK] = 0; if (nh->nh_ifp && !(nh->nh_ifp->if_flags & IFF_DYING)) { info.rti_info[RTAX_IFP] = nh->nh_ifp->if_addr->ifa_addr; @@ -1804,12 +1873,16 @@ sysctl_dumpnhop(struct rtentry *rt, struct nhop_object bzero(&rtm->rtm_index, sizeof(*rtm) - offsetof(struct rt_msghdr, rtm_index)); - if (rt->rte_flags & RTF_GWFLAG_COMPAT) + + /* + * rte flags may consist of RTF_HOST (duplicated in nhop rtflags) + * and RTF_UP (if entry is linked, which is always true here). + * Given that, use nhop rtflags & add RTF_UP. + */ + rtm->rtm_flags = rtflags | RTF_UP; + if (rtm->rtm_flags & RTF_GWFLAG_COMPAT) rtm->rtm_flags = RTF_GATEWAY | - (rt->rte_flags & ~RTF_GWFLAG_COMPAT); - else - rtm->rtm_flags = rt->rte_flags; - rtm->rtm_flags |= nhop_get_rtflags(nh); + (rtm->rtm_flags & ~RTF_GWFLAG_COMPAT); rt_getmetrics(rt, nh, &rtm->rtm_rmx); rtm->rtm_rmx.rmx_weight = weight; rtm->rtm_index = nh->nh_ifp->if_index; @@ -2075,10 +2148,23 @@ sysctl_ifmalist(int af, struct walkarg *w) return (error); } +static void +rtable_sysctl_dump(uint32_t fibnum, int family, struct walkarg *w) +{ + union sockaddr_union sa_dst, sa_mask; + + w->family = family; + w->dst = (struct sockaddr *)&sa_dst; + w->mask = (struct sockaddr *)&sa_mask; + + init_sockaddrs_family(family, w->dst, w->mask); + + rib_walk(fibnum, family, false, sysctl_dumpentry, w); +} + static int sysctl_rtsock(SYSCTL_HANDLER_ARGS) { - RIB_RLOCK_TRACKER; struct epoch_tracker et; int *name = (int *)arg1; u_int namelen = arg2; @@ -2151,10 +2237,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) for (error = 0; error == 0 && i <= lim; i++) { rnh = rt_tables_get_rnh(fib, i); if (rnh != NULL) { - RIB_RLOCK(rnh); - error = rnh->rnh_walktree(&rnh->head, - sysctl_dumpentry, &w); - RIB_RUNLOCK(rnh); + rtable_sysctl_dump(fib, i, &w); } else if (af != 0) error = EAFNOSUPPORT; } From owner-svn-src-head@freebsd.org Fri Dec 18 22:10: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 A02AB4AF53F; Fri, 18 Dec 2020 22:10:17 +0000 (UTC) (envelope-from jrtc27@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyNMs48FNz3m6Z; Fri, 18 Dec 2020 22:10:17 +0000 (UTC) (envelope-from jrtc27@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 7D186126AC; Fri, 18 Dec 2020 22:10:17 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BIMAHDS067380; Fri, 18 Dec 2020 22:10:17 GMT (envelope-from jrtc27@FreeBSD.org) Received: (from jrtc27@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BIMAHK0067379; Fri, 18 Dec 2020 22:10:17 GMT (envelope-from jrtc27@FreeBSD.org) Message-Id: <202012182210.0BIMAHK0067379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrtc27 set sender to jrtc27@FreeBSD.org using -f From: Jessica Clarke Date: Fri, 18 Dec 2020 22:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368770 - head/lib/libc/string X-SVN-Group: head X-SVN-Commit-Author: jrtc27 X-SVN-Commit-Paths: head/lib/libc/string X-SVN-Commit-Revision: 368770 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.34 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, 18 Dec 2020 22:10:17 -0000 Author: jrtc27 Date: Fri Dec 18 22:10:17 2020 New Revision: 368770 URL: https://svnweb.freebsd.org/changeset/base/368770 Log: strerror.3: Fix whitespace issue introduced in r368714 MFC with: 368714 Modified: head/lib/libc/string/strerror.3 Modified: head/lib/libc/string/strerror.3 ============================================================================== --- head/lib/libc/string/strerror.3 Fri Dec 18 22:00:57 2020 (r368769) +++ head/lib/libc/string/strerror.3 Fri Dec 18 22:10:17 2020 (r368770) @@ -188,7 +188,7 @@ main(void) perror("open()"); exit(1); } - printf("File descriptor: %d\en", fd); + printf("File descriptor: %d\en", fd); return (0); } .Ed From owner-svn-src-head@freebsd.org Fri Dec 18 23: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 DE1C04B0E16; Fri, 18 Dec 2020 23:11:27 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyPkR5s89z3pqd; Fri, 18 Dec 2020 23:11:27 +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 BBBDB12F7D; Fri, 18 Dec 2020 23:11:27 +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 0BINBR4m008966; Fri, 18 Dec 2020 23:11:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BINBRxv008965; Fri, 18 Dec 2020 23:11:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012182311.0BINBRxv008965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Dec 2020 23:11:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368771 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 368771 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.34 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, 18 Dec 2020 23:11:27 -0000 Author: kib Date: Fri Dec 18 23:11:27 2020 New Revision: 368771 URL: https://svnweb.freebsd.org/changeset/base/368771 Log: proc.h: Reformat P_ and P2_ definitions. Use traditional explicit leading zero format for hex numbers. Align P2_ hex values. Wrap long lines by splitting comments. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/sys/proc.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Fri Dec 18 22:10:17 2020 (r368770) +++ head/sys/sys/proc.h Fri Dec 18 23:11:27 2020 (r368771) @@ -739,57 +739,78 @@ struct proc { #define PROC_PROFLOCK_ASSERT(p, type) mtx_assert(&(p)->p_profmtx, (type)) /* These flags are kept in p_flag. */ -#define P_ADVLOCK 0x00001 /* Process may hold a POSIX advisory lock. */ -#define P_CONTROLT 0x00002 /* Has a controlling terminal. */ -#define P_KPROC 0x00004 /* Kernel process. */ -#define P_UNUSED3 0x00008 /* --available-- */ -#define P_PPWAIT 0x00010 /* Parent is waiting for child to exec/exit. */ -#define P_PROFIL 0x00020 /* Has started profiling. */ -#define P_STOPPROF 0x00040 /* Has thread requesting to stop profiling. */ -#define P_HADTHREADS 0x00080 /* Has had threads (no cleanup shortcuts) */ -#define P_SUGID 0x00100 /* Had set id privileges since last exec. */ -#define P_SYSTEM 0x00200 /* System proc: no sigs, stats or swapping. */ -#define P_SINGLE_EXIT 0x00400 /* Threads suspending should exit, not wait. */ -#define P_TRACED 0x00800 /* Debugged process being traced. */ -#define P_WAITED 0x01000 /* Someone is waiting for us. */ -#define P_WEXIT 0x02000 /* Working on exiting. */ -#define P_EXEC 0x04000 /* Process called exec. */ -#define P_WKILLED 0x08000 /* Killed, go to kernel/user boundary ASAP. */ -#define P_CONTINUED 0x10000 /* Proc has continued from a stopped state. */ -#define P_STOPPED_SIG 0x20000 /* Stopped due to SIGSTOP/SIGTSTP. */ -#define P_STOPPED_TRACE 0x40000 /* Stopped because of tracing. */ -#define P_STOPPED_SINGLE 0x80000 /* Only 1 thread can continue (not to user). */ -#define P_PROTECTED 0x100000 /* Do not kill on memory overcommit. */ -#define P_SIGEVENT 0x200000 /* Process pending signals changed. */ -#define P_SINGLE_BOUNDARY 0x400000 /* Threads should suspend at user boundary. */ -#define P_HWPMC 0x800000 /* Process is using HWPMCs */ -#define P_JAILED 0x1000000 /* Process is in jail. */ -#define P_TOTAL_STOP 0x2000000 /* Stopped in stop_all_proc. */ -#define P_INEXEC 0x4000000 /* Process is in execve(). */ -#define P_STATCHILD 0x8000000 /* Child process stopped or exited. */ -#define P_INMEM 0x10000000 /* Loaded into memory. */ -#define P_SWAPPINGOUT 0x20000000 /* Process is being swapped out. */ -#define P_SWAPPINGIN 0x40000000 /* Process is being swapped in. */ -#define P_PPTRACE 0x80000000 /* PT_TRACEME by vforked child. */ +#define P_ADVLOCK 0x00000001 /* Process may hold a POSIX advisory + lock. */ +#define P_CONTROLT 0x00000002 /* Has a controlling terminal. */ +#define P_KPROC 0x00000004 /* Kernel process. */ +#define P_UNUSED3 0x00000008 /* --available-- */ +#define P_PPWAIT 0x00000010 /* Parent is waiting for child to + exec/exit. */ +#define P_PROFIL 0x00000020 /* Has started profiling. */ +#define P_STOPPROF 0x00000040 /* Has thread requesting to stop + profiling. */ +#define P_HADTHREADS 0x00000080 /* Has had threads (no cleanup + shortcuts) */ +#define P_SUGID 0x00000100 /* Had set id privileges since last + exec. */ +#define P_SYSTEM 0x00000200 /* System proc: no sigs, stats or + swapping. */ +#define P_SINGLE_EXIT 0x00000400 /* Threads suspending should exit, + not wait. */ +#define P_TRACED 0x00000800 /* Debugged process being traced. */ +#define P_WAITED 0x00001000 /* Someone is waiting for us. */ +#define P_WEXIT 0x00002000 /* Working on exiting. */ +#define P_EXEC 0x00004000 /* Process called exec. */ +#define P_WKILLED 0x00008000 /* Killed, go to kernel/user boundary + ASAP. */ +#define P_CONTINUED 0x00010000 /* Proc has continued from a stopped + state. */ +#define P_STOPPED_SIG 0x00020000 /* Stopped due to SIGSTOP/SIGTSTP. */ +#define P_STOPPED_TRACE 0x00040000 /* Stopped because of tracing. */ +#define P_STOPPED_SINGLE 0x00080000 /* Only 1 thread can continue (not to + user). */ +#define P_PROTECTED 0x00100000 /* Do not kill on memory overcommit. */ +#define P_SIGEVENT 0x00200000 /* Process pending signals changed. */ +#define P_SINGLE_BOUNDARY 0x00400000 /* Threads should suspend at user + boundary. */ +#define P_HWPMC 0x00800000 /* Process is using HWPMCs */ +#define P_JAILED 0x01000000 /* Process is in jail. */ +#define P_TOTAL_STOP 0x02000000 /* Stopped in stop_all_proc. */ +#define P_INEXEC 0x04000000 /* Process is in execve(). */ +#define P_STATCHILD 0x08000000 /* Child process stopped or exited. */ +#define P_INMEM 0x10000000 /* Loaded into memory. */ +#define P_SWAPPINGOUT 0x20000000 /* Process is being swapped out. */ +#define P_SWAPPINGIN 0x40000000 /* Process is being swapped in. */ +#define P_PPTRACE 0x80000000 /* PT_TRACEME by vforked child. */ #define P_STOPPED (P_STOPPED_SIG|P_STOPPED_SINGLE|P_STOPPED_TRACE) #define P_SHOULDSTOP(p) ((p)->p_flag & P_STOPPED) #define P_KILLED(p) ((p)->p_flag & P_WKILLED) /* These flags are kept in p_flag2. */ -#define P2_INHERIT_PROTECTED 0x00000001 /* New children get P_PROTECTED. */ -#define P2_NOTRACE 0x00000002 /* No ptrace(2) attach or coredumps. */ -#define P2_NOTRACE_EXEC 0x00000004 /* Keep P2_NOPTRACE on exec(2). */ -#define P2_AST_SU 0x00000008 /* Handles SU ast for kthreads. */ -#define P2_PTRACE_FSTP 0x00000010 /* SIGSTOP from PT_ATTACH not yet handled. */ -#define P2_TRAPCAP 0x00000020 /* SIGTRAP on ENOTCAPABLE */ -#define P2_ASLR_ENABLE 0x00000040 /* Force enable ASLR. */ -#define P2_ASLR_DISABLE 0x00000080 /* Force disable ASLR. */ -#define P2_ASLR_IGNSTART 0x00000100 /* Enable ASLR to consume sbrk area. */ -#define P2_PROTMAX_ENABLE 0x00000200 /* Force enable implied PROT_MAX. */ -#define P2_PROTMAX_DISABLE 0x00000400 /* Force disable implied PROT_MAX. */ -#define P2_STKGAP_DISABLE 0x00000800 /* Disable stack gap for MAP_STACK */ -#define P2_STKGAP_DISABLE_EXEC 0x00001000 /* Stack gap disabled after exec */ +#define P2_INHERIT_PROTECTED 0x00000001 /* New children get + P_PROTECTED. */ +#define P2_NOTRACE 0x00000002 /* No ptrace(2) attach or + coredumps. */ +#define P2_NOTRACE_EXEC 0x00000004 /* Keep P2_NOPTRACE on + exec(2). */ +#define P2_AST_SU 0x00000008 /* Handles SU ast for + kthreads. */ +#define P2_PTRACE_FSTP 0x00000010 /* SIGSTOP from PT_ATTACH not + yet handled. */ +#define P2_TRAPCAP 0x00000020 /* SIGTRAP on ENOTCAPABLE */ +#define P2_ASLR_ENABLE 0x00000040 /* Force enable ASLR. */ +#define P2_ASLR_DISABLE 0x00000080 /* Force disable ASLR. */ +#define P2_ASLR_IGNSTART 0x00000100 /* Enable ASLR to consume sbrk + area. */ +#define P2_PROTMAX_ENABLE 0x00000200 /* Force enable implied + PROT_MAX. */ +#define P2_PROTMAX_DISABLE 0x00000400 /* Force disable implied + PROT_MAX. */ +#define P2_STKGAP_DISABLE 0x00000800 /* Disable stack gap for + MAP_STACK */ +#define P2_STKGAP_DISABLE_EXEC 0x00001000 /* Stack gap disabled + after exec */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ From owner-svn-src-head@freebsd.org Fri Dec 18 23:14: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 2EBED4B0A7E; Fri, 18 Dec 2020 23:14:42 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyPp93l91z3qFX; Fri, 18 Dec 2020 23:14:41 +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 72DA713250; Fri, 18 Dec 2020 23:14:41 +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 0BINEfVn010664; Fri, 18 Dec 2020 23:14:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BINEeA3010657; Fri, 18 Dec 2020 23:14:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012182314.0BINEeA3010657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Dec 2020 23:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368772 - in head: sys/compat/freebsd32 sys/kern sys/sys usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: sys/compat/freebsd32 sys/kern sys/sys usr.bin/elfctl X-SVN-Commit-Revision: 368772 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.34 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, 18 Dec 2020 23:14:42 -0000 Author: kib Date: Fri Dec 18 23:14:39 2020 New Revision: 368772 URL: https://svnweb.freebsd.org/changeset/base/368772 Log: Add ELF flag to disable ASLR stack gap. Also centralize and unify checks to enable ASLR stack gap in a new helper exec_stackgap(). PR: 239873 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/imgact_elf.c head/sys/kern/kern_exec.c head/sys/sys/elf_common.h head/sys/sys/imgact.h head/usr.bin/elfctl/elfctl.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Dec 18 23:11:27 2020 (r368771) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Dec 18 23:14:39 2020 (r368772) @@ -3424,8 +3424,7 @@ freebsd32_copyout_strings(struct image_params *imgp, u destp = rounddown2(destp, sizeof(uint32_t)); ustringp = destp; - if (imgp->sysent->sv_stackgap != NULL) - imgp->sysent->sv_stackgap(imgp, &destp); + exec_stackgap(imgp, &destp); if (imgp->auxargs) { /* Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Fri Dec 18 23:11:27 2020 (r368771) +++ head/sys/kern/imgact_elf.c Fri Dec 18 23:14:39 2020 (r368772) @@ -2818,8 +2818,6 @@ __elfN(stackgap)(struct image_params *imgp, uintptr_t uintptr_t range, rbase, gap; int pct; - if ((imgp->map_flags & MAP_ASLR) == 0) - return; pct = __elfN(aslr_stack_gap); if (pct == 0) return; Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Fri Dec 18 23:11:27 2020 (r368771) +++ head/sys/kern/kern_exec.c Fri Dec 18 23:14:39 2020 (r368772) @@ -1534,6 +1534,17 @@ exec_args_get_begin_envv(struct image_args *args) return (args->endp); } +void +exec_stackgap(struct image_params *imgp, uintptr_t *dp) +{ + if (imgp->sysent->sv_stackgap == NULL || + (imgp->proc->p_fctl0 & (NT_FREEBSD_FCTL_ASLR_DISABLE | + NT_FREEBSD_FCTL_ASG_DISABLE)) != 0 || + (imgp->map_flags & MAP_ASLR) == 0) + return; + imgp->sysent->sv_stackgap(imgp, dp); +} + /* * Copy strings out to the new process address space, constructing new arg * and env vector tables. Return a pointer to the base so that it can be used @@ -1624,8 +1635,7 @@ exec_copyout_strings(struct image_params *imgp, uintpt destp = rounddown2(destp, sizeof(void *)); ustringp = destp; - if (imgp->sysent->sv_stackgap != NULL) - imgp->sysent->sv_stackgap(imgp, &destp); + exec_stackgap(imgp, &destp); if (imgp->auxargs) { /* Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Fri Dec 18 23:11:27 2020 (r368771) +++ head/sys/sys/elf_common.h Fri Dec 18 23:14:39 2020 (r368772) @@ -797,6 +797,7 @@ typedef struct { #define NT_FREEBSD_FCTL_STKGAP_DISABLE 0x00000004 #define NT_FREEBSD_FCTL_WXNEEDED 0x00000008 #define NT_FREEBSD_FCTL_LA48 0x00000010 +#define NT_FREEBSD_FCTL_ASG_DISABLE 0x00000020 /* ASLR STACK GAP Disable */ /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Fri Dec 18 23:11:27 2020 (r368771) +++ head/sys/sys/imgact.h Fri Dec 18 23:14:39 2020 (r368772) @@ -122,6 +122,7 @@ int exec_copyin_args(struct image_args *, const char * char **, char **); int exec_copyin_data_fds(struct thread *, struct image_args *, const void *, size_t, const int *, size_t); +void exec_stackgap(struct image_params *imgp, uintptr_t *dp); int pre_execve(struct thread *td, struct vmspace **oldvmspace); void post_execve(struct thread *td, int error, struct vmspace *oldvmspace); #endif Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Fri Dec 18 23:11:27 2020 (r368771) +++ head/usr.bin/elfctl/elfctl.c Fri Dec 18 23:14:39 2020 (r368772) @@ -68,6 +68,7 @@ static struct ControlFeatures featurelist[] = { { "stackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" }, { "wxneeded", NT_FREEBSD_FCTL_WXNEEDED, "Requires W+X mappings" }, { "la48", NT_FREEBSD_FCTL_LA48, "amd64: Limit user VA to 48bit" }, + { "aslrstkgap", NT_FREEBSD_FCTL_ASG_DISABLE, "Disable ASLR stack gap" }, }; static struct option long_opts[] = { From owner-svn-src-head@freebsd.org Fri Dec 18 23:28: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 B662C4B1286; Fri, 18 Dec 2020 23:28:28 +0000 (UTC) (envelope-from mckusick@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyQ644nRtz3qSq; Fri, 18 Dec 2020 23:28:28 +0000 (UTC) (envelope-from mckusick@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 96FAB13645; Fri, 18 Dec 2020 23:28:28 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BINSStt017289; Fri, 18 Dec 2020 23:28:28 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BINSRVC017284; Fri, 18 Dec 2020 23:28:27 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202012182328.0BINSRVC017284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 18 Dec 2020 23:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368773 - head/sbin/fsck_ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sbin/fsck_ffs X-SVN-Commit-Revision: 368773 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.34 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, 18 Dec 2020 23:28:28 -0000 Author: mckusick Date: Fri Dec 18 23:28:27 2020 New Revision: 368773 URL: https://svnweb.freebsd.org/changeset/base/368773 Log: Rename pass4check() to freeblock() and move from pass4.c to inode.c. The new name more accurately describes what it does and the file move puts it with other similar functions. Done in preparation for future cleanups. No functional differences intended. Sponsored by: Netflix Historic Footnote: my last FreeBSD svn commit Modified: head/sbin/fsck_ffs/dir.c head/sbin/fsck_ffs/fsck.h head/sbin/fsck_ffs/fsutil.c head/sbin/fsck_ffs/inode.c head/sbin/fsck_ffs/pass4.c Modified: head/sbin/fsck_ffs/dir.c ============================================================================== --- head/sbin/fsck_ffs/dir.c Fri Dec 18 23:14:39 2020 (r368772) +++ head/sbin/fsck_ffs/dir.c Fri Dec 18 23:28:27 2020 (r368773) @@ -532,7 +532,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name) } inodirty(dp); idesc.id_type = ADDR; - idesc.id_func = pass4check; + idesc.id_func = freeblock; idesc.id_number = oldlfdir; adjust(&idesc, inoinfo(oldlfdir)->ino_linkcnt + 1); inoinfo(oldlfdir)->ino_linkcnt = 0; @@ -635,6 +635,7 @@ expanddir(union dinode *dp, char *name) { ufs2_daddr_t lastbn, newblk; struct bufarea *bp; + struct inodesc idesc; char *cp, firstblk[DIRBLKSIZ]; lastbn = lblkno(&sblock, DIP(dp, di_size)); @@ -679,7 +680,10 @@ bad: DIP_SET(dp, di_db[lastbn + 1], 0); DIP_SET(dp, di_size, DIP(dp, di_size) - sblock.fs_bsize); DIP_SET(dp, di_blocks, DIP(dp, di_blocks) - btodb(sblock.fs_bsize)); - freeblk(newblk, sblock.fs_frag); + /* Free the block we allocated above */ + idesc.id_blkno = newblk; + idesc.id_numfrags = sblock.fs_frag; + (void)freeblock(&idesc); return (0); } Modified: head/sbin/fsck_ffs/fsck.h ============================================================================== --- head/sbin/fsck_ffs/fsck.h Fri Dec 18 23:14:39 2020 (r368772) +++ head/sbin/fsck_ffs/fsck.h Fri Dec 18 23:28:27 2020 (r368773) @@ -438,7 +438,7 @@ void finalIOstats(void); int findino(struct inodesc *); int findname(struct inodesc *); void flush(int fd, struct bufarea *bp); -void freeblk(ufs2_daddr_t blkno, long frags); +int freeblock(struct inodesc *); void freeino(ino_t ino); void freeinodebuf(void); void fsutilinit(void); @@ -465,7 +465,6 @@ int pass1check(struct inodesc *); void pass2(void); void pass3(void); void pass4(void); -int pass4check(struct inodesc *); void pass5(void); void pfatal(const char *fmt, ...) __printflike(1, 2); void propagate(void); Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Fri Dec 18 23:14:39 2020 (r368772) +++ head/sbin/fsck_ffs/fsutil.c Fri Dec 18 23:28:27 2020 (r368773) @@ -800,19 +800,8 @@ allocblk(long frags) } /* - * Free a previously allocated block + * Slow down IO so as to leave some disk bandwidth for other processes */ -void -freeblk(ufs2_daddr_t blkno, long frags) -{ - struct inodesc idesc; - - idesc.id_blkno = blkno; - idesc.id_numfrags = frags; - (void)pass4check(&idesc); -} - -/* Slow down IO so as to leave some disk bandwidth for other processes */ void slowio_start() { Modified: head/sbin/fsck_ffs/inode.c ============================================================================== --- head/sbin/fsck_ffs/inode.c Fri Dec 18 23:14:39 2020 (r368772) +++ head/sbin/fsck_ffs/inode.c Fri Dec 18 23:28:27 2020 (r368773) @@ -641,6 +641,37 @@ clearentry(struct inodesc *idesc) return (STOP|FOUND|ALTERED); } +int +freeblock(struct inodesc *idesc) +{ + struct dups *dlp; + ufs2_daddr_t blkno; + long nfrags, res; + + res = KEEPON; + blkno = idesc->id_blkno; + for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) { + if (chkrange(blkno, 1)) { + res = SKIP; + } else if (testbmap(blkno)) { + for (dlp = duplist; dlp; dlp = dlp->next) { + if (dlp->dup != blkno) + continue; + dlp->dup = duplist->dup; + dlp = duplist; + duplist = duplist->next; + free((char *)dlp); + break; + } + if (dlp == NULL) { + clrbmap(blkno); + n_blks--; + } + } + } + return (res); +} + void prtinode(ino_t ino, union dinode *dp) { @@ -767,7 +798,7 @@ freeino(ino_t ino) memset(&idesc, 0, sizeof(struct inodesc)); idesc.id_type = ADDR; - idesc.id_func = pass4check; + idesc.id_func = freeblock; idesc.id_number = ino; dp = ginode(ino); (void)ckinode(dp, &idesc); Modified: head/sbin/fsck_ffs/pass4.c ============================================================================== --- head/sbin/fsck_ffs/pass4.c Fri Dec 18 23:14:39 2020 (r368772) +++ head/sbin/fsck_ffs/pass4.c Fri Dec 18 23:28:27 2020 (r368773) @@ -58,7 +58,7 @@ pass4(void) memset(&idesc, 0, sizeof(struct inodesc)); idesc.id_type = ADDR; - idesc.id_func = pass4check; + idesc.id_func = freeblock; for (cg = 0; cg < sblock.fs_ncg; cg++) { if (got_siginfo) { printf("%s: phase 4: cyl group %d of %d (%d%%)\n", @@ -123,33 +123,4 @@ pass4(void) } } } -} - -int -pass4check(struct inodesc *idesc) -{ - struct dups *dlp; - int nfrags, res = KEEPON; - ufs2_daddr_t blkno = idesc->id_blkno; - - for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) { - if (chkrange(blkno, 1)) { - res = SKIP; - } else if (testbmap(blkno)) { - for (dlp = duplist; dlp; dlp = dlp->next) { - if (dlp->dup != blkno) - continue; - dlp->dup = duplist->dup; - dlp = duplist; - duplist = duplist->next; - free((char *)dlp); - break; - } - if (dlp == NULL) { - clrbmap(blkno); - n_blks--; - } - } - } - return (res); } From owner-svn-src-head@freebsd.org Fri Dec 18 23:31: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 2E6C54B10D2; Fri, 18 Dec 2020 23:31:37 +0000 (UTC) (envelope-from jrtc27@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyQ9j0wHJz3qvY; Fri, 18 Dec 2020 23:31:37 +0000 (UTC) (envelope-from jrtc27@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 089FF13959; Fri, 18 Dec 2020 23:31:37 +0000 (UTC) (envelope-from jrtc27@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BINVaqM021285; Fri, 18 Dec 2020 23:31:36 GMT (envelope-from jrtc27@FreeBSD.org) Received: (from jrtc27@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BINValT021283; Fri, 18 Dec 2020 23:31:36 GMT (envelope-from jrtc27@FreeBSD.org) Message-Id: <202012182331.0BINValT021283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jrtc27 set sender to jrtc27@FreeBSD.org using -f From: Jessica Clarke Date: Fri, 18 Dec 2020 23:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368774 - in head/sys/dev/usb: . quirk X-SVN-Group: head X-SVN-Commit-Author: jrtc27 X-SVN-Commit-Paths: in head/sys/dev/usb: . quirk X-SVN-Commit-Revision: 368774 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.34 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, 18 Dec 2020 23:31:37 -0000 Author: jrtc27 Date: Fri Dec 18 23:31:36 2020 New Revision: 368774 URL: https://svnweb.freebsd.org/changeset/base/368774 Log: usb: Replace ITUNERNET vendor with MICROCHIP and improve product names These Mini-Box LCDs are using Microchip components and sub-licensed product IDs. Whilst here, update the constant names and descriptions for the products to use the names listed on the manufacturer's website rather than vague ones. The picoLCD 4x20 is named that on the manufacturer's website so prefer that name, even though linux-usb.org lists it with the numbers reversed as one might expect. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D27670 Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Fri Dec 18 23:28:27 2020 (r368773) +++ head/sys/dev/usb/quirk/usb_quirk.c Fri Dec 18 23:31:36 2020 (r368774) @@ -128,8 +128,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(CYPRESS, SILVERSHIELD, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(DREAMLINK, DL100B, 0x0000, 0xffff, UQ_HID_IGNORE), - USB_QUIRK(ITUNERNET, USBLCD2X20, 0x0000, 0xffff, UQ_HID_IGNORE), - USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(MICROCHIP, PICOLCD20X2, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(MICROCHIP, PICOLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(LIEBERT2, PSI1000, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(LIEBERT2, POWERSURE_PSA, 0x0000, 0xffff, UQ_HID_IGNORE), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Dec 18 23:28:27 2020 (r368773) +++ head/sys/dev/usb/usbdevs Fri Dec 18 23:31:36 2020 (r368774) @@ -184,7 +184,7 @@ vendor ITTCANON 0x04d1 ITT Canon vendor ALTEC 0x04d2 Altec Lansing vendor LSI 0x04d4 LSI vendor MENTORGRAPHICS 0x04d6 Mentor Graphics -vendor ITUNERNET 0x04d8 I-Tuner Networks +vendor MICROCHIP 0x04d8 Microchip Technology, Inc. vendor HOLTEK 0x04d9 Holtek Semiconductor, Inc. vendor PANASONIC 0x04da Panasonic (Matsushita) vendor HUANHSIN 0x04dc Huan Hsin @@ -2647,9 +2647,9 @@ product ISSC ISSCBTA 0x1001 Bluetooth USB Adapter product ITEGNO WM1080A 0x1080 WM1080A GSM/GPRS modem product ITEGNO WM2080A 0x2080 WM2080A CDMA modem -/* Ituner networks products */ -product ITUNERNET USBLCD2X20 0x0002 USB-LCD 2x20 -product ITUNERNET USBLCD4X20 0xc001 USB-LCD 4x20 +/* Microchip Technology, Inc. products */ +product MICROCHIP PICOLCD20X2 0x0002 Mini-Box picoLCD 20x2 +product MICROCHIP PICOLCD4X20 0xc001 Mini-Box picoLCD 4x20 /* Jablotron products */ product JABLOTRON PC60B 0x0001 PC-60B From owner-svn-src-head@freebsd.org Sat Dec 19 01:46: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 E6C204B59F8; Sat, 19 Dec 2020 01:46:47 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyT9g6Dczz4TrH; Sat, 19 Dec 2020 01:46:47 +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 C8D2E1548E; Sat, 19 Dec 2020 01:46:47 +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 0BJ1klOM004833; Sat, 19 Dec 2020 01:46:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJ1klAZ004832; Sat, 19 Dec 2020 01:46:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202012190146.0BJ1klAZ004832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 19 Dec 2020 01:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368775 - head/usr.sbin/pmc X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/usr.sbin/pmc X-SVN-Commit-Revision: 368775 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.34 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, 19 Dec 2020 01:46:48 -0000 Author: kib Date: Sat Dec 19 01:46:47 2020 New Revision: 368775 URL: https://svnweb.freebsd.org/changeset/base/368775 Log: Remove redundand redefinion, fixing build. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/usr.sbin/pmc/cmd_pmc_summary.cc Modified: head/usr.sbin/pmc/cmd_pmc_summary.cc ============================================================================== --- head/usr.sbin/pmc/cmd_pmc_summary.cc Fri Dec 18 23:31:36 2020 (r368774) +++ head/usr.sbin/pmc/cmd_pmc_summary.cc Sat Dec 19 01:46:47 2020 (r368775) @@ -81,8 +81,6 @@ typedef std::pair sampleid; typedef std::pair samplename; typedef unordered_map > eventcountmap; -#define P_KPROC 0x00004 /* Kernel process. */ - static void __dead2 usage(void) { From owner-svn-src-head@freebsd.org Sat Dec 19 02:23: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 F04514B702E; Sat, 19 Dec 2020 02:23:53 +0000 (UTC) (envelope-from pfg@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyV0T6S9Mz4WGl; Sat, 19 Dec 2020 02:23:53 +0000 (UTC) (envelope-from pfg@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 D000F15579; Sat, 19 Dec 2020 02:23:53 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJ2Nrsn029386; Sat, 19 Dec 2020 02:23:53 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJ2NrOI029385; Sat, 19 Dec 2020 02:23:53 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <202012190223.0BJ2NrOI029385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 19 Dec 2020 02:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368776 - head/usr.bin/login X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/usr.bin/login X-SVN-Commit-Revision: 368776 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.34 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, 19 Dec 2020 02:23:54 -0000 Author: pfg Date: Sat Dec 19 02:23:53 2020 New Revision: 368776 URL: https://svnweb.freebsd.org/changeset/base/368776 Log: login(1): when exporting variables check the result of setenv(3) When exporting a variable we correctly check all the preconditions that could make setenv(3) fail. Checking the setenv(3) return value seems redundant, but given that login(1) is critical, it doesn't hurt to have a post-check. This change is based on the "Principles of Secure Coding" course by Matthew Bishop, PhD., which specifically discusses this code in FreeBSD. Differential Revision: https://reviews.freebsd.org/D26966 Modified: head/usr.bin/login/login.c Modified: head/usr.bin/login/login.c ============================================================================== --- head/usr.bin/login/login.c Sat Dec 19 01:46:47 2020 (r368775) +++ head/usr.bin/login/login.c Sat Dec 19 02:23:53 2020 (r368776) @@ -793,6 +793,7 @@ export(const char *s) char *p; const char **pp; size_t n; + int rv; if (strlen(s) > 1024 || (p = strchr(s, '=')) == NULL) return (0); @@ -804,8 +805,10 @@ export(const char *s) return (0); } *p = '\0'; - (void)setenv(s, p + 1, 1); + rv = setenv(s, p + 1, 1); *p = '='; + if (rv == 1) + return (0); return (1); } From owner-svn-src-head@freebsd.org Sat Dec 19 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 AE3254B6FD6; Sat, 19 Dec 2020 02:36:42 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyVHG4XdLz4WtX; Sat, 19 Dec 2020 02:36:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.4] (unknown [200.118.158.2]) (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 36C624F33; Sat, 19 Dec 2020 02:36:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r368776 - head/usr.bin/login From: Pedro Giffuni To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202012190223.0BJ2NrOI029385@repo.freebsd.org> Organization: FreeBSD Message-ID: <566e2678-cf2f-abf2-9899-f3a8727e52ce@FreeBSD.org> Date: Fri, 18 Dec 2020 21:36:41 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <202012190223.0BJ2NrOI029385@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.34 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, 19 Dec 2020 02:36:42 -0000 On 12/18/20 9:23 PM, Pedro F. Giffuni wrote: > Author: pfg > Date: Sat Dec 19 02:23:53 2020 > New Revision: 368776 > URL: https://svnweb.freebsd.org/changeset/base/368776 > > Log: > login(1): when exporting variables check the result of setenv(3) > > When exporting a variable we correctly check all the preconditions that > could make setenv(3) fail. Checking the setenv(3) return value seems > redundant, but given that login(1) is critical, it doesn't hurt to have > a post-check. > > This change is based on the "Principles of Secure Coding" course by > Matthew Bishop, PhD., which specifically discusses this code in FreeBSD. > > Differential Revision: https://reviews.freebsd.org/D26966 > > Modified: > head/usr.bin/login/login.c > > Modified: head/usr.bin/login/login.c > ============================================================================== > --- head/usr.bin/login/login.c Sat Dec 19 01:46:47 2020 (r368775) > +++ head/usr.bin/login/login.c Sat Dec 19 02:23:53 2020 (r368776) > @@ -793,6 +793,7 @@ export(const char *s) > char *p; > const char **pp; > size_t n; > + int rv; > > if (strlen(s) > 1024 || (p = strchr(s, '=')) == NULL) > return (0); > @@ -804,8 +805,10 @@ export(const char *s) > return (0); > } > *p = '\0'; > - (void)setenv(s, p + 1, 1); > + rv = setenv(s, p + 1, 1); > *p = '='; > + if (rv == 1) > + return (0); > return (1); > } > This is wrong .. it should have been -1. I'll revert to make the change clean. From owner-svn-src-head@freebsd.org Sat Dec 19 02:42: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 808254B7628; Sat, 19 Dec 2020 02:42:15 +0000 (UTC) (envelope-from pfg@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyVPg3J14z4X93; Sat, 19 Dec 2020 02:42:15 +0000 (UTC) (envelope-from pfg@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 63B5915A66; Sat, 19 Dec 2020 02:42:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJ2gF9p041068; Sat, 19 Dec 2020 02:42:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJ2gFPK041067; Sat, 19 Dec 2020 02:42:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <202012190242.0BJ2gFPK041067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 19 Dec 2020 02:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368777 - head/usr.bin/login X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/usr.bin/login X-SVN-Commit-Revision: 368777 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.34 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, 19 Dec 2020 02:42:15 -0000 Author: pfg Date: Sat Dec 19 02:42:14 2020 New Revision: 368777 URL: https://svnweb.freebsd.org/changeset/base/368777 Log: Revert r368776: login(1): when exporting variables check the result of setenv(3) mismatch: the return value upon error is -1, so the code was not doing nothing. Modified: head/usr.bin/login/login.c Modified: head/usr.bin/login/login.c ============================================================================== --- head/usr.bin/login/login.c Sat Dec 19 02:23:53 2020 (r368776) +++ head/usr.bin/login/login.c Sat Dec 19 02:42:14 2020 (r368777) @@ -793,7 +793,6 @@ export(const char *s) char *p; const char **pp; size_t n; - int rv; if (strlen(s) > 1024 || (p = strchr(s, '=')) == NULL) return (0); @@ -805,10 +804,8 @@ export(const char *s) return (0); } *p = '\0'; - rv = setenv(s, p + 1, 1); + (void)setenv(s, p + 1, 1); *p = '='; - if (rv == 1) - return (0); return (1); } From owner-svn-src-head@freebsd.org Sat Dec 19 03:07: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 4436A4B8294; Sat, 19 Dec 2020 03:07:39 +0000 (UTC) (envelope-from pfg@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyVyz1S31z4Z0s; Sat, 19 Dec 2020 03:07:39 +0000 (UTC) (envelope-from pfg@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 24D5F162B3; Sat, 19 Dec 2020 03:07:39 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJ37dI1055320; Sat, 19 Dec 2020 03:07:39 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJ37dw7055319; Sat, 19 Dec 2020 03:07:39 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <202012190307.0BJ37dw7055319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 19 Dec 2020 03:07:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368778 - head/usr.bin/login X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/usr.bin/login X-SVN-Commit-Revision: 368778 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.34 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, 19 Dec 2020 03:07:39 -0000 Author: pfg Date: Sat Dec 19 03:07:38 2020 New Revision: 368778 URL: https://svnweb.freebsd.org/changeset/base/368778 Log: login(1): when exporting variables check the result of setenv(3) When exporting a variable we correctly check all the preconditions that could make setenv(3) fail. Checking the setenv(3) return value seems redundant, but given that login(1) is critical, it doesn't hurt to have a post-check. This change is based on the "Principles of Secure Coding" course by Matthew Bishop, PhD., which specifically discusses this code in FreeBSD. (This change redoes r368776 due to a silly mistake) Modified: head/usr.bin/login/login.c Modified: head/usr.bin/login/login.c ============================================================================== --- head/usr.bin/login/login.c Sat Dec 19 02:42:14 2020 (r368777) +++ head/usr.bin/login/login.c Sat Dec 19 03:07:38 2020 (r368778) @@ -793,6 +793,7 @@ export(const char *s) char *p; const char **pp; size_t n; + int rv; if (strlen(s) > 1024 || (p = strchr(s, '=')) == NULL) return (0); @@ -804,8 +805,10 @@ export(const char *s) return (0); } *p = '\0'; - (void)setenv(s, p + 1, 1); + rv = setenv(s, p + 1, 1); *p = '='; + if (rv == -1) + return (0); return (1); } From owner-svn-src-head@freebsd.org Sat Dec 19 03:30: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 B80464B8688; Sat, 19 Dec 2020 03:30:06 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyWSt4mKcz4b8P; Sat, 19 Dec 2020 03:30:06 +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 8BDC316811; Sat, 19 Dec 2020 03:30:06 +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 0BJ3U6cm068132; Sat, 19 Dec 2020 03:30:06 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJ3U6b1068131; Sat, 19 Dec 2020 03:30:06 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202012190330.0BJ3U6b1068131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 19 Dec 2020 03:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368779 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368779 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.34 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, 19 Dec 2020 03:30:06 -0000 Author: kevans Date: Sat Dec 19 03:30:06 2020 New Revision: 368779 URL: https://svnweb.freebsd.org/changeset/base/368779 Log: kern: cpuset: allow jails to modify child jails' roots This partially lifts a restriction imposed by r191639 ("Prevent a superuser inside a jail from modifying the dedicated root cpuset of that jail") that's perhaps beneficial after r192895 ("Add hierarchical jails."). Jails still cannot modify their own cpuset, but they can modify child jails' roots to further restrict them or widen them back to the modifying jails' own mask. As a side effect of this, the system root may once again widen the mask of jails as long as they're still using a subset of the parent jails' mask. This was previously prevented by the fact that cpuset_getroot of a root set will return that root, rather than the root's parent -- cpuset_modify uses cpuset_getroot since it was introduced in r327895, previously it was just validating against set->cs_parent which allowed the system root to widen jail masks. Reviewed by: jamie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27352 Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Sat Dec 19 03:07:38 2020 (r368778) +++ head/sys/kern/kern_cpuset.c Sat Dec 19 03:30:06 2020 (r368779) @@ -688,19 +688,34 @@ cpuset_modify(struct cpuset *set, cpuset_t *mask) if (error) return (error); /* - * In case we are called from within the jail + * In case we are called from within the jail, * we do not allow modifying the dedicated root * cpuset of the jail but may still allow to - * change child sets. + * change child sets, including subordinate jails' + * roots. */ - if (jailed(curthread->td_ucred) && - set->cs_flags & CPU_SET_ROOT) + if ((set->cs_flags & CPU_SET_ROOT) != 0 && + jailed(curthread->td_ucred) && + set == curthread->td_ucred->cr_prison->pr_cpuset) return (EPERM); /* * Verify that we have access to this set of * cpus. */ - root = cpuset_getroot(set); + if ((set->cs_flags & (CPU_SET_ROOT | CPU_SET_RDONLY)) == CPU_SET_ROOT) { + KASSERT(set->cs_parent != NULL, + ("jail.cpuset=%d is not a proper child of parent jail's root.", + set->cs_id)); + + /* + * cpuset_getroot() cannot work here due to how top-level jail + * roots are constructed. Top-level jails are parented to + * thread0's cpuset (i.e. cpuset 1) rather than the system root. + */ + root = set->cs_parent; + } else { + root = cpuset_getroot(set); + } mtx_lock_spin(&cpuset_lock); if (root && !CPU_SUBSET(&root->cs_mask, mask)) { error = EINVAL; From owner-svn-src-head@freebsd.org Sat Dec 19 08:38: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 9E1E74C0FCE; Sat, 19 Dec 2020 08:38:27 +0000 (UTC) (envelope-from rlibby@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyfJg46KNz4ttc; Sat, 19 Dec 2020 08:38:27 +0000 (UTC) (envelope-from rlibby@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 7FFCE1A563; Sat, 19 Dec 2020 08:38:27 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJ8cRd9064764; Sat, 19 Dec 2020 08:38:27 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJ8cRhG064763; Sat, 19 Dec 2020 08:38:27 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012190838.0BJ8cRhG064763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Sat, 19 Dec 2020 08:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368788 - head/libexec/rtld-elf/rtld-libc X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/libexec/rtld-elf/rtld-libc X-SVN-Commit-Revision: 368788 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.34 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, 19 Dec 2020 08:38:27 -0000 Author: rlibby Date: Sat Dec 19 08:38:27 2020 New Revision: 368788 URL: https://svnweb.freebsd.org/changeset/base/368788 Log: rtld-libc: fix incremental build ar cr is an update of an archive, not a creation of a new one. During incremental builds (e.g. with meta mode) the archive was not getting cleaned, and so could retain now-deleted objects from previous builds. Now, delete the archive before creating/updating it. Reviewed by: arichardson, bdrewery, kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27663 Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc ============================================================================== --- head/libexec/rtld-elf/rtld-libc/Makefile.inc Sat Dec 19 08:16:33 2020 (r368787) +++ head/libexec/rtld-elf/rtld-libc/Makefile.inc Sat Dec 19 08:38:27 2020 (r368788) @@ -89,8 +89,9 @@ CLEANFILES+=${_obj}.nossppico # We insert all the .o files from libc_nossp_pic.a into a new rtld_libc.a file # to ensure that only .o files that are actually used end up being included. rtld_libc.a: ${LIBC_NOSSP_PIC} ${SRCTOP}/libexec/rtld-elf/rtld-libc/Makefile.inc + @rm -f ${.TARGET} ${AR} x ${LIBC_NOSSP_PIC} ${_rtld_libc_objs} - ${AR} cr ${.OBJDIR}/${.TARGET} ${_rtld_libc_objs} + ${AR} cr ${.TARGET} ${_rtld_libc_objs} CLEANFILES+=rtld_libc.a LDADD+=${.OBJDIR}/rtld_libc.a beforelinking: rtld_libc.a From owner-svn-src-head@freebsd.org Sat Dec 19 08:38: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 382F54C116A; Sat, 19 Dec 2020 08:38:33 +0000 (UTC) (envelope-from rlibby@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyfJm27D0z4v37; Sat, 19 Dec 2020 08:38:32 +0000 (UTC) (envelope-from rlibby@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 ADE4E1A1D9; Sat, 19 Dec 2020 08:38:31 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJ8cVTv064817; Sat, 19 Dec 2020 08:38:31 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJ8cVJ3064816; Sat, 19 Dec 2020 08:38:31 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <202012190838.0BJ8cVJ3064816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Sat, 19 Dec 2020 08:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368789 - head/libexec/rtld-elf/rtld-libc X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: head/libexec/rtld-elf/rtld-libc X-SVN-Commit-Revision: 368789 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.34 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, 19 Dec 2020 08:38:35 -0000 Author: rlibby Date: Sat Dec 19 08:38:31 2020 New Revision: 368789 URL: https://svnweb.freebsd.org/changeset/base/368789 Log: rtld-elf: link udivmoddi4 from compiler_rt This fixes the gcc9 build of rtld-elf32 on amd64, which needed an implementation of udivmoddi4. rtld-elf uses certain functions normally found in libc, and so it includes certain files from libc in its own build. It has two mechanisms to include files from libc: one that rebuilds source files in the rtld-elf environment, and one that extracts object files from a purpose-built no-SSP PIC archive. In addition to libc functions, rtld-elf may need to link functions normally found in libcompiler_rt (formerly libgcc). Now, add an ability to rebuild libcompiler_rt source files in the rtld-elf environment. We don't yet have a need for an object file extraction mechanism. libcompiler_rt could also supply udivdi3 and umoddi3, but leave them alone for now. Reviewed by: arichardson, kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27665 Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc ============================================================================== --- head/libexec/rtld-elf/rtld-libc/Makefile.inc Sat Dec 19 08:38:27 2020 (r368788) +++ head/libexec/rtld-elf/rtld-libc/Makefile.inc Sat Dec 19 08:38:31 2020 (r368789) @@ -51,8 +51,12 @@ _libc_other_objects= sigsetjmp lstat stat fstat fstata getdirentries _getdirentries _close _fcntl _open _openat _read \ _sigprocmask _write readlink __realpathat _setjmp setjmp setjmperr +# Allow building files from libcompiler_rt. Beware, there are some name +# collisions between libcompiler_rt files and libc files. +CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins +.PATH: ${CRTSRC} -# Finally add additional architecture-dependent libc dependencies +# Finally add additional architecture-dependent dependencies .if ${LIBC_ARCH} == "arm" # ARM needs aeabi_unwind_cpp for _setjmp _libc_other_objects+=aeabi_unwind_cpp @@ -60,6 +64,7 @@ _libc_other_objects+=aeabi_unwind_cpp # __udivdi3 is needed by kvprintf() in rtld_printf.c # i386 also needs i386_set_gsbase for allocate_initial_tls() _libc_other_objects+=umoddi3 udivdi3 qdivrem i386_set_gsbase +SRCS+= udivmoddi4.c .elif ${LIBC_ARCH} == "powerpc" || ${LIBC_ARCH} == "powerpcspe" # ppc needs __syncicache for reloc.c and __umoddi3+__udivdi3 for rtld_printf.c _libc_other_objects+=syncicache umoddi3 udivdi3 qdivrem From owner-svn-src-head@freebsd.org Sat Dec 19 09: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 791E34C2078; Sat, 19 Dec 2020 09:40:06 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cyggp2yW1z3DLc; Sat, 19 Dec 2020 09:40:06 +0000 (UTC) (envelope-from gbe@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 587E61B1C8; Sat, 19 Dec 2020 09:40:06 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJ9e60P002066; Sat, 19 Dec 2020 09:40:06 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJ9e6jA002065; Sat, 19 Dec 2020 09:40:06 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012190940.0BJ9e6jA002065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 09:40:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368790 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368790 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.34 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, 19 Dec 2020 09:40:06 -0000 Author: gbe (doc committer) Date: Sat Dec 19 09:40:05 2020 New Revision: 368790 URL: https://svnweb.freebsd.org/changeset/base/368790 Log: accept_filter(9): Fix a mandoc related error - no blank before trailing delimiter Modified: head/share/man/man9/accept_filter.9 Modified: head/share/man/man9/accept_filter.9 ============================================================================== --- head/share/man/man9/accept_filter.9 Sat Dec 19 08:38:31 2020 (r368789) +++ head/share/man/man9/accept_filter.9 Sat Dec 19 09:40:05 2020 (r368790) @@ -143,7 +143,7 @@ This manual page was written by .An Alfred Perlstein , .An Sheldon Hearn and -.An Jeroen Ruigrok van der Werven. +.An Jeroen Ruigrok van der Werven . .Pp The accept filter concept was pioneered by .An David Filo From owner-svn-src-head@freebsd.org Sat Dec 19 09:55: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 3E9754C293A; Sat, 19 Dec 2020 09:55:03 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cyh131HbFz3F4T; Sat, 19 Dec 2020 09:55:03 +0000 (UTC) (envelope-from gbe@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 1AD251B900; Sat, 19 Dec 2020 09:55:03 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJ9t2Ld014207; Sat, 19 Dec 2020 09:55:02 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJ9t24G014206; Sat, 19 Dec 2020 09:55:02 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012190955.0BJ9t24G014206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 09:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368791 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368791 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.34 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, 19 Dec 2020 09:55:03 -0000 Author: gbe (doc committer) Date: Sat Dec 19 09:55:02 2020 New Revision: 368791 URL: https://svnweb.freebsd.org/changeset/base/368791 Log: disk(9): Fix a few mandoc related errors - function name without markup: g_io_deliver() - function name without markup: disk_gone() - sections out of conventional order: Sh SEE ALSO - referenced manual not found: Xr MAKE_DEV 9 Actually the man page of MAKE_DEV has never existed. MFC after: 3 days Modified: head/share/man/man9/disk.9 Modified: head/share/man/man9/disk.9 ============================================================================== --- head/share/man/man9/disk.9 Sat Dec 19 09:40:05 2020 (r368790) +++ head/share/man/man9/disk.9 Sat Dec 19 09:55:02 2020 (r368791) @@ -172,9 +172,11 @@ kernel panic to record a copy of the system RAM to the Optional: if this method is provided, it gives the disk driver the opportunity to override the default GEOM response to BIO_GETATTR requests. This function should return -1 if the attribute is not handled, 0 if the -attribute is handled, or an errno to be passed to g_io_deliver(). +attribute is handled, or an errno to be passed to +.Fn g_io_deliver . .It Vt "disk_gone_t *" Va d_gone -Optional: if this method is provided, it will be called after disk_gone() +Optional: if this method is provided, it will be called after +.Fn disk_gone is called, once GEOM has finished its cleanup process. Once this callback is called, it is safe for the disk driver to free all of its resources, as it will not be receiving further calls from GEOM. @@ -241,15 +243,14 @@ Typically used to store a pointer to the drivers .Vt softc structure for this disk device. .El +.Sh SEE ALSO +.Xr GEOM 4 , +.Xr devfs 5 .Sh HISTORY The .Nm kernel disk storage API first appeared in .Fx 4.9 . -.Sh SEE ALSO -.Xr GEOM 4 , -.Xr devfs 5 , -.Xr MAKE_DEV 9 .Sh AUTHORS This manual page was written by .An Robert Watson . From owner-svn-src-head@freebsd.org Sat Dec 19 10:11: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 26FDB4C2B93; Sat, 19 Dec 2020 10:11:38 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyhNB0Rbrz3Fn5; Sat, 19 Dec 2020 10:11:38 +0000 (UTC) (envelope-from gbe@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 021421B8D1; Sat, 19 Dec 2020 10:11:38 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJABbrd024633; Sat, 19 Dec 2020 10:11:37 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJABbYk024632; Sat, 19 Dec 2020 10:11:37 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191011.0BJABbYk024632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 10:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368792 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368792 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.34 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, 19 Dec 2020 10:11:38 -0000 Author: gbe (doc committer) Date: Sat Dec 19 10:11:37 2020 New Revision: 368792 URL: https://svnweb.freebsd.org/changeset/base/368792 Log: bhnd(9): Fix a few mandoc related issues - skipping paragraph macro: Pp before Bl - skipping paragraph macro: Pp at the end of Ss - missing section argument: Xr device_set_desc - unusual Xr punctuation: none before bhnd_erom(9) MFC after: 1 week Modified: head/share/man/man9/bhnd.9 Modified: head/share/man/man9/bhnd.9 ============================================================================== --- head/share/man/man9/bhnd.9 Sat Dec 19 09:55:02 2020 (r368791) +++ head/share/man/man9/bhnd.9 Sat Dec 19 10:11:37 2020 (r368792) @@ -715,7 +715,6 @@ per-core management registers. When BHND hardware is used as a host-connected peripheral (e.g., in a PCI Wi-Fi card), the on-chip peripheral controller core is configured to operate as an endpoint device, bridging access to the SoC hardware: -.Pp .Bl -dash -offset indent .It Host access to SoC address space is provided via a set of register windows @@ -925,7 +924,6 @@ A pointer to the bus If true, the resource requires bus window remapping before it is MMIO accessible. .El -.Pp .\" .Ss "Bus Space Functions" The bhnd_bus_space functions wrap their equivalent @@ -1116,7 +1114,6 @@ bus of device The returned .Vt bhnd_chipid struct contains the following fields: -.Pp .Bl -tag -width "enum_addr" -offset indent .It Fa chip_id The chip identifier. @@ -1320,7 +1317,6 @@ on success. The .Vt bhnd_board_info structure contains the following fields: -.Pp .Bl -tag -width "board_srom_rev" -offset indent .It Fa board_vendor Vendor ID of the board manufacturer (PCI-SIG assigned). @@ -1362,7 +1358,6 @@ fields will be populated from device NVRAM. .Pp Symbolic constants for common board flags are defined in .In dev/bhnd/bhnd_ids.h . -.Pp .Ss "Device Matching Functions" The bhnd device matching functions are used to match against core, chip, and board-level device attributes. @@ -1481,7 +1476,6 @@ is returned. A .Vt bhnd_board_match match descriptor may be initialized using one or more of the following macros: -.Pp .Bl -tag -width "Fn BHND_MATCH_BOARD_VENDOR vendor" -offset indent .It Fn BHND_MATCH_BOARD_VENDOR "vendor" Match on boards with a vendor equal to @@ -1518,7 +1512,6 @@ struct bhnd_board_match board_desc = { A .Vt bhnd_chip_match match descriptor may be initialized using one or more of the following macros: -.Pp .Bl -tag -width "Fn BHND_MATCH_CHIP_IPR id pkg hwrev" -offset indent .It Fn BHND_MATCH_CHIP_ID "id" Match on chips with an ID equal to @@ -1565,7 +1558,6 @@ struct bhnd_chip_match chip_desc = { A .Vt bhnd_core_match match descriptor may be initialized using one or more of the following macros: -.Pp .Bl -tag -width "Fn BHND_MATCH_CORE_VENDOR vendor" -offset indent .It Fn BHND_MATCH_CORE_VENDOR "vendor" Match on cores with a vendor ID equal to @@ -1711,7 +1703,6 @@ bridged backplane. A .Vt bhnd_device table entry may be initialized using one of the following macros: -.Pp .Bl -ohang -offset indent .It Fn BHND_DEVICE "vendor" "device" "desc" "quirks" "flags" Match on devices with a vendor ID equal to @@ -2242,7 +2233,6 @@ will be discarded. .Pp The following clocks are supported, and may be combined using bitwise OR to request multiple clocks: -.Pp .Bl -tag -width ".Dv BHND_CLOCK_DYN" -offset indent .It BHND_CLOCK_DYN Dynamically select an appropriate clock source based on all outstanding clock @@ -2454,7 +2444,7 @@ device identification of overriding the core name with the specified .Fa dev_name , to populate the device's verbose description using -.Xr device_set_desc . +.Xr device_set_desc 9 . .Pp The .Fn bhnd_set_default_core_desc @@ -2463,7 +2453,7 @@ function uses the device identification of .Fa dev to populate the device's verbose description using -.Xr device_set_desc . +.Xr device_set_desc 9 . .Pp The .Fn bhnd_vendor_name @@ -2491,7 +2481,6 @@ functions return a pointer to on success, a null pointer otherwise. .\" .Ss "Device Configuration Functions" -.Pp The .Fn bhnd_read_config and @@ -2521,7 +2510,6 @@ and functions return 0 on success, otherwise an appropriate error code is returned. .\" .Ss "Device Information Functions" -.Pp The .Fn bhnd_read_board_info function returns 0 on success, otherwise an appropriate error code is returned. @@ -2542,7 +2530,6 @@ If fetching the requested DMA address translation othe appropriate error code will be returned. .\" .Ss "Interrupt Functions" -.Pp The .Fn bhnd_get_intr_ivec function returns @@ -2641,7 +2628,6 @@ The and .Fn bhnd_release_ext_rsrc functions return 0 on success, otherwise an appropriate error code is returned. -.Pp .\" .Ss "Service Provider Functions" The @@ -2664,14 +2650,13 @@ function returns a pointer to on success, a null pointer if the requested provider is not registered. .\" .Ss "Utility Functions" -.Pp The .Fn bhnd_format_chip_id function returns the total number of bytes written on success, or a negative integer on failure. .\" .Sh SEE ALSO -.Xr bhnd 4 +.Xr bhnd 4 , .Xr bhnd_erom 9 .Sh AUTHORS .An -nosplit From owner-svn-src-head@freebsd.org Sat Dec 19 10:15: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 8E36A4C276A; Sat, 19 Dec 2020 10:15:59 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyhTC0Bhnz3Ftc; Sat, 19 Dec 2020 10:15:59 +0000 (UTC) (envelope-from gbe@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 C51241B37B; Sat, 19 Dec 2020 10:15:58 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJAFw7B026755; Sat, 19 Dec 2020 10:15:58 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJAFwc2026754; Sat, 19 Dec 2020 10:15:58 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191015.0BJAFwc2026754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 10:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368793 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368793 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.34 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, 19 Dec 2020 10:15:59 -0000 Author: gbe (doc committer) Date: Sat Dec 19 10:15:58 2020 New Revision: 368793 URL: https://svnweb.freebsd.org/changeset/base/368793 Log: bhnd_erom(9): Fix a few mandoc related issues - skipping paragraph macro: Pp before Bl - skipping paragraph macro: Pp after Ss - skipping paragraph macro: Pp at the end of Ss - unusual Xr punctuation: none before bhnd_driver_get_erom_class(9) - unusual Xr punctuation: none before bus_space(9) MFC after: 1 week Modified: head/share/man/man9/bhnd_erom.9 Modified: head/share/man/man9/bhnd_erom.9 ============================================================================== --- head/share/man/man9/bhnd_erom.9 Sat Dec 19 10:11:37 2020 (r368792) +++ head/share/man/man9/bhnd_erom.9 Sat Dec 19 10:15:58 2020 (r368793) @@ -336,7 +336,6 @@ If the core information is not desired, set to .Dv NULL . .Ss Bus Space I/O -.Pp The .Vt bhnd_erom_io structure provides a set of I/O callbacks used by @@ -353,7 +352,6 @@ callbacks directly. The .Vt bhnd_erom_io structure contains these required fields: -.Pp .Bl -tag -width "read" -offset indent .It Fa map A function implementing @@ -424,7 +422,6 @@ relative to the bus address previously mapped using The .Fa width must be one of 1, 2, or 4 bytes. -.Pp .Sh RETURN VALUES The .Fn bhnd_erom_probe @@ -477,8 +474,8 @@ functions return 0 on success, otherwise an appropriat .Sh SEE ALSO .Xr bhnd 4 , .Xr bhnd 9 , -.Xr bhnd_alloc_resource 9 -.Xr bhnd_driver_get_erom_class 9 +.Xr bhnd_alloc_resource 9 , +.Xr bhnd_driver_get_erom_class 9 , .Xr bus_space 9 .Sh AUTHORS .An -nosplit From owner-svn-src-head@freebsd.org Sat Dec 19 10:18: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 8E8194C2E84; Sat, 19 Dec 2020 10:18:21 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyhWx3c4Kz3GBC; Sat, 19 Dec 2020 10:18:21 +0000 (UTC) (envelope-from gbe@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 6F0621BBC6; Sat, 19 Dec 2020 10:18:21 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJAILjC026903; Sat, 19 Dec 2020 10:18:21 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJAILNx026902; Sat, 19 Dec 2020 10:18:21 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191018.0BJAILNx026902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 10:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368794 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368794 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.34 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, 19 Dec 2020 10:18:21 -0000 Author: gbe (doc committer) Date: Sat Dec 19 10:18:21 2020 New Revision: 368794 URL: https://svnweb.freebsd.org/changeset/base/368794 Log: driver(9): Fix a mandoc related issue - sections out of conventional order: Sh SEE ALSO MFC after: 1 week Modified: head/share/man/man9/driver.9 Modified: head/share/man/man9/driver.9 ============================================================================== --- head/share/man/man9/driver.9 Sat Dec 19 10:15:58 2020 (r368793) +++ head/share/man/man9/driver.9 Sat Dec 19 10:18:21 2020 (r368794) @@ -102,11 +102,6 @@ macro will also create the devclass with the name of t can optionally call extra initialisation code in the driver by specifying an extra module event handler and argument as the last two arguments. -.Sh HISTORY -The -.Nm -framework first appeared in -.Fx 2.2.7 . .Sh SEE ALSO .Xr devclass 9 , .Xr device 9 , @@ -116,6 +111,11 @@ framework first appeared in .Xr DEVICE_PROBE 9 , .Xr DEVICE_SHUTDOWN 9 , .Xr DRIVER_MODULE 9 +.Sh HISTORY +The +.Nm +framework first appeared in +.Fx 2.2.7 . .Sh AUTHORS This manual page was written by .An Doug Rabson . From owner-svn-src-head@freebsd.org Sat Dec 19 10:20: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 431CC4C2F88; Sat, 19 Dec 2020 10:20:23 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyhZH1Qmzz3G8g; Sat, 19 Dec 2020 10:20:23 +0000 (UTC) (envelope-from gbe@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 23BF61B8E2; Sat, 19 Dec 2020 10:20:23 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJAKN8Y027087; Sat, 19 Dec 2020 10:20:23 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJAKMh0027086; Sat, 19 Dec 2020 10:20:22 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191020.0BJAKMh0027086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 10:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368795 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368795 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.34 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, 19 Dec 2020 10:20:23 -0000 Author: gbe (doc committer) Date: Sat Dec 19 10:20:22 2020 New Revision: 368795 URL: https://svnweb.freebsd.org/changeset/base/368795 Log: fail(9): Fix a few mandoc related issues - function name without markup: return() - function name without markup: print() MFC after: 1 week Modified: head/share/man/man9/fail.9 Modified: head/share/man/man9/fail.9 ============================================================================== --- head/share/man/man9/fail.9 Sat Dec 19 10:18:21 2020 (r368794) +++ head/share/man/man9/fail.9 Sat Dec 19 10:20:22 2020 (r368795) @@ -218,9 +218,15 @@ The operator -> can be used to express cascading terms If you specify ->, it means that if does not .Ql execute , is evaluated. -For the purpose of this operator, the return() and print() operators -are the only types that cascade. -A return() term only cascades if the code executes, and a print() +For the purpose of this operator, the +.Fn return +and +.Fn print +operators are the only types that cascade. +A +.Fn return +term only cascades if the code executes, and a +.Fn print term only cascades when passed a non-zero argument. A pid can optionally be specified. The fail point term is only executed when invoked by a process with a From owner-svn-src-head@freebsd.org Sat Dec 19 10:24: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 1D71F4C2FA6; Sat, 19 Dec 2020 10:24:37 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cyhg90JRHz3Gnv; Sat, 19 Dec 2020 10:24:37 +0000 (UTC) (envelope-from gbe@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 ED61D1B6ED; Sat, 19 Dec 2020 10:24:36 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJAOa3q032839; Sat, 19 Dec 2020 10:24:36 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJAOamu032838; Sat, 19 Dec 2020 10:24:36 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191024.0BJAOamu032838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 10:24:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368796 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368796 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.34 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, 19 Dec 2020 10:24:37 -0000 Author: gbe (doc committer) Date: Sat Dec 19 10:24:36 2020 New Revision: 368796 URL: https://svnweb.freebsd.org/changeset/base/368796 Log: ofw_bus_is_compatible(9): Fix a few mandoc related issues - missing comma before name: Nm ofw_bus_is_compatible_strict - missing comma before name: Nm ofw_bus_node_is_compatible - missing comma before name: Nm ofw_bus_search_compatible - skipping paragraph macro: Pp after Sh MFC after: 1 week Modified: head/share/man/man9/ofw_bus_is_compatible.9 Modified: head/share/man/man9/ofw_bus_is_compatible.9 ============================================================================== --- head/share/man/man9/ofw_bus_is_compatible.9 Sat Dec 19 10:20:22 2020 (r368795) +++ head/share/man/man9/ofw_bus_is_compatible.9 Sat Dec 19 10:24:36 2020 (r368796) @@ -32,9 +32,9 @@ .Dt ofw_bus_is_compatible 9 .Os .Sh NAME -.Nm ofw_bus_is_compatible -.Nm ofw_bus_is_compatible_strict -.Nm ofw_bus_node_is_compatible +.Nm ofw_bus_is_compatible , +.Nm ofw_bus_is_compatible_strict , +.Nm ofw_bus_node_is_compatible , .Nm ofw_bus_search_compatible .Nd check device tree nodes for compatibility with drivers .Sh SYNOPSIS @@ -50,7 +50,6 @@ .Ft const struct ofw_compat_data * .Fn ofw_bus_search_compatible "device_t dev" "const struct ofw_compat_data *compat" .Sh DESCRIPTION -.Pp The "compatible" property of the device tree node is used to identify the type of the device the node represents. The property is a list of one or more strings that represent From owner-svn-src-head@freebsd.org Sat Dec 19 10:26: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 53F194C3023; Sat, 19 Dec 2020 10:26:41 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyhjY1wXkz3GpS; Sat, 19 Dec 2020 10:26:41 +0000 (UTC) (envelope-from gbe@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 308961BD4F; Sat, 19 Dec 2020 10:26:41 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJAQfGu032997; Sat, 19 Dec 2020 10:26:41 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJAQfpm032996; Sat, 19 Dec 2020 10:26:41 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191026.0BJAQfpm032996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 10:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368797 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368797 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.34 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, 19 Dec 2020 10:26:41 -0000 Author: gbe (doc committer) Date: Sat Dec 19 10:26:40 2020 New Revision: 368797 URL: https://svnweb.freebsd.org/changeset/base/368797 Log: ofw_bus_status_okay(9): Fix a few mandoc related issues - missing comma before name: Nm ofw_bus_status_okay - missing comma before name: Nm ofw_bus_node_status_okay - skipping paragraph macro: Pp after Sh MFC after: 1 week Modified: head/share/man/man9/ofw_bus_status_okay.9 Modified: head/share/man/man9/ofw_bus_status_okay.9 ============================================================================== --- head/share/man/man9/ofw_bus_status_okay.9 Sat Dec 19 10:24:36 2020 (r368796) +++ head/share/man/man9/ofw_bus_status_okay.9 Sat Dec 19 10:26:40 2020 (r368797) @@ -32,8 +32,8 @@ .Dt ofw_bus_status_okay 9 .Os .Sh NAME -.Nm ofw_bus_get_status -.Nm ofw_bus_status_okay +.Nm ofw_bus_get_status , +.Nm ofw_bus_status_okay , .Nm ofw_bus_node_status_okay .Nd check status of the device tree node .Sh SYNOPSIS @@ -47,7 +47,6 @@ .Ft int .Fn ofw_bus_node_status_okay "phandle_t node" .Sh DESCRIPTION -.Pp The "status" property of the device tree node indicates whether the device is enabled or not. Multiple hardware versions might be built using the same base System-on-Chip From owner-svn-src-head@freebsd.org Sat Dec 19 10:31: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 C72764C3282; Sat, 19 Dec 2020 10:31:25 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cyhq15GGZz3Gys; Sat, 19 Dec 2020 10:31:25 +0000 (UTC) (envelope-from gbe@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 A77251BC2F; Sat, 19 Dec 2020 10:31:25 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJAVPtr036365; Sat, 19 Dec 2020 10:31:25 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJAVPaJ036364; Sat, 19 Dec 2020 10:31:25 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191031.0BJAVPaJ036364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 10:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368798 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 368798 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.34 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, 19 Dec 2020 10:31:25 -0000 Author: gbe (doc committer) Date: Sat Dec 19 10:31:25 2020 New Revision: 368798 URL: https://svnweb.freebsd.org/changeset/base/368798 Log: sysctl(9): Fix a few mandoc related issues - missing comma before name: Nm SYSCTL_UQUAD - bad NAME section content: text MFC after: 1 week Modified: head/share/man/man9/sysctl.9 Modified: head/share/man/man9/sysctl.9 ============================================================================== --- head/share/man/man9/sysctl.9 Sat Dec 19 10:26:40 2020 (r368797) +++ head/share/man/man9/sysctl.9 Sat Dec 19 10:31:25 2020 (r368798) @@ -95,8 +95,8 @@ .Nm SYSCTL_UINT , .Nm SYSCTL_ULONG , .Nm SYSCTL_UMA_CUR , -.Nm SYSCTL_UMA_MAX -.Nm SYSCTL_UQUAD , +.Nm SYSCTL_UMA_MAX , +.Nm SYSCTL_UQUAD .Nd Dynamic and static sysctl MIB creation functions .Sh SYNOPSIS .In sys/param.h From owner-svn-src-head@freebsd.org Sat Dec 19 11:00: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 912CB4C39A0; Sat, 19 Dec 2020 11:00:11 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyjSC3m5qz3JHy; Sat, 19 Dec 2020 11:00:11 +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 73D271C234; Sat, 19 Dec 2020 11:00:11 +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 0BJB0B1f051961; Sat, 19 Dec 2020 11:00:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJB0BIa051960; Sat, 19 Dec 2020 11:00:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012191100.0BJB0BIa051960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 19 Dec 2020 11:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368799 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 368799 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.34 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, 19 Dec 2020 11:00:11 -0000 Author: hselasky Date: Sat Dec 19 11:00:11 2020 New Revision: 368799 URL: https://svnweb.freebsd.org/changeset/base/368799 Log: Move SYSCTL_ADD_PROC() to unlocked context in if_ure to avoid lock order reversal. MFC after: 1 week Reported by: Mark Millard Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/usb/net/if_ure.c Modified: head/sys/dev/usb/net/if_ure.c ============================================================================== --- head/sys/dev/usb/net/if_ure.c Sat Dec 19 10:31:25 2020 (r368798) +++ head/sys/dev/usb/net/if_ure.c Sat Dec 19 11:00:11 2020 (r368799) @@ -959,8 +959,6 @@ static void ure_attach_post(struct usb_ether *ue) { struct ure_softc *sc = uether_getsc(ue); - struct sysctl_ctx_list *sctx; - struct sysctl_oid *soid; sc->sc_rxstarted = 0; sc->sc_phyno = 0; @@ -988,18 +986,13 @@ ure_attach_post(struct usb_ether *ue) sc->sc_ue.ue_eaddr[0] &= ~0x01; /* unicast */ sc->sc_ue.ue_eaddr[0] |= 0x02; /* locally administered */ } - - sctx = device_get_sysctl_ctx(sc->sc_ue.ue_dev); - soid = device_get_sysctl_tree(sc->sc_ue.ue_dev); - SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "chipver", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, - ure_sysctl_chipver, "A", - "Return string with chip version."); } static int ure_attach_post_sub(struct usb_ether *ue) { + struct sysctl_ctx_list *sctx; + struct sysctl_oid *soid; struct ure_softc *sc; struct ifnet *ifp; int error; @@ -1032,6 +1025,13 @@ ure_attach_post_sub(struct usb_ether *ue) uether_ifmedia_upd, ue->ue_methods->ue_mii_sts, BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, 0); mtx_unlock(&Giant); + + sctx = device_get_sysctl_ctx(sc->sc_ue.ue_dev); + soid = device_get_sysctl_tree(sc->sc_ue.ue_dev); + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "chipver", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + ure_sysctl_chipver, "A", + "Return string with chip version."); return (error); } From owner-svn-src-head@freebsd.org Sat Dec 19 11:03: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 77F844C3A76; Sat, 19 Dec 2020 11:03:05 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyjWY2pkxz3Jpl; Sat, 19 Dec 2020 11:03:05 +0000 (UTC) (envelope-from gbe@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 537561C417; Sat, 19 Dec 2020 11:03:05 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJB35sc057877; Sat, 19 Dec 2020 11:03:05 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJB3566057876; Sat, 19 Dec 2020 11:03:05 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191103.0BJB3566057876@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 11:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368800 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 368800 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.34 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, 19 Dec 2020 11:03:05 -0000 Author: gbe (doc committer) Date: Sat Dec 19 11:03:04 2020 New Revision: 368800 URL: https://svnweb.freebsd.org/changeset/base/368800 Log: devd.conf(5): Fix a mandoc related issue - sections out of conventional order: Sh SEE ALSO MFC after: 1 week Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 ============================================================================== --- head/sbin/devd/devd.conf.5 Sat Dec 19 11:00:11 2020 (r368799) +++ head/sbin/devd/devd.conf.5 Sat Dec 19 11:03:04 2020 (r368800) @@ -786,12 +786,12 @@ detach 0 { The installed .Pa /etc/devd.conf has many additional examples. -.Sh BUGS -The variable expansion's interaction with single quotes is -suboptimal and surprising. .Sh SEE ALSO .Xr cam 4 , .Xr coretemp 4 , .Xr devfs 5 , .Xr re_format 7 , .Xr devd 8 +.Sh BUGS +The variable expansion's interaction with single quotes is +suboptimal and surprising. From owner-svn-src-head@freebsd.org Sat Dec 19 11:03: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 030294C3E07; Sat, 19 Dec 2020 11:03:55 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyjXV6lFJz3Jy3; Sat, 19 Dec 2020 11:03:54 +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 DA47E1C528; Sat, 19 Dec 2020 11:03:54 +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 0BJB3seo057971; Sat, 19 Dec 2020 11:03:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJB3sqJ057970; Sat, 19 Dec 2020 11:03:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202012191103.0BJB3sqJ057970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 19 Dec 2020 11:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368801 - head/sys/dev/usb/net X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/net X-SVN-Commit-Revision: 368801 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.34 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, 19 Dec 2020 11:03:55 -0000 Author: hselasky Date: Sat Dec 19 11:03:54 2020 New Revision: 368801 URL: https://svnweb.freebsd.org/changeset/base/368801 Log: Ensure a minimum packet length before creating a mbuf in if_ure. Sponsored by: Mellanox Technologies // NVIDIA Networking Modified: head/sys/dev/usb/net/if_ure.c Modified: head/sys/dev/usb/net/if_ure.c ============================================================================== --- head/sys/dev/usb/net/if_ure.c Sat Dec 19 11:03:04 2020 (r368800) +++ head/sys/dev/usb/net/if_ure.c Sat Dec 19 11:03:54 2020 (r368801) @@ -711,7 +711,7 @@ ure_bulk_read_callback(struct usb_xfer *xfer, usb_erro goto tr_setup; } - if (len != 0) + if (len >= (ETHER_HDR_LEN + ETHER_CRC_LEN)) m = ure_makembuf(pc, off, len - ETHER_CRC_LEN); else m = NULL; From owner-svn-src-head@freebsd.org Sat Dec 19 11:41: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 1C0CB4C4992 for ; Sat, 19 Dec 2020 11:41:47 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CykNB1v65z3LBW for ; Sat, 19 Dec 2020 11:41:46 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-yb1-xb2d.google.com with SMTP id d37so4449098ybi.4 for ; Sat, 19 Dec 2020 03:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=su//Dz7rEUfHZtJJgVsJFd2fS+ZhGMjqLtFXMqyc+Xo=; b=DDdqvV44tEc7Ag9sdft7ecVtIkKv7bcthNscwTBir8a+vwTBHsNxhm7Bj2CLE5XcOb BYn1NgDOZDMfxd/9M84FIXmZ86s2tYq5ZZRybbkHuAQd/OXhqBYDfBhdTWKjQfULLoYJ SECnWhw+nFY7BoZQvPRqZonLk6tWiF/AsYr44= 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=su//Dz7rEUfHZtJJgVsJFd2fS+ZhGMjqLtFXMqyc+Xo=; b=O9e2Aaxb3FMHnGFUzVGXZ7nZLmjmMGdU0UIUO7Z5hhTqSKBLHZrTV7bjyuhNljZUPT LgBka1xSr8er0JFTSaK2lE4f67WgfEnMZcPtAJ57MEMgBpD8Dh8qFUakW1vHQCS9Bxh0 3O1BLnb3MYeTKPxUghMNLfSZIcOp5cf85Kz6AkyaVgy9VIUDDMQRlg4XtTgAlXuNzmFu LgX+qKWYjXOIbzaoMWtNS2P/mHWDJNFFhX5P88RSaPRSrI4Xwtxqgb6/yh/bac13l5mU +XB/kSTD/rtuOYz3Rm4tceb2d5VIHU124vJ6l4KYIFC1GO3UqKR9TvhcVDVEJM/2g45g bhmQ== X-Gm-Message-State: AOAM530nvPpk6ct9FFjVLkJRwiHIa6S4/5wVKpbTFkbgVmRMuUMHeHVM aSORVRU1jEwd5U9hJKa7jdRKFfhU0rOO9Tv7K2fTyA== X-Google-Smtp-Source: ABdhPJzHqveKD/9z1q6pahxvA12Cxg0FWZ65ZaQV1LmdT4VPJQHPkCFhIWtxKpRxFYH3lczzsl2gDIvdsM220gKrhDQ= X-Received: by 2002:a25:ac1f:: with SMTP id w31mr11774601ybi.87.1608378104602; Sat, 19 Dec 2020 03:41:44 -0800 (PST) MIME-Version: 1.0 References: <202012171241.0BHCfl1r008452@repo.freebsd.org> <686CF2E6-1D3C-4A83-A323-02CD9F536675@freebsd.org> <452cbb1060b7134315999c2323ed431714dc03fe.camel@freebsd.org> In-Reply-To: <452cbb1060b7134315999c2323ed431714dc03fe.camel@freebsd.org> From: Kevin Bowling Date: Sat, 19 Dec 2020 04:41:33 -0700 Message-ID: Subject: Re: svn commit: r368714 - head/lib/libc/string To: Ian Lepore Cc: Jessica Clarke , Konstantin Belousov , Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 4CykNB1v65z3LBW X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none (invalid DKIM record) header.d=kev009.com header.s=google header.b=DDdqvV44; dmarc=none; spf=pass (mx1.freebsd.org: domain of kevin.bowling@kev009.com designates 2607:f8b0:4864:20::b2d as permitted sender) smtp.mailfrom=kevin.bowling@kev009.com X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[kev009.com]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::b2d:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[kev009.com:~]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b2d:from]; R_DKIM_PERMFAIL(0.00)[kev009.com:s=google]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::b2d:from]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MAILMAN_DEST(0.00)[svn-src-head]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 19 Dec 2020 11:41:47 -0000 On Thu, Dec 17, 2020 at 9:33 AM Ian Lepore wrote: > On Thu, 2020-12-17 at 18:22 +0200, Konstantin Belousov wrote: > > On Thu, Dec 17, 2020 at 01:01:01PM +0000, Jessica Clarke wrote: > > > On 17 Dec 2020, at 12:53, Konstantin Belousov > > > wrote: > > > > > > > > On Thu, Dec 17, 2020 at 12:41:47PM +0000, Mateusz Piotrowski > > > > wrote: > > > > > Author: 0mp (doc,ports committer) > > > > > Date: Thu Dec 17 12:41:47 2020 > > > > > New Revision: 368714 > > > > > URL: https://svnweb.freebsd.org/changeset/base/368714 > > > > > > > > > > Log: > > > > > strerror.3: Add an example for perror() > > > > > > > > > > This is a nice and quick reference. > > > > > > > > > > Reviewed by: jilles, yuripv > > > > > MFC after: 2 weeks > > > > > Differential Revision: https://reviews.freebsd.org/D27623 > > > > > > > > > > Modified: > > > > > head/lib/libc/string/strerror.3 > > > > > > > > > > Modified: head/lib/libc/string/strerror.3 > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=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/lib/libc/string/strerror.3 Thu Dec 17 03:42:54 > > > > > 2020 (r368713) > > > > > +++ head/lib/libc/string/strerror.3 Thu Dec 17 12:41:47 > > > > > 2020 (r368714) > > > > > @@ -32,7 +32,7 @@ > > > > > .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 > > > > > .\" $FreeBSD$ > > > > > .\" > > > > > -.Dd December 7, 2020 > > > > > +.Dd December 17, 2020 > > > > > .Dt STRERROR 3 > > > > > .Os > > > > > .Sh NAME > > > > > @@ -170,6 +170,31 @@ The use of these variables is deprecated; > > > > > or > > > > > .Fn strerror_r > > > > > should be used instead. > > > > > +.Sh EXAMPLES > > > > > +The following example shows how to use > > > > > +.Fn perror > > > > > +to report an error. > > > > > +.Bd -literal -offset 2n > > > > > +#include > > > > > +#include > > > > > +#include > > > > > + > > > > > +int > > > > > +main(void) > > > > > +{ > > > > > + int fd; > > > > > + > > > > > + if ((fd =3D open("/nonexistent", O_RDONLY)) =3D=3D -1) { > > > > > + perror("open()"); > > > > > + exit(1); > > > > > + } > > > > > + printf("File descriptor: %d\en", fd); > > > > > > > > This lines is indented with spaces, while other lines have tabs. > > > > > > > > > + return (0); > > > > > > > > return (0) is redundand. > > > > > > It's not required as per the standard, but omitting it is needlessly > > > obfuscating it and bad practice. C lets you do a whole load of things > > > that are a bad idea, and whilst this one is harmless, it is nonethele= ss > > > confusing to anyone who is not intimately acquainted quirks like this > > > special case in the standard. > > > > Why it is bad practice ? > > > > C is a small language, and while knowing some quirks (like this one) > > seems to be optional, others are not. And worse, that other quirks are > > essential for writing correct code at all. Consequence is that ignoring > > details indicates insufficient knowledge of the fundamentals and lowers > > the trust in the provided suggestion. > > I completely disagree. Writing example code where you fail to return a > value and just fall out the bottom of some function that declares it > returns an int is just Bad Code. Using some obscure quirk of the > language as justification for that bad code doesn't help the situation > at all. > > How obscure is this quirk? I've been writing C code since 1983, > including having released a freeware compiler (pre-gcc days) and > working on a commercial C compiler. I used to moderate the c_language > conference on BIX (back when that was a thing). I make my living > writing C and C++ code every day. And yet, I had completely forgotten > about this quirk. > > Example code shouldn't be used to establish how much more clever you > are than the reader, it should be as easy to understand as possible. > > -- Ian In Kib=E2=80=99s defense I think this is commonly mentioned in C99 books (a= t least that=E2=80=99s where I learned of it) so it depends on when and where someo= ne learned. There are merits approaches of being explicit or brief. I have no preference directly but we should probably try to be uniform in our examples with whatever is most common in the docs already. > From owner-svn-src-head@freebsd.org Sat Dec 19 11:47: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 68E6C4C41EC; Sat, 19 Dec 2020 11:47:39 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CykVz2Xt2z3LYp; Sat, 19 Dec 2020 11:47:39 +0000 (UTC) (envelope-from gbe@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 459111CE91; Sat, 19 Dec 2020 11:47:39 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJBldw2082713; Sat, 19 Dec 2020 11:47:39 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJBldf3082712; Sat, 19 Dec 2020 11:47:39 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191147.0BJBldf3082712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 11:47:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368802 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 368802 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.34 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, 19 Dec 2020 11:47:39 -0000 Author: gbe (doc committer) Date: Sat Dec 19 11:47:38 2020 New Revision: 368802 URL: https://svnweb.freebsd.org/changeset/base/368802 Log: nvmecontrol(8): Fix a few mandoc related issues and add a SEE ALSO section - inserting missing end of block: Ss breaks Bl - skipping paragraph macro: Pp before Ss - referenced manual not found: Xr nvme 4 (2 times) - unknown standard specifier: St The The macro .St can only be used for standards known by mdoc(7). So add a SEE ALSO section and add a reference to the NVM Express Base Specification. MFC after: 2 weeks Modified: head/sbin/nvmecontrol/nvmecontrol.8 Modified: head/sbin/nvmecontrol/nvmecontrol.8 ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.8 Sat Dec 19 11:03:54 2020 (r368801) +++ head/sbin/nvmecontrol/nvmecontrol.8 Sat Dec 19 11:47:38 2020 (r368802) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 30, 2020 +.Dd December 19, 2020 .Dt NVMECONTROL 8 .Os .Sh NAME @@ -205,7 +205,6 @@ .Sh DESCRIPTION NVM Express (NVMe) is a storage protocol standard, for SSDs and other high-speed storage devices over PCI Express. -.Pp .Ss identify The identify commands reports information from the drive's .Dv IDENTIFY_CONTROLLER @@ -238,6 +237,7 @@ of is used to retrieve the .Dv IDENTIFY_CONTROLLER data associated with that drive. +.El .Ss logpage The logpage command knows how to print log pages of various types. It also knows about vendor specific log pages from hgst/wdc and intel. @@ -482,9 +482,7 @@ and commands send NVMe commands to either the administrative or the data part of the device. These commands are expected to be compatible with nvme-cli. -Please see -.St The NVMe Standard -for details. +Please see the NVMe Standard for details. .Bl -tag -width 16n .It Fl o -opcode Ar opcode Opcode to send. @@ -674,6 +672,12 @@ linker set are added to the top-level commands. The members of the .Va logpage linker set are added to the logpage parsers. +.Sh SEE ALSO +.Rs +.%T The NVM Express Base Specification +.%D June 10, 2019 +.%U https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf +.Re .Sh HISTORY The .Nm From owner-svn-src-head@freebsd.org Sat Dec 19 11:57: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 A511E4C4B20; Sat, 19 Dec 2020 11:57:47 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cykkg4MZKz3MBt; Sat, 19 Dec 2020 11:57:47 +0000 (UTC) (envelope-from gbe@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 88ADD1C9E5; Sat, 19 Dec 2020 11:57:47 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJBvlEf088694; Sat, 19 Dec 2020 11:57:47 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJBvlQl088693; Sat, 19 Dec 2020 11:57:47 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191157.0BJBvlQl088693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 11:57:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368803 - head/sbin/ping X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/sbin/ping X-SVN-Commit-Revision: 368803 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.34 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, 19 Dec 2020 11:57:47 -0000 Author: gbe (doc committer) Date: Sat Dec 19 11:57:47 2020 New Revision: 368803 URL: https://svnweb.freebsd.org/changeset/base/368803 Log: ping(8): Fix a mandoc related issue - unusual Xr punctuation: none before traceroute6(8) Modified: head/sbin/ping/ping.8 Modified: head/sbin/ping/ping.8 ============================================================================== --- head/sbin/ping/ping.8 Sat Dec 19 11:47:38 2020 (r368802) +++ head/sbin/ping/ping.8 Sat Dec 19 11:57:47 2020 (r368803) @@ -749,7 +749,7 @@ ping -6 -k agl dst.foo.com .Xr ip6 4 , .Xr ifconfig 8 , .Xr routed 8 , -.Xr traceroute 8 +.Xr traceroute 8 , .Xr traceroute6 8 .Rs .%A A. Conta From owner-svn-src-head@freebsd.org Sat Dec 19 12:47: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 769124C69AC; Sat, 19 Dec 2020 12:47:41 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CylrF2cMbz3Q16; Sat, 19 Dec 2020 12:47:41 +0000 (UTC) (envelope-from gbe@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 4C4E71D5C8; Sat, 19 Dec 2020 12:47:41 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJClf5s020323; Sat, 19 Dec 2020 12:47:41 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJClf5D020322; Sat, 19 Dec 2020 12:47:41 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191247.0BJClf5D020322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 12:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368804 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 368804 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.34 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, 19 Dec 2020 12:47:41 -0000 Author: gbe (doc committer) Date: Sat Dec 19 12:47:40 2020 New Revision: 368804 URL: https://svnweb.freebsd.org/changeset/base/368804 Log: ipfw(8): Fix a few mandoc related issues - no blank before trailing delimiter - missing section argument: Xr inet_pton - skipping paragraph macro: Pp before Ss - unusual Xr order: syslogd after sysrc - tab in filled text There were a few multiline NAT examples which used the .Dl macro with tabs. I converted them to .Bd, which is a more suitable macro for that case. MFC after: 1 week Modified: head/sbin/ipfw/ipfw.8 Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Sat Dec 19 11:57:47 2020 (r368803) +++ head/sbin/ipfw/ipfw.8 Sat Dec 19 12:47:40 2020 (r368804) @@ -305,7 +305,6 @@ Finally, counters can be reset with the and .Cm resetlog commands. -.Pp .Ss COMMAND OPTIONS The following general options are available when invoking .Nm : @@ -389,7 +388,8 @@ listed. When listing pipes, sort according to one of the four counters (total or current packets or bytes). .It Fl t -When listing, show last match timestamp converted with ctime(). +When listing, show last match timestamp converted with +.Fn ctime . .It Fl T When listing, show last match timestamp as seconds from the epoch. This form can be more convenient for postprocessing by scripts. @@ -1441,7 +1441,7 @@ list. Matches all IPv6 addresses with base .Ar addr (specified as allowed by -.Xr inet_pton +.Xr inet_pton 3 or a hostname) and mask width of .Cm masklen @@ -1450,12 +1450,12 @@ bits. Matches all IPv6 addresses with base .Ar addr (specified as allowed by -.Xr inet_pton +.Xr inet_pton 3 or a hostname) and the mask of .Ar mask , specified as allowed by -.Xr inet_pton . +.Xr inet_pton 3 . As an example, fe::640:0:0/ffff::ffff:ffff:0:0 will match fe:*:*:*:0:640:*:*. This form is advised only for non-contiguous @@ -1518,7 +1518,7 @@ operand, and possibly grouped into .Pp The following match patterns can be used (listed in alphabetical order): .Bl -tag -width indent -.It Cm // this is a comment. +.It Cm // this is a comment . Inserts the specified text as a comment in the rule. Everything following // is considered as a comment and stored in the rule. You can have comment-only rules, which are listed as having a @@ -1806,7 +1806,10 @@ keyword is special name used for compatibility with ol .It Cm layer2 Matches only layer2 packets, i.e., those passed to .Nm -from ether_demux() and ether_output_frame(). +from +.Fn ether_demux +and +.Fn ether_output_frame . .It Cm limit Bro Cm src-addr | src-port | dst-addr | dst-port Brc Ar N Op Ar :flowname The firewall will only allow .Ar N @@ -2258,8 +2261,8 @@ Shows generic table information and algo-specific data The following lookup algorithms are supported: .Bl -tag -width indent .It Ar algo-desc : algo-name | "algo-name algo-data" -.It Ar algo-name: Ar addr:radix | addr:hash | iface:array | number:array | flow:hash -.It Cm addr:radix +.It Ar algo-name : Ar addr: radix | addr: hash | iface: array | number: array | flow: hash +.It Cm addr: radix Separate Radix trees for IPv4 and IPv6, the same way as the routing table (see .Xr route 4 ) . Default choice for @@ -2330,11 +2333,11 @@ IPv6 nexthop to fwd packets to. The .Cm tablearg argument can be used with the following actions: -.Cm nat, pipe , queue, divert, tee, netgraph, ngtee, fwd, skipto, setfib, +.Cm nat, pipe, queue, divert, tee, netgraph, ngtee, fwd, skipto, setfib , action parameters: -.Cm tag, untag, +.Cm tag, untag , rule options: -.Cm limit, tagged. +.Cm limit, tagged . .Pp When used with the .Cm skipto @@ -2614,7 +2617,6 @@ mode can be enabled by setting the .Va net.inet.ip.dummynet.io_fast .Xr sysctl 8 variable to a non-zero value. -.Pp .Ss PIPE, QUEUE AND SCHEDULER CONFIGURATION The .Em pipe , @@ -3550,7 +3552,6 @@ Note that the behavior of stateless translator with re packets differs from stateful translator. If corresponding addresses was not found in the lookup tables, the packet will not be dropped and the search continues. -.Pp .Ss XLAT464 CLAT translation XLAT464 CLAT NAT64 translator implements client-side stateless translation as defined in RFC6877 and is very similar to statless NAT64 translator @@ -3662,12 +3663,12 @@ or .Xr kenv 1 before ipfw module gets loaded. .Bl -tag -width indent -.It Va net.inet.ip.fw.default_to_accept: No 0 +.It Va net.inet.ip.fw.default_to_accept : No 0 Defines ipfw last rule behavior. This value overrides .Cd "options IPFW_DEFAULT_TO_(ACCEPT|DENY)" from kernel configuration file. -.It Va net.inet.ip.fw.tables_max: No 128 +.It Va net.inet.ip.fw.tables_max : No 128 Defines number of tables available in ipfw. Number cannot exceed 65534. .El @@ -3682,7 +3683,7 @@ These are shown below together with their default valu .Xr sysctl 8 command what value is actually in use) and meaning: .Bl -tag -width indent -.It Va net.inet.ip.alias.sctp.accept_global_ootb_addip: No 0 +.It Va net.inet.ip.alias.sctp.accept_global_ootb_addip : No 0 Defines how the .Nm nat responds to receipt of global OOTB ASCONF-AddIP: @@ -3698,7 +3699,7 @@ will accept and process all OOTB global AddIP messages Option 1 should never be selected as this forms a security risk. An attacker can establish multiple fake associations by sending AddIP messages. -.It Va net.inet.ip.alias.sctp.chunk_proc_limit: No 5 +.It Va net.inet.ip.alias.sctp.chunk_proc_limit : No 5 Defines the maximum number of chunks in an SCTP packet that will be parsed for a packet that matches an existing association. @@ -3708,7 +3709,7 @@ A high value is a DoS risk yet setting too low a value may result in important control chunks in the packet not being located and parsed. -.It Va net.inet.ip.alias.sctp.error_on_ootb: No 1 +.It Va net.inet.ip.alias.sctp.error_on_ootb : No 1 Defines when the .Nm nat responds to any Out-of-the-Blue (OOTB) packets with ErrorM packets. @@ -3745,7 +3746,7 @@ ASCONF-AddIP. Value 3 should never be chosen (except for debugging) as the .Nm nat will respond to all OOTB global packets (a DoS risk). -.It Va net.inet.ip.alias.sctp.hashtable_size: No 2003 +.It Va net.inet.ip.alias.sctp.hashtable_size : No 2003 Size of hash tables used for .Nm nat lookups (100 < prime_number > 1000001). @@ -3764,35 +3765,35 @@ should make these larger. A prime number is best for the table size. The sysctl update function will adjust your input value to the next highest prime number. -.It Va net.inet.ip.alias.sctp.holddown_time: No 0 +.It Va net.inet.ip.alias.sctp.holddown_time : No 0 Hold association in table for this many seconds after receiving a SHUTDOWN-COMPLETE. This allows endpoints to correct shutdown gracefully if a shutdown_complete is lost and retransmissions are required. -.It Va net.inet.ip.alias.sctp.init_timer: No 15 +.It Va net.inet.ip.alias.sctp.init_timer : No 15 Timeout value while waiting for (INIT-ACK|AddIP-ACK). This value cannot be 0. -.It Va net.inet.ip.alias.sctp.initialising_chunk_proc_limit: No 2 +.It Va net.inet.ip.alias.sctp.initialising_chunk_proc_limit : No 2 Defines the maximum number of chunks in an SCTP packet that will be parsed when no existing association exists that matches that packet. Ideally this packet will only be an INIT or ASCONF-AddIP packet. A higher value may become a DoS risk as malformed packets can consume processing resources. -.It Va net.inet.ip.alias.sctp.param_proc_limit: No 25 +.It Va net.inet.ip.alias.sctp.param_proc_limit : No 25 Defines the maximum number of parameters within a chunk that will be parsed in a packet. As for other similar sysctl variables, larger values pose a DoS risk. -.It Va net.inet.ip.alias.sctp.log_level: No 0 +.It Va net.inet.ip.alias.sctp.log_level : No 0 Level of detail in the system log messages (0 \- minimal, 1 \- event, 2 \- info, 3 \- detail, 4 \- debug, 5 \- max debug). May be a good option in high loss environments. -.It Va net.inet.ip.alias.sctp.shutdown_time: No 15 +.It Va net.inet.ip.alias.sctp.shutdown_time : No 15 Timeout value while waiting for SHUTDOWN-COMPLETE. This value cannot be 0. -.It Va net.inet.ip.alias.sctp.track_global_addresses: No 0 +.It Va net.inet.ip.alias.sctp.track_global_addresses : No 0 Enables/disables global IP address tracking within the .Nm nat and places an @@ -3819,7 +3820,7 @@ problems in complex networks with multiple We recommend not tracking global IP addresses, this will still result in a fully functional .Nm nat . -.It Va net.inet.ip.alias.sctp.up_timer: No 300 +.It Va net.inet.ip.alias.sctp.up_timer : No 300 Timeout value to keep an association up with no traffic. This value cannot be 0. .It Va net.inet.ip.dummynet.codel.interval : No 100000 @@ -4050,7 +4051,7 @@ and must be strictly lower than 5 seconds, the period of repetition of keepalives. The firewall enforces that. -.It Va net.inet.ip.fw.dyn_keep_states: No 0 +.It Va net.inet.ip.fw.dyn_keep_states : No 0 Keep dynamic states on rule/set deletion. States are relinked to default rule (65535). This can be handly for ruleset reload. @@ -4131,7 +4132,6 @@ List all table lookup algorithms currently available. There are far too many possible uses of .Nm so this Section will only give a small set of examples. -.Pp .Ss BASIC PACKET FILTERING This command adds an entry which denies all tcp packets from .Em cracker.evil.org @@ -4542,25 +4542,27 @@ To see configurations of all instances: .Dl "ipfw nat show config" .Pp Or a redirect rule with mixed modes could looks like: +.Bd -literal -offset 2n +ipfw nat 123 config redirect_addr 10.0.0.1 10.0.0.66 + redirect_port tcp 192.168.0.1:80 500 + redirect_proto udp 192.168.1.43 192.168.1.1 + redirect_addr 192.168.0.10,192.168.0.11 + 10.0.0.100 # LSNAT + redirect_port tcp 192.168.0.1:80,192.168.0.10:22 + 500 # LSNAT +.Ed .Pp -.Dl "ipfw nat 123 config redirect_addr 10.0.0.1 10.0.0.66" -.Dl " redirect_port tcp 192.168.0.1:80 500" -.Dl " redirect_proto udp 192.168.1.43 192.168.1.1" -.Dl " redirect_addr 192.168.0.10,192.168.0.11" -.Dl " 10.0.0.100 # LSNAT" -.Dl " redirect_port tcp 192.168.0.1:80,192.168.0.10:22" -.Dl " 500 # LSNAT" -.Pp or it could be split in: +.Bd -literal -offset 2n +ipfw nat 1 config redirect_addr 10.0.0.1 10.0.0.66 +ipfw nat 2 config redirect_port tcp 192.168.0.1:80 500 +ipfw nat 3 config redirect_proto udp 192.168.1.43 192.168.1.1 +ipfw nat 4 config redirect_addr 192.168.0.10,192.168.0.11,192.168.0.12 + 10.0.0.100 +ipfw nat 5 config redirect_port tcp + 192.168.0.1:80,192.168.0.10:22,192.168.0.20:25 500 +.Ed .Pp -.Dl "ipfw nat 1 config redirect_addr 10.0.0.1 10.0.0.66" -.Dl "ipfw nat 2 config redirect_port tcp 192.168.0.1:80 500" -.Dl "ipfw nat 3 config redirect_proto udp 192.168.1.43 192.168.1.1" -.Dl "ipfw nat 4 config redirect_addr 192.168.0.10,192.168.0.11,192.168.0.12" -.Dl " 10.0.0.100" -.Dl "ipfw nat 5 config redirect_port tcp" -.Dl " 192.168.0.1:80,192.168.0.10:22,192.168.0.20:25 500" -.Pp Sometimes you may want to mix NAT and dynamic rules. It could be achieved with .Cm record-state @@ -4711,8 +4713,8 @@ can be changed in a similar way as for .Xr kldload 8 , .Xr reboot 8 , .Xr sysctl 8 , -.Xr sysrc 8 , -.Xr syslogd 8 +.Xr syslogd 8 , +.Xr sysrc 8 .Sh HISTORY The .Nm From owner-svn-src-head@freebsd.org Sat Dec 19 12:54: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 C70DC4C69D2; Sat, 19 Dec 2020 12:54:00 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CylzX5FNrz3QJf; Sat, 19 Dec 2020 12:54:00 +0000 (UTC) (envelope-from gbe@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 A70F51D7C1; Sat, 19 Dec 2020 12:54:00 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJCs0eA026436; Sat, 19 Dec 2020 12:54:00 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJCs0OG026435; Sat, 19 Dec 2020 12:54:00 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191254.0BJCs0OG026435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 12:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368805 - head/usr.bin/ident X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.bin/ident X-SVN-Commit-Revision: 368805 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.34 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, 19 Dec 2020 12:54:00 -0000 Author: gbe (doc committer) Date: Sat Dec 19 12:54:00 2020 New Revision: 368805 URL: https://svnweb.freebsd.org/changeset/base/368805 Log: ident(1): Normalizing date format MFC after: 3 days Modified: head/usr.bin/ident/ident.1 Modified: head/usr.bin/ident/ident.1 ============================================================================== --- head/usr.bin/ident/ident.1 Sat Dec 19 12:47:40 2020 (r368804) +++ head/usr.bin/ident/ident.1 Sat Dec 19 12:54:00 2020 (r368805) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jul 25, 2015 +.Dd July 25, 2015 .Dt IDENT 1 .Os .Sh NAME From owner-svn-src-head@freebsd.org Sat Dec 19 12:55: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 C52C84C67CB; Sat, 19 Dec 2020 12:55:27 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cym1C5Hchz3QMG; Sat, 19 Dec 2020 12:55:27 +0000 (UTC) (envelope-from gbe@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 A877D1DA41; Sat, 19 Dec 2020 12:55:27 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJCtRtc026589; Sat, 19 Dec 2020 12:55:27 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJCtRtO026588; Sat, 19 Dec 2020 12:55:27 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191255.0BJCtRtO026588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 12:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368806 - head/usr.bin/uname X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.bin/uname X-SVN-Commit-Revision: 368806 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.34 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, 19 Dec 2020 12:55:27 -0000 Author: gbe (doc committer) Date: Sat Dec 19 12:55:27 2020 New Revision: 368806 URL: https://svnweb.freebsd.org/changeset/base/368806 Log: uname(1): Fix a typo in the man page date MFC after: 3 days Modified: head/usr.bin/uname/uname.1 Modified: head/usr.bin/uname/uname.1 ============================================================================== --- head/usr.bin/uname/uname.1 Sat Dec 19 12:54:00 2020 (r368805) +++ head/usr.bin/uname/uname.1 Sat Dec 19 12:55:27 2020 (r368806) @@ -28,7 +28,7 @@ .\" @(#)uname.1 8.3 (Berkeley) 4/8/94 .\" $FreeBSD$ .\" -.Dd Novermber 13, 2020 +.Dd November 13, 2020 .Dt UNAME 1 .Os .Sh NAME From owner-svn-src-head@freebsd.org Sat Dec 19 13:00: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 53DCB4C6B40; Sat, 19 Dec 2020 13:00:18 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cym6p209Cz3Qqp; Sat, 19 Dec 2020 13:00:18 +0000 (UTC) (envelope-from gbe@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 37DBD1D8B0; Sat, 19 Dec 2020 13:00:18 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJD0IbN027092; Sat, 19 Dec 2020 13:00:18 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJD0I1a027090; Sat, 19 Dec 2020 13:00:18 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191300.0BJD0I1a027090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 13:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368807 - head/usr.bin/patch X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.bin/patch X-SVN-Commit-Revision: 368807 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.34 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, 19 Dec 2020 13:00:18 -0000 Author: gbe (doc committer) Date: Sat Dec 19 13:00:17 2020 New Revision: 368807 URL: https://svnweb.freebsd.org/changeset/base/368807 Log: patch(1): Fix a few mandoc related issues - no blank before trailing delimiter MFC after: 1 week Modified: head/usr.bin/patch/patch.1 Modified: head/usr.bin/patch/patch.1 ============================================================================== --- head/usr.bin/patch/patch.1 Sat Dec 19 12:55:27 2020 (r368806) +++ head/usr.bin/patch/patch.1 Sat Dec 19 13:00:17 2020 (r368807) @@ -164,7 +164,7 @@ ask any questions. It assumes the following: skip patches for which a file to patch cannot be found; patch files even though they have the wrong version for the -.Qq Prereq: +.Qq Prereq : line in the patch; and assume that patches are not reversed even if they look like they are. This option does not suppress commentary; use @@ -288,7 +288,7 @@ in that it suppresses questions, but makes some differ skip patches for which a file to patch cannot be found (the same as .Fl f ) ; skip patches for which the file has the wrong version for the -.Qq Prereq: +.Qq Prereq : line in the patch; and assume that patches are reversed if they look like they are. .It Fl u , Fl Fl unified @@ -393,7 +393,7 @@ line of context. If that fails, and the maximum fuzz factor is set to 2 or more, the first two and last two lines of context are ignored, and another scan is made. -.Pq The default maximum fuzz factor is 2. +.Pq The default maximum fuzz factor is 2 . .Pp If .Nm @@ -450,7 +450,7 @@ and the file is specified in the line beginning with .Qq +++ . If there is an -.Qq Index: +.Qq Index : line in the leading garbage (regardless of the diff type), .Nm will use the file name from that line as the @@ -544,13 +544,13 @@ First, you can save people a lot of grief by keeping a file which is patched to increment the patch level as the first diff in the patch file you send out. If you put a -.Qq Prereq: +.Qq Prereq : line in with the patch, it will not let them apply patches out of order without some warning. .Pp Second, make sure you have specified the file names right, either in a context diff header, or with an -.Qq Index: +.Qq Index : line. If you are patching something in a subdirectory, be sure to tell the patch user to specify a From owner-svn-src-head@freebsd.org Sat Dec 19 13:05: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 9A7524C6FFD; Sat, 19 Dec 2020 13:05:54 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CymFG42tYz3R6G; Sat, 19 Dec 2020 13:05:54 +0000 (UTC) (envelope-from gbe@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 7DFF61DBC1; Sat, 19 Dec 2020 13:05:54 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJD5shh033260; Sat, 19 Dec 2020 13:05:54 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJD5sTR033259; Sat, 19 Dec 2020 13:05:54 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191305.0BJD5sTR033259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 13:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368808 - head/usr.sbin/devctl X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.sbin/devctl X-SVN-Commit-Revision: 368808 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.34 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, 19 Dec 2020 13:05:54 -0000 Author: gbe (doc committer) Date: Sat Dec 19 13:05:54 2020 New Revision: 368808 URL: https://svnweb.freebsd.org/changeset/base/368808 Log: devctl(8): Correct "sections out of conventional order" error MFC after: 1 week Modified: head/usr.sbin/devctl/devctl.8 Modified: head/usr.sbin/devctl/devctl.8 ============================================================================== --- head/usr.sbin/devctl/devctl.8 Sat Dec 19 13:00:17 2020 (r368807) +++ head/usr.sbin/devctl/devctl.8 Sat Dec 19 13:05:54 2020 (r368808) @@ -194,11 +194,6 @@ tried first; if failed or not implemented, power reset If you have detached or suspended a child device explicitly and then do a reset, the child device will end up attached. .El -.Sh BUGS -Currently there is no administrative flag to prevent re-attach or resume -of the manually detached or suspended devices after reset. -Similarly, there is no flag to prevent un-suspending of the the manually -suspended devices after system resume. .Sh SEE ALSO .Xr devctl 3 , .Xr devinfo 8 @@ -207,3 +202,8 @@ The .Nm utility first appeared in .Fx 10.3 . +.Sh BUGS +Currently there is no administrative flag to prevent re-attach or resume +of the manually detached or suspended devices after reset. +Similarly, there is no flag to prevent un-suspending of the the manually +suspended devices after system resume. From owner-svn-src-head@freebsd.org Sat Dec 19 13:11: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 B1E654C6DFA; Sat, 19 Dec 2020 13:11:45 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CymN14kfYz3hJy; Sat, 19 Dec 2020 13:11:45 +0000 (UTC) (envelope-from gbe@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 9558E1D8D5; Sat, 19 Dec 2020 13:11:45 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJDBjIJ035928; Sat, 19 Dec 2020 13:11:45 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJDBjXQ035926; Sat, 19 Dec 2020 13:11:45 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191311.0BJDBjXQ035926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 13:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368809 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 368809 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.34 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, 19 Dec 2020 13:11:45 -0000 Author: gbe (doc committer) Date: Sat Dec 19 13:11:44 2020 New Revision: 368809 URL: https://svnweb.freebsd.org/changeset/base/368809 Log: config: Fix a few mandoc related errors - new sentence, new line - no blank before trailing delimiter MFC after: 1 week Modified: head/usr.sbin/config/config.5 head/usr.sbin/config/config.8 Modified: head/usr.sbin/config/config.5 ============================================================================== --- head/usr.sbin/config/config.5 Sat Dec 19 13:05:54 2020 (r368808) +++ head/usr.sbin/config/config.5 Sat Dec 19 13:11:44 2020 (r368809) @@ -96,7 +96,7 @@ There can be more than one directive in a configuration file. The allowed list of CPU names is architecture specific and is defined in the file -.Pa sys/conf/options. Ns Aq Ar arch . +.Pa sys/conf/options . Ns Aq Ar arch . .\" -------- DEVICE -------- .Pp .It Ic device Ar name Op , Ar name Op ... @@ -109,7 +109,7 @@ defined in the file Devices that are specific to architecture .Ar arch are defined in the file -.Pa sys/conf/files. Ns Aq Ar arch . +.Pa sys/conf/files . Ns Aq Ar arch . .\" -------- ENV -------- .Pp .It Ic env Ar filename @@ -182,7 +182,7 @@ specified variables. .It Ic files Ar filename Specifies a file containing a list of files specific to that kernel configuration file (a la -.Pa files. Ns Aq Ar arch ) . +.Pa files . Ns Aq Ar arch ) . .\" -------- HINTS -------- .Pp .It Ic hints Ar filename @@ -400,7 +400,7 @@ the file Options specific to architecture .Ar arch are specified in the file -.Pa sys/conf/options. Ns Aq Ar arch . +.Pa sys/conf/options . Ns Aq Ar arch . .\" -------- PROFILE -------- .Pp .It Ic profile Ar number @@ -432,18 +432,18 @@ onwards, this information is passed to a booting kerne .Bl -tag -width ".Pa sys/conf/Makefile. Ns Ar arch" -compact .It Pa sys/compile/ Ns Ar NAME Compile directory created from a kernel configuration. -.It Pa sys/conf/Makefile. Ns Ar arch +.It Pa sys/conf/Makefile . Ns Ar arch .Pa Makefile fragments for architecture .Ar arch . .It Pa sys/conf/files Devices common to all architectures. -.It Pa sys/conf/files. Ns Ar arch +.It Pa sys/conf/files . Ns Ar arch Devices for architecture .Ar arch . .It Pa sys/conf/options Options common to all architectures. -.It Pa sys/conf/options. Ns Ar arch +.It Pa sys/conf/options . Ns Ar arch Options for architecture .Ar arch . .El Modified: head/usr.sbin/config/config.8 ============================================================================== --- head/usr.sbin/config/config.8 Sat Dec 19 13:05:54 2020 (r368808) +++ head/usr.sbin/config/config.8 Sat Dec 19 13:11:44 2020 (r368809) @@ -76,7 +76,8 @@ Search in .Ar path for any file included by the .Ic include -directive. This option may be specified more than once. +directive. +This option may be specified more than once. .It Fl d Ar destdir Use .Ar destdir @@ -238,10 +239,10 @@ in the root file system. .Bl -tag -width "/sys/ARCH/compile/SYSTEM_NAME" -compact .It Pa /sys/conf/files list of common files system is built from -.It Pa /sys/conf/Makefile. Ns Va ARCH +.It Pa /sys/conf/Makefile . Ns Va ARCH generic makefile for the .Va ARCH -.It Pa /sys/conf/files. Ns Va ARCH +.It Pa /sys/conf/files . Ns Va ARCH list of .Va ARCH specific files From owner-svn-src-head@freebsd.org Sat Dec 19 13:17: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 444AF4C7616; Sat, 19 Dec 2020 13:17:26 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CymVZ1XYXz3hkj; Sat, 19 Dec 2020 13:17:26 +0000 (UTC) (envelope-from gbe@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 27D551DF90; Sat, 19 Dec 2020 13:17:26 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJDHQiv039622; Sat, 19 Dec 2020 13:17:26 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJDHQ5r039621; Sat, 19 Dec 2020 13:17:26 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191317.0BJDHQ5r039621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 13:17:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368810 - head/usr.sbin/camdd X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.sbin/camdd X-SVN-Commit-Revision: 368810 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.34 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, 19 Dec 2020 13:17:26 -0000 Author: gbe (doc committer) Date: Sat Dec 19 13:17:25 2020 New Revision: 368810 URL: https://svnweb.freebsd.org/changeset/base/368810 Log: camdd(8): Fix the man page date The comment before the .Dd macro was missing a quotation mark, so that the date of the man page was always today. MFC after: 3 days Modified: head/usr.sbin/camdd/camdd.8 Modified: head/usr.sbin/camdd/camdd.8 ============================================================================== --- head/usr.sbin/camdd/camdd.8 Sat Dec 19 13:11:44 2020 (r368809) +++ head/usr.sbin/camdd/camdd.8 Sat Dec 19 13:17:25 2020 (r368810) @@ -30,7 +30,7 @@ .\" Authors: Ken Merry (Spectra Logic Corporation) .\" .\" $FreeBSD$ -.\ +.\" .Dd November 11, 2015 .Dt CAMDD 8 .Os From owner-svn-src-head@freebsd.org Sat Dec 19 13: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 AF5D04C755A; Sat, 19 Dec 2020 13:21:40 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CymbS4fk2z3j76; Sat, 19 Dec 2020 13:21:40 +0000 (UTC) (envelope-from gbe@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 92B161DE6D; Sat, 19 Dec 2020 13:21:40 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJDLexn039890; Sat, 19 Dec 2020 13:21:40 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJDLev2039889; Sat, 19 Dec 2020 13:21:40 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191321.0BJDLev2039889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 13:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368811 - head/usr.sbin/bhyvectl X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.sbin/bhyvectl X-SVN-Commit-Revision: 368811 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.34 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, 19 Dec 2020 13:21:40 -0000 Author: gbe (doc committer) Date: Sat Dec 19 13:21:40 2020 New Revision: 368811 URL: https://svnweb.freebsd.org/changeset/base/368811 Log: bhyvectl(8): Normalize the man page date MFC after: 1 week Modified: head/usr.sbin/bhyvectl/bhyvectl.8 Modified: head/usr.sbin/bhyvectl/bhyvectl.8 ============================================================================== --- head/usr.sbin/bhyvectl/bhyvectl.8 Sat Dec 19 13:17:25 2020 (r368810) +++ head/usr.sbin/bhyvectl/bhyvectl.8 Sat Dec 19 13:21:40 2020 (r368811) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 04, 2020 +.Dd May 4, 2020 .Dt BHYVECTL 8 .Os .Sh NAME From owner-svn-src-head@freebsd.org Sat Dec 19 13:23: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 4EBF84C7931; Sat, 19 Dec 2020 13:23:27 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CymdW1rXdz3jP6; Sat, 19 Dec 2020 13:23:27 +0000 (UTC) (envelope-from gbe@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 3255D1DD73; Sat, 19 Dec 2020 13:23:27 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJDNRUE045649; Sat, 19 Dec 2020 13:23:27 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJDNRmB045648; Sat, 19 Dec 2020 13:23:27 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191323.0BJDNRmB045648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 13:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368812 - head/usr.sbin/mpsutil X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.sbin/mpsutil X-SVN-Commit-Revision: 368812 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.34 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, 19 Dec 2020 13:23:27 -0000 Author: gbe (doc committer) Date: Sat Dec 19 13:23:26 2020 New Revision: 368812 URL: https://svnweb.freebsd.org/changeset/base/368812 Log: mpsutil(8): Remove trailing whitespace MFC after: 1 week Modified: head/usr.sbin/mpsutil/mpsutil.8 Modified: head/usr.sbin/mpsutil/mpsutil.8 ============================================================================== --- head/usr.sbin/mpsutil/mpsutil.8 Sat Dec 19 13:21:40 2020 (r368811) +++ head/usr.sbin/mpsutil/mpsutil.8 Sat Dec 19 13:23:26 2020 (r368812) @@ -9,7 +9,7 @@ .\" 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 From owner-svn-src-head@freebsd.org Sat Dec 19 13:37: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 A4DAA4C7B68; Sat, 19 Dec 2020 13:37:00 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cymx84DQFz3jsG; Sat, 19 Dec 2020 13:37:00 +0000 (UTC) (envelope-from gbe@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 797A01E037; Sat, 19 Dec 2020 13:37:00 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJDb0j9051947; Sat, 19 Dec 2020 13:37:00 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJDaxpD051939; Sat, 19 Dec 2020 13:36:59 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191336.0BJDaxpD051939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 13:36:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368813 - in head/usr.sbin/bluetooth: bluetooth-config hccontrol hcseriald sdpd X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in head/usr.sbin/bluetooth: bluetooth-config hccontrol hcseriald sdpd X-SVN-Commit-Revision: 368813 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.34 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, 19 Dec 2020 13:37:00 -0000 Author: gbe (doc committer) Date: Sat Dec 19 13:36:59 2020 New Revision: 368813 URL: https://svnweb.freebsd.org/changeset/base/368813 Log: bluetooth: Fix a mandoc related issues - new sentence, new line - sections out of conventional order: Sh FILES - unusual Xr order: bthost(1) after bthidd(8) - no blank before trailing delimiter - whitespace at end of input line - sections out of conventional order: Sh EXIT STATUS MFC after: 1 week Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 head/usr.sbin/bluetooth/hccontrol/hccontrol.8 head/usr.sbin/bluetooth/hcseriald/hcseriald.8 head/usr.sbin/bluetooth/sdpd/sdpd.8 Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 ============================================================================== --- head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 Sat Dec 19 13:23:26 2020 (r368812) +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.8 Sat Dec 19 13:36:59 2020 (r368813) @@ -45,7 +45,8 @@ The following options are available: .It Fl d Scan for a specific bluetooth device address. .It Fl n -Limit scan to a specific host controller. Hint: List all netgraph nodes with +Limit scan to a specific host controller. +Hint: List all netgraph nodes with .Ql /usr/sbin/ngctl list . .El .Pp @@ -62,11 +63,6 @@ keyboards, configure and restart .Nm can bring up any interface and daemon necessary for operation and, if a node is provided on command line, will do so automatically for that interface. -.Sh CAVEATS -.Nm -can not parse entries in -.Xr hcsecd 8 -config file and thus will ask the user to manually modify existing pairing PIN entries. .Sh FILES .Bl -tag -width ".Pa /etc/bluetooth/hosts" -compact .It Pa /etc/bluetooth/hosts @@ -79,7 +75,8 @@ scan -n ubt0 -a 00:26:bb:7a:58:95 .Bd -ragged -offset indent This will scan the bluetooth controller ubt0hci for a bluetooth device with the address 00:26:bb:7a:58:95, set up ubt0 if necessary and enter an interactive dialog to pair the -new device. Since in this example a mouse is paired, +new device. +Since in this example a mouse is paired, .Nm will interact with .Xr bthidd 8 , @@ -93,9 +90,9 @@ This will scan all bluetooth controllers on the system to bring up controllers or daemons along the way. .Ed .Sh SEE ALSO +.Xr bthost 1 , .Xr bthidcontrol 8 , .Xr bthidd 8 , -.Xr bthost 1 , .Xr hccontrol 8 , .Xr hcsecd 8 , .Xr sdpcontrol 8 , @@ -107,5 +104,10 @@ utility first appeared in .Fx 12.1 . .Sh AUTHORS .An Dirk Engling Aq Mt erdgeist@erdgeist.org +.Sh CAVEATS +.Nm +can not parse entries in +.Xr hcsecd 8 +config file and thus will ask the user to manually modify existing pairing PIN entries. .Sh THANKS TO Lars Engels and Warren Block for suggestions, help, and testing. Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.8 ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/hccontrol.8 Sat Dec 19 13:23:26 2020 (r368812) +++ head/usr.sbin/bluetooth/hccontrol/hccontrol.8 Sat Dec 19 13:36:59 2020 (r368813) @@ -147,8 +147,8 @@ are: .It Cm Read_RSSI .It Cm LE_Enable .It Cm LE_Read_Local_Supported_Features -.It Cm LE_Set_Advertising_Parameters -.It Cm LE_Read_Advertising_Physical_Channel_Tx_Power +.It Cm LE_Set_Advertising_Parameters +.It Cm LE_Read_Advertising_Physical_Channel_Tx_Power .It Cm LE_Set_Advertising_Data .It Cm LE_Set_Scan_Response_Data .It Cm LE_Set_Advertising_Enable @@ -192,10 +192,11 @@ are: .It Cm Write_Node_Role_Switch .It Cm Read_Node_List .El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES Make the blutooth LE host, ubt0hci, scannable through .Xr hccontrol 8 commands: -.Pp .Bd -literal -offset indent hccontrol -n ubt0hci le_set_advertising_enable disable hccontrol -n ubt0hci le_set_advertising_param @@ -204,8 +205,6 @@ hccontrol -n ubt0hci le_set_advertising_data hccontrol -n ubt0hci le_set_scan_response -n FBSD_Host hccontrol -n ubt0hci le_set_advertising_enable enable .Ed -.Sh EXIT STATUS -.Ex -std .Sh SEE ALSO .Xr bluetooth 3 , .Xr netgraph 3 , Modified: head/usr.sbin/bluetooth/hcseriald/hcseriald.8 ============================================================================== --- head/usr.sbin/bluetooth/hcseriald/hcseriald.8 Sat Dec 19 13:23:26 2020 (r368812) +++ head/usr.sbin/bluetooth/hcseriald/hcseriald.8 Sat Dec 19 13:36:59 2020 (r368813) @@ -69,7 +69,7 @@ Example: .El .Sh FILES .Bl -tag -width ".Pa /var/run/hcserial. Ns Ar * Ns Pa .pid" -compact -.It Pa /var/run/hcserial. Ns Ar * Ns Pa .pid +.It Pa /var/run/hcserial . Ns Ar * Ns Pa .pid Process ID of the currently running .Nm daemon. Modified: head/usr.sbin/bluetooth/sdpd/sdpd.8 ============================================================================== --- head/usr.sbin/bluetooth/sdpd/sdpd.8 Sat Dec 19 13:23:26 2020 (r368812) +++ head/usr.sbin/bluetooth/sdpd/sdpd.8 Sat Dec 19 13:36:59 2020 (r368813) @@ -98,7 +98,16 @@ was started as root. The default user name is .Dq Li nobody . .El -.Sh CAVEAT +.Sh FILES +.Bl -tag -width ".Pa /var/run/sdp" -compact +.It Pa /var/run/sdp +.El +.Sh SEE ALSO +.Xr sdp 3 , +.Xr sdpcontrol 8 +.Sh AUTHORS +.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com +.Sh CAVEATS The .Nm daemon @@ -126,15 +135,6 @@ It only performs minimal checking on the service data Register request. It is assumed that application must obtain all required resources such as RFCOMM channels etc., before registering the service. -.Sh FILES -.Bl -tag -width ".Pa /var/run/sdp" -compact -.It Pa /var/run/sdp -.El -.Sh SEE ALSO -.Xr sdp 3 , -.Xr sdpcontrol 8 -.Sh AUTHORS -.An Maksim Yevmenkin Aq Mt m_evmenkin@yahoo.com .Sh BUGS Most likely. Please report if found. From owner-svn-src-head@freebsd.org Sat Dec 19 13:45: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 A51FB4C7BE5; Sat, 19 Dec 2020 13:45:39 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cyn774LwBz3kSL; Sat, 19 Dec 2020 13:45:39 +0000 (UTC) (envelope-from gbe@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 885411E3E2; Sat, 19 Dec 2020 13:45:39 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJDjd3P058150; Sat, 19 Dec 2020 13:45:39 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJDjdUk058149; Sat, 19 Dec 2020 13:45:39 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191345.0BJDjdUk058149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 13:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368814 - head/usr.sbin/nfsd X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.sbin/nfsd X-SVN-Commit-Revision: 368814 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.34 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, 19 Dec 2020 13:45:39 -0000 Author: gbe (doc committer) Date: Sat Dec 19 13:45:39 2020 New Revision: 368814 URL: https://svnweb.freebsd.org/changeset/base/368814 Log: nfsv4(4): Fix a few issues reported by mandoc - new sentence, new line - function name without markup: rtalloc() - function name without markup: VOP_RECLAIM() MFC after: 1 week Modified: head/usr.sbin/nfsd/nfsv4.4 Modified: head/usr.sbin/nfsd/nfsv4.4 ============================================================================== --- head/usr.sbin/nfsd/nfsv4.4 Sat Dec 19 13:36:59 2020 (r368813) +++ head/usr.sbin/nfsd/nfsv4.4 Sat Dec 19 13:45:39 2020 (r368814) @@ -60,8 +60,8 @@ To provide for correct recovery semantics, a small fil is used by the server during the recovery phase. If this file is missing or empty, there is a backup copy maintained by .Xr nfsd 8 -that will be used. If either file is missing, they will be -created by the +that will be used. +If either file is missing, they will be created by the .Xr nfsd 8 . If both the file and the backup copy are empty, it will result in the server starting without providing a grace period @@ -299,7 +299,8 @@ Without a functioning callback path, a server will nev to a client. .sp For NFSv4.0, by default, the callback address will be set to the IP address acquired via -rtalloc() in the kernel and port# 7745. +.Fn rtalloc +in the kernel and port# 7745. To override the default port#, a command line option for .Xr nfscbd 8 can be used. @@ -341,8 +342,9 @@ variables. .Pp NFSv4 mount(s) against exported volume(s) on the same host are not recommended, since this can result in a hung NFS server. -It occurs when an nfsd thread tries to do an NFSv4 VOP_RECLAIM()/Close RPC -as part of acquiring a new vnode. +It occurs when an nfsd thread tries to do an NFSv4 +.Fn VOP_RECLAIM +/ Close RPC as part of acquiring a new vnode. If all other nfsd threads are blocked waiting for lock(s) held by this nfsd thread, then there isn't an nfsd thread to service the Close RPC. .Sh FILES From owner-svn-src-head@freebsd.org Sat Dec 19 13:51: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 B89B54C81D0; Sat, 19 Dec 2020 13:51:47 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CynGC2M1Qz3l92; Sat, 19 Dec 2020 13:51:47 +0000 (UTC) (envelope-from gbe@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 4106A1E1F7; Sat, 19 Dec 2020 13:51:47 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJDplVd063403; Sat, 19 Dec 2020 13:51:47 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJDplkG063402; Sat, 19 Dec 2020 13:51:47 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191351.0BJDplkG063402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 13:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368815 - head/usr.sbin/zonectl X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.sbin/zonectl X-SVN-Commit-Revision: 368815 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.34 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, 19 Dec 2020 13:51:47 -0000 Author: gbe (doc committer) Date: Sat Dec 19 13:51:46 2020 New Revision: 368815 URL: https://svnweb.freebsd.org/changeset/base/368815 Log: zonectl(8): Fix a few issues reported by mandoc - Add missing quotation mark for a comment above the .Dd - inserting missing end of block: Sh breaks Bd - skipping paragraph macro: Pp before Bl - skipping paragraph macro: Pp before Bd - empty block: Bd MFC after: 1 week Modified: head/usr.sbin/zonectl/zonectl.8 Modified: head/usr.sbin/zonectl/zonectl.8 ============================================================================== --- head/usr.sbin/zonectl/zonectl.8 Sat Dec 19 13:45:39 2020 (r368814) +++ head/usr.sbin/zonectl/zonectl.8 Sat Dec 19 13:51:46 2020 (r368815) @@ -30,7 +30,7 @@ .\" Authors: Ken Merry (Spectra Logic Corporation) .\" .\" $FreeBSD$ -.\ +.\" .Dd May 18, 2016 .Dt ZONECTL 8 .Os @@ -104,7 +104,6 @@ These zones must be written sequentially. If they are not written sequentially, starting at the write pointer, the command will fail. .El -.Pp .Bl -tag -width 12n .It Fl c Ar cmd Specify the zone subcommand: @@ -208,14 +207,12 @@ zonectl -d /dev/da5 -c params .Ed .Pp Display basic zoning information for disk da5. -.Pp .Bd -literal -offset indent zonectl -d /dev/da5 -c rz .Ed .Pp Issue the Report Zones command to disk da5, and print out all zones on the drive in the default format. -.Pp .Bd -literal -offset indent zonectl -d /dev/da5 -c rz -o reset -P script .Ed @@ -223,14 +220,11 @@ zonectl -d /dev/da5 -c rz -o reset -P script Issue the Report Zones command to disk da5, and print out all of the zones that have the Reset Write Pointer Recommended bit set to true. Print the zones in a script friendly form. -.Pp .Bd -literal -offset indent zonectl -d /dev/da5 -c rwp -l 0x2c80000 .Ed .Pp Issue the Reset Write Pointer command to disk da5 for the zone that starts at LBA 0x2c80000. -.Pp -.Bd -literal -offset indent .Sh AUTHORS .An Kenneth Merry Aq ken@FreeBSD.org From owner-svn-src-head@freebsd.org Sat Dec 19 13:52: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 B7D844C858B; Sat, 19 Dec 2020 13:52:28 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CynH04GHNz3lXr; Sat, 19 Dec 2020 13:52:28 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 33FB516058; Sat, 19 Dec 2020 14:52:26 +0100 (CET) Date: Sat, 19 Dec 2020 14:52:25 +0100 From: Steffen Nurpmeso To: Kevin Bowling Cc: Ian Lepore , Jessica Clarke , Konstantin Belousov , Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r368714 - head/lib/libc/string Message-ID: <20201219135225.B6y3g%steffen@sdaoden.eu> In-Reply-To: References: <202012171241.0BHCfl1r008452@repo.freebsd.org> <686CF2E6-1D3C-4A83-A323-02CD9F536675@freebsd.org> <452cbb1060b7134315999c2323ed431714dc03fe.camel@freebsd.org> Mail-Followup-To: Kevin Bowling , Ian Lepore , Jessica Clarke , Konstantin Belousov , Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.20-84-g7268a84d 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. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4CynH04GHNz3lXr X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 19 Dec 2020 13:52:28 -0000 Kevin Bowling wrote in : |On Thu, Dec 17, 2020 at 9:33 AM Ian Lepore wrote: |> On Thu, 2020-12-17 at 18:22 +0200, Konstantin Belousov wrote: |>> On Thu, Dec 17, 2020 at 01:01:01PM +0000, Jessica Clarke wrote: |>>> On 17 Dec 2020, at 12:53, Konstantin Belousov |>>> wrote: |>>>> On Thu, Dec 17, 2020 at 12:41:47PM +0000, Mateusz Piotrowski |>>>> wrote: |>>>>> Author: 0mp (doc,ports committer) |>>>>> Date: Thu Dec 17 12:41:47 2020 |>>>>> New Revision: 368714 |>>>>> URL: https://svnweb.freebsd.org/changeset/base/368714 ... |>>>>> + return (0); |>>>> |>>>> return (0) is redundand. ... |>> Why it is bad practice ? |>> |>> C is a small language, and while knowing some quirks (like this one) |>> seems to be optional, others are not. And worse, that other quirks are ... |> How obscure is this quirk? I've been writing C code since 1983, |> including having released a freeware compiler (pre-gcc days) and |> working on a commercial C compiler. I used to moderate the c_language |> conference on BIX (back when that was a thing). I make my living |> writing C and C++ code every day. And yet, I had completely forgotten |> about this quirk. ... |In Kib=E2=80=99s defense I think this is commonly mentioned in C99 books = (at least |that=E2=80=99s where I learned of it) so it depends on when and where som= eone |learned. There are merits approaches of being explicit or brief. I have Nicely said. K&R C 2nd Ed. explicitly uses return(0) many times. --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 Sat Dec 19 13:56: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 C33A54C8701; Sat, 19 Dec 2020 13:56:19 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CynMR59zSz3lNv; Sat, 19 Dec 2020 13:56:19 +0000 (UTC) (envelope-from gbe@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 A094C1E786; Sat, 19 Dec 2020 13:56:19 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJDuJPg064368; Sat, 19 Dec 2020 13:56:19 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJDuJLA064367; Sat, 19 Dec 2020 13:56:19 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191356.0BJDuJLA064367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 13:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368816 - head/usr.sbin/trim X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.sbin/trim X-SVN-Commit-Revision: 368816 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.34 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, 19 Dec 2020 13:56:19 -0000 Author: gbe (doc committer) Date: Sat Dec 19 13:56:19 2020 New Revision: 368816 URL: https://svnweb.freebsd.org/changeset/base/368816 Log: trim(8): Fix a few issues reported by mandoc - new sentence, new line - unusual Xr order: ioctl(2) after da(4) - unusual Xr order: sysexits(3) after nda(4) MFC after: 1 week Modified: head/usr.sbin/trim/trim.8 Modified: head/usr.sbin/trim/trim.8 ============================================================================== --- head/usr.sbin/trim/trim.8 Sat Dec 19 13:51:46 2020 (r368815) +++ head/usr.sbin/trim/trim.8 Sat Dec 19 13:56:19 2020 (r368816) @@ -60,10 +60,12 @@ The following options are available: Do not actually erase anything but show what it would do (dry run). Implies .Fl v . -This is the default. Overrides +This is the default. +Overrides .Fl f . .It Fl f -Perform the operation. Overrides +Perform the operation. +Overrides .Fl N . .It Fl l Xo .Sm off @@ -150,11 +152,11 @@ is special device file not supporting DIOCGMEDIASIZE (probably not a disk), so its size cannot be examined. .El .Sh SEE ALSO +.Xr ioctl 2 , +.Xr sysexits 3 , .Xr ada 4 , .Xr da 4 , -.Xr ioctl 2 , -.Xr nda 4 , -.Xr sysexits 3 +.Xr nda 4 .Sh HISTORY The .Nm From owner-svn-src-head@freebsd.org Sat Dec 19 14:24: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 197E24C8BF3; Sat, 19 Dec 2020 14:24:06 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CynzT1TvHz3mkR; Sat, 19 Dec 2020 14:24:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0BJENvHf073969 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 19 Dec 2020 16:24:00 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BJENvHf073969 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BJENvS8073968; Sat, 19 Dec 2020 16:23:57 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 19 Dec 2020 16:23:57 +0200 From: Konstantin Belousov To: Kevin Bowling Cc: Ian Lepore , Jessica Clarke , Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r368714 - head/lib/libc/string Message-ID: References: <202012171241.0BHCfl1r008452@repo.freebsd.org> <686CF2E6-1D3C-4A83-A323-02CD9F536675@freebsd.org> <452cbb1060b7134315999c2323ed431714dc03fe.camel@freebsd.org> <20201219135225.B6y3g%steffen@sdaoden.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201219135225.B6y3g%steffen@sdaoden.eu> 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: 4CynzT1TvHz3mkR X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:470:d5e7:1::1:from]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_SPAM_SHORT(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[2001:470:d5e7:1::1:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 19 Dec 2020 14:24:06 -0000 On Sat, Dec 19, 2020 at 02:52:25PM +0100, Steffen Nurpmeso wrote: > Kevin Bowling wrote in > : > |On Thu, Dec 17, 2020 at 9:33 AM Ian Lepore wrote: > |> On Thu, 2020-12-17 at 18:22 +0200, Konstantin Belousov wrote: > |>> On Thu, Dec 17, 2020 at 01:01:01PM +0000, Jessica Clarke wrote: > |>>> On 17 Dec 2020, at 12:53, Konstantin Belousov > |>>> wrote: > |>>>> On Thu, Dec 17, 2020 at 12:41:47PM +0000, Mateusz Piotrowski > |>>>> wrote: > |>>>>> Author: 0mp (doc,ports committer) > |>>>>> Date: Thu Dec 17 12:41:47 2020 > |>>>>> New Revision: 368714 > |>>>>> URL: https://svnweb.freebsd.org/changeset/base/368714 > ... > |>>>>> + return (0); > |>>>> > |>>>> return (0) is redundand. > ... > |>> Why it is bad practice ? > |>> > |>> C is a small language, and while knowing some quirks (like this one) > |>> seems to be optional, others are not. And worse, that other quirks are > ... > |> How obscure is this quirk? I've been writing C code since 1983, > |> including having released a freeware compiler (pre-gcc days) and > |> working on a commercial C compiler. I used to moderate the c_language > |> conference on BIX (back when that was a thing). I make my living > |> writing C and C++ code every day. And yet, I had completely forgotten > |> about this quirk. > ... > |In Kib’s defense I think this is commonly mentioned in C99 books (at least > |that’s where I learned of it) so it depends on when and where someone > |learned. There are merits approaches of being explicit or brief. I have > > Nicely said. K&R C 2nd Ed. explicitly uses return(0) many times. We are long after K&R in any of its form. My point was that the example if of very low quality, and return (0); is an indicator. Perhaps even more interesting point to make is the mix of return from main() and exit(3) use in same 4 lines. Besides inconsistency, exit(3) from main() should probably not used in examples or recommended to novices at all. From owner-svn-src-head@freebsd.org Sat Dec 19 14:54: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 EF53B4C9E82; Sat, 19 Dec 2020 14:54:32 +0000 (UTC) (envelope-from gbe@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cypfc6Pphz3phG; Sat, 19 Dec 2020 14:54:32 +0000 (UTC) (envelope-from gbe@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 CA6C61F0DB; Sat, 19 Dec 2020 14:54:32 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJEsWPb001330; Sat, 19 Dec 2020 14:54:32 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJEsSaH001310; Sat, 19 Dec 2020 14:54:28 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202012191454.0BJEsSaH001310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 19 Dec 2020 14:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368817 - in head/lib/libc: locale net stdlib sys x86/sys X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in head/lib/libc: locale net stdlib sys x86/sys X-SVN-Commit-Revision: 368817 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.34 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, 19 Dec 2020 14:54:33 -0000 Author: gbe (doc committer) Date: Sat Dec 19 14:54:28 2020 New Revision: 368817 URL: https://svnweb.freebsd.org/changeset/base/368817 Log: libc: Fix most issues reported by mandoc - varios "new sentence, new line" warnings - varios "sections out of conventional order" warnings - varios "unusual Xr order" warnings - varios "missing section argument" warnings - varios "no blank before trailing delimiter" warnings - varios "normalizing date format" warnings MFC after: 1 month Modified: head/lib/libc/locale/setlocale.3 head/lib/libc/net/gethostbyname.3 head/lib/libc/stdlib/system.3 head/lib/libc/sys/_umtx_op.2 head/lib/libc/sys/copy_file_range.2 head/lib/libc/sys/execve.2 head/lib/libc/sys/fhlink.2 head/lib/libc/sys/open.2 head/lib/libc/sys/pdfork.2 head/lib/libc/sys/ptrace.2 head/lib/libc/sys/revoke.2 head/lib/libc/sys/rtprio.2 head/lib/libc/sys/sendfile.2 head/lib/libc/sys/thr_exit.2 head/lib/libc/sys/thr_new.2 head/lib/libc/sys/thr_self.2 head/lib/libc/sys/thr_set_name.2 head/lib/libc/sys/thr_suspend.2 head/lib/libc/sys/thr_wake.2 head/lib/libc/x86/sys/pkru.3 Modified: head/lib/libc/locale/setlocale.3 ============================================================================== --- head/lib/libc/locale/setlocale.3 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/locale/setlocale.3 Sat Dec 19 14:54:28 2020 (r368817) @@ -157,6 +157,15 @@ if the given combination of and .Fa locale makes no sense. +.Sh FILES +.Bl -tag -width /usr/share/locale/locale/category -compact +.It Pa $PATH_LOCALE/ Ns Em locale/category +.It Pa /usr/share/locale/ Ns Em locale/category +locale file for the locale +.Em locale +and the category +.Em category . +.El .Sh EXAMPLES The following code illustrates how a program can initialize the international environment for one language, while selectively @@ -176,15 +185,6 @@ following manner before using any of the locale-specif .Bd -literal setlocale(LC_ALL, ""); .Ed -.Sh FILES -.Bl -tag -width /usr/share/locale/locale/category -compact -.It Pa $PATH_LOCALE/ Ns Em locale/category -.It Pa /usr/share/locale/ Ns Em locale/category -locale file for the locale -.Em locale -and the category -.Em category . -.El .Sh ERRORS No errors are defined. .Sh SEE ALSO Modified: head/lib/libc/net/gethostbyname.3 ============================================================================== --- head/lib/libc/net/gethostbyname.3 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/net/gethostbyname.3 Sat Dec 19 14:54:28 2020 (r368817) @@ -303,8 +303,27 @@ for example, a mail-forwarder may be registered for th .Xr hosts 5 , .Xr hostname 7 , .Xr named 8 -.Sh CAVEAT +.Sh HISTORY The +.Fn herror +function appeared in +.Bx 4.3 . +The +.Fn endhostent , +.Fn gethostbyaddr , +.Fn gethostbyname , +.Fn gethostent , +and +.Fn sethostent +functions appeared in +.Bx 4.2 . +The +.Fn gethostbyname2 +function first appeared in +.Tn BIND +version 4.9.4. +.Sh CAVEATS +The .Fn gethostent function is defined, and @@ -343,25 +362,6 @@ The .Fn endhostent function closes the file. -.Sh HISTORY -The -.Fn herror -function appeared in -.Bx 4.3 . -The -.Fn endhostent , -.Fn gethostbyaddr , -.Fn gethostbyname , -.Fn gethostent , -and -.Fn sethostent -functions appeared in -.Bx 4.2 . -The -.Fn gethostbyname2 -function first appeared in -.Tn BIND -version 4.9.4. .Sh BUGS These functions use a thread-specific data storage; if the data is needed for future use, it should be Modified: head/lib/libc/stdlib/system.3 ============================================================================== --- head/lib/libc/stdlib/system.3 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/stdlib/system.3 Sat Dec 19 14:54:28 2020 (r368817) @@ -108,4 +108,4 @@ because all meta-characters supported by would be honored. User supplied parameters should always be carefully santized before they appear in -.Fa string. +.Fa string . Modified: head/lib/libc/sys/_umtx_op.2 ============================================================================== --- head/lib/libc/sys/_umtx_op.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/_umtx_op.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -1180,7 +1180,7 @@ request: .It Dv UMTX_SHM_CREAT Creates the anonymous shared memory object, which can be looked up with the specified key -.Fa uaddr. +.Fa uaddr . If the object associated with the .Fa uaddr key already exists, it is returned instead of creating a new object. @@ -1198,7 +1198,7 @@ the specified key an error is returned, and no new object is created. .It Dv UMTX_SHM_DESTROY De-associate the shared object with the specified key -.Fa uaddr. +.Fa uaddr . The object is destroyed after the last open file descriptor is closed and the last mapping for it is destroyed. .It Dv UMTX_SHM_ALIVE Modified: head/lib/libc/sys/copy_file_range.2 ============================================================================== --- head/lib/libc/sys/copy_file_range.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/copy_file_range.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -117,7 +117,6 @@ with .Dv SEEK_DATA arguments and this system call for the data ranges found. -.Pp .Sh RETURN VALUES If it succeeds, the call returns the number of bytes copied, which can be fewer than @@ -144,11 +143,9 @@ will fail if: .Bl -tag -width Er .It Bq Er EBADF If -.Fa -infd +.Fa infd is not open for reading or -.Fa -outfd +.Fa outfd is not open for writing, or opened for writing with .Dv O_APPEND , or if @@ -175,8 +172,7 @@ are reset to the initial values for the system call. and .Fa outfd refer to the same file and the byte ranges overlap or -.Fa -flags +.Fa flags is not zero. .It Bq Er EIO An I/O error occurred while reading/writing the files. Modified: head/lib/libc/sys/execve.2 ============================================================================== --- head/lib/libc/sys/execve.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/execve.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -348,7 +348,7 @@ system call conforms to The Open Group Extended API Se The .Fn execve system call appeared in -.At V7 . +.At v7 . The .Fn fexecve system call appeared in Modified: head/lib/libc/sys/fhlink.2 ============================================================================== --- head/lib/libc/sys/fhlink.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/fhlink.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -272,6 +272,6 @@ is not nor a file descriptor associated with a directory. .El .Sh SEE ALSO -.Xr fhstat 2 , -.Xr fhreadlink 2 , .Xr fhopen 2 , +.Xr fhreadlink 2 , +.Xr fhstat 2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/open.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -339,7 +339,7 @@ returns if any intermediate component of the specified relative path does not reside in the directory hierarchy beneath the topping directory. Comparing to -.Dv O_BENEATH, +.Dv O_BENEATH , absolute paths or even the temporal escape from beneath of the topping directory is not allowed. .Pp Modified: head/lib/libc/sys/pdfork.2 ============================================================================== --- head/lib/libc/sys/pdfork.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/pdfork.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -161,8 +161,8 @@ for .Xr fork 2 , .Xr fstat 2 , .Xr kill 2 , -.Xr poll 2 , .Xr kqueue 2 , +.Xr poll 2 , .Xr wait4 2 , .Xr capsicum 4 , .Xr procdesc 4 Modified: head/lib/libc/sys/ptrace.2 ============================================================================== --- head/lib/libc/sys/ptrace.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/ptrace.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -577,7 +577,7 @@ Only valid when or .Dv PL_FLAG_SCX is set in -.Va pl_flags. +.Va pl_flags . .It Va pl_syscall_narg The number of arguments passed to the current system call not counting the system call identifier. @@ -588,7 +588,7 @@ Only valid when or .Dv PL_FLAG_SCX is set in -.Va pl_flags. +.Va pl_flags . .El .It Dv PT_GETNUMLWPS This request returns the number of kernel threads associated with the @@ -622,7 +622,7 @@ The and .Fa data arguments are used the same as for -.Dv PT_CONTINUE. +.Dv PT_CONTINUE . .It Dv PT_TO_SCX This request will set the .Dv PTRACE_SCX @@ -632,7 +632,7 @@ The and .Fa data arguments are used the same as for -.Dv PT_CONTINUE. +.Dv PT_CONTINUE . .It Dv PT_SYSCALL This request will set the .Dv PTRACE_SYSCALL @@ -643,7 +643,7 @@ The and .Fa data arguments are used the same as for -.Dv PT_CONTINUE. +.Dv PT_CONTINUE . .It Dv PT_GET_SC_ARGS For the thread which is stopped in either .Dv PL_FLAG_SCE @@ -698,7 +698,6 @@ value. If the system call completed in an unusual fashion, .Va sr_error is set to a negative value: -.Pp .Bl -tag -width Dv EJUSTRETURN -compact .It Dv ERESTART System call will be restarted. @@ -830,7 +829,6 @@ The .Fa data argument is ignored. .El -.Pp .Sh x86 MACHINE-SPECIFIC REQUESTS .Bl -tag -width "Dv PT_GETXSTATE_INFO" .It Dv PT_GETXMMREGS @@ -860,7 +858,7 @@ machine instruction .Dv FXRSTOR . .Pp As with -.Dv PT_GETXMMREGS, +.Dv PT_GETXMMREGS , this request is only valid for i386 programs. .Pp The Modified: head/lib/libc/sys/revoke.2 ============================================================================== --- head/lib/libc/sys/revoke.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/revoke.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -31,7 +31,7 @@ .\" @(#)revoke.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd Jan 25, 2016 +.Dd January 25, 2016 .Dt REVOKE 2 .Os .Sh NAME Modified: head/lib/libc/sys/rtprio.2 ============================================================================== --- head/lib/libc/sys/rtprio.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/rtprio.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -135,7 +135,10 @@ field ranges between 0 and .Pq usually 31 . 0 is the highest possible priority. .Pp -Realtime and idle priority is inherited through fork() and exec(). +Realtime and idle priority is inherited through +.Fn fork +and +.Fn exec . .Pp A realtime thread can only be preempted by a thread of equal or higher priority, or by an interrupt; idle priority threads will run only Modified: head/lib/libc/sys/sendfile.2 ============================================================================== --- head/lib/libc/sys/sendfile.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/sendfile.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -381,14 +381,14 @@ does not support The socket peer has closed the connection. .El .Sh SEE ALSO -.Xr loader.conf 5 , .Xr netstat 1 , .Xr open 2 , .Xr send 2 , .Xr socket 2 , .Xr writev 2 , -.Xr sysctl 8 , -.Xr tuning 7 +.Xr loader.conf 5 , +.Xr tuning 7 , +.Xr sysctl 8 .Rs .%A K. Elmeleegy .%A A. Chanda @@ -442,4 +442,4 @@ it will return and set .Va errno to -.Er EINVAL. +.Er EINVAL . Modified: head/lib/libc/sys/thr_exit.2 ============================================================================== --- head/lib/libc/sys/thr_exit.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/thr_exit.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -72,12 +72,12 @@ A return from the function indicates that the calling last one in the process. .Sh SEE ALSO .Xr _exit 2 , +.Xr _umtx_op 2 , .Xr thr_kill 2 , .Xr thr_kill2 2 , .Xr thr_new 2 , .Xr thr_self 2 , .Xr thr_set_name 2 , -.Xr _umtx_op 2 , .Xr pthread_exit 3 .Sh STANDARDS The Modified: head/lib/libc/sys/thr_new.2 ============================================================================== --- head/lib/libc/sys/thr_new.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/thr_new.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -225,6 +225,7 @@ There was not enough kernel memory to allocate the new .El .Sh SEE ALSO .Xr ps 1 , +.Xr _umtx_op 2 , .Xr execve 2 , .Xr racct 2 , .Xr thr_exit 2 , @@ -232,7 +233,6 @@ There was not enough kernel memory to allocate the new .Xr thr_kill2 2 , .Xr thr_self 2 , .Xr thr_set_name 2 , -.Xr _umtx_op 2 , .Xr pthread_create 3 .Sh STANDARDS The Modified: head/lib/libc/sys/thr_self.2 ============================================================================== --- head/lib/libc/sys/thr_self.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/thr_self.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -71,12 +71,12 @@ The memory pointed to by the argument is not valid. .El .Sh SEE ALSO +.Xr _umtx_op 2 , .Xr thr_exit 2 , .Xr thr_kill 2 , .Xr thr_kill2 2 , .Xr thr_new 2 , .Xr thr_set_name 2 , -.Xr _umtx_op 2 , .Xr pthread_getthreadid_np 3 , .Xr pthread_self 3 .Sh STANDARDS Modified: head/lib/libc/sys/thr_set_name.2 ============================================================================== --- head/lib/libc/sys/thr_set_name.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/thr_set_name.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -78,12 +78,12 @@ does not exist in the current process. .El .Sh SEE ALSO .Xr ps 1 , +.Xr _umtx_op 2 , .Xr thr_exit 2 , .Xr thr_kill 2 , .Xr thr_kill2 2 , .Xr thr_new 2 , .Xr thr_self 2 , -.Xr _umtx_op 2 , .Xr pthread_set_name_np 3 , .Xr ddb 4 , .Xr ktr 9 Modified: head/lib/libc/sys/thr_suspend.2 ============================================================================== --- head/lib/libc/sys/thr_suspend.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/thr_suspend.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -98,7 +98,6 @@ As with called from another thread, the next .Nm call does not result in suspension. -.Pp .Sh RETURN VALUES .Rv -std thr_suspend .Sh ERRORS Modified: head/lib/libc/sys/thr_wake.2 ============================================================================== --- head/lib/libc/sys/thr_wake.2 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/sys/thr_wake.2 Sat Dec 19 14:54:28 2020 (r368817) @@ -74,7 +74,7 @@ If .Fa id is not equal to the current thread identifier, the specified thread is woken up if suspended by the -.Xr thr_suspend +.Xr thr_suspend 2 system call. If the thread is not suspended at the time of the .Nm Modified: head/lib/libc/x86/sys/pkru.3 ============================================================================== --- head/lib/libc/x86/sys/pkru.3 Sat Dec 19 13:56:19 2020 (r368816) +++ head/lib/libc/x86/sys/pkru.3 Sat Dec 19 14:54:28 2020 (r368817) @@ -95,7 +95,7 @@ syscall. Per-key permissions are managed using the user-mode instructions .Em RDPKRU and -.Em WRPKRU. +.Em WRPKRU . The system provides convenient library helpers for both the syscall and the instructions, described below. .Pp From owner-svn-src-head@freebsd.org Sat Dec 19 14:58: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 4F2764C9E9C; Sat, 19 Dec 2020 14:58:56 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cyplg6xbZz3pwL; Sat, 19 Dec 2020 14:58:55 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 5742116058; Sat, 19 Dec 2020 15:58:54 +0100 (CET) Date: Sat, 19 Dec 2020 15:58:53 +0100 From: Steffen Nurpmeso To: Konstantin Belousov Cc: Kevin Bowling , Ian Lepore , Jessica Clarke , Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r368714 - head/lib/libc/string Message-ID: <20201219145853.pLBGG%steffen@sdaoden.eu> In-Reply-To: References: <202012171241.0BHCfl1r008452@repo.freebsd.org> <686CF2E6-1D3C-4A83-A323-02CD9F536675@freebsd.org> <452cbb1060b7134315999c2323ed431714dc03fe.camel@freebsd.org> <20201219135225.B6y3g%steffen@sdaoden.eu> Mail-Followup-To: Konstantin Belousov , Kevin Bowling , Ian Lepore , Jessica Clarke , Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.20-84-g7268a84d 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. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Cyplg6xbZz3pwL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 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, 19 Dec 2020 14:58:56 -0000 Konstantin Belousov wrote in : |On Sat, Dec 19, 2020 at 02:52:25PM +0100, Steffen Nurpmeso wrote: |> Kevin Bowling wrote in |> : |>|On Thu, Dec 17, 2020 at 9:33 AM Ian Lepore wrote: |>|> On Thu, 2020-12-17 at 18:22 +0200, Konstantin Belousov wrote: |>|>> On Thu, Dec 17, 2020 at 01:01:01PM +0000, Jessica Clarke wrote: |>|>>> On 17 Dec 2020, at 12:53, Konstantin Belousov |>|>>> wrote: |>|>>>> On Thu, Dec 17, 2020 at 12:41:47PM +0000, Mateusz Piotrowski |>|>>>> wrote: |>|>>>>> Author: 0mp (doc,ports committer) |>|>>>>> Date: Thu Dec 17 12:41:47 2020 |>|>>>>> New Revision: 368714 |>|>>>>> URL: https://svnweb.freebsd.org/changeset/base/368714 |> ... |>|>>>>> + return (0); |>|>>>> |>|>>>> return (0) is redundand. |> ... |>|>> Why it is bad practice ? |>|>> |>|>> C is a small language, and while knowing some quirks (like this one) |>|>> seems to be optional, others are not. And worse, that other quirks a= re |> ... |>|> How obscure is this quirk? I've been writing C code since 1983, |>|> including having released a freeware compiler (pre-gcc days) and |>|> working on a commercial C compiler. I used to moderate the c_language |>|> conference on BIX (back when that was a thing). I make my living |>|> writing C and C++ code every day. And yet, I had completely forgotten |>|> about this quirk. |> ... |>|In Kib=E2=80=99s defense I think this is commonly mentioned in C99 book= s \ |>|(at least |>|that=E2=80=99s where I learned of it) so it depends on when and where s= omeone |>|learned. There are merits approaches of being explicit or brief. I ha= ve |>=20 |> Nicely said. K&R C 2nd Ed. explicitly uses return(0) many times. | |We are long after K&R in any of its form. | |My point was that the example if of very low quality, and return (0); is |an indicator. Perhaps even more interesting point to make is the mix of |return from main() and exit(3) use in same 4 lines. Besides inconsistenc= y, |exit(3) from main() should probably not used in examples or recommended |to novices at all. I .. cannot see this from the context above? I personally use _?exit only if execution must not continue aka control cannot be given back to code flow. For me .. not. C89 can be used here. (It is annoying only for field initializers, and there especially that the order must be correct in C89 mode, when FIELD_INIT[IN]() expands to nothing.) (Yes, one of the things i personally was out for was restartability without leaks for at least development, ie, it was only "fine" if one could have entered sf_main() multiple times without causing problems. This required "atexit_uninstall" and two distinct priorities for exit handlers, and a clean order of the "final" ones, also atcrash_uninstall, but it was nice to see "SF: memcache empty!" messages in debug code, knowing it is nice. Today i only do this a bit as i link other libraries anyway, and everybody uses ctors and dtors and it is all dynamically linked, .. and all that.) --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 Sat Dec 19 21:46: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 6B11E4AB72F; Sat, 19 Dec 2020 21:46:10 +0000 (UTC) (envelope-from gallatin@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4CyznZ2Y8xz3G1B; Sat, 19 Dec 2020 21:46:10 +0000 (UTC) (envelope-from gallatin@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 4A78D24530; Sat, 19 Dec 2020 21:46:10 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJLkAR6080077; Sat, 19 Dec 2020 21:46:10 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJLkAfB080076; Sat, 19 Dec 2020 21:46:10 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <202012192146.0BJLkAfB080076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Sat, 19 Dec 2020 21:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368818 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 368818 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.34 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, 19 Dec 2020 21:46:10 -0000 Author: gallatin Date: Sat Dec 19 21:46:09 2020 New Revision: 368818 URL: https://svnweb.freebsd.org/changeset/base/368818 Log: Optionally bind ktls threads to NUMA domains When ktls_bind_thread is 2, we pick a ktls worker thread that is bound to the same domain as the TCP connection associated with the socket. We use roughly the same code as netinet/tcp_hpts.c to do this. This allows crypto to run on the same domain as the TCP connection is associated with. Assuming TCP_REUSPORT_LB_NUMA (D21636) is in place & in use, this ensures that the crypto source and destination buffers are local to the same NUMA domain as we're running crypto on. This change (when TCP_REUSPORT_LB_NUMA, D21636, is used) reduces cross-domain traffic from over 37% down to about 13% as measured by pcm.x on a dual-socket Xeon using nginx and a Netflix workload. Reviewed by: jhb Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21648 Modified: head/sys/kern/uipc_ktls.c Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Sat Dec 19 14:54:28 2020 (r368817) +++ head/sys/kern/uipc_ktls.c Sat Dec 19 21:46:09 2020 (r368818) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -83,6 +84,12 @@ struct ktls_wq { bool running; } __aligned(CACHE_LINE_SIZE); +struct ktls_domain_info { + int count; + int cpu[MAXCPU]; +}; + +struct ktls_domain_info ktls_domains[MAXMEMDOM]; static struct ktls_wq *ktls_wq; static struct proc *ktls_proc; LIST_HEAD(, ktls_crypto_backend) ktls_backends; @@ -316,6 +323,9 @@ static u_int ktls_get_cpu(struct socket *so) { struct inpcb *inp; +#ifdef NUMA + struct ktls_domain_info *di; +#endif u_int cpuid; inp = sotoinpcb(so); @@ -330,7 +340,13 @@ ktls_get_cpu(struct socket *so) * serialization provided by having the same connection use * the same queue. */ - cpuid = ktls_cpuid_lookup[inp->inp_flowid % ktls_number_threads]; +#ifdef NUMA + if (ktls_bind_threads > 1 && inp->inp_numa_domain != M_NODOM) { + di = &ktls_domains[inp->inp_numa_domain]; + cpuid = di->cpu[inp->inp_flowid % di->count]; + } else +#endif + cpuid = ktls_cpuid_lookup[inp->inp_flowid % ktls_number_threads]; return (cpuid); } #endif @@ -341,7 +357,7 @@ ktls_init(void *dummy __unused) struct thread *td; struct pcpu *pc; cpuset_t mask; - int error, i; + int count, domain, error, i; ktls_tasks_active = counter_u64_alloc(M_WAITOK); ktls_cnt_tx_queued = counter_u64_alloc(M_WAITOK); @@ -397,7 +413,11 @@ ktls_init(void *dummy __unused) if (ktls_bind_threads) { if (ktls_bind_threads > 1) { pc = pcpu_find(i); - CPU_COPY(&cpuset_domain[pc->pc_domain], &mask); + domain = pc->pc_domain; + CPU_COPY(&cpuset_domain[domain], &mask); + count = ktls_domains[domain].count; + ktls_domains[domain].cpu[count] = i; + ktls_domains[domain].count++; } else { CPU_SETOF(i, &mask); } @@ -410,6 +430,18 @@ ktls_init(void *dummy __unused) ktls_cpuid_lookup[ktls_number_threads] = i; ktls_number_threads++; } + + /* + * If we somehow have an empty domain, fall back to choosing + * among all KTLS threads. + */ + for (i = 0; i < vm_ndomains; i++) { + if (ktls_domains[i].count == 0) { + ktls_bind_threads = 0; + break; + } + } + printf("KTLS: Initialized %d threads\n", ktls_number_threads); } SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, NULL); @@ -2093,6 +2125,10 @@ ktls_work_thread(void *ctx) STAILQ_HEAD(, mbuf) local_m_head; STAILQ_HEAD(, socket) local_so_head; + if (ktls_bind_threads > 1) { + curthread->td_domain.dr_policy = + DOMAINSET_PREF(PCPU_GET(domain)); + } #if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) fpu_kern_thread(0); #endif From owner-svn-src-head@freebsd.org Sat Dec 19 22:04: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 E17E34AC2AA; Sat, 19 Dec 2020 22:04:47 +0000 (UTC) (envelope-from gallatin@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Cz0C35xPNz3Glj; Sat, 19 Dec 2020 22:04:47 +0000 (UTC) (envelope-from gallatin@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 BEA89248C6; Sat, 19 Dec 2020 22:04:47 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0BJM4lmK092386; Sat, 19 Dec 2020 22:04:47 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0BJM4kk5092379; Sat, 19 Dec 2020 22:04:46 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <202012192204.0BJM4kk5092379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Sat, 19 Dec 2020 22:04:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368819 - in head: share/man/man4 sys/netinet sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: in head: share/man/man4 sys/netinet sys/netinet6 X-SVN-Commit-Revision: 368819 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.34 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, 19 Dec 2020 22:04:47 -0000 Author: gallatin Date: Sat Dec 19 22:04:46 2020 New Revision: 368819 URL: https://svnweb.freebsd.org/changeset/base/368819 Log: Filter TCP connections to SO_REUSEPORT_LB listen sockets by NUMA domain In order to efficiently serve web traffic on a NUMA machine, one must avoid as many NUMA domain crossings as possible. With SO_REUSEPORT_LB, a number of workers can share a listen socket. However, even if a worker sets affinity to a core or set of cores on a NUMA domain, it will receive connections associated with all NUMA domains in the system. This will lead to cross-domain traffic when the server writes to the socket or calls sendfile(), and memory is allocated on the server's local NUMA node, but transmitted on the NUMA node associated with the TCP connection. Similarly, when the server reads from the socket, he will likely be reading memory allocated on the NUMA domain associated with the TCP connection. This change provides a new socket ioctl, TCP_REUSPORT_LB_NUMA. A server can now tell the kernel to filter traffic so that only incoming connections associated with the desired NUMA domain are given to the server. (Of course, in the case where there are no servers sharing the listen socket on some domain, then as a fallback, traffic will be hashed as normal to all servers sharing the listen socket regardless of domain). This allows a server to deal only with traffic that is local to its NUMA domain, and avoids cross-domain traffic in most cases. This patch, and a corresponding small patch to nginx to use TCP_REUSPORT_LB_NUMA allows us to serve 190Gb/s of kTLS encrypted https media content from dual-socket Xeons with only 13% (as measured by pcm.x) cross domain traffic on the memory controller. Reviewed by: jhb, bz (earlier version), bcr (man page) Tested by: gonzo Sponsored by: Netfix Differential Revision: https://reviews.freebsd.org/D21636 Modified: head/share/man/man4/tcp.4 head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/tcp.h head/sys/netinet/tcp_usrreq.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_pcb.h Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Sat Dec 19 21:46:09 2020 (r368818) +++ head/share/man/man4/tcp.4 Sat Dec 19 22:04:46 2020 (r368819) @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 25, 2020 +.Dd December 19, 2020 .Dt TCP 4 .Os .Sh NAME @@ -314,6 +314,21 @@ Enable in-kernel TLS for data read from this socket. See .Xr ktls 4 for more details. +.It Dv TCP_REUSPORT_LB_NUMA +Changes NUMA affinity filtering for an established TCP listen +socket. +This option takes a single integer argument which specifies +the NUMA domain to filter on for this listen socket. +The argument can also have the follwing special values: +.Bl -tag -width "Dv TCP_REUSPORT_LB_NUMA" +.It Dv TCP_REUSPORT_LB_NUMA_NODOM +Remove NUMA filtering for this listen socket. +.It Dv TCP_REUSPORT_LB_NUMA_CURDOM +Filter traffic associated with the domain where the calling thread is +currently executing. +This is typically used after a process or thread inherits a listen +socket from its parent, and sets its CPU affinity to a particular core. +.El .El .Pp The option level for the Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sat Dec 19 21:46:09 2020 (r368818) +++ head/sys/netinet/in_pcb.c Sat Dec 19 22:04:46 2020 (r368819) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #endif #include +#include #include #include @@ -150,7 +151,8 @@ static void in_pcbremlists(struct inpcb *inp); static struct inpcb *in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_int fport_arg, struct in_addr laddr, u_int lport_arg, - int lookupflags, struct ifnet *ifp); + int lookupflags, struct ifnet *ifp, + uint8_t numa_domain); #define RANGECHK(var, min, max) \ if ((var) < (min)) { (var) = (min); } \ @@ -248,7 +250,8 @@ SYSCTL_COUNTER_U64(_net_inet_ip_rl, OID_AUTO, set_ok, static struct inpcblbgroup * in_pcblbgroup_alloc(struct inpcblbgrouphead *hdr, u_char vflag, - uint16_t port, const union in_dependaddr *addr, int size) + uint16_t port, const union in_dependaddr *addr, int size, + uint8_t numa_domain) { struct inpcblbgroup *grp; size_t bytes; @@ -259,6 +262,7 @@ in_pcblbgroup_alloc(struct inpcblbgrouphead *hdr, u_ch return (NULL); grp->il_vflag = vflag; grp->il_lport = port; + grp->il_numa_domain = numa_domain; grp->il_dependladdr = *addr; grp->il_inpsiz = size; CK_LIST_INSERT_HEAD(hdr, grp, il_list); @@ -290,7 +294,8 @@ in_pcblbgroup_resize(struct inpcblbgrouphead *hdr, int i; grp = in_pcblbgroup_alloc(hdr, old_grp->il_vflag, - old_grp->il_lport, &old_grp->il_dependladdr, size); + old_grp->il_lport, &old_grp->il_dependladdr, size, + old_grp->il_numa_domain); if (grp == NULL) return (NULL); @@ -333,7 +338,7 @@ in_pcblbgroup_reorder(struct inpcblbgrouphead *hdr, st * Add PCB to load balance group for SO_REUSEPORT_LB option. */ static int -in_pcbinslbgrouphash(struct inpcb *inp) +in_pcbinslbgrouphash(struct inpcb *inp, uint8_t numa_domain) { const static struct timeval interval = { 60, 0 }; static struct timeval lastprint; @@ -369,6 +374,7 @@ in_pcbinslbgrouphash(struct inpcb *inp) CK_LIST_FOREACH(grp, hdr, il_list) { if (grp->il_vflag == inp->inp_vflag && grp->il_lport == inp->inp_lport && + grp->il_numa_domain == numa_domain && memcmp(&grp->il_dependladdr, &inp->inp_inc.inc_ie.ie_dependladdr, sizeof(grp->il_dependladdr)) == 0) @@ -378,7 +384,7 @@ in_pcbinslbgrouphash(struct inpcb *inp) /* Create new load balance group. */ grp = in_pcblbgroup_alloc(hdr, inp->inp_vflag, inp->inp_lport, &inp->inp_inc.inc_ie.ie_dependladdr, - INPCBLBGROUP_SIZMIN); + INPCBLBGROUP_SIZMIN, numa_domain); if (grp == NULL) return (ENOBUFS); } else if (grp->il_inpcnt == grp->il_inpsiz) { @@ -439,6 +445,57 @@ in_pcbremlbgrouphash(struct inpcb *inp) } } +int +in_pcblbgroup_numa(struct inpcb *inp, int arg) +{ + struct inpcbinfo *pcbinfo; + struct inpcblbgrouphead *hdr; + struct inpcblbgroup *grp; + int err, i; + uint8_t numa_domain; + + switch (arg) { + case TCP_REUSPORT_LB_NUMA_NODOM: + numa_domain = M_NODOM; + break; + case TCP_REUSPORT_LB_NUMA_CURDOM: + numa_domain = PCPU_GET(domain); + break; + default: + if (arg < 0 || arg >= vm_ndomains) + return (EINVAL); + numa_domain = arg; + } + + err = 0; + pcbinfo = inp->inp_pcbinfo; + INP_WLOCK_ASSERT(inp); + INP_HASH_WLOCK(pcbinfo); + hdr = &pcbinfo->ipi_lbgrouphashbase[ + INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_lbgrouphashmask)]; + CK_LIST_FOREACH(grp, hdr, il_list) { + for (i = 0; i < grp->il_inpcnt; ++i) { + if (grp->il_inp[i] != inp) + continue; + + if (grp->il_numa_domain == numa_domain) { + goto abort_with_hash_wlock; + } + + /* Remove it from the old group. */ + in_pcbremlbgrouphash(inp); + + /* Add it to the new group based on numa domain. */ + in_pcbinslbgrouphash(inp, numa_domain); + goto abort_with_hash_wlock; + } + } + err = ENOENT; +abort_with_hash_wlock: + INP_HASH_WUNLOCK(pcbinfo); + return (err); +} + /* * Different protocols initialize their inpcbs differently - giving * different name to the lock. But they all are disposed the same. @@ -731,14 +788,14 @@ in_pcb_lport_dest(struct inpcb *inp, struct sockaddr * if (lsa->sa_family == AF_INET) { tmpinp = in_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, lookupflags, - NULL); + NULL, M_NODOM); } #endif #ifdef INET6 if (lsa->sa_family == AF_INET6) { tmpinp = in6_pcblookup_hash_locked(pcbinfo, faddr6, fport, laddr6, lport, lookupflags, - NULL); + NULL, M_NODOM); } #endif } else { @@ -1399,9 +1456,10 @@ in_pcbconnect_setup(struct inpcb *inp, struct sockaddr if (error) return (error); } + if (lport != 0) { oinp = in_pcblookup_hash_locked(inp->inp_pcbinfo, faddr, - fport, laddr, lport, 0, NULL); + fport, laddr, lport, 0, NULL, M_NODOM); if (oinp != NULL) { if (oinpp != NULL) *oinpp = oinp; @@ -2019,9 +2077,9 @@ in_pcblookup_local(struct inpcbinfo *pcbinfo, struct i static struct inpcb * in_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, const struct in_addr *laddr, uint16_t lport, const struct in_addr *faddr, - uint16_t fport, int lookupflags) + uint16_t fport, int lookupflags, int numa_domain) { - struct inpcb *local_wild; + struct inpcb *local_wild, *numa_wild; const struct inpcblbgrouphead *hdr; struct inpcblbgroup *grp; uint32_t idx; @@ -2041,6 +2099,7 @@ in_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, * - Load balanced group does not contain IPv4 mapped INET6 wild sockets */ local_wild = NULL; + numa_wild = NULL; CK_LIST_FOREACH(grp, hdr, il_list) { #ifdef INET6 if (!(grp->il_vflag & INP_IPV4)) @@ -2051,12 +2110,24 @@ in_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, idx = INP_PCBLBGROUP_PKTHASH(faddr->s_addr, lport, fport) % grp->il_inpcnt; - if (grp->il_laddr.s_addr == laddr->s_addr) - return (grp->il_inp[idx]); + if (grp->il_laddr.s_addr == laddr->s_addr) { + if (numa_domain == M_NODOM || + grp->il_numa_domain == numa_domain) { + return (grp->il_inp[idx]); + } else { + numa_wild = grp->il_inp[idx]; + } + } if (grp->il_laddr.s_addr == INADDR_ANY && - (lookupflags & INPLOOKUP_WILDCARD) != 0) + (lookupflags & INPLOOKUP_WILDCARD) != 0 && + (local_wild == NULL || numa_domain == M_NODOM || + grp->il_numa_domain == numa_domain)) { local_wild = grp->il_inp[idx]; + } } + if (numa_wild != NULL) + return (numa_wild); + return (local_wild); } @@ -2303,7 +2374,7 @@ found: static struct inpcb * in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_int fport_arg, struct in_addr laddr, u_int lport_arg, int lookupflags, - struct ifnet *ifp) + struct ifnet *ifp, uint8_t numa_domain) { struct inpcbhead *head; struct inpcb *inp, *tmpinp; @@ -2348,7 +2419,7 @@ in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, st */ if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { inp = in_pcblookup_lbgroup(pcbinfo, &laddr, lport, &faddr, - fport, lookupflags); + fport, lookupflags, numa_domain); if (inp != NULL) return (inp); } @@ -2435,12 +2506,13 @@ in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, st static struct inpcb * in_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_int fport, struct in_addr laddr, u_int lport, int lookupflags, - struct ifnet *ifp) + struct ifnet *ifp, uint8_t numa_domain) { struct inpcb *inp; inp = in_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, - (lookupflags & ~(INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)), ifp); + (lookupflags & ~(INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)), ifp, + numa_domain); if (inp != NULL) { if (lookupflags & INPLOOKUP_WLOCKPCB) { INP_WLOCK(inp); @@ -2507,7 +2579,7 @@ in_pcblookup(struct inpcbinfo *pcbinfo, struct in_addr } #endif return (in_pcblookup_hash(pcbinfo, faddr, fport, laddr, lport, - lookupflags, ifp)); + lookupflags, ifp, M_NODOM)); } struct inpcb * @@ -2549,7 +2621,7 @@ in_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct in } #endif return (in_pcblookup_hash(pcbinfo, faddr, fport, laddr, lport, - lookupflags, ifp)); + lookupflags, ifp, m->m_pkthdr.numa_domain)); } #endif /* INET */ @@ -2591,7 +2663,7 @@ in_pcbinshash_internal(struct inpcb *inp, struct mbuf */ so_options = inp_so_options(inp); if (so_options & SO_REUSEPORT_LB) { - int ret = in_pcbinslbgrouphash(inp); + int ret = in_pcbinslbgrouphash(inp, M_NODOM); if (ret) { /* pcb lb group malloc fail (ret=ENOBUFS). */ return (ret); Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Sat Dec 19 21:46:09 2020 (r368818) +++ head/sys/netinet/in_pcb.h Sat Dec 19 22:04:46 2020 (r368819) @@ -565,7 +565,7 @@ struct inpcblbgroup { struct epoch_context il_epoch_ctx; uint16_t il_lport; /* (c) */ u_char il_vflag; /* (c) */ - u_char il_pad; + u_int8_t il_numa_domain; uint32_t il_pad2; union in_dependaddr il_dependladdr; /* (c) */ #define il_laddr il_dependladdr.id46_addr.ia46_addr4 @@ -852,6 +852,7 @@ int in_pcbinshash(struct inpcb *); int in_pcbinshash_mbuf(struct inpcb *, struct mbuf *); int in_pcbladdr(struct inpcb *, struct in_addr *, struct in_addr *, struct ucred *); +int in_pcblbgroup_numa(struct inpcb *, int arg); struct inpcb * in_pcblookup_local(struct inpcbinfo *, struct in_addr, u_short, int, struct ucred *); Modified: head/sys/netinet/tcp.h ============================================================================== --- head/sys/netinet/tcp.h Sat Dec 19 21:46:09 2020 (r368818) +++ head/sys/netinet/tcp.h Sat Dec 19 22:04:46 2020 (r368819) @@ -196,6 +196,7 @@ struct tcphdr { #define TCP_PCAP_IN 4096 /* number of input packets to keep */ #define TCP_FUNCTION_BLK 8192 /* Set the tcp function pointers to the specified stack */ /* Options for Rack and BBR */ +#define TCP_REUSPORT_LB_NUMA 1026 /* set listen socket numa domain */ #define TCP_RACK_MBUF_QUEUE 1050 /* Do we allow mbuf queuing if supported */ #define TCP_RACK_PROP 1051 /* RACK proportional rate reduction (bool) */ #define TCP_RACK_TLP_REDUCE 1052 /* RACK TLP cwnd reduction (bool) */ @@ -405,5 +406,8 @@ struct tcp_function_set { #define VOI_TCP_CALCFRWINDIFF 7 /* Congestion avoidance LCWIN - FRWIN */ #define VOI_TCP_GPUT_ND 8 /* Goodput normalised delta */ #define VOI_TCP_ACKLEN 9 /* Average ACKed bytes per ACK */ + +#define TCP_REUSPORT_LB_NUMA_NODOM (-2) /* remove numa binding */ +#define TCP_REUSPORT_LB_NUMA_CURDOM (-1) /* bind to current domain */ #endif /* !_NETINET_TCP_H_ */ Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Sat Dec 19 21:46:09 2020 (r368818) +++ head/sys/netinet/tcp_usrreq.c Sat Dec 19 22:04:46 2020 (r368819) @@ -2143,6 +2143,16 @@ unlock_and_done: INP_WUNLOCK(inp); break; + case TCP_REUSPORT_LB_NUMA: + INP_WUNLOCK(inp); + error = sooptcopyin(sopt, &optval, sizeof(optval), + sizeof(optval)); + INP_WLOCK_RECHECK(inp); + if (!error) + error = in_pcblbgroup_numa(inp, optval); + INP_WUNLOCK(inp); + break; + #ifdef KERN_TLS case TCP_TXTLS_ENABLE: INP_WUNLOCK(inp); Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Sat Dec 19 21:46:09 2020 (r368818) +++ head/sys/netinet6/in6_pcb.c Sat Dec 19 22:04:46 2020 (r368819) @@ -446,7 +446,7 @@ in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr sin6->sin6_port, IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) ? &laddr6.sin6_addr : &inp->in6p_laddr, - inp->inp_lport, 0, NULL) != NULL) { + inp->inp_lport, 0, NULL, M_NODOM) != NULL) { return (EADDRINUSE); } if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { @@ -903,9 +903,9 @@ in6_rtchange(struct inpcb *inp, int errno __unused) static struct inpcb * in6_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, const struct in6_addr *laddr, uint16_t lport, const struct in6_addr *faddr, - uint16_t fport, int lookupflags) + uint16_t fport, int lookupflags, uint8_t numa_domain) { - struct inpcb *local_wild; + struct inpcb *local_wild, *numa_wild; const struct inpcblbgrouphead *hdr; struct inpcblbgroup *grp; uint32_t idx; @@ -925,6 +925,7 @@ in6_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, * - Load balanced does not contain IPv4 mapped INET6 wild sockets. */ local_wild = NULL; + numa_wild = NULL; CK_LIST_FOREACH(grp, hdr, il_list) { #ifdef INET if (!(grp->il_vflag & INP_IPV6)) @@ -935,12 +936,23 @@ in6_pcblookup_lbgroup(const struct inpcbinfo *pcbinfo, idx = INP_PCBLBGROUP_PKTHASH(INP6_PCBHASHKEY(faddr), lport, fport) % grp->il_inpcnt; - if (IN6_ARE_ADDR_EQUAL(&grp->il6_laddr, laddr)) - return (grp->il_inp[idx]); + if (IN6_ARE_ADDR_EQUAL(&grp->il6_laddr, laddr)) { + if (numa_domain == M_NODOM || + grp->il_numa_domain == numa_domain) { + return (grp->il_inp[idx]); + } + else + numa_wild = grp->il_inp[idx]; + } if (IN6_IS_ADDR_UNSPECIFIED(&grp->il6_laddr) && - (lookupflags & INPLOOKUP_WILDCARD) != 0) + (lookupflags & INPLOOKUP_WILDCARD) != 0 && + (local_wild == NULL || numa_domain == M_NODOM || + grp->il_numa_domain == numa_domain)) { local_wild = grp->il_inp[idx]; + } } + if (numa_wild != NULL) + return (numa_wild); return (local_wild); } @@ -1151,7 +1163,7 @@ found: struct inpcb * in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, - int lookupflags, struct ifnet *ifp) + int lookupflags, struct ifnet *ifp, uint8_t numa_domain) { struct inpcbhead *head; struct inpcb *inp, *tmpinp; @@ -1195,7 +1207,7 @@ in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, s */ if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { inp = in6_pcblookup_lbgroup(pcbinfo, laddr, lport, faddr, - fport, lookupflags); + fport, lookupflags, numa_domain); if (inp != NULL) return (inp); } @@ -1273,12 +1285,13 @@ in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, s static struct inpcb * in6_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport, struct in6_addr *laddr, u_int lport, int lookupflags, - struct ifnet *ifp) + struct ifnet *ifp, uint8_t numa_domain) { struct inpcb *inp; inp = in6_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, - (lookupflags & ~(INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)), ifp); + (lookupflags & ~(INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)), ifp, + numa_domain); if (inp != NULL) { if (lookupflags & INPLOOKUP_WLOCKPCB) { INP_WLOCK(inp); @@ -1344,7 +1357,7 @@ in6_pcblookup(struct inpcbinfo *pcbinfo, struct in6_ad } #endif return (in6_pcblookup_hash(pcbinfo, faddr, fport, laddr, lport, - lookupflags, ifp)); + lookupflags, ifp, M_NODOM)); } struct inpcb * @@ -1386,7 +1399,7 @@ in6_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct i } #endif return (in6_pcblookup_hash(pcbinfo, faddr, fport, laddr, lport, - lookupflags, ifp)); + lookupflags, ifp, m->m_pkthdr.numa_domain)); } void Modified: head/sys/netinet6/in6_pcb.h ============================================================================== --- head/sys/netinet6/in6_pcb.h Sat Dec 19 21:46:09 2020 (r368818) +++ head/sys/netinet6/in6_pcb.h Sat Dec 19 22:04:46 2020 (r368819) @@ -95,7 +95,7 @@ struct inpcb * struct inpcb * in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport_arg, struct in6_addr *laddr, - u_int lport_arg, int lookupflags, struct ifnet *ifp); + u_int lport_arg, int lookupflags, struct ifnet *ifp, uint8_t); struct inpcb * in6_pcblookup(struct inpcbinfo *, struct in6_addr *, u_int, struct in6_addr *, u_int, int,