From owner-svn-src-head@freebsd.org Sun Sep 16 00:44:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2922A108ED05; Sun, 16 Sep 2018 00:44:24 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C39737724D; Sun, 16 Sep 2018 00:44:23 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B22D61AE4A; Sun, 16 Sep 2018 00:44:23 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8G0iN7J051482; Sun, 16 Sep 2018 00:44:23 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8G0iNBn051481; Sun, 16 Sep 2018 00:44:23 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201809160044.w8G0iNBn051481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sun, 16 Sep 2018 00:44:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338698 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: jmg X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 338698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 16 Sep 2018 00:44:24 -0000 Author: jmg Date: Sun Sep 16 00:44:23 2018 New Revision: 338698 URL: https://svnweb.freebsd.org/changeset/base/338698 Log: Significantly improve pf purge cpu usage by only taking locks when there is work to do. This reduces CPU consumption to one third on systems. This will help keep the thread CPU usage under control now that the default hash size has increased. Reviewed by: kp Approved by: re (kib) Differential Revision: https://reviews.freebsd.org/D17097 Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sat Sep 15 21:22:50 2018 (r338697) +++ head/sys/netpfil/pf/pf.c Sun Sep 16 00:44:23 2018 (r338698) @@ -1719,24 +1719,28 @@ pf_purge_expired_states(u_int i, int maxcheck) while (maxcheck > 0) { ih = &V_pf_idhash[i]; + + /* only take the lock if we expect to do work */ + if (!LIST_EMPTY(&ih->states)) { relock: - PF_HASHROW_LOCK(ih); - LIST_FOREACH(s, &ih->states, entry) { - if (pf_state_expires(s) <= time_uptime) { - V_pf_status.states -= - pf_unlink_state(s, PF_ENTER_LOCKED); - goto relock; + PF_HASHROW_LOCK(ih); + LIST_FOREACH(s, &ih->states, entry) { + if (pf_state_expires(s) <= time_uptime) { + V_pf_status.states -= + pf_unlink_state(s, PF_ENTER_LOCKED); + goto relock; + } + s->rule.ptr->rule_flag |= PFRULE_REFS; + if (s->nat_rule.ptr != NULL) + s->nat_rule.ptr->rule_flag |= PFRULE_REFS; + if (s->anchor.ptr != NULL) + s->anchor.ptr->rule_flag |= PFRULE_REFS; + s->kif->pfik_flags |= PFI_IFLAG_REFS; + if (s->rt_kif) + s->rt_kif->pfik_flags |= PFI_IFLAG_REFS; } - s->rule.ptr->rule_flag |= PFRULE_REFS; - if (s->nat_rule.ptr != NULL) - s->nat_rule.ptr->rule_flag |= PFRULE_REFS; - if (s->anchor.ptr != NULL) - s->anchor.ptr->rule_flag |= PFRULE_REFS; - s->kif->pfik_flags |= PFI_IFLAG_REFS; - if (s->rt_kif) - s->rt_kif->pfik_flags |= PFI_IFLAG_REFS; + PF_HASHROW_UNLOCK(ih); } - PF_HASHROW_UNLOCK(ih); /* Return when we hit end of hash. */ if (++i > pf_hashmask) { From owner-svn-src-head@freebsd.org Sun Sep 16 17:16:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3468510A6251 for ; Sun, 16 Sep 2018 17:16:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-22.consmr.mail.gq1.yahoo.com (sonic312-22.consmr.mail.gq1.yahoo.com [98.137.69.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B742571131 for ; Sun, 16 Sep 2018 17:16:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: ej9SqLMVM1mo0_AsHga8oQhPJqhB0pvg6jd_okDG2.ZeViTVAIUj2vChBOoWP4b w.imVisK.M5qLKYyEkxcGYMDYsKC8GfeLT11SFoVXuOeL6kKggdmn4Onr53bywcN80YNjrywWZzO 3IVUtol1F27YQnXMRKimoteMhT1rSKjD5l820DoX.HkoPxlleYIAbIG1n2_znTUrPlydNLhiyfIA N.cRx1ZBij07pnwwC2uPJtzxfhUoKUQQrx_g9Z8pla.x3IQxMOr.Cj94mgDX3BgBjRq4rnJ5rro6 FDfeuukcE5YhX9M.o8hWRo6I.wqciKGPHnYiZOxQP2nljFiWoxYdiqaywwpK1NqZNXrKLJBbQwrz j4iMNbGtmB5rtoIPDBrhMiEy4EX23VtQYeE6dCrgU5TrHQaWmwU8rcMMdIY52vLcpE7wo4Q9ARaN P1kf3zBrPpUEfjMZKxqXTIK_MpNtfwGpjqVjeyVPGJnkwahVo_T359Yz_i7tWTznfPhz_W9Wbx.V 6FjC7R12CwFAxdAU78WP1C9OSHtM636QaYXBTlxUMFQxLlFmI2maDHG1wBDnPIn5s4fegY9TOv0e D0keVAMcgmj5KkU.dFYvNzxXypSgyvtVqsSkKeueRgD.zc4Lb2TIffltRC3DqSGOJGN1HIV0ORXv mBbFMUyH4MXjPL6nb_hq6l9MLxWOXyfFoK_ZaFLY4Lfh8gEXEwyiYYwM1dYzagPkd.VEw26mGeZR xzl9wFYQ69kernNGFJ0ViAmd.Ebd5p.g9.RJIUIgts0Ro_A0SbOpI5_TEcLPEYGovMUae5IziIPn dsY4lHfVT78eM.Y5w74ISZufz6nzcG41gvm7UcgTL4GV43MFV6ZGH2y3BRUTm5KUjauKGLpbDz4U TREqz6nLZM2P3lCv8KGgUSerlr2z0XcsXF0X1y4dpwYzWlgUZYXw5fpyGSPrBsVYq1QnJtpOPvqj 3lGIqVC.1tXufQIb6pRAImEcUUeG9pIBTRbj.Cm7LsRMWm.w.lwJZcwYfRHTHlKeHzTSc Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Sun, 16 Sep 2018 17:16:30 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp406.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f4b3c1d851f07d56343aeba9cb0dafde for ; Sun, 16 Sep 2018 17:06:20 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336601 - head Message-Id: Date: Sun, 16 Sep 2018 10:06:19 -0700 To: svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 16 Sep 2018 17:16:37 -0000 Looks like this head/ObsoleteFiles.inc update has a typo in each thing added to OLD_FILES . . . # ls -lTdt /usr/tests/usr.bin/indent/* -r--r--r-- 1 root wheel 121 Sep 13 22:53:30 2018 = /usr/tests/usr.bin/indent/Kyuafile . . . -r--r--r-- 1 root wheel 295 Sep 13 22:53:29 2018 = /usr/tests/usr.bin/indent/binary.0 -r--r--r-- 1 root wheel 92 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/sac.0.pro -r--r--r-- 1 root wheel 130 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/sac.0.stdout -r--r--r-- 1 root wheel 122 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/sac.0 -r--r--r-- 1 root wheel 94 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/nsac.0.pro -r--r--r-- 1 root wheel 130 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/nsac.0.stdout -r--r--r-- 1 root wheel 123 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/nsac.0 vs. ( note usr.bin vs. usr/bin ): Modified: head/ObsoleteFiles.inc = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/ObsoleteFiles.inc Sun Jul 22 12:04:21 2018 = (r336600) +++ head/ObsoleteFiles.inc Sun Jul 22 12:45:02 2018 = (r336601) @@ -38,6 +38,13 @@ # xargs -n1 | sort | uniq -d; # done =20 +# 20180722: indent(1) option renamed, test files follow +OLD_FILES+=3Dusr/bin/indent/tests/nsac.0 +OLD_FILES+=3Dusr/bin/indent/tests/nsac.0.pro +OLD_FILES+=3Dusr/bin/indent/tests/nsac.0.stdout +OLD_FILES+=3Dusr/bin/indent/tests/sac.0 +OLD_FILES+=3Dusr/bin/indent/tests/sac.0.pro +OLD_FILES+=3Dusr/bin/indent/tests/sac.0.stdout # 20180721: move of libmlx5.so.1 and libibverbs.so.1 OLD_LIBS+=3Dusr/lib/libmlx5.so.1 OLD_LIBS+=3Dusr/lib/libibverbs.so.1 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Sun Sep 16 18:36:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C67FF10A799D; Sun, 16 Sep 2018 18:36: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A2B27C3FC; Sun, 16 Sep 2018 18:36: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 5F68925D82; Sun, 16 Sep 2018 18:36: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 w8GIah2r096602; Sun, 16 Sep 2018 18:36:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8GIahbw096601; Sun, 16 Sep 2018 18:36:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809161836.w8GIahbw096601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 16 Sep 2018 18:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338699 - 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: 338699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 16 Sep 2018 18:36:43 -0000 Author: kib Date: Sun Sep 16 18:36:42 2018 New Revision: 338699 URL: https://svnweb.freebsd.org/changeset/base/338699 Log: Remove unneeded new line from the panic string. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (rgrimes) Differential revision: https://reviews.freebsd.org/D17181 Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sun Sep 16 00:44:23 2018 (r338698) +++ head/sys/amd64/amd64/trap.c Sun Sep 16 18:36:42 2018 (r338699) @@ -811,7 +811,7 @@ trap_pfault(struct trapframe *frame, int usermode) PGEX_U | PGEX_I)) == (PGEX_P | PGEX_U | PGEX_I) && (curpcb->pcb_saved_ucr3 & ~CR3_PCID_MASK)== (PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK)) - panic("PTI: pid %d comm %s tf_err %#lx\n", p->p_pid, + panic("PTI: pid %d comm %s tf_err %#lx", p->p_pid, p->p_comm, frame->tf_err); /* From owner-svn-src-head@freebsd.org Sun Sep 16 19:28:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF79710A8789; Sun, 16 Sep 2018 19:28:27 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83A417D620; Sun, 16 Sep 2018 19:28:27 +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 7E59826589; Sun, 16 Sep 2018 19:28:27 +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 w8GJSRZk022097; Sun, 16 Sep 2018 19:28:27 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8GJSRxn022096; Sun, 16 Sep 2018 19:28:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809161928.w8GJSRxn022096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 16 Sep 2018 19:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338700 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 16 Sep 2018 19:28:28 -0000 Author: mjg Date: Sun Sep 16 19:28:27 2018 New Revision: 338700 URL: https://svnweb.freebsd.org/changeset/base/338700 Log: amd64: tidy up kernel memmove There is no need to use %rax for temporary values and avoiding doing so shortens the func. Handle the explicit 'check for tail' depessimisization for backwards copying. This reduces the diff against userspace. Approved by: re (kib) Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Sun Sep 16 18:36:42 2018 (r338699) +++ head/sys/amd64/amd64/support.S Sun Sep 16 19:28:27 2018 (r338700) @@ -108,12 +108,12 @@ END(sse2_pagezero) */ ENTRY(memmove_std) PUSH_FRAME_POINTER - movq %rdi,%r9 + movq %rdi,%rax movq %rdx,%rcx - movq %rdi,%rax - subq %rsi,%rax - cmpq %rcx,%rax /* overlapping && src < dst? */ + movq %rdi,%r8 + subq %rsi,%r8 + cmpq %rcx,%r8 /* overlapping && src < dst? */ jb 1f shrq $3,%rcx /* copy by 64-bit words */ @@ -128,7 +128,6 @@ ENTRY(memmove_std) 2: rep movsb - movq %r9,%rax POP_FRAME_POINTER ret @@ -140,8 +139,10 @@ ENTRY(memmove_std) decq %rsi andq $7,%rcx /* any fractional bytes? */ std + jne 3f rep movsb +3: movq %rdx,%rcx /* copy remainder by 32-bit words */ shrq $3,%rcx subq $7,%rsi @@ -149,24 +150,22 @@ ENTRY(memmove_std) rep movsq cld - movq %r9,%rax POP_FRAME_POINTER ret END(memmove_std) ENTRY(memmove_erms) PUSH_FRAME_POINTER - movq %rdi,%r9 + movq %rdi,%rax movq %rdx,%rcx - movq %rdi,%rax - subq %rsi,%rax - cmpq %rcx,%rax /* overlapping && src < dst? */ + movq %rdi,%r8 + subq %rsi,%r8 + cmpq %rcx,%r8 /* overlapping && src < dst? */ jb 1f rep movsb - movq %r9,%rax POP_FRAME_POINTER ret @@ -179,7 +178,6 @@ ENTRY(memmove_erms) rep movsb cld - movq %r9,%rax POP_FRAME_POINTER ret END(memmove_erms) From owner-svn-src-head@freebsd.org Sun Sep 16 21:44:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78FD11082603; Sun, 16 Sep 2018 21:44:37 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C1AC823B7; Sun, 16 Sep 2018 21:44:37 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2305527C07; Sun, 16 Sep 2018 21:44:37 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8GLiaEq093160; Sun, 16 Sep 2018 21:44:36 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8GLiaca093159; Sun, 16 Sep 2018 21:44:36 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201809162144.w8GLiaca093159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 16 Sep 2018 21:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338701 - head/sys/dev/ichiic X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/dev/ichiic X-SVN-Commit-Revision: 338701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 16 Sep 2018 21:44:37 -0000 Author: gonzo Date: Sun Sep 16 21:44:36 2018 New Revision: 338701 URL: https://svnweb.freebsd.org/changeset/base/338701 Log: [ig4] Fix device description for Kaby Lake systems Kaby Lake I2C controller is Intel Sunrise Point-H not Intel Sunrise Point-LP. Submitted by: Dmitry Luhtionov Approved by: re (kib) Modified: head/sys/dev/ichiic/ig4_pci.c Modified: head/sys/dev/ichiic/ig4_pci.c ============================================================================== --- head/sys/dev/ichiic/ig4_pci.c Sun Sep 16 19:28:27 2018 (r338700) +++ head/sys/dev/ichiic/ig4_pci.c Sun Sep 16 21:44:36 2018 (r338701) @@ -112,8 +112,8 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = { PCI_CHIP_SKYLAKE_I2C_3, "Intel Sunrise Point-LP I2C Controller-3", IG4_SKYLAKE}, { PCI_CHIP_SKYLAKE_I2C_4, "Intel Sunrise Point-LP I2C Controller-4", IG4_SKYLAKE}, { PCI_CHIP_SKYLAKE_I2C_5, "Intel Sunrise Point-LP I2C Controller-5", IG4_SKYLAKE}, - { PCI_CHIP_KABYLAKE_I2C_0, "Intel Sunrise Point-LP I2C Controller-0", IG4_SKYLAKE}, - { PCI_CHIP_KABYLAKE_I2C_1, "Intel Sunrise Point-LP I2C Controller-1", IG4_SKYLAKE}, + { PCI_CHIP_KABYLAKE_I2C_0, "Intel Sunrise Point-H I2C Controller-0", IG4_SKYLAKE}, + { PCI_CHIP_KABYLAKE_I2C_1, "Intel Sunrise Point-H I2C Controller-1", IG4_SKYLAKE}, { PCI_CHIP_APL_I2C_0, "Intel Apollo Lake I2C Controller-0", IG4_APL}, { PCI_CHIP_APL_I2C_1, "Intel Apollo Lake I2C Controller-1", IG4_APL}, { PCI_CHIP_APL_I2C_2, "Intel Apollo Lake I2C Controller-2", IG4_APL}, From owner-svn-src-head@freebsd.org Sun Sep 16 21:46:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAD6A1082727; Sun, 16 Sep 2018 21:46:27 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91909825A0; Sun, 16 Sep 2018 21:46:27 +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 87AD027C08; Sun, 16 Sep 2018 21:46:27 +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 w8GLkREN093291; Sun, 16 Sep 2018 21:46:27 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8GLkRoj093290; Sun, 16 Sep 2018 21:46:27 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809162146.w8GLkRoj093290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 16 Sep 2018 21:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338702 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 16 Sep 2018 21:46:28 -0000 Author: mjg Date: Sun Sep 16 21:46:27 2018 New Revision: 338702 URL: https://svnweb.freebsd.org/changeset/base/338702 Log: Revert amd64: tidy up kernel memmove There is a braino in the non-erms variant which breaks the functionality. Will be fixed at a later time with a different patch. Reported by: Manfred Antar Approved by: re (implicit) Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Sun Sep 16 21:44:36 2018 (r338701) +++ head/sys/amd64/amd64/support.S Sun Sep 16 21:46:27 2018 (r338702) @@ -108,12 +108,12 @@ END(sse2_pagezero) */ ENTRY(memmove_std) PUSH_FRAME_POINTER - movq %rdi,%rax + movq %rdi,%r9 movq %rdx,%rcx - movq %rdi,%r8 - subq %rsi,%r8 - cmpq %rcx,%r8 /* overlapping && src < dst? */ + movq %rdi,%rax + subq %rsi,%rax + cmpq %rcx,%rax /* overlapping && src < dst? */ jb 1f shrq $3,%rcx /* copy by 64-bit words */ @@ -128,6 +128,7 @@ ENTRY(memmove_std) 2: rep movsb + movq %r9,%rax POP_FRAME_POINTER ret @@ -139,10 +140,8 @@ ENTRY(memmove_std) decq %rsi andq $7,%rcx /* any fractional bytes? */ std - jne 3f rep movsb -3: movq %rdx,%rcx /* copy remainder by 32-bit words */ shrq $3,%rcx subq $7,%rsi @@ -150,22 +149,24 @@ ENTRY(memmove_std) rep movsq cld + movq %r9,%rax POP_FRAME_POINTER ret END(memmove_std) ENTRY(memmove_erms) PUSH_FRAME_POINTER - movq %rdi,%rax + movq %rdi,%r9 movq %rdx,%rcx - movq %rdi,%r8 - subq %rsi,%r8 - cmpq %rcx,%r8 /* overlapping && src < dst? */ + movq %rdi,%rax + subq %rsi,%rax + cmpq %rcx,%rax /* overlapping && src < dst? */ jb 1f rep movsb + movq %r9,%rax POP_FRAME_POINTER ret @@ -178,6 +179,7 @@ ENTRY(memmove_erms) rep movsb cld + movq %r9,%rax POP_FRAME_POINTER ret END(memmove_erms) From owner-svn-src-head@freebsd.org Mon Sep 17 10:10:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 695C61098303; Mon, 17 Sep 2018 10:10:15 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1FC40761AC; Mon, 17 Sep 2018 10:10:15 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14CD478E6; Mon, 17 Sep 2018 10:10:15 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8HAAEZp074443; Mon, 17 Sep 2018 10:10:14 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HAAEjp074442; Mon, 17 Sep 2018 10:10:14 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201809171010.w8HAAEjp074442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 17 Sep 2018 10:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338708 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 338708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 10:10:15 -0000 Author: ae Date: Mon Sep 17 10:10:14 2018 New Revision: 338708 URL: https://svnweb.freebsd.org/changeset/base/338708 Log: Restore outbound packets capturing for if_gre(4). It was missed in r335048. Also clear M_MCAST and M_BCAST flags for encapsulated datagram, since it will have new IP header. Approved by: re (kib) Modified: head/sys/net/if_gre.c Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Mon Sep 17 02:51:08 2018 (r338707) +++ head/sys/net/if_gre.c Mon Sep 17 10:10:14 2018 (r338708) @@ -569,6 +569,8 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m) goto drop; } af = m->m_pkthdr.csum_data; + BPF_MTAP2(ifp, &af, sizeof(af), m); + m->m_flags &= ~(M_BCAST|M_MCAST); M_SETFIB(m, sc->gre_fibnum); M_PREPEND(m, sc->gre_hlen, M_NOWAIT); if (m == NULL) { From owner-svn-src-head@freebsd.org Mon Sep 17 14:59:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AECF109F766; Mon, 17 Sep 2018 14:59:06 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B13C47F409; Mon, 17 Sep 2018 14:59:05 +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 AB8A31282F; Mon, 17 Sep 2018 14:59:05 +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 w8HEx5dZ023399; Mon, 17 Sep 2018 14:59:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HEx5gt023398; Mon, 17 Sep 2018 14:59:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809171459.w8HEx5gt023398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 17 Sep 2018 14:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338711 - 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: 338711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 14:59:06 -0000 Author: kib Date: Mon Sep 17 14:59:05 2018 New Revision: 338711 URL: https://svnweb.freebsd.org/changeset/base/338711 Log: Make the PTI violation check to follow style of the SMAP check. No functional changes. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (rgrimes) Differential revision: https://reviews.freebsd.org/D17181 Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Sep 17 14:53:03 2018 (r338710) +++ head/sys/amd64/amd64/trap.c Mon Sep 17 14:59:05 2018 (r338711) @@ -705,6 +705,17 @@ trap_is_smap(struct trapframe *frame) PGEX_P && (frame->tf_rflags & PSL_AC) == 0); } +static bool +trap_is_pti(struct trapframe *frame) +{ + + return (PCPU_GET(curpmap)->pm_ucr3 != PMAP_NO_CR3 && + pg_nx != 0 && (frame->tf_err & (PGEX_P | PGEX_W | + PGEX_U | PGEX_I)) == (PGEX_P | PGEX_U | PGEX_I) && + (curpcb->pcb_saved_ucr3 & ~CR3_PCID_MASK) == + (PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK)); +} + static int trap_pfault(struct trapframe *frame, int usermode) { @@ -806,11 +817,7 @@ trap_pfault(struct trapframe *frame, int usermode) * If nx protection of the usermode portion of kernel page * tables caused trap, panic. */ - if (usermode && PCPU_GET(curpmap)->pm_ucr3 != PMAP_NO_CR3 && - pg_nx != 0 && (frame->tf_err & (PGEX_P | PGEX_W | - PGEX_U | PGEX_I)) == (PGEX_P | PGEX_U | PGEX_I) && - (curpcb->pcb_saved_ucr3 & ~CR3_PCID_MASK)== - (PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK)) + if (usermode && trap_is_pti(frame)) panic("PTI: pid %d comm %s tf_err %#lx", p->p_pid, p->p_comm, frame->tf_err); From owner-svn-src-head@freebsd.org Mon Sep 17 15:34:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D80F210A0690; Mon, 17 Sep 2018 15:34:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CA3080929; Mon, 17 Sep 2018 15:34:20 +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 6855212EAD; Mon, 17 Sep 2018 15:34:20 +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 w8HFYKZm043772; Mon, 17 Sep 2018 15:34:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HFYKq8043771; Mon, 17 Sep 2018 15:34:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809171534.w8HFYKq8043771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 17 Sep 2018 15:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338712 - 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: 338712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 15:34:21 -0000 Author: kib Date: Mon Sep 17 15:34:19 2018 New Revision: 338712 URL: https://svnweb.freebsd.org/changeset/base/338712 Log: Calculate PTI, PCID and INVPCID modes earlier, before ifuncs are resolved. This will be used in following conversion of pmap_activate_sw(). Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D17181 Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Sep 17 14:59:05 2018 (r338711) +++ head/sys/amd64/amd64/machdep.c Mon Sep 17 15:34:19 2018 (r338712) @@ -1581,6 +1581,21 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) */ identify_cpu2(); + /* + * Check for pti, pcid, and invpcid before ifuncs are + * resolved, to correctly select the implementation for + * pmap_activate_sw_mode(). + */ + pti = pti_get_default(); + TUNABLE_INT_FETCH("vm.pmap.pti", &pti); + TUNABLE_INT_FETCH("vm.pmap.pcid_enabled", &pmap_pcid_enabled); + if ((cpu_feature2 & CPUID2_PCID) != 0 && pmap_pcid_enabled) { + invpcid_works = (cpu_stdext_feature & + CPUID_STDEXT_INVPCID) != 0; + } else { + pmap_pcid_enabled = 0; + } + link_elf_ireloc(kmdp); /* @@ -1645,9 +1660,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) mtx_init(&dt_lock, "descriptor tables", NULL, MTX_DEF); /* exceptions */ - pti = pti_get_default(); - TUNABLE_INT_FETCH("vm.pmap.pti", &pti); - for (x = 0; x < NIDT; x++) setidt(x, pti ? &IDTVEC(rsvd_pti) : &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Sep 17 14:59:05 2018 (r338711) +++ head/sys/amd64/amd64/pmap.c Mon Sep 17 15:34:19 2018 (r338712) @@ -1179,11 +1179,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) pmap_init_pat(); /* Initialize TLB Context Id. */ - TUNABLE_INT_FETCH("vm.pmap.pcid_enabled", &pmap_pcid_enabled); - if ((cpu_feature2 & CPUID2_PCID) != 0 && pmap_pcid_enabled) { - /* Check for INVPCID support */ - invpcid_works = (cpu_stdext_feature & CPUID_STDEXT_INVPCID) - != 0; + if (pmap_pcid_enabled) { for (i = 0; i < MAXCPU; i++) { kernel_pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN; kernel_pmap->pm_pcids[i].pm_gen = 1; @@ -1204,8 +1200,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) * during pcpu setup. */ load_cr4(rcr4() | CR4_PCIDE); - } else { - pmap_pcid_enabled = 0; } } From owner-svn-src-head@freebsd.org Mon Sep 17 15:49:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 964C510A0A3D; Mon, 17 Sep 2018 15:49:36 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B25D8111E; Mon, 17 Sep 2018 15:49:36 +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 41657130A2; Mon, 17 Sep 2018 15:49:36 +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 w8HFnaIv049268; Mon, 17 Sep 2018 15:49:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HFnZ0d049266; Mon, 17 Sep 2018 15:49:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809171549.w8HFnZ0d049266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 17 Sep 2018 15:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338713 - in head/lib/libc: amd64/string i386/string X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/lib/libc: amd64/string i386/string X-SVN-Commit-Revision: 338713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 15:49:36 -0000 Author: mjg Date: Mon Sep 17 15:49:35 2018 New Revision: 338713 URL: https://svnweb.freebsd.org/changeset/base/338713 Log: amd64: depessimize userspace memcpy/memmove/bcopy The change resembles what was done in r334537 for kernel routines. While here take care of i386 variants. Note that primitives remain suboptimal. Reviewed by: kib (previous version) Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17167 Modified: head/lib/libc/amd64/string/bcopy.S head/lib/libc/i386/string/bcopy.S Modified: head/lib/libc/amd64/string/bcopy.S ============================================================================== --- head/lib/libc/amd64/string/bcopy.S Mon Sep 17 15:34:19 2018 (r338712) +++ head/lib/libc/amd64/string/bcopy.S Mon Sep 17 15:49:35 2018 (r338713) @@ -66,6 +66,9 @@ ENTRY(bcopy) movsq movq %rdx,%rcx andq $7,%rcx /* any bytes left? */ + jne 2f + ret +2: rep movsb ret @@ -73,11 +76,13 @@ ENTRY(bcopy) addq %rcx,%rdi /* copy backwards. */ addq %rcx,%rsi std - andq $7,%rcx /* any fractional bytes? */ decq %rdi decq %rsi + andq $7,%rcx /* any fractional bytes? */ + je 3f rep movsb +3: movq %rdx,%rcx /* copy remainder by words */ shrq $3,%rcx subq $7,%rsi Modified: head/lib/libc/i386/string/bcopy.S ============================================================================== --- head/lib/libc/i386/string/bcopy.S Mon Sep 17 15:34:19 2018 (r338712) +++ head/lib/libc/i386/string/bcopy.S Mon Sep 17 15:49:35 2018 (r338713) @@ -64,7 +64,7 @@ ENTRY(bcopy) movl %edi,%edx subl %esi,%edx cmpl %ecx,%edx /* overlapping? */ - jb 1f + jb 2f cld /* nope, copy forwards. */ movl %ecx,%edx shrl $2,%ecx /* copy by words */ @@ -72,21 +72,28 @@ ENTRY(bcopy) movsl movl %edx,%ecx andl $3,%ecx /* any bytes left? */ + jne 1f + popl %edi + popl %esi + ret +1: rep movsb popl %edi popl %esi ret -1: +2: addl %ecx,%edi /* copy backwards. */ addl %ecx,%esi std movl %ecx,%edx - andl $3,%ecx /* any fractional bytes? */ decl %edi decl %esi + andl $3,%ecx /* any fractional bytes? */ + je 3f rep movsb +3: movl %edx,%ecx /* copy remainder by words */ shrl $2,%ecx subl $3,%esi From owner-svn-src-head@freebsd.org Mon Sep 17 15:51:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E25C610A0C71; Mon, 17 Sep 2018 15:51:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9894A814B0; Mon, 17 Sep 2018 15:51:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 934AE131FC; Mon, 17 Sep 2018 15:51:49 +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 w8HFpnNY050206; Mon, 17 Sep 2018 15:51:49 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HFpnHn050205; Mon, 17 Sep 2018 15:51:49 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809171551.w8HFpnHn050205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 17 Sep 2018 15:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338714 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 15:51:50 -0000 Author: mjg Date: Mon Sep 17 15:51:49 2018 New Revision: 338714 URL: https://svnweb.freebsd.org/changeset/base/338714 Log: amd64: tidy up kernel memmove, take 2 There is no need to use %rax for temporary values and avoiding doing so shortens the func. Handle the explicit 'check for tail' depessimisization for backwards copying. This reduces the diff against userspace. Tested with the glibc test suite. Approved by: re (kib) Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Mon Sep 17 15:49:35 2018 (r338713) +++ head/sys/amd64/amd64/support.S Mon Sep 17 15:51:49 2018 (r338714) @@ -108,40 +108,40 @@ END(sse2_pagezero) */ ENTRY(memmove_std) PUSH_FRAME_POINTER - movq %rdi,%r9 + movq %rdi,%rax movq %rdx,%rcx - movq %rdi,%rax - subq %rsi,%rax - cmpq %rcx,%rax /* overlapping && src < dst? */ - jb 1f + movq %rdi,%r8 + subq %rsi,%r8 + cmpq %rcx,%r8 /* overlapping && src < dst? */ + jb 2f shrq $3,%rcx /* copy by 64-bit words */ rep movsq movq %rdx,%rcx andq $7,%rcx /* any bytes left? */ - jne 2f - movq %r9,%rax + jne 1f POP_FRAME_POINTER ret -2: +1: rep movsb - movq %r9,%rax POP_FRAME_POINTER ret /* ALIGN_TEXT */ -1: +2: addq %rcx,%rdi /* copy backwards */ addq %rcx,%rsi decq %rdi decq %rsi - andq $7,%rcx /* any fractional bytes? */ std + andq $7,%rcx /* any fractional bytes? */ + je 3f rep movsb +3: movq %rdx,%rcx /* copy remainder by 32-bit words */ shrq $3,%rcx subq $7,%rsi @@ -149,24 +149,22 @@ ENTRY(memmove_std) rep movsq cld - movq %r9,%rax POP_FRAME_POINTER ret END(memmove_std) ENTRY(memmove_erms) PUSH_FRAME_POINTER - movq %rdi,%r9 + movq %rdi,%rax movq %rdx,%rcx - movq %rdi,%rax - subq %rsi,%rax - cmpq %rcx,%rax /* overlapping && src < dst? */ + movq %rdi,%r8 + subq %rsi,%r8 + cmpq %rcx,%r8 /* overlapping && src < dst? */ jb 1f rep movsb - movq %r9,%rax POP_FRAME_POINTER ret @@ -179,7 +177,6 @@ ENTRY(memmove_erms) rep movsb cld - movq %r9,%rax POP_FRAME_POINTER ret END(memmove_erms) From owner-svn-src-head@freebsd.org Mon Sep 17 15:52:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1812010A0CBE; Mon, 17 Sep 2018 15:52:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2A218163F; Mon, 17 Sep 2018 15:52:19 +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 BD9A313223; Mon, 17 Sep 2018 15:52:19 +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 w8HFqJJr051672; Mon, 17 Sep 2018 15:52:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HFqJDm051671; Mon, 17 Sep 2018 15:52:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809171552.w8HFqJDm051671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 17 Sep 2018 15:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338715 - 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: 338715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 15:52:20 -0000 Author: kib Date: Mon Sep 17 15:52:19 2018 New Revision: 338715 URL: https://svnweb.freebsd.org/changeset/base/338715 Log: Use ifunc to resolve context switching mode on amd64. Patch removes all checks for pti/pcid/invpcid from the context switch path. I verified this by looking at the generated code, compiling with the in-tree clang. The invpcid_works1 trick required inline attribute for pmap_activate_sw_pcid_pti() to work. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D17181 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Mon Sep 17 15:51:49 2018 (r338714) +++ head/sys/amd64/amd64/pmap.c Mon Sep 17 15:52:19 2018 (r338715) @@ -146,6 +146,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -7435,17 +7436,177 @@ pmap_pcid_alloc(pmap_t pmap, u_int cpuid) return (0); } +static uint64_t +pmap_pcid_alloc_checked(pmap_t pmap, u_int cpuid) +{ + uint64_t cached; + + cached = pmap_pcid_alloc(pmap, cpuid); + KASSERT(pmap->pm_pcids[cpuid].pm_pcid >= 0 && + pmap->pm_pcids[cpuid].pm_pcid < PMAP_PCID_OVERMAX, + ("pmap %p cpu %d pcid %#x", pmap, cpuid, + pmap->pm_pcids[cpuid].pm_pcid)); + KASSERT(pmap->pm_pcids[cpuid].pm_pcid != PMAP_PCID_KERN || + pmap == kernel_pmap, + ("non-kernel pmap pmap %p cpu %d pcid %#x", + pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); + return (cached); +} + +static void +pmap_activate_sw_pti_post(pmap_t pmap) +{ + + if (pmap->pm_ucr3 != PMAP_NO_CR3) + PCPU_GET(tssp)->tss_rsp0 = ((vm_offset_t)PCPU_PTR(pti_stack) + + PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful; +} + +static void inline +pmap_activate_sw_pcid_pti(pmap_t pmap, u_int cpuid, const bool invpcid_works1) +{ + struct invpcid_descr d; + uint64_t cached, cr3, kcr3, ucr3; + + cached = pmap_pcid_alloc_checked(pmap, cpuid); + cr3 = rcr3(); + if ((cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) + load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid); + PCPU_SET(curpmap, pmap); + kcr3 = pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid; + ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[cpuid].pm_pcid | + PMAP_PCID_USER_PT; + + if (!cached && pmap->pm_ucr3 != PMAP_NO_CR3) { + /* + * Explicitly invalidate translations cached from the + * user page table. They are not automatically + * flushed by reload of cr3 with the kernel page table + * pointer above. + * + * Note that the if() condition is resolved statically + * by using the function argument instead of + * runtime-evaluated invpcid_works value. + */ + if (invpcid_works1) { + d.pcid = PMAP_PCID_USER_PT | + pmap->pm_pcids[cpuid].pm_pcid; + d.pad = 0; + d.addr = 0; + invpcid(&d, INVPCID_CTX); + } else { + pmap_pti_pcid_invalidate(ucr3, kcr3); + } + } + + PCPU_SET(kcr3, kcr3 | CR3_PCID_SAVE); + PCPU_SET(ucr3, ucr3 | CR3_PCID_SAVE); + if (cached) + PCPU_INC(pm_save_cnt); +} + +static void +pmap_activate_sw_pcid_invpcid_pti(pmap_t pmap, u_int cpuid) +{ + + pmap_activate_sw_pcid_pti(pmap, cpuid, true); + pmap_activate_sw_pti_post(pmap); +} + +static void +pmap_activate_sw_pcid_noinvpcid_pti(pmap_t pmap, u_int cpuid) +{ + register_t rflags; + + /* + * If the INVPCID instruction is not available, + * invltlb_pcid_handler() is used to handle an invalidate_all + * IPI, which checks for curpmap == smp_tlb_pmap. The below + * sequence of operations has a window where %CR3 is loaded + * with the new pmap's PML4 address, but the curpmap value has + * not yet been updated. This causes the invltlb IPI handler, + * which is called between the updates, to execute as a NOP, + * which leaves stale TLB entries. + * + * Note that the most typical use of pmap_activate_sw(), from + * the context switch, is immune to this race, because + * interrupts are disabled (while the thread lock is owned), + * and the IPI happens after curpmap is updated. Protect + * other callers in a similar way, by disabling interrupts + * around the %cr3 register reload and curpmap assignment. + */ + rflags = intr_disable(); + pmap_activate_sw_pcid_pti(pmap, cpuid, false); + intr_restore(rflags); + pmap_activate_sw_pti_post(pmap); +} + +static void +pmap_activate_sw_pcid_nopti(pmap_t pmap, u_int cpuid) +{ + uint64_t cached, cr3; + + cached = pmap_pcid_alloc_checked(pmap, cpuid); + cr3 = rcr3(); + if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) + load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid | + cached); + PCPU_SET(curpmap, pmap); + if (cached) + PCPU_INC(pm_save_cnt); +} + +static void +pmap_activate_sw_pcid_noinvpcid_nopti(pmap_t pmap, u_int cpuid) +{ + register_t rflags; + + rflags = intr_disable(); + pmap_activate_sw_pcid_nopti(pmap, cpuid); + intr_restore(rflags); +} + +static void +pmap_activate_sw_nopcid_nopti(pmap_t pmap, u_int cpuid __unused) +{ + + load_cr3(pmap->pm_cr3); + PCPU_SET(curpmap, pmap); +} + +static void +pmap_activate_sw_nopcid_pti(pmap_t pmap, u_int cpuid __unused) +{ + + pmap_activate_sw_nopcid_nopti(pmap, cpuid); + PCPU_SET(kcr3, pmap->pm_cr3); + PCPU_SET(ucr3, pmap->pm_ucr3); + pmap_activate_sw_pti_post(pmap); +} + +DEFINE_IFUNC(static, void, pmap_activate_sw_mode, (pmap_t, u_int), static) +{ + + if (pmap_pcid_enabled && pti && invpcid_works) + return (pmap_activate_sw_pcid_invpcid_pti); + else if (pmap_pcid_enabled && pti && !invpcid_works) + return (pmap_activate_sw_pcid_noinvpcid_pti); + else if (pmap_pcid_enabled && !pti && invpcid_works) + return (pmap_activate_sw_pcid_nopti); + else if (pmap_pcid_enabled && !pti && !invpcid_works) + return (pmap_activate_sw_pcid_noinvpcid_nopti); + else if (!pmap_pcid_enabled && pti) + return (pmap_activate_sw_nopcid_pti); + else /* if (!pmap_pcid_enabled && !pti) */ + return (pmap_activate_sw_nopcid_nopti); +} + void pmap_activate_sw(struct thread *td) { pmap_t oldpmap, pmap; - struct invpcid_descr d; - uint64_t cached, cr3, kcr3, kern_pti_cached, rsp0, ucr3; - register_t rflags; u_int cpuid; - struct amd64tss *tssp; - rflags = 0; oldpmap = PCPU_GET(curpmap); pmap = vmspace_pmap(td->td_proc->p_vmspace); if (oldpmap == pmap) @@ -7456,91 +7617,7 @@ pmap_activate_sw(struct thread *td) #else CPU_SET(cpuid, &pmap->pm_active); #endif - cr3 = rcr3(); - if (pmap_pcid_enabled) { - cached = pmap_pcid_alloc(pmap, cpuid); - KASSERT(pmap->pm_pcids[cpuid].pm_pcid >= 0 && - pmap->pm_pcids[cpuid].pm_pcid < PMAP_PCID_OVERMAX, - ("pmap %p cpu %d pcid %#x", pmap, cpuid, - pmap->pm_pcids[cpuid].pm_pcid)); - KASSERT(pmap->pm_pcids[cpuid].pm_pcid != PMAP_PCID_KERN || - pmap == kernel_pmap, - ("non-kernel pmap thread %p pmap %p cpu %d pcid %#x", - td, pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); - - /* - * If the INVPCID instruction is not available, - * invltlb_pcid_handler() is used for handle - * invalidate_all IPI, which checks for curpmap == - * smp_tlb_pmap. Below operations sequence has a - * window where %CR3 is loaded with the new pmap's - * PML4 address, but curpmap value is not yet updated. - * This causes invltlb IPI handler, called between the - * updates, to execute as NOP, which leaves stale TLB - * entries. - * - * Note that the most typical use of - * pmap_activate_sw(), from the context switch, is - * immune to this race, because interrupts are - * disabled (while the thread lock is owned), and IPI - * happens after curpmap is updated. Protect other - * callers in a similar way, by disabling interrupts - * around the %cr3 register reload and curpmap - * assignment. - */ - if (!invpcid_works) - rflags = intr_disable(); - - kern_pti_cached = pti ? 0 : cached; - if (!kern_pti_cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) { - load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid | - kern_pti_cached); - } - PCPU_SET(curpmap, pmap); - if (pti) { - kcr3 = pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid; - ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[cpuid].pm_pcid | - PMAP_PCID_USER_PT; - - if (!cached && pmap->pm_ucr3 != PMAP_NO_CR3) { - /* - * Manually invalidate translations cached - * from the user page table. They are not - * flushed by reload of cr3 with the kernel - * page table pointer above. - */ - if (invpcid_works) { - d.pcid = PMAP_PCID_USER_PT | - pmap->pm_pcids[cpuid].pm_pcid; - d.pad = 0; - d.addr = 0; - invpcid(&d, INVPCID_CTX); - } else { - pmap_pti_pcid_invalidate(ucr3, kcr3); - } - } - - PCPU_SET(kcr3, kcr3 | CR3_PCID_SAVE); - PCPU_SET(ucr3, ucr3 | CR3_PCID_SAVE); - } - if (!invpcid_works) - intr_restore(rflags); - if (cached) - PCPU_INC(pm_save_cnt); - } else { - load_cr3(pmap->pm_cr3); - PCPU_SET(curpmap, pmap); - if (pti) { - PCPU_SET(kcr3, pmap->pm_cr3); - PCPU_SET(ucr3, pmap->pm_ucr3); - } - } - if (pmap->pm_ucr3 != PMAP_NO_CR3) { - rsp0 = ((vm_offset_t)PCPU_PTR(pti_stack) + - PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful; - tssp = PCPU_GET(tssp); - tssp->tss_rsp0 = rsp0; - } + pmap_activate_sw_mode(pmap, cpuid); #ifdef SMP CPU_CLR_ATOMIC(cpuid, &oldpmap->pm_active); #else From owner-svn-src-head@freebsd.org Mon Sep 17 16:16:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 861C310A17E6; Mon, 17 Sep 2018 16:16:58 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3828B829EA; Mon, 17 Sep 2018 16:16:58 +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 18E79135AD; Mon, 17 Sep 2018 16:16:58 +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 w8HGGvOY064929; Mon, 17 Sep 2018 16:16:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HGGv7Q064928; Mon, 17 Sep 2018 16:16:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201809171616.w8HGGv7Q064928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 17 Sep 2018 16:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338724 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 338724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 16:16:58 -0000 Author: markj Date: Mon Sep 17 16:16:57 2018 New Revision: 338724 URL: https://svnweb.freebsd.org/changeset/base/338724 Log: Fix an nvpair leak in vdev_geom_read_config(). Also change the behaviour slightly: instead of freeing "config" if the last nvlist doesn't pass the tests, return the last config that did pass those tests. This matches the comment at the beginning of the function. PR: 230704 Diagnosed by: avg Reviewed by: asomers, avg Tested by: Mark Martinec Approved by: re (gjb) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D17202 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Sep 17 15:53:29 2018 (r338723) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Mon Sep 17 16:16:57 2018 (r338724) @@ -415,9 +415,10 @@ vdev_geom_io(struct g_consumer *cp, int *cmds, void ** * least one valid label was found. */ static int -vdev_geom_read_config(struct g_consumer *cp, nvlist_t **config) +vdev_geom_read_config(struct g_consumer *cp, nvlist_t **configp) { struct g_provider *pp; + nvlist_t *config; vdev_phys_t *vdev_lists[VDEV_LABELS]; char *buf; size_t buflen; @@ -442,7 +443,6 @@ vdev_geom_read_config(struct g_consumer *cp, nvlist_t buflen = sizeof(vdev_lists[0]->vp_nvlist); - *config = NULL; /* Create all of the IO requests */ for (l = 0; l < VDEV_LABELS; l++) { cmds[l] = BIO_READ; @@ -458,6 +458,7 @@ vdev_geom_read_config(struct g_consumer *cp, nvlist_t VDEV_LABELS); /* Parse the labels */ + config = *configp = NULL; nlabels = 0; for (l = 0; l < VDEV_LABELS; l++) { if (errors[l] != 0) @@ -465,24 +466,26 @@ vdev_geom_read_config(struct g_consumer *cp, nvlist_t buf = vdev_lists[l]->vp_nvlist; - if (nvlist_unpack(buf, buflen, config, 0) != 0) + if (nvlist_unpack(buf, buflen, &config, 0) != 0) continue; - if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE, + if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE, &state) != 0 || state > POOL_STATE_L2CACHE) { - nvlist_free(*config); - *config = NULL; + nvlist_free(config); continue; } if (state != POOL_STATE_SPARE && state != POOL_STATE_L2CACHE && - (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG, + (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg) != 0 || txg == 0)) { - nvlist_free(*config); - *config = NULL; + nvlist_free(config); continue; } + + if (*configp != NULL) + nvlist_free(*configp); + *configp = config; nlabels++; } From owner-svn-src-head@freebsd.org Mon Sep 17 17:18:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E836A10A2775; Mon, 17 Sep 2018 17:18: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E5C0842C9; Mon, 17 Sep 2018 17:18: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 94F0213FA0; Mon, 17 Sep 2018 17:18: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 w8HHIs76095199; Mon, 17 Sep 2018 17:18:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HHIsMh095198; Mon, 17 Sep 2018 17:18:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201809171718.w8HHIsMh095198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 17 Sep 2018 17:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338725 - head/sys/x86/isa X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/x86/isa X-SVN-Commit-Revision: 338725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 17:18:55 -0000 Author: jhb Date: Mon Sep 17 17:18:54 2018 New Revision: 338725 URL: https://svnweb.freebsd.org/changeset/base/338725 Log: Fix a regression in r338360 when booting an x86 machine without APIC. The atpic_register_sources callback tries to avoid registering interrupt sources that would collide with an I/O APIC. However, the previous implementation was failing to register IRQs 8-15 since the slave PIC saw valid IRQs from the master and assumed an I/O APIC was present. To fix, go back to registering all 8259A interrupt sources in one loop when the master's register_sources method is invoked. PR: 231291 Approved by: re (kib) MFC after: 1 month Modified: head/sys/x86/isa/atpic.c Modified: head/sys/x86/isa/atpic.c ============================================================================== --- head/sys/x86/isa/atpic.c Mon Sep 17 16:16:57 2018 (r338724) +++ head/sys/x86/isa/atpic.c Mon Sep 17 17:18:54 2018 (r338725) @@ -221,14 +221,20 @@ atpic_register_sources(struct pic *pic) * that APIC ISA routing and allowing the ATPIC source for that IRQ * to leak through. We used to depend on this feature for routing * IRQ0 via mixed mode, but now we don't use mixed mode at all. + * + * To avoid the slave not register sources after the master + * registers its sources, register all IRQs when this function is + * called on the master. */ + if (ap != &atpics[MASTER]) + return; for (i = 0; i < NUM_ISA_IRQS; i++) if (intr_lookup_source(i) != NULL) return; /* Loop through all interrupt sources and add them. */ - for (i = 0, ai = atintrs + ap->at_irqbase; i < 8; i++, ai++) { - if (ap->at_irqbase + i == ICU_SLAVEID) + for (i = 0, ai = atintrs; i < NUM_ISA_IRQS; i++, ai++) { + if (i == ICU_SLAVEID) continue; intr_register_source(&ai->at_intsrc); } From owner-svn-src-head@freebsd.org Mon Sep 17 18:56:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF5DF10A4C1F; Mon, 17 Sep 2018 18:56:49 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61BF2885EE; Mon, 17 Sep 2018 18:56:49 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56DAB14FFE; Mon, 17 Sep 2018 18:56:49 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8HIundr048344; Mon, 17 Sep 2018 18:56:49 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HIumkV048338; Mon, 17 Sep 2018 18:56:48 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809171856.w8HIumkV048338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Mon, 17 Sep 2018 18:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338729 - in head: etc lib/libc/net X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc lib/libc/net X-SVN-Commit-Revision: 338729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 18:56:50 -0000 Author: brd Date: Mon Sep 17 18:56:47 2018 New Revision: 338729 URL: https://svnweb.freebsd.org/changeset/base/338729 Log: Move hosts, hosts.equiv, networks, nsswitch.conf, protocols to lib/libc/net/ This uses relative paths to make it more specific to avoid any potential future problems with .PATH and leverages CONFS. libc was picked as the destination location for these because of the syscalls that use these files as the lowest level place they are referenced. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17164 Added: head/lib/libc/net/hosts - copied unchanged from r338728, head/etc/hosts head/lib/libc/net/hosts.equiv - copied unchanged from r338728, head/etc/hosts.equiv head/lib/libc/net/networks - copied unchanged from r338728, head/etc/networks head/lib/libc/net/nsswitch.conf - copied unchanged from r338728, head/etc/nsswitch.conf head/lib/libc/net/protocols - copied unchanged from r338728, head/etc/protocols Deleted: head/etc/hosts head/etc/hosts.equiv head/etc/networks head/etc/nsswitch.conf head/etc/protocols Modified: head/etc/Makefile head/lib/libc/net/Makefile.inc Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Mon Sep 17 18:46:30 2018 (r338728) +++ head/etc/Makefile Mon Sep 17 18:56:47 2018 (r338729) @@ -16,18 +16,13 @@ BIN1= \ dhclient.conf \ disktab \ group \ - hosts \ hosts.allow \ - hosts.equiv \ libalias.conf \ libmap.conf \ login.access \ mac.conf \ netconfig \ - networks \ - nsswitch.conf \ phones \ - protocols \ rc.bsdextended \ rc.firewall \ remote \ @@ -159,10 +154,6 @@ distribution: ${SRCTOP}/sys/${MACHINE}/conf/GENERIC.hints \ ${DESTDIR}/boot/device.hints .endif -.endif -.if ${MK_NIS} == "no" - sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ - ${DESTDIR}/etc/nsswitch.conf .endif MTREE_CMD?= mtree Modified: head/lib/libc/net/Makefile.inc ============================================================================== --- head/lib/libc/net/Makefile.inc Mon Sep 17 18:46:30 2018 (r338728) +++ head/lib/libc/net/Makefile.inc Mon Sep 17 18:56:47 2018 (r338729) @@ -4,6 +4,7 @@ # machine-independent net sources .PATH: ${LIBC_SRCTOP}/net +CONFS+= net/hosts net/hosts.equiv net/networks net/nsswitch.conf net/protocols SRCS+= base64.c ether_addr.c eui64.c \ gai_strerror.c getaddrinfo.c \ gethostbydns.c gethostbyht.c gethostbynis.c gethostnamadr.c \ @@ -123,3 +124,8 @@ SRCS+= hesiod.c MAN+= hesiod.3 .endif +.if ${MK_NIS} == "no" +afterinstallconfig: + sed -i "" -e 's/.*_compat:/# &/' -e 's/compat$$/files/' \ + ${DESTDIR}/etc/nsswitch.conf +.endif Copied: head/lib/libc/net/hosts (from r338728, head/etc/hosts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/net/hosts Mon Sep 17 18:56:47 2018 (r338729, copy of r338728, head/etc/hosts) @@ -0,0 +1,31 @@ +# $FreeBSD$ +# +# Host Database +# +# This file should contain the addresses and aliases for local hosts that +# share this file. Replace 'my.domain' below with the domainname of your +# machine. +# +# In the presence of the domain name service or NIS, this file may +# not be consulted at all; see /etc/nsswitch.conf for the resolution order. +# +# +::1 localhost localhost.my.domain +127.0.0.1 localhost localhost.my.domain +# +# Imaginary network. +#10.0.0.2 myname.my.domain myname +#10.0.0.3 myfriend.my.domain myfriend +# +# According to RFC 1918, you can use the following IP networks for +# private nets which will never be connected to the Internet: +# +# 10.0.0.0 - 10.255.255.255 +# 172.16.0.0 - 172.31.255.255 +# 192.168.0.0 - 192.168.255.255 +# +# In case you want to be able to connect to the Internet, you need +# real official assigned numbers. Do not try to invent your own network +# numbers but instead get one from your network provider (if any) or +# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.) +# Copied: head/lib/libc/net/hosts.equiv (from r338728, head/etc/hosts.equiv) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/net/hosts.equiv Mon Sep 17 18:56:47 2018 (r338729, copy of r338728, head/etc/hosts.equiv) @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +#localhost +#my_very_good_friend.domain Copied: head/lib/libc/net/networks (from r338728, head/etc/networks) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/net/networks Mon Sep 17 18:56:47 2018 (r338729, copy of r338728, head/etc/networks) @@ -0,0 +1,17 @@ +# $FreeBSD$ +# @(#)networks 5.1 (Berkeley) 6/30/90 +# +# Your Local Networks Database +# +your-net 127 # your comment +your-netmask 255.255.255 # subnet mask for your-net + +# +# Your subnets +# +subnet1 127.0.1 alias1 # comment 1 +subnet2 127.0.2 alias2 # comment 2 + +# +# Internet networks (from nic.ddn.mil) +# Copied: head/lib/libc/net/nsswitch.conf (from r338728, head/etc/nsswitch.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/net/nsswitch.conf Mon Sep 17 18:56:47 2018 (r338729, copy of r338728, head/etc/nsswitch.conf) @@ -0,0 +1,16 @@ +# +# nsswitch.conf(5) - name service switch configuration file +# $FreeBSD$ +# +group: compat +group_compat: nis +hosts: files dns +netgroup: compat +networks: files +passwd: compat +passwd_compat: nis +shells: files +services: compat +services_compat: nis +protocols: files +rpc: files Copied: head/lib/libc/net/protocols (from r338728, head/etc/protocols) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/net/protocols Mon Sep 17 18:56:47 2018 (r338729, copy of r338728, head/etc/protocols) @@ -0,0 +1,158 @@ +# +# Internet protocols +# +# $FreeBSD$ +# from: @(#)protocols 5.1 (Berkeley) 4/17/89 +# +# See also http://www.iana.org/assignments/protocol-numbers +# +ip 0 IP # internet protocol, pseudo protocol number +#hopopt 0 HOPOPT # hop-by-hop options for ipv6 +icmp 1 ICMP # internet control message protocol +igmp 2 IGMP # internet group management protocol +ggp 3 GGP # gateway-gateway protocol +ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') +st2 5 ST2 # ST2 datagram mode (RFC 1819) (officially ``ST'') +tcp 6 TCP # transmission control protocol +cbt 7 CBT # CBT, Tony Ballardie +egp 8 EGP # exterior gateway protocol +igp 9 IGP # any private interior gateway (Cisco: for IGRP) +bbn-rcc 10 BBN-RCC-MON # BBN RCC Monitoring +nvp 11 NVP-II # Network Voice Protocol +pup 12 PUP # PARC universal packet protocol +argus 13 ARGUS # ARGUS +emcon 14 EMCON # EMCON +xnet 15 XNET # Cross Net Debugger +chaos 16 CHAOS # Chaos +udp 17 UDP # user datagram protocol +mux 18 MUX # Multiplexing protocol +dcn 19 DCN-MEAS # DCN Measurement Subsystems +hmp 20 HMP # host monitoring protocol +prm 21 PRM # packet radio measurement protocol +xns-idp 22 XNS-IDP # Xerox NS IDP +trunk-1 23 TRUNK-1 # Trunk-1 +trunk-2 24 TRUNK-2 # Trunk-2 +leaf-1 25 LEAF-1 # Leaf-1 +leaf-2 26 LEAF-2 # Leaf-2 +rdp 27 RDP # "reliable datagram" protocol +irtp 28 IRTP # Internet Reliable Transaction Protocol +iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4 +netblt 30 NETBLT # Bulk Data Transfer Protocol +mfe-nsp 31 MFE-NSP # MFE Network Services Protocol +merit-inp 32 MERIT-INP # MERIT Internodal Protocol +dccp 33 DCCP # Datagram Congestion Control Protocol +3pc 34 3PC # Third Party Connect Protocol +idpr 35 IDPR # Inter-Domain Policy Routing Protocol +xtp 36 XTP # Xpress Transfer Protocol +ddp 37 DDP # Datagram Delivery Protocol +idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport Proto +tp++ 39 TP++ # TP++ Transport Protocol +il 40 IL # IL Transport Protocol +ipv6 41 IPV6 # ipv6 +sdrp 42 SDRP # Source Demand Routing Protocol +ipv6-route 43 IPV6-ROUTE # routing header for ipv6 +ipv6-frag 44 IPV6-FRAG # fragment header for ipv6 +idrp 45 IDRP # Inter-Domain Routing Protocol +rsvp 46 RSVP # Resource ReSerVation Protocol +gre 47 GRE # Generic Routing Encapsulation +dsr 48 DSR # Dynamic Source Routing Protocol +bna 49 BNA # BNA +esp 50 ESP # encapsulating security payload +ah 51 AH # authentication header +i-nlsp 52 I-NLSP # Integrated Net Layer Security TUBA +swipe 53 SWIPE # IP with Encryption +narp 54 NARP # NBMA Address Resolution Protocol +mobile 55 MOBILE # IP Mobility +tlsp 56 TLSP # Transport Layer Security Protocol +skip 57 SKIP # SKIP +ipv6-icmp 58 IPV6-ICMP icmp6 # ICMP for IPv6 +ipv6-nonxt 59 IPV6-NONXT # no next header for ipv6 +ipv6-opts 60 IPV6-OPTS # destination options for ipv6 +# 61 # any host internal protocol +cftp 62 CFTP # CFTP +# 63 # any local network +sat-expak 64 SAT-EXPAK # SATNET and Backroom EXPAK +kryptolan 65 KRYPTOLAN # Kryptolan +rvd 66 RVD # MIT Remote Virtual Disk Protocol +ippc 67 IPPC # Internet Pluribus Packet Core +# 68 # any distributed filesystem +sat-mon 69 SAT-MON # SATNET Monitoring +visa 70 VISA # VISA Protocol +ipcv 71 IPCV # Internet Packet Core Utility +cpnx 72 CPNX # Computer Protocol Network Executive +cphb 73 CPHB # Computer Protocol Heart Beat +wsn 74 WSN # Wang Span Network +pvp 75 PVP # Packet Video Protocol +br-sat-mon 76 BR-SAT-MON # Backroom SATNET Monitoring +sun-nd 77 SUN-ND # SUN ND PROTOCOL-Temporary +wb-mon 78 WB-MON # WIDEBAND Monitoring +wb-expak 79 WB-EXPAK # WIDEBAND EXPAK +iso-ip 80 ISO-IP # ISO Internet Protocol +vmtp 81 VMTP # Versatile Message Transport +secure-vmtp 82 SECURE-VMTP # SECURE-VMTP +vines 83 VINES # VINES +ttp 84 TTP # TTP +#iptm 84 IPTM # Protocol Internet Protocol Traffic +nsfnet-igp 85 NSFNET-IGP # NSFNET-IGP +dgp 86 DGP # Dissimilar Gateway Protocol +tcf 87 TCF # TCF +eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) +ospf 89 OSPFIGP # Open Shortest Path First IGP +sprite-rpc 90 Sprite-RPC # Sprite RPC Protocol +larp 91 LARP # Locus Address Resolution Protocol +mtp 92 MTP # Multicast Transport Protocol +ax.25 93 AX.25 # AX.25 Frames +ipip 94 IPIP # Yet Another IP encapsulation +micp 95 MICP # Mobile Internetworking Control Pro. +scc-sp 96 SCC-SP # Semaphore Communications Sec. Pro. +etherip 97 ETHERIP # Ethernet-within-IP Encapsulation +encap 98 ENCAP # Yet Another IP encapsulation +# 99 # any private encryption scheme +gmtp 100 GMTP # GMTP +ifmp 101 IFMP # Ipsilon Flow Management Protocol +pnni 102 PNNI # PNNI over IP +pim 103 PIM # Protocol Independent Multicast +aris 104 ARIS # ARIS +scps 105 SCPS # SCPS +qnx 106 QNX # QNX +a/n 107 A/N # Active Networks +ipcomp 108 IPComp # IP Payload Compression Protocol +snp 109 SNP # Sitara Networks Protocol +compaq-peer 110 Compaq-Peer # Compaq Peer Protocol +ipx-in-ip 111 IPX-in-IP # IPX in IP +carp 112 CARP vrrp # Common Address Redundancy Protocol +pgm 113 PGM # PGM Reliable Transport Protocol +# 114 # any 0-hop protocol +l2tp 115 L2TP # Layer Two Tunneling Protocol +ddx 116 DDX # D-II Data Exchange +iatp 117 IATP # Interactive Agent Transfer Protocol +stp 118 STP # Schedule Transfer Protocol +srp 119 SRP # SpectraLink Radio Protocol +uti 120 UTI # UTI +smp 121 SMP # Simple Message Protocol +sm 122 SM # SM +ptp 123 PTP # Performance Transparency Protocol +isis 124 ISIS # ISIS over IPv4 +fire 125 FIRE +crtp 126 CRTP # Combat Radio Transport Protocol +crudp 127 CRUDP # Combat Radio User Datagram +sscopmce 128 SSCOPMCE +iplt 129 IPLT +sps 130 SPS # Secure Packet Shield +pipe 131 PIPE # Private IP Encapsulation within IP +sctp 132 SCTP # Stream Control Transmission Protocol +fc 133 FC # Fibre Channel +rsvp-e2e-ignore 134 RSVP-E2E-IGNORE # Aggregation of RSVP for IP reservations +mobility-header 135 Mobility-Header # Mobility Support in IPv6 +udplite 136 UDPLite # The UDP-Lite Protocol +mpls-in-ip 137 MPLS-IN-IP # Encapsulating MPLS in IP +manet 138 MANET # MANET Protocols (RFC5498) +hip 139 HIP # Host Identity Protocol (RFC5201) +shim6 140 SHIM6 # Shim6 Protocol (RFC5533) +wesp 141 WESP # Wrapped Encapsulating Security Payload (RFC5840) +rohc 142 ROHC # Robust Header Compression (RFC5858) +# 138-254 # Unassigned +pfsync 240 PFSYNC # PF Synchronization +# 253-254 # Use for experimentation and testing (RFC3692) +# 255 # Reserved +divert 258 DIVERT # Divert pseudo-protocol [non IANA] From owner-svn-src-head@freebsd.org Mon Sep 17 19:20:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AC2310A51E7; Mon, 17 Sep 2018 19:20:52 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C78D589172; Mon, 17 Sep 2018 19:20:51 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C275815358; Mon, 17 Sep 2018 19:20:51 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8HJKpKL059188; Mon, 17 Sep 2018 19:20:51 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HJKp9q059183; Mon, 17 Sep 2018 19:20:51 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809171920.w8HJKp9q059183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Mon, 17 Sep 2018 19:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338732 - in head: etc lib/libc/rpc X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc lib/libc/rpc X-SVN-Commit-Revision: 338732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 19:20:52 -0000 Author: brd Date: Mon Sep 17 19:20:50 2018 New Revision: 338732 URL: https://svnweb.freebsd.org/changeset/base/338732 Log: Move rpc and netconfig to lib/libc/rpc/ This uses relative paths to make it more specific to avoid any potential future problems with .PATH and leverages CONFS. libc was picked as the destination location for these because of the syscalls that use these files as the lowest level place they are referenced. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17163 Added: head/lib/libc/rpc/netconfig - copied unchanged from r338731, head/etc/netconfig head/lib/libc/rpc/rpc - copied unchanged from r338731, head/etc/rpc Deleted: head/etc/netconfig head/etc/rpc Modified: head/etc/Makefile head/lib/libc/rpc/Makefile.inc Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Mon Sep 17 19:05:32 2018 (r338731) +++ head/etc/Makefile Mon Sep 17 19:20:50 2018 (r338732) @@ -21,12 +21,10 @@ BIN1= \ libmap.conf \ login.access \ mac.conf \ - netconfig \ phones \ rc.bsdextended \ rc.firewall \ remote \ - rpc \ termcap.small # NB: keep these sorted by MK_* knobs Modified: head/lib/libc/rpc/Makefile.inc ============================================================================== --- head/lib/libc/rpc/Makefile.inc Mon Sep 17 19:05:32 2018 (r338731) +++ head/lib/libc/rpc/Makefile.inc Mon Sep 17 19:20:50 2018 (r338732) @@ -2,6 +2,7 @@ # $FreeBSD$ .PATH: ${LIBC_SRCTOP}/rpc ${LIBC_SRCTOP}/. +CONFS= rpc/netconfig rpc/rpc SRCS+= auth_none.c auth_unix.c authunix_prot.c bindresvport.c clnt_bcast.c \ clnt_dg.c clnt_generic.c clnt_perror.c clnt_raw.c clnt_simple.c \ clnt_vc.c rpc_dtablesize.c getnetconfig.c getnetpath.c getrpcent.c \ Copied: head/lib/libc/rpc/netconfig (from r338731, head/etc/netconfig) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/rpc/netconfig Mon Sep 17 19:20:50 2018 (r338732, copy of r338731, head/etc/netconfig) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# The network configuration file. This file is currently only used in +# conjunction with the (TI-) RPC code in the C library, unlike its +# use in SVR4. +# +# Entries consist of: +# +# \ +# +# +# The and fields are always empty in FreeBSD. +# +udp6 tpi_clts v inet6 udp - - +tcp6 tpi_cots_ord v inet6 tcp - - +udp tpi_clts v inet udp - - +tcp tpi_cots_ord v inet tcp - - +rawip tpi_raw - inet - - - +local tpi_cots_ord - loopback - - - Copied: head/lib/libc/rpc/rpc (from r338731, head/etc/rpc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/rpc/rpc Mon Sep 17 19:20:50 2018 (r338732, copy of r338731, head/etc/rpc) @@ -0,0 +1,68 @@ +# +# $FreeBSD$ +# rpc 88/08/01 4.0 RPCSRC; from 1.12 99/07/25 SMI +# +rpcbind 100000 portmap sunrpc rpcbind +rstatd 100001 rstat rstat_svc rup perfmeter +rusersd 100002 rusers +nfs 100003 nfsprog +ypserv 100004 ypprog +mountd 100005 mount showmount +ypbind 100007 +walld 100008 rwall shutdown +yppasswdd 100009 yppasswd +etherstatd 100010 etherstat +rquotad 100011 rquotaprog quota rquota +sprayd 100012 spray +3270_mapper 100013 +rje_mapper 100014 +selection_svc 100015 selnsvc +database_svc 100016 +rexd 100017 rex +alis 100018 +sched 100019 +llockmgr 100020 +nlockmgr 100021 +x25.inr 100022 +statmon 100023 +status 100024 +bootparamd 100026 bootparam +ypupdated 100028 ypupdate +keyserv 100029 keyserver +sunlink_mapper 100033 +tfsd 100037 +nsed 100038 +nsemntd 100039 +showfhd 100043 showfh +ioadmd 100055 rpc.ioadmd +NETlicense 100062 +sunisamd 100065 +debug_svc 100066 dbsrv +cmsd 100068 +bugtraqd 100071 +kerbd 100078 +ttdbserver 100083 tooltalk +event 100101 na.event # SunNet Manager +logger 100102 na.logger # SunNet Manager +sync 100104 na.sync +hostperf 100107 na.hostperf +activity 100109 na.activity # SunNet Manager +hostmem 100112 na.hostmem +sample 100113 na.sample +x25 100114 na.x25 +ping 100115 na.ping +rpcnfs 100116 na.rpcnfs +hostif 100117 na.hostif +etherif 100118 na.etherif +iproutes 100120 na.iproutes +layers 100121 na.layers +snmp 100122 na.snmp snmp-cmc snmp-synoptics snmp-unisys snmp-utk +traffic 100123 na.traffic +nfs_acl 100227 +sadmind 100232 +nisd 100300 rpc.nisd +nispasswd 100303 rpc.nispasswdd +ufsd 100233 +pcnfsd 150001 pcnfs +amd 300019 +sgi_fam 391002 # file alteration monitor From owner-svn-src-head@freebsd.org Mon Sep 17 19:38:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 330A610A56C4; Mon, 17 Sep 2018 19:38:44 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D30C789C14; Mon, 17 Sep 2018 19:38: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 BEE0B156D4; Mon, 17 Sep 2018 19:38: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 w8HJchGB069082; Mon, 17 Sep 2018 19:38:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HJchX9069081; Mon, 17 Sep 2018 19:38:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809171938.w8HJchX9069081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 17 Sep 2018 19:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338733 - head/sys/ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/ufs/ufs X-SVN-Commit-Revision: 338733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 19:38:44 -0000 Author: kib Date: Mon Sep 17 19:38:43 2018 New Revision: 338733 URL: https://svnweb.freebsd.org/changeset/base/338733 Log: Do not upgrade the vnode lock to call getinoquota(). Doing so can deadlock when the thread already owns another vnode lock, e.g. during a rename, as was demonstrated by the reporter. In fact, there seems to be no need to force the call to getinoquota() always, because vn_open() locks vnode exclusively, and this is the most important case. To add to the point, directories where the dirent is added or removed, are locked exclusively as well. Reported by: bwidawsk Tested by: bwidawsk, pho (as part of the larger patch) Sponsored by: The FreeBSD Foundation Approved by: re (gjb) MFC after: 1 week Modified: head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Mon Sep 17 19:20:50 2018 (r338732) +++ head/sys/ufs/ufs/ufs_vnops.c Mon Sep 17 19:38:43 2018 (r338733) @@ -325,9 +325,6 @@ ufs_accessx(ap) struct inode *ip = VTOI(vp); accmode_t accmode = ap->a_accmode; int error; -#ifdef QUOTA - int relocked; -#endif #ifdef UFS_ACL struct acl *acl; acl_type_t type; @@ -350,32 +347,14 @@ ufs_accessx(ap) * Inode is accounted in the quotas only if struct * dquot is attached to it. VOP_ACCESS() is called * from vn_open_cred() and provides a convenient - * point to call getinoquota(). + * point to call getinoquota(). The lock mode is + * exclusive when the file is opening for write. */ - if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { - - /* - * Upgrade vnode lock, since getinoquota() - * requires exclusive lock to modify inode. - */ - relocked = 1; - vhold(vp); - vn_lock(vp, LK_UPGRADE | LK_RETRY); - VI_LOCK(vp); - if (vp->v_iflag & VI_DOOMED) { - vdropl(vp); - error = ENOENT; - goto relock; - } - vdropl(vp); - } else - relocked = 0; - error = getinoquota(ip); -relock: - if (relocked) - vn_lock(vp, LK_DOWNGRADE | LK_RETRY); - if (error != 0) - return (error); + if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) { + error = getinoquota(ip); + if (error != 0) + return (error); + } #endif break; default: From owner-svn-src-head@freebsd.org Mon Sep 17 20:15:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D73AB10A644A; Mon, 17 Sep 2018 20:15:19 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DB418B494; Mon, 17 Sep 2018 20:15:19 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8421B15D41; Mon, 17 Sep 2018 20:15:19 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8HKFJ1d090584; Mon, 17 Sep 2018 20:15:19 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HKFJO2090583; Mon, 17 Sep 2018 20:15:19 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201809172015.w8HKFJO2090583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 17 Sep 2018 20:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338734 - head/sys/dev/bxe X-SVN-Group: head X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: head/sys/dev/bxe X-SVN-Commit-Revision: 338734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 20:15:20 -0000 Author: davidcs Date: Mon Sep 17 20:15:18 2018 New Revision: 338734 URL: https://svnweb.freebsd.org/changeset/base/338734 Log: Fixed isses: State check before enqueuing transmit task in bxe_link_attn() routine. State check before invoking bxe_nic_unload in bxe_shutdown(). Submitted by:Vaishali.Kulkarni@cavium.com Approved by:re(gjb) Modified: head/sys/dev/bxe/bxe.c Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Mon Sep 17 19:38:43 2018 (r338733) +++ head/sys/dev/bxe/bxe.c Mon Sep 17 20:15:18 2018 (r338734) @@ -7076,13 +7076,13 @@ bxe_link_attn(struct bxe_softc *sc) if (sc->state == BXE_STATE_OPEN) { bxe_stats_handle(sc, STATS_EVENT_LINK_UP); + /* Restart tx when the link comes back. */ + FOR_EACH_ETH_QUEUE(sc, i) { + fp = &sc->fp[i]; + taskqueue_enqueue(fp->tq, &fp->tx_task); + } } - /* Restart tx when the link comes back. */ - FOR_EACH_ETH_QUEUE(sc, i) { - fp = &sc->fp[i]; - taskqueue_enqueue(fp->tq, &fp->tx_task); - } } if (sc->link_vars.link_up && sc->link_vars.line_speed) { @@ -16279,9 +16279,11 @@ bxe_shutdown(device_t dev) /* stop the periodic callout */ bxe_periodic_stop(sc); - BXE_CORE_LOCK(sc); - bxe_nic_unload(sc, UNLOAD_NORMAL, FALSE); - BXE_CORE_UNLOCK(sc); + if (sc->state != BXE_STATE_CLOSED) { + BXE_CORE_LOCK(sc); + bxe_nic_unload(sc, UNLOAD_NORMAL, FALSE); + BXE_CORE_UNLOCK(sc); + } return (0); } From owner-svn-src-head@freebsd.org Mon Sep 17 22:14:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DBB910A8A50; Mon, 17 Sep 2018 22:14:54 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E45868EFCF; Mon, 17 Sep 2018 22:14:53 +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 D44DA170E1; Mon, 17 Sep 2018 22:14:53 +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 w8HMErKq052071; Mon, 17 Sep 2018 22:14:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HMErR7052070; Mon, 17 Sep 2018 22:14:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201809172214.w8HMErR7052070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 17 Sep 2018 22:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338735 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 338735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 22:14:54 -0000 Author: bdrewery Date: Mon Sep 17 22:14:53 2018 New Revision: 338735 URL: https://svnweb.freebsd.org/changeset/base/338735 Log: DIRS: installdirs should also be .PHONY Sponsored by: Dell EMC Approved by: re (gjb, kib) Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Mon Sep 17 20:15:18 2018 (r338734) +++ head/share/mk/bsd.sys.mk Mon Sep 17 22:14:53 2018 (r338735) @@ -250,8 +250,8 @@ PHONY_NOTMAIN = analyze afterdepend afterinstall all b beforelinking build build-tools buildconfig buildfiles \ buildincludes check checkdpadd clean cleandepend cleandir \ cleanobj configure depend distclean distribute exe \ - files html includes install installconfig installfiles \ - installincludes lint obj objlink objs objwarn \ + files html includes install installconfig installdirs \ + installfiles installincludes lint obj objlink objs objwarn \ realinstall tags whereobj # we don't want ${PROG} to be PHONY From owner-svn-src-head@freebsd.org Mon Sep 17 22:15:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43B6210A8A71; Mon, 17 Sep 2018 22:15:07 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AB498F0CC; Mon, 17 Sep 2018 22:15:06 +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 84D28170E2; Mon, 17 Sep 2018 22:15:06 +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 w8HMF6K8052134; Mon, 17 Sep 2018 22:15:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HMF69u052133; Mon, 17 Sep 2018 22:15:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201809172215.w8HMF69u052133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 17 Sep 2018 22:15:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338736 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 338736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 22:15:07 -0000 Author: bdrewery Date: Mon Sep 17 22:15:06 2018 New Revision: 338736 URL: https://svnweb.freebsd.org/changeset/base/338736 Log: PROGS: Don't redundantly process DIRS. Sponsored by: Dell EMC Approved by: re (gjb) Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Mon Sep 17 22:14:53 2018 (r338735) +++ head/share/mk/bsd.progs.mk Mon Sep 17 22:15:06 2018 (r338736) @@ -77,7 +77,7 @@ stage_as.prog.${_prog}: ${_prog} .ifdef _RECURSING_PROGS MK_STAGING= no -_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS CONFGROUPS FILESGROUPS INCSGROUPS \ +_PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS CONFGROUPS DIRS FILESGROUPS INCSGROUPS \ SCRIPTS .for v in ${_PROGS_GLOBAL_VARS} $v = From owner-svn-src-head@freebsd.org Mon Sep 17 22:15:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C6D110A8A98; Mon, 17 Sep 2018 22:15:10 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D7D9F8F0E2; Mon, 17 Sep 2018 22:15:09 +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 D2E57170E3; Mon, 17 Sep 2018 22:15:09 +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 w8HMF93U052182; Mon, 17 Sep 2018 22:15:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HMF9NG052181; Mon, 17 Sep 2018 22:15:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201809172215.w8HMF9NG052181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 17 Sep 2018 22:15:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338737 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 338737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 22:15:10 -0000 Author: bdrewery Date: Mon Sep 17 22:15:09 2018 New Revision: 338737 URL: https://svnweb.freebsd.org/changeset/base/338737 Log: installdirs can be a recursive/standalone target. Sponsored by: Dell EMC Approved by: re (gjb) Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Mon Sep 17 22:15:06 2018 (r338736) +++ head/share/mk/bsd.subdir.mk Mon Sep 17 22:15:09 2018 (r338737) @@ -46,6 +46,7 @@ SUBDIR_TARGETS+= \ all all-man analyze buildconfig buildfiles buildincludes \ checkdpadd clean cleandepend cleandir cleanilinks \ cleanobj depend distribute files includes installconfig \ + installdirs \ installfiles installincludes print-dir realinstall \ maninstall manlint ${_obj} objlink tags \ @@ -53,7 +54,7 @@ SUBDIR_TARGETS+= \ STANDALONE_SUBDIR_TARGETS+= \ all-man buildconfig buildfiles buildincludes check checkdpadd \ clean cleandepend cleandir cleanilinks cleanobj files includes \ - installconfig installincludes installfiles print-dir \ + installconfig installdirs installincludes installfiles print-dir \ maninstall manlint obj objlink # It is safe to install in parallel when staging. From owner-svn-src-head@freebsd.org Mon Sep 17 22:15:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3DBC10A8ABA; Mon, 17 Sep 2018 22:15:15 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBBDF8F1C0; Mon, 17 Sep 2018 22:15:13 +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 4BE1F170E4; Mon, 17 Sep 2018 22:15:13 +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 w8HMFDmV052227; Mon, 17 Sep 2018 22:15:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8HMFDMs052226; Mon, 17 Sep 2018 22:15:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201809172215.w8HMFDMs052226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 17 Sep 2018 22:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338738 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 338738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 17 Sep 2018 22:15:15 -0000 Author: bdrewery Date: Mon Sep 17 22:15:12 2018 New Revision: 338738 URL: https://svnweb.freebsd.org/changeset/base/338738 Log: DIRS: Rework how duplicated dirs are installed. - Warn if multiple DIRS have conflicting metadata - This fixes META_MODE writing to a very long .meta file that contained the full DESTDIR path. Reported by: sjg, jonathan Sponsored by: Dell EMC Approved by: re (gjb) Modified: head/share/mk/bsd.dirs.mk Modified: head/share/mk/bsd.dirs.mk ============================================================================== --- head/share/mk/bsd.dirs.mk Mon Sep 17 22:15:09 2018 (r338737) +++ head/share/mk/bsd.dirs.mk Mon Sep 17 22:15:12 2018 (r338738) @@ -27,18 +27,29 @@ ${dir}TAG_ARGS= -T ${${dir}TAGS:[*]:S/ /,/g} . endif installdirs: installdirs-${dir} - -installdirs-${dir}: installdirs-${DESTDIR}${${dir}} - -. if !target(installdirs-${DESTDIR}${${dir}}) -installdirs-${DESTDIR}${${dir}}: - @${ECHO} installing DIRS ${dir} +# Coalesce duplicate destdirs +. if !defined(_uniquedirs_${${dir}}) +_uniquedirs_${${dir}}= ${dir} +_alldirs_${dir}= ${dir} +installdirs-${dir}: .PHONY + @${ECHO} installing DIRS ${_alldirs_${dir}} ${INSTALL} ${${dir}TAG_ARGS} -d -m ${${dir}_MODE} -o ${${dir}_OWN} \ -g ${${dir}_GRP} ${${dir}_FLAG} ${DESTDIR}${${dir}} -. endif -. endif - -realinstall: installdirs-${dir} +. else +_uniquedir:= ${_uniquedirs_${${dir}}} +_alldirs_${_uniquedir}+=${dir} +# Connect to the single target +installdirs-${dir}: installdirs-${_uniquedir} +# Validate that duplicate dirs have the same metadata. +. for v in TAG_ARGS _MODE _OWN _GRP _FLAG +. if ${${dir}${v}:Uunset} != ${${_uniquedir}${v}:Uunset} +. warning ${RELDIR}: ${dir}${v} (${${dir}${v}:U}) does not match ${_uniquedir}${v} (${${_uniquedir}${v}:U}) but both install to ${${dir}} +. endif +. endfor +. endif # !defined(_uniquedirs_${${dir}}) +. endif # defined(${dir}) && !empty(${dir}) . endfor + +realinstall: installdirs .endif From owner-svn-src-head@freebsd.org Tue Sep 18 00:10:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCB7310AAB38; Tue, 18 Sep 2018 00:10:30 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74C86724B4; Tue, 18 Sep 2018 00:10:30 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 519CC182B3; Tue, 18 Sep 2018 00:10:30 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8I0AUhJ011529; Tue, 18 Sep 2018 00:10:30 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8I0AUn7011528; Tue, 18 Sep 2018 00:10:30 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809180010.w8I0AUn7011528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 18 Sep 2018 00:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338739 - head/sbin/dhclient X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/sbin/dhclient X-SVN-Commit-Revision: 338739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 00:10:31 -0000 Author: brd Date: Tue Sep 18 00:10:29 2018 New Revision: 338739 URL: https://svnweb.freebsd.org/changeset/base/338739 Log: Remove dhclient.conf from here in prep for the move of it from etc/. This is being done a separate step to ease importing into other VCSes. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17160 Deleted: head/sbin/dhclient/dhclient.conf From owner-svn-src-head@freebsd.org Tue Sep 18 00:11:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DE1A10AABB9; Tue, 18 Sep 2018 00:11:46 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 329E0726F0; Tue, 18 Sep 2018 00:11:46 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D92518409; Tue, 18 Sep 2018 00:11:46 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8I0Bkvb012541; Tue, 18 Sep 2018 00:11:46 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8I0BjJX012539; Tue, 18 Sep 2018 00:11:45 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809180011.w8I0BjJX012539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 18 Sep 2018 00:11:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338740 - in head: etc sbin/dhclient X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc sbin/dhclient X-SVN-Commit-Revision: 338740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 00:11:46 -0000 Author: brd Date: Tue Sep 18 00:11:45 2018 New Revision: 338740 URL: https://svnweb.freebsd.org/changeset/base/338740 Log: Move dhclient.conf to sbin/dhclient/. This also leverages CONFS for handling config files. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17160 Added: head/sbin/dhclient/dhclient.conf - copied unchanged from r338739, head/etc/dhclient.conf Deleted: head/etc/dhclient.conf Modified: head/etc/Makefile head/sbin/dhclient/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Sep 18 00:10:29 2018 (r338739) +++ head/etc/Makefile Tue Sep 18 00:11:45 2018 (r338740) @@ -13,7 +13,6 @@ SUBDIR+=sendmail .endif BIN1= \ - dhclient.conf \ disktab \ group \ hosts.allow \ Modified: head/sbin/dhclient/Makefile ============================================================================== --- head/sbin/dhclient/Makefile Tue Sep 18 00:10:29 2018 (r338739) +++ head/sbin/dhclient/Makefile Tue Sep 18 00:11:45 2018 (r338740) @@ -33,6 +33,7 @@ .include +CONFS= dhclient.conf PACKAGE=runtime SRCS= dhclient.c clparse.c alloc.c dispatch.c hash.c bpf.c options.c \ tree.c conflex.c errwarn.c inet.c packet.c convert.c tables.c \ Copied: head/sbin/dhclient/dhclient.conf (from r338739, head/etc/dhclient.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/dhclient/dhclient.conf Tue Sep 18 00:11:45 2018 (r338740, copy of r338739, head/etc/dhclient.conf) @@ -0,0 +1,8 @@ +# $FreeBSD$ +# +# This file is required by the ISC DHCP client. +# See ``man 5 dhclient.conf'' for details. +# +# In most cases an empty file is sufficient for most people as the +# defaults are usually fine. +# From owner-svn-src-head@freebsd.org Tue Sep 18 00:25:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FBCC10AAFCD; Tue, 18 Sep 2018 00:25:01 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C38572E69; Tue, 18 Sep 2018 00:25:01 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 339DA185DB; Tue, 18 Sep 2018 00:25:01 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8I0P1mO021505; Tue, 18 Sep 2018 00:25:01 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8I0P0qY021502; Tue, 18 Sep 2018 00:25:00 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809180025.w8I0P0qY021502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 18 Sep 2018 00:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338741 - in head: etc libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc libexec/rtld-elf X-SVN-Commit-Revision: 338741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 00:25:01 -0000 Author: brd Date: Tue Sep 18 00:25:00 2018 New Revision: 338741 URL: https://svnweb.freebsd.org/changeset/base/338741 Log: Move libmap.conf to libexec/rtld-elf/ This leverages CONFS to handle the config file install. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17161 Added: head/libexec/rtld-elf/libmap.conf - copied unchanged from r338740, head/etc/libmap.conf Deleted: head/etc/libmap.conf Modified: head/etc/Makefile head/libexec/rtld-elf/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Sep 18 00:11:45 2018 (r338740) +++ head/etc/Makefile Tue Sep 18 00:25:00 2018 (r338741) @@ -17,7 +17,6 @@ BIN1= \ group \ hosts.allow \ libalias.conf \ - libmap.conf \ login.access \ mac.conf \ phones \ Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Tue Sep 18 00:11:45 2018 (r338740) +++ head/libexec/rtld-elf/Makefile Tue Sep 18 00:25:00 2018 (r338741) @@ -8,6 +8,7 @@ PACKAGE= clibs MK_SSP= no +CONFS= libmap.conf PROG?= ld-elf.so.1 .if (${PROG:M*ld-elf32*} != "") TAGS+= lib32 Copied: head/libexec/rtld-elf/libmap.conf (from r338740, head/etc/libmap.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/rtld-elf/libmap.conf Tue Sep 18 00:25:00 2018 (r338741, copy of r338740, head/etc/libmap.conf) @@ -0,0 +1,2 @@ +# $FreeBSD$ +includedir /usr/local/etc/libmap.d From owner-svn-src-head@freebsd.org Tue Sep 18 00:32:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0056710AB156; Tue, 18 Sep 2018 00:32:11 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7FC1732B7; Tue, 18 Sep 2018 00:32:11 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2E8F18773; Tue, 18 Sep 2018 00:32:11 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8I0WBSt025539; Tue, 18 Sep 2018 00:32:11 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8I0WBPo025537; Tue, 18 Sep 2018 00:32:11 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809180032.w8I0WBPo025537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 18 Sep 2018 00:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338742 - in head: etc usr.sbin/amd/amd X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc usr.sbin/amd/amd X-SVN-Commit-Revision: 338742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 00:32:12 -0000 Author: brd Date: Tue Sep 18 00:32:10 2018 New Revision: 338742 URL: https://svnweb.freebsd.org/changeset/base/338742 Log: Move amd.map to usr.sbin/amd/amd/ This leverages CONFS to handle the install of the config file. Approved by: re (gjb), will (mentor) Differential Revision: https://reviews.freebsd.org/D17159 Added: head/usr.sbin/amd/amd/amd.map - copied unchanged from r338741, head/etc/amd.map Deleted: head/etc/amd.map Modified: head/etc/Makefile head/usr.sbin/amd/amd/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Sep 18 00:25:00 2018 (r338741) +++ head/etc/Makefile Tue Sep 18 00:32:10 2018 (r338742) @@ -27,10 +27,6 @@ BIN1= \ # NB: keep these sorted by MK_* knobs -.if ${MK_AMD} != "no" -BIN1+= amd.map -.endif - .if ${MK_LOCATE} != "no" BIN1+= ${SRCTOP}/usr.bin/locate/locate/locate.rc .endif Modified: head/usr.sbin/amd/amd/Makefile ============================================================================== --- head/usr.sbin/amd/amd/Makefile Tue Sep 18 00:25:00 2018 (r338741) +++ head/usr.sbin/amd/amd/Makefile Tue Sep 18 00:32:10 2018 (r338742) @@ -10,6 +10,7 @@ .PATH: ${SRCTOP}/contrib/amd/amd +CONFS= amd.map PROG= amd MAN= amd.8 SRCS= am_ops.c amd.c amfs_auto.c amfs_direct.c amfs_error.c amfs_generic.c Copied: head/usr.sbin/amd/amd/amd.map (from r338741, head/etc/amd.map) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/amd/amd/amd.map Tue Sep 18 00:32:10 2018 (r338742, copy of r338741, head/etc/amd.map) @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +/defaults type:=host;fs:=${autodir}/${rhost}/host;rhost:=${key} +* opts:=rw,grpid,resvport,vers=3,proto=tcp,nosuid,nodev From owner-svn-src-head@freebsd.org Tue Sep 18 01:24:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02266108006E; Tue, 18 Sep 2018 01:24:32 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABC9B75366; Tue, 18 Sep 2018 01:24:31 +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 A68AA19036; Tue, 18 Sep 2018 01:24:31 +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 w8I1OVPl052290; Tue, 18 Sep 2018 01:24:31 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8I1OVwq052288; Tue, 18 Sep 2018 01:24:31 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809180124.w8I1OVwq052288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 18 Sep 2018 01:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338743 - in head/sys: sys vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: sys vm X-SVN-Commit-Revision: 338743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 01:24:32 -0000 Author: mjg Date: Tue Sep 18 01:24:30 2018 New Revision: 338743 URL: https://svnweb.freebsd.org/changeset/base/338743 Log: vm: stop taking proc lock in mmap to satisfy racct if it is disabled Limits can be safely obtained with lim_cur from the thread. racct is compiled in but disabled by default. Note that racct enablement is a boot-only tunable. This eliminates second most common place of taking the lock while pkg building. While here don't take the lock in mlockall either. Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17210 Modified: head/sys/sys/racct.h head/sys/vm/vm_mmap.c Modified: head/sys/sys/racct.h ============================================================================== --- head/sys/sys/racct.h Tue Sep 18 00:32:10 2018 (r338742) +++ head/sys/sys/racct.h Tue Sep 18 01:24:30 2018 (r338743) @@ -164,6 +164,15 @@ extern struct mtx racct_lock; #define RACCT_UNLOCK() mtx_unlock(&racct_lock) #define RACCT_LOCK_ASSERT() mtx_assert(&racct_lock, MA_OWNED) +#define RACCT_PROC_LOCK(p) do { \ + if (__predict_false(racct_enable)) \ + PROC_LOCK(p); \ +} while (0) +#define RACCT_PROC_UNLOCK(p) do { \ + if (__predict_false(racct_enable)) \ + PROC_UNLOCK(p); \ +} while (0) + int racct_add(struct proc *p, int resource, uint64_t amount); void racct_add_cred(struct ucred *cred, int resource, uint64_t amount); void racct_add_force(struct proc *p, int resource, uint64_t amount); @@ -188,6 +197,9 @@ void racct_move(struct racct *dest, struct racct *src) void racct_proc_throttle(struct proc *p, int timeout); #else + +#define RACCT_PROC_LOCK(p) do { } while (0) +#define RACCT_PROC_UNLOCK(p) do { } while (0) static inline int racct_add(struct proc *p, int resource, uint64_t amount) Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Tue Sep 18 00:32:10 2018 (r338742) +++ head/sys/vm/vm_mmap.c Tue Sep 18 01:24:30 2018 (r338743) @@ -1055,12 +1055,8 @@ sys_mlockall(struct thread *td, struct mlockall_args * * a hard resource limit, return ENOMEM. */ if (!old_mlock && uap->how & MCL_CURRENT) { - PROC_LOCK(td->td_proc); - if (map->size > lim_cur(td, RLIMIT_MEMLOCK)) { - PROC_UNLOCK(td->td_proc); + if (map->size > lim_cur(td, RLIMIT_MEMLOCK)) return (ENOMEM); - } - PROC_UNLOCK(td->td_proc); } #ifdef RACCT if (racct_enable) { @@ -1445,21 +1441,21 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_siz curmap = map == &td->td_proc->p_vmspace->vm_map; if (curmap) { - PROC_LOCK(td->td_proc); - if (map->size + size > lim_cur_proc(td->td_proc, RLIMIT_VMEM)) { - PROC_UNLOCK(td->td_proc); + RACCT_PROC_LOCK(td->td_proc); + if (map->size + size > lim_cur(td, RLIMIT_VMEM)) { + RACCT_PROC_UNLOCK(td->td_proc); return (ENOMEM); } if (racct_set(td->td_proc, RACCT_VMEM, map->size + size)) { - PROC_UNLOCK(td->td_proc); + RACCT_PROC_UNLOCK(td->td_proc); return (ENOMEM); } if (!old_mlock && map->flags & MAP_WIREFUTURE) { if (ptoa(pmap_wired_count(map->pmap)) + size > - lim_cur_proc(td->td_proc, RLIMIT_MEMLOCK)) { + lim_cur(td, RLIMIT_MEMLOCK)) { racct_set_force(td->td_proc, RACCT_VMEM, map->size); - PROC_UNLOCK(td->td_proc); + RACCT_PROC_UNLOCK(td->td_proc); return (ENOMEM); } error = racct_set(td->td_proc, RACCT_MEMLOCK, @@ -1467,11 +1463,11 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_siz if (error != 0) { racct_set_force(td->td_proc, RACCT_VMEM, map->size); - PROC_UNLOCK(td->td_proc); + RACCT_PROC_UNLOCK(td->td_proc); return (error); } } - PROC_UNLOCK(td->td_proc); + RACCT_PROC_UNLOCK(td->td_proc); } /* From owner-svn-src-head@freebsd.org Tue Sep 18 01:38:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C39D41082699; Tue, 18 Sep 2018 01:38:45 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7944275F6B; Tue, 18 Sep 2018 01:38:45 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7423B19255; Tue, 18 Sep 2018 01:38:45 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8I1cjdp057334; Tue, 18 Sep 2018 01:38:45 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8I1cjqv057333; Tue, 18 Sep 2018 01:38:45 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809180138.w8I1cjqv057333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 18 Sep 2018 01:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338744 - head/lib/libc/rpc X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/lib/libc/rpc X-SVN-Commit-Revision: 338744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 01:38:45 -0000 Author: brd Date: Tue Sep 18 01:38:44 2018 New Revision: 338744 URL: https://svnweb.freebsd.org/changeset/base/338744 Log: Fix CONFS to append the value in this case. Approved by: re (blanket, pkgbase), will (mentor) Modified: head/lib/libc/rpc/Makefile.inc Modified: head/lib/libc/rpc/Makefile.inc ============================================================================== --- head/lib/libc/rpc/Makefile.inc Tue Sep 18 01:24:30 2018 (r338743) +++ head/lib/libc/rpc/Makefile.inc Tue Sep 18 01:38:44 2018 (r338744) @@ -2,7 +2,7 @@ # $FreeBSD$ .PATH: ${LIBC_SRCTOP}/rpc ${LIBC_SRCTOP}/. -CONFS= rpc/netconfig rpc/rpc +CONFS+= rpc/netconfig rpc/rpc SRCS+= auth_none.c auth_unix.c authunix_prot.c bindresvport.c clnt_bcast.c \ clnt_dg.c clnt_generic.c clnt_perror.c clnt_raw.c clnt_simple.c \ clnt_vc.c rpc_dtablesize.c getnetconfig.c getnetpath.c getrpcent.c \ From owner-svn-src-head@freebsd.org Tue Sep 18 01:40:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 414CA108292A; Tue, 18 Sep 2018 01:40:38 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EAE5C761A6; Tue, 18 Sep 2018 01:40:37 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5FAE1926B; Tue, 18 Sep 2018 01:40:37 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8I1ebj3057477; Tue, 18 Sep 2018 01:40:37 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8I1eb35057475; Tue, 18 Sep 2018 01:40:37 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809180140.w8I1eb35057475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 18 Sep 2018 01:40:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338745 - in head: etc lib/libc/posix1e X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc lib/libc/posix1e X-SVN-Commit-Revision: 338745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 01:40:38 -0000 Author: brd Date: Tue Sep 18 01:40:37 2018 New Revision: 338745 URL: https://svnweb.freebsd.org/changeset/base/338745 Log: Move mac.conf to lib/libc/posix1e/ This leverages CONFS to handle the install of the config file. Approved by: re (blanket, pkgbase), will (mentor) Differential Revision: https://reviews.freebsd.org/D17162 Added: head/lib/libc/posix1e/mac.conf - copied unchanged from r338744, head/etc/mac.conf Deleted: head/etc/mac.conf Modified: head/etc/Makefile head/lib/libc/posix1e/Makefile.inc Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Sep 18 01:38:44 2018 (r338744) +++ head/etc/Makefile Tue Sep 18 01:40:37 2018 (r338745) @@ -18,7 +18,6 @@ BIN1= \ hosts.allow \ libalias.conf \ login.access \ - mac.conf \ phones \ rc.bsdextended \ rc.firewall \ Modified: head/lib/libc/posix1e/Makefile.inc ============================================================================== --- head/lib/libc/posix1e/Makefile.inc Tue Sep 18 01:38:44 2018 (r338744) +++ head/lib/libc/posix1e/Makefile.inc Tue Sep 18 01:40:37 2018 (r338745) @@ -8,6 +8,7 @@ CFLAGS+=-D_ACL_PRIVATE subr_acl_nfs4.c: ${SRCTOP}/sys/kern/subr_acl_nfs4.c cat ${.ALLSRC} > ${.TARGET} +CONFS+= posix1e/mac.conf SRCS+= acl_branding.c \ acl_calc_mask.c \ acl_copy.c \ Copied: head/lib/libc/posix1e/mac.conf (from r338744, head/etc/mac.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/posix1e/mac.conf Tue Sep 18 01:40:37 2018 (r338745, copy of r338744, head/etc/mac.conf) @@ -0,0 +1,18 @@ +# +# $FreeBSD$ +# +# TrustedBSD MAC userland policy configuration file. Kernel modules +# export label information, and mac.conf indicates to userland +# applications what defaults they should use in the absence of any +# other user-provided information. +# + +# +# Default label set to be used by simple MAC applications +# + +default_labels file ?biba,?lomac,?mls,?sebsd +default_labels ifnet ?biba,?lomac,?mls,?sebsd +default_labels process ?biba,?lomac,?mls,?partition,?sebsd +default_labels socket ?biba,?lomac,?mls + From owner-svn-src-head@freebsd.org Tue Sep 18 08:17:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6249C1096FB7; Tue, 18 Sep 2018 08:17:36 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0320284053; Tue, 18 Sep 2018 08:17:36 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id D2E4F338; Tue, 18 Sep 2018 08:17:35 +0000 (UTC) Date: Tue, 18 Sep 2018 08:17:35 +0000 From: Alexey Dokuchaev To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338687 - in head/sys: dev/cpuctl x86/include x86/x86 Message-ID: <20180918081735.GA44081@FreeBSD.org> References: <201809141704.w8EH4aKd075044@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201809141704.w8EH4aKd075044@repo.freebsd.org> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 08:17:36 -0000 On Fri, Sep 14, 2018 at 05:04:36PM +0000, Mark Johnston wrote: > New Revision: 338687 > URL: https://svnweb.freebsd.org/changeset/base/338687 > > Log: > Log a message after a successful boot-time microcode update. Unfortunately, this had pessimized things on the unsuccessful side a bit. (See below.) > ... > @@ -130,36 +148,26 @@ ucode_intel_verify(struct ucode_intel_header *hdr, siz > uint32_t cksum, *data, size; > int i; > > - if (resid < sizeof(struct ucode_intel_header)) { > - log_err("truncated update header"); > + if (resid < sizeof(struct ucode_intel_header)) > return (1); > - } > size = hdr->total_size; > if (size == 0) > size = UCODE_INTEL_DEFAULT_DATA_SIZE + > sizeof(struct ucode_intel_header); > > - if (hdr->header_version != 1) { > - log_err("unexpected header version %u", hdr->header_version); > + if (hdr->header_version != 1) > return (1); > - } > - if (size % 16 != 0) { > - log_err("unexpected update size %u", hdr->total_size); > + if (size % 16 != 0) > return (1); > - } > - if (resid < size) { > - log_err("truncated update"); > + if (resid < size) > return (1); > - } > > cksum = 0; > data = (uint32_t *)hdr; > for (i = 0; i < size / sizeof(uint32_t); i++) > cksum += data[i]; > - if (cksum != 0) { > - log_err("checksum failed"); > + if (cksum != 0) > return (1); > - } > return (0); Looks like previous error messages were more detailed (truncated header, unexpected version or size, truncated update, checksum mismatch). Now it all falls under "microcode verification failed". Was this intentional? ./danfe From owner-svn-src-head@freebsd.org Tue Sep 18 10:53:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C017D109A859; Tue, 18 Sep 2018 10:53:08 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CEF08ACAC; Tue, 18 Sep 2018 10:53:08 +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 4E7881F06C; Tue, 18 Sep 2018 10:53:08 +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 w8IAr8Kk047400; Tue, 18 Sep 2018 10:53:08 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IAr7Rm047398; Tue, 18 Sep 2018 10:53:07 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201809181053.w8IAr7Rm047398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 18 Sep 2018 10:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338749 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 338749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 10:53:09 -0000 Author: tuexen Date: Tue Sep 18 10:53:07 2018 New Revision: 338749 URL: https://svnweb.freebsd.org/changeset/base/338749 Log: Remove unused code. Approved by: re (kib@) MFC after: 1 week Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_auth.h Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Tue Sep 18 07:29:01 2018 (r338748) +++ head/sys/netinet/sctp_auth.c Tue Sep 18 10:53:07 2018 (r338749) @@ -1060,40 +1060,6 @@ sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t return (digestlen); } -/*- - * verify the HMAC digest using the desired hash key, text, and HMAC - * algorithm. - * Returns -1 on error, 0 on success. - */ -int -sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, - uint8_t *text, uint32_t textlen, - uint8_t *digest, uint32_t digestlen) -{ - uint32_t len; - uint8_t temp[SCTP_AUTH_DIGEST_LEN_MAX]; - - /* sanity check the material and length */ - if ((key == NULL) || (keylen == 0) || - (text == NULL) || (textlen == 0) || (digest == NULL)) { - /* can't do HMAC with empty key or text or digest */ - return (-1); - } - len = sctp_get_hmac_digest_len(hmac_algo); - if ((len == 0) || (digestlen != len)) - return (-1); - - /* compute the expected hash */ - if (sctp_hmac(hmac_algo, key, keylen, text, textlen, temp) != len) - return (-1); - - if (memcmp(digest, temp, digestlen) != 0) - return (-1); - else - return (0); -} - - /* * computes the requested HMAC using a key struct (which may be modified if * the keylen exceeds the HMAC block len). Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Tue Sep 18 07:29:01 2018 (r338748) +++ head/sys/netinet/sctp_auth.h Tue Sep 18 10:53:07 2018 (r338749) @@ -178,9 +178,6 @@ extern uint32_t sctp_get_hmac_digest_len(uint16_t hmac extern uint32_t sctp_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, uint8_t *text, uint32_t textlen, uint8_t *digest); -extern int -sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, - uint8_t *text, uint32_t textlen, uint8_t *digest, uint32_t digestlen); extern uint32_t sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t *key, uint8_t *text, uint32_t textlen, uint8_t *digest); From owner-svn-src-head@freebsd.org Tue Sep 18 11:58:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08BBF109C0DC; Tue, 18 Sep 2018 11:58:07 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward104o.mail.yandex.net (forward104o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::607]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 679B88D25B; Tue, 18 Sep 2018 11:58:06 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback15j.mail.yandex.net (mxback15j.mail.yandex.net [IPv6:2a02:6b8:0:1619::91]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 878563D85599; Tue, 18 Sep 2018 14:58:03 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback15j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hLZlqUrbTQ-w3k8YcRl; Tue, 18 Sep 2018 14:58:03 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1537271883; bh=qQEFUaWmLOoe6eC23R8KhvVzi01Wo7oqO19XTMGdSeE=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=vRaLbkdEXMkaZ3ZC9Bs9D3IpwObNwXY6crinawSzdBj1cjyJog/i48UHErR1f/FF1 Hn7N6fHOWxl16EOjkblk8r6A5UJwy6poiInFDUhZlX+FuSfFX6UmdYKgelI7qfQM/L T85a3NNUGKMsbSF2rfb2EVkjWFROOxPi7d42pCVo= Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id GePb6dGOcZ-w25WVsnC; Tue, 18 Sep 2018 14:58:02 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1537271882; bh=qQEFUaWmLOoe6eC23R8KhvVzi01Wo7oqO19XTMGdSeE=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=sIVxw1IPaUGcDIs+oDEvvKYT1wByWIPBqGggDByk7AzBu/9Q5bbdYd0UxKC8t+wRl JKEERvvIyLpnd2Z9SoqO+UbGoqf80LO1wahJNyjWvtB9VwG0njS2qTmNyRfQRMczWI 1bO/pyZBIaA5XRCNjvAcgVwN7K0ZDpec4br+Rzhc= Authentication-Results: smtp4p.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: svn commit: r336439 - in head: share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/blake2 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe/crypto sys/dev/hifn sys/dev/safe sys/dev/s... To: cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807180056.w6I0uPb6000705@repo.freebsd.org> <6d1d2b23-978b-af1d-4022-16d09c9a42f5@yandex.ru> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= xsBNBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAHNIkFuZHJleSBWLiBFbHN1a292IDxhZUBmcmVlYnNkLm9yZz7CwHsEEwECACUCGwMGCwkI BwMCBhUIAgkKCwQWAgMBAh4BAheABQJMB/ruAhkBAAoJEAHF6gQQyKF6MLwH/3Ri/TZl9uo0 SepYWXOnxL6EaDVXDA+dLb1eLKC4PRBBjX29ttQ0KaWapiE6y5/AfzOPmRtHLrHYHjd/aiHX GMLHcYRXD+5GvdkK8iMALrZ28X0JXyuuZa8rAxWIWmCbYHNSBy2unqWgTI04Erodk90IALgM 9JeHN9sFqTM6zalrMnTzlcmel4kcjT3lyYw3vOKgoYLtsLhKZSbJoVVVlvRlGBpHFJI5AoYJ SyfXoN0rcX6k9X7Isp2K50YjqxV4v78xluh1puhwZyC0p8IShPrmrp9Oy9JkMX90o6UAXdGU KfdExJuGJfUZOFBTtNIMNIAKfMTjhpRhxONIr0emxxDOwE0ETAEXWQEIAJ2p6l9LBoqdH/0J PEFDY2t2gTvAuzz+8zs3R03dFuHcNbOwjvWCG0aOmVpAzkRa8egn5JB4sZaFUtKPYJEQ1Iu+ LUBwgvtXf4vWpzC67zs2dDuiW4LamH5p6xkTD61aHR7mCB3bg2TUjrDWn2Jt44cvoYxj3dz4 S49U1rc9ZPgD5axCNv45j72tggWlZvpefThP7xT1OlNTUqye2gAwQravXpZkl5JG4eOqJVIU X316iE3qso0iXRUtO7OseBf0PiVmk+wCahdreHOeOxK5jMhYkPKVn7z1sZiB7W2H2TojbmcK HZC22sz7Z/H36Lhg1+/RCnGzdEcjGc8oFHXHCxUAEQEAAcLAXwQYAQIACQUCTAEXWQIbDAAK CRABxeoEEMihegkYCAC3ivGYNe2taNm/4Nx5GPdzuaAJGKWksV+w9mo7dQvU+NmI2az5w8vw 98OmX7G0OV9snxMW+6cyNqBrVFTu33VVNzz9pnqNCHxGvj5dL5ltP160JV2zw2bUwJBYsgYQ WfyJJIM7l3gv5ZS3DGqaGIm9gOK1ANxfrR5PgPzvI9VxDhlr2juEVMZYAqPLEJe+SSxbwLoz BcFCNdDAyXcaAzXsx/E02YWm1hIWNRxanAe7Vlg7OL+gvLpdtrYCMg28PNqKNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: Date: Tue, 18 Sep 2018 14:56:53 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5FqrIpHqBPZoOAtu9ddhXkpe3QMcqY9jP" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 11:58:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5FqrIpHqBPZoOAtu9ddhXkpe3QMcqY9jP Content-Type: multipart/mixed; boundary="NUGoJLdKsOiUkR24bZRU2Hs1iDY49Jh0U"; protected-headers="v1" From: "Andrey V. Elsukov" To: cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r336439 - in head: share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/blake2 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe/crypto sys/dev/hifn sys/dev/safe sys/dev/s... References: <201807180056.w6I0uPb6000705@repo.freebsd.org> <6d1d2b23-978b-af1d-4022-16d09c9a42f5@yandex.ru> In-Reply-To: --NUGoJLdKsOiUkR24bZRU2Hs1iDY49Jh0U Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 17.08.2018 19:01, Conrad Meyer wrote: > Please file a PR and we can track it there. >=20 > The first suggestion that comes to mind is that the XFORMS_LOCK > protects modification of the xforms list =E2=80=94 not the lifetime of = objects > in it =E2=80=94 so drop the list lock over xf_init(). It does not appe= ar that > xform_init can race with xform_detach with the lock dropped. >=20 > xform_init is called only by key_setsaval, which is called in two > places: key_newsav, and key_update. In key_newsav, it is used on > sav's that are not yet linked in to a sah. In key_update, it is on > larbal sav's only (i.e., linked in to savtree_larval list but not > savtree_alive list). >=20 > xform_detach -> key_delete_xform only enumerates over the sahtree > looking for sah's with sav's present in savtree_alive with matching > xform. Since neither key_newsav nor key_update insert the sav into > the sah savtree_alive list until after setsaval -> xform_init, there > is no race between xform_init and xform_detach (protected by > SAHTREE_WLOCK). >=20 > I think this patch may be safe, and would remove the OOM-induced > deadlock condition: >=20 > --- netipsec/key.c (revision 337955) > +++ netipsec/key.c (working copy) > @@ -8676,11 +8676,13 @@ > XFORMS_LOCK(); > LIST_FOREACH(entry, &xforms, chain) { > if (entry->xf_type =3D=3D xftype) { > + XFORMS_UNLOCK(); > ret =3D (*entry->xf_init)(sav, entry); > - break; > + goto out; > } > } > XFORMS_UNLOCK(); > +out: > return (ret); > } I think this will work for now, but a potential problem can occur when xform that is going to be detached placed is some kld. I.e. some application invokes SA creation and another thread does kldunload ipsec_esp.ko (currently we don't have such module, but...) So, when we drop XFORMS_LOCK after check "entry->xf_type =3D=3D xftype", xf_init can become unavailable due to kldunload happened. --=20 WBR, Andrey V. Elsukov --NUGoJLdKsOiUkR24bZRU2Hs1iDY49Jh0U-- --5FqrIpHqBPZoOAtu9ddhXkpe3QMcqY9jP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlug6AYACgkQAcXqBBDI oXpddQf+NzoYGl7fBofowvy2N9nCKB0hrIjQZVb1cYm/OtZlCxJFbaEr3AEhZyez hcJzYIt3WAdz2sUR+Mz2qnG0f5Nrcxn6737lHCm981Ra+gZqYhSvZDMeeFHsTCs6 QIPrVPVXa0OFFfLiARW35ZmjcRAUhEaRUnHmgTFzz+DUUiK59jWBkuTLAipX0uET 7WESwGHS3PPj2o5xx2TsxD96nrCmGFgYQfUBL9TPLa+DzdzQoSwdTM9HDseM7M3K D7yOK6kca310ehxUN5yfKhok9Bmkz/MOkCjF2r2gvAOEcKxru1mcinTGreffzNXh Q7O6EstitP19WwOpsAc0MsVoiD5L/A== =1DJX -----END PGP SIGNATURE----- --5FqrIpHqBPZoOAtu9ddhXkpe3QMcqY9jP-- From owner-svn-src-head@freebsd.org Tue Sep 18 15:01:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 039B810A04A5; Tue, 18 Sep 2018 15:01:22 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE5D773F6D; Tue, 18 Sep 2018 15:01:21 +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 A8DCB217BD; Tue, 18 Sep 2018 15:01:21 +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 w8IF1Luv071749; Tue, 18 Sep 2018 15:01:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IF1LIc071748; Tue, 18 Sep 2018 15:01:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201809181501.w8IF1LIc071748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 18 Sep 2018 15:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338750 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 338750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 15:01:22 -0000 Author: emaste Date: Tue Sep 18 15:01:21 2018 New Revision: 338750 URL: https://svnweb.freebsd.org/changeset/base/338750 Log: Require ifunc-capable linker for i386 The amd64 kernel started using ifunc for a variety of functions with arch-specific implementations, and we would like to make use of the same functionality on i386 and as much as possible avoid divergence between i386 and amd64. In particular, future changes for security improvements and mitigations may rely on ifunc support. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Sep 18 10:53:07 2018 (r338749) +++ head/sys/conf/kern.pre.mk Tue Sep 18 15:01:21 2018 (r338750) @@ -121,10 +121,11 @@ CFLAGS+= ${CONF_CFLAGS} LDFLAGS+= -Wl,--build-id=sha1 .endif -.if ${MACHINE_CPUARCH} == "amd64" -.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" -.error amd64 kernel requires linker ifunc support +.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386") && \ + defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" +.error amd64/i386 kernel requires linker ifunc support .endif +.if ${MACHINE_CPUARCH} == "amd64" LDFLAGS+= -Wl,-z max-page-size=2097152 -Wl,-z common-page-size=4096 -Wl,-z -Wl,ifunc-noplt .endif From owner-svn-src-head@freebsd.org Tue Sep 18 15:01:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE27910A04D6; Tue, 18 Sep 2018 15:01:41 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E788740A5; Tue, 18 Sep 2018 15:01:41 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg1-x541.google.com with SMTP id s15-v6so1171742pgv.8; Tue, 18 Sep 2018 08:01:41 -0700 (PDT) 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:user-agent; bh=9ksSpNPT7wC1q0J5c+dZvY0eQM5DqX3V3WthtX1lpwg=; b=OKF+urxogc4Log8BR0IUDAJ+jnMuxF7WaSN5EBAobdeu1ICAPx6Nrf9WJllgfzMovI c1P4AXD3PzMoi7f8qOmp31Cx+sOvNt90km5VsUda8ou3ZTT06vsyFHPJcAyeIH+k5k2M uW/wWAi5fRNbWpfgIxk/0fa657yCp/ploM14h1FnsT8gWlz5hYeMWJcFj1eGMTdyvZmq WfnHkyFntjprHOs9DiYwKs0aZ1QwRrYmodfXhon9Wc7uUlVUTCrXaxz8SMbtuIuody8m m8z+fqC/ii3HbTgoQM8vHLdy6n7zD2a6Wclxh3vBZ1Mj9z5q2dCOKag7GTALg6dYr7OZ OH+g== 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:user-agent; bh=9ksSpNPT7wC1q0J5c+dZvY0eQM5DqX3V3WthtX1lpwg=; b=PvTBsmK2QioAzQ2g5WZw6xXXBp3Ri7AZ419qRdU6MGbiGkthC2prYJSqoAahA6hGy6 rLvG/zlptOH3gXDCtomqwb77Ee3XA3sNcc19JvksXneyG/6Suu8mX6F5PGiFN9AuXzH+ SxsOuWm0VacN35ZFMjglXkvB+Gm7vJ4elFX+QsL2Emt8iK/fcxqUCkD8LPR0S+0snQA4 rqKMUlDEPCgW7xawFF4GYFUkHBwoxEWQ/+3N1CUI8XafjK6ZY10kPeVO0bHEKrm/muHT MW3yrbcsA33Ye6CKej5M2ncRUCBTicU65oXTf2mtJtx0wq5BEwnKVC1LwXnzTBTKhgwr m1Sg== X-Gm-Message-State: APzg51DRuooMXlhjsO0YQe1pXlxFP4Sbz0meVtxRIpZkagZbkQUzErtU kPldJsk1dO9nAcDsQPTQUH6pTu7D X-Google-Smtp-Source: ANB0VdYuqTSb0cRS2gM4a5BIGL26OAmhsOBUHsIdO3ujd+s+DjSONtDi9M4WJhoql89U4XJArIYgKg== X-Received: by 2002:a62:198e:: with SMTP id 136-v6mr31433025pfz.103.1537282899928; Tue, 18 Sep 2018 08:01:39 -0700 (PDT) Received: from raichu (toroon0560w-lp130-01-174-88-78-8.dsl.bell.ca. [174.88.78.8]) by smtp.gmail.com with ESMTPSA id 187-v6sm25540625pfu.184.2018.09.18.08.01.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Sep 2018 08:01:38 -0700 (PDT) Sender: Mark Johnston Date: Tue, 18 Sep 2018 11:01:36 -0400 From: Mark Johnston To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338687 - in head/sys: dev/cpuctl x86/include x86/x86 Message-ID: <20180918150135.GC93504@raichu> References: <201809141704.w8EH4aKd075044@repo.freebsd.org> <20180918081735.GA44081@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180918081735.GA44081@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 15:01:42 -0000 On Tue, Sep 18, 2018 at 08:17:35AM +0000, Alexey Dokuchaev wrote: > On Fri, Sep 14, 2018 at 05:04:36PM +0000, Mark Johnston wrote: > > New Revision: 338687 > > URL: https://svnweb.freebsd.org/changeset/base/338687 > > > > Log: > > Log a message after a successful boot-time microcode update. > > Unfortunately, this had pessimized things on the unsuccessful side a bit. > (See below.) > > > ... > > @@ -130,36 +148,26 @@ ucode_intel_verify(struct ucode_intel_header *hdr, siz > > uint32_t cksum, *data, size; > > int i; > > > > - if (resid < sizeof(struct ucode_intel_header)) { > > - log_err("truncated update header"); > > + if (resid < sizeof(struct ucode_intel_header)) > > return (1); > > - } > > size = hdr->total_size; > > if (size == 0) > > size = UCODE_INTEL_DEFAULT_DATA_SIZE + > > sizeof(struct ucode_intel_header); > > > > - if (hdr->header_version != 1) { > > - log_err("unexpected header version %u", hdr->header_version); > > + if (hdr->header_version != 1) > > return (1); > > - } > > - if (size % 16 != 0) { > > - log_err("unexpected update size %u", hdr->total_size); > > + if (size % 16 != 0) > > return (1); > > - } > > - if (resid < size) { > > - log_err("truncated update"); > > + if (resid < size) > > return (1); > > - } > > > > cksum = 0; > > data = (uint32_t *)hdr; > > for (i = 0; i < size / sizeof(uint32_t); i++) > > cksum += data[i]; > > - if (cksum != 0) { > > - log_err("checksum failed"); > > + if (cksum != 0) > > return (1); > > - } > > return (0); > > Looks like previous error messages were more detailed (truncated header, > unexpected version or size, truncated update, checksum mismatch). Now > it all falls under "microcode verification failed". Was this intentional? It was intentional. It simplified the logging mechanism a bit, and diagnosis of update verification can be done more easily in userland anyway. I should have mentioned this change in the commit log. From owner-svn-src-head@freebsd.org Tue Sep 18 15:31:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08EFE10A0FFF; Tue, 18 Sep 2018 15:31:25 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE6D9752B3; Tue, 18 Sep 2018 15:31: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 A97BA21CBA; Tue, 18 Sep 2018 15:31:24 +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 w8IFVOh9089587; Tue, 18 Sep 2018 15:31:24 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IFVOSW089586; Tue, 18 Sep 2018 15:31:24 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201809181531.w8IFVOSW089586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 18 Sep 2018 15:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338751 - head/include X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/include X-SVN-Commit-Revision: 338751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 15:31:25 -0000 Author: brooks Date: Tue Sep 18 15:31:24 2018 New Revision: 338751 URL: https://svnweb.freebsd.org/changeset/base/338751 Log: Fix C11 and POSIX 1003.1b-1993 compliance in time.h Only expose timespec_get in C11, C++17, or BSD code. Always define struct timespect if defining timespec_get. PR: 231425 Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17174 Modified: head/include/time.h Modified: head/include/time.h ============================================================================== --- head/include/time.h Tue Sep 18 15:01:21 2018 (r338750) +++ head/include/time.h Tue Sep 18 15:31:24 2018 (r338751) @@ -207,9 +207,13 @@ time_t posix2time(time_t t); #include #endif +#if defined(__BSD_VISIBLE) || __ISO_C_VISIBLE >= 2011 || \ + (defined(cplusplus) && cplusplus >= 201703) +#include /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ #define TIME_UTC 1 /* time elapsed since epoch */ int timespec_get(struct timespec *ts, int base); +#endif __END_DECLS From owner-svn-src-head@freebsd.org Tue Sep 18 15:32:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1DB910A11AF; Tue, 18 Sep 2018 15:32:04 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29C927547F; Tue, 18 Sep 2018 15:32:03 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w8IFVsSh019423; Tue, 18 Sep 2018 08:31:54 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w8IFVsSA019422; Tue, 18 Sep 2018 08:31:54 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201809181531.w8IFVsSA019422@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r338749 - head/sys/netinet In-Reply-To: <201809181053.w8IAr7Rm047398@repo.freebsd.org> To: Michael Tuexen Date: Tue, 18 Sep 2018 08:31:54 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 15:32:04 -0000 > Author: tuexen > Date: Tue Sep 18 10:53:07 2018 > New Revision: 338749 > URL: https://svnweb.freebsd.org/changeset/base/338749 > > Log: > Remove unused code. This type of commit log entry is almost useless when someone is reading a svn log. In the future could you please indicate what was removed, ie: Log: Removed unused sctp_verify_hmac function. Thanks, Rod > > Approved by: re (kib@) > MFC after: 1 week > > Modified: > head/sys/netinet/sctp_auth.c > head/sys/netinet/sctp_auth.h > > Modified: head/sys/netinet/sctp_auth.c > ============================================================================== > --- head/sys/netinet/sctp_auth.c Tue Sep 18 07:29:01 2018 (r338748) > +++ head/sys/netinet/sctp_auth.c Tue Sep 18 10:53:07 2018 (r338749) > @@ -1060,40 +1060,6 @@ sctp_hmac_m(uint16_t hmac_algo, uint8_t *key, uint32_t > return (digestlen); > } > > -/*- > - * verify the HMAC digest using the desired hash key, text, and HMAC > - * algorithm. > - * Returns -1 on error, 0 on success. > - */ > -int > -sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, > - uint8_t *text, uint32_t textlen, > - uint8_t *digest, uint32_t digestlen) > -{ > - uint32_t len; > - uint8_t temp[SCTP_AUTH_DIGEST_LEN_MAX]; > - > - /* sanity check the material and length */ > - if ((key == NULL) || (keylen == 0) || > - (text == NULL) || (textlen == 0) || (digest == NULL)) { > - /* can't do HMAC with empty key or text or digest */ > - return (-1); > - } > - len = sctp_get_hmac_digest_len(hmac_algo); > - if ((len == 0) || (digestlen != len)) > - return (-1); > - > - /* compute the expected hash */ > - if (sctp_hmac(hmac_algo, key, keylen, text, textlen, temp) != len) > - return (-1); > - > - if (memcmp(digest, temp, digestlen) != 0) > - return (-1); > - else > - return (0); > -} > - > - > /* > * computes the requested HMAC using a key struct (which may be modified if > * the keylen exceeds the HMAC block len). > > Modified: head/sys/netinet/sctp_auth.h > ============================================================================== > --- head/sys/netinet/sctp_auth.h Tue Sep 18 07:29:01 2018 (r338748) > +++ head/sys/netinet/sctp_auth.h Tue Sep 18 10:53:07 2018 (r338749) > @@ -178,9 +178,6 @@ extern uint32_t sctp_get_hmac_digest_len(uint16_t hmac > extern uint32_t > sctp_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, > uint8_t *text, uint32_t textlen, uint8_t *digest); > -extern int > -sctp_verify_hmac(uint16_t hmac_algo, uint8_t *key, uint32_t keylen, > - uint8_t *text, uint32_t textlen, uint8_t *digest, uint32_t digestlen); > extern uint32_t > sctp_compute_hmac(uint16_t hmac_algo, sctp_key_t *key, > uint8_t *text, uint32_t textlen, uint8_t *digest); > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Sep 18 16:06:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E49B10A200F; Tue, 18 Sep 2018 16:06:25 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B87E57672E; Tue, 18 Sep 2018 16:06: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 B347B22302; Tue, 18 Sep 2018 16:06:24 +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 w8IG6OBv007806; Tue, 18 Sep 2018 16:06:24 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IG6Omb007805; Tue, 18 Sep 2018 16:06:24 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201809181606.w8IG6Omb007805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 18 Sep 2018 16:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338752 - in head: share/mk tools/build/options X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: share/mk tools/build/options X-SVN-Commit-Revision: 338752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 16:06:25 -0000 Author: brooks Date: Tue Sep 18 16:06:24 2018 New Revision: 338752 URL: https://svnweb.freebsd.org/changeset/base/338752 Log: Only enable HyperV support by default on x86. Without this we get spurious output during boot as we try to run nonexistant HyperV scripts on non-x86 models. Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17211 Added: head/tools/build/options/WITH_HYPERV (contents, props changed) Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Sep 18 15:31:24 2018 (r338751) +++ head/share/mk/src.opts.mk Tue Sep 18 16:06:24 2018 (r338752) @@ -111,7 +111,6 @@ __DEFAULT_YES_OPTIONS = \ GPIO \ HAST \ HTML \ - HYPERV \ ICONV \ INET \ INET6 \ @@ -371,6 +370,13 @@ __DEFAULT_YES_OPTIONS+=MLX5TOOL .else __DEFAULT_NO_OPTIONS+=CXGBETOOL __DEFAULT_NO_OPTIONS+=MLX5TOOL +.endif + +# HyperV is currently x86-only +.if ${__T} == "amd64" || ${__T} == "i386" +__DEFAULT_YES_OPTIONS+=HYPERV +.else +__DEFAULT_NO_OPTIONS+=HYPERV .endif # NVME is only x86 and powerpc64 Added: head/tools/build/options/WITH_HYPERV ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_HYPERV Tue Sep 18 16:06:24 2018 (r338752) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build or install HyperV utilities. From owner-svn-src-head@freebsd.org Tue Sep 18 16:16:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8959810A26F2; Tue, 18 Sep 2018 16:16:59 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DB6477238; Tue, 18 Sep 2018 16:16:59 +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 19CA8224DD; Tue, 18 Sep 2018 16:16:59 +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 w8IGGw6o013227; Tue, 18 Sep 2018 16:16:58 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IGGwUd013226; Tue, 18 Sep 2018 16:16:58 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201809181616.w8IGGwUd013226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 18 Sep 2018 16:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338753 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 338753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 16:16:59 -0000 Author: brooks Date: Tue Sep 18 16:16:58 2018 New Revision: 338753 URL: https://svnweb.freebsd.org/changeset/base/338753 Log: Regen after r338752. Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17211 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Sep 18 16:06:24 2018 (r338752) +++ head/share/man/man5/src.conf.5 Tue Sep 18 16:16:58 2018 (r338753) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd September 13, 2018 +.Dd September 18, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -807,6 +807,14 @@ Set to build Hesiod support. Set to not build HTML docs. .It Va WITHOUT_HYPERV Set to not build or install HyperV utilities. +.Pp +This is a default setting on +arm/arm, arm/armv6, arm/armv7, arm64/aarch64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. +.It Va WITH_HYPERV +Set to build or install HyperV utilities. +.Pp +This is a default setting on +amd64/amd64 and i386/i386. .It Va WITHOUT_ICONV Set to not build iconv as part of libc. .It Va WITHOUT_INCLUDES From owner-svn-src-head@freebsd.org Tue Sep 18 16:57:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2924D10A353D; Tue, 18 Sep 2018 16:57:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1E717855E; Tue, 18 Sep 2018 16:57:04 +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 C89E822B68; Tue, 18 Sep 2018 16:57:04 +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 w8IGv495033323; Tue, 18 Sep 2018 16:57:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IGv490033322; Tue, 18 Sep 2018 16:57:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201809181657.w8IGv490033322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 18 Sep 2018 16:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338754 - head/release/scripts X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/scripts X-SVN-Commit-Revision: 338754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 16:57:05 -0000 Author: gjb Date: Tue Sep 18 16:57:04 2018 New Revision: 338754 URL: https://svnweb.freebsd.org/changeset/base/338754 Log: Update the pkg-stage.sh script used to populate packages on the dvd1.iso installation medium from including KDE4 to KDE5, as the KDE4-based ports have been marked as deprecated in the Ports Collection. MFC after: 3 days Approved by: re (rgrimes) Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Tue Sep 18 16:16:58 2018 (r338753) +++ head/release/scripts/pkg-stage.sh Tue Sep 18 16:57:04 2018 (r338754) @@ -30,7 +30,7 @@ www/firefox www/links x11-drivers/xf86-video-vmware x11/gnome3 -x11/kde4 +x11/kde5 x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). From owner-svn-src-head@freebsd.org Tue Sep 18 17:51:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DDBE10A4B47; Tue, 18 Sep 2018 17:51:46 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5121C7B1A2; Tue, 18 Sep 2018 17:51:46 +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 4C1502345D; Tue, 18 Sep 2018 17:51:46 +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 w8IHpks3062429; Tue, 18 Sep 2018 17:51:46 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IHpkUV062428; Tue, 18 Sep 2018 17:51:46 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201809181751.w8IHpkUV062428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 18 Sep 2018 17:51:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338755 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 338755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 17:51:46 -0000 Author: markj Date: Tue Sep 18 17:51:45 2018 New Revision: 338755 URL: https://svnweb.freebsd.org/changeset/base/338755 Log: Only update the domain cursor once in keg_fetch_slab(). We drop the keg lock when we go to actually allocate the slab, allowing other threads to advance the cursor. This can cause us to exit the round-robin loop before having attempted allocations from all domains, resulting in a hang during a subsequent blocking allocation attempt from a depleted domain. Reported and tested by: Jan Bramkamp Reviewed by: alc, cem Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17209 Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Sep 18 16:57:04 2018 (r338754) +++ head/sys/vm/uma_core.c Tue Sep 18 17:51:45 2018 (r338755) @@ -2698,10 +2698,8 @@ again: LIST_INSERT_HEAD(&dom->ud_part_slab, slab, us_link); return (slab); } - if (rr) { - keg->uk_cursor = (keg->uk_cursor + 1) % vm_ndomains; - domain = keg->uk_cursor; - } + if (rr) + domain = (domain + 1) % vm_ndomains; } while (domain != start); /* Retry domain scan with blocking. */ From owner-svn-src-head@freebsd.org Tue Sep 18 18:37:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E41A910A5D70; Tue, 18 Sep 2018 18:37:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 37F8C7D021; Tue, 18 Sep 2018 18:37:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 0954FD6E2ED; Wed, 19 Sep 2018 04:37:11 +1000 (AEST) Date: Wed, 19 Sep 2018 04:37:10 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Brooks Davis cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338751 - head/include In-Reply-To: <201809181531.w8IFVOSW089586@repo.freebsd.org> Message-ID: <20180919025337.F2618@besplex.bde.org> References: <201809181531.w8IFVOSW089586@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=I9sVfJog c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=6I5d2MoRAAAA:8 a=51RncMHbroxWV6yNN-QA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 18:37:22 -0000 On Tue, 18 Sep 2018, Brooks Davis wrote: > Log: > Fix C11 and POSIX 1003.1b-1993 compliance in time.h > > Only expose timespec_get in C11, C++17, or BSD code. Always define > struct timespect if defining timespec_get. > > PR: 231425 > Reviewed by: kib > Approved by: re (gjb) > Differential Revision: https://reviews.freebsd.org/D17174 This still has a high density of namespace pollution and style bugs, not all in old code: > Modified: head/include/time.h > ============================================================================== > --- head/include/time.h Tue Sep 18 15:01:21 2018 (r338750) > +++ head/include/time.h Tue Sep 18 15:31:24 2018 (r338751) > @@ -207,9 +207,13 @@ time_t posix2time(time_t t); > #include > #endif > > +#if defined(__BSD_VISIBLE) || __ISO_C_VISIBLE >= 2011 || \ > + (defined(cplusplus) && cplusplus >= 201703) > +#include Lexical and organizational style bugs: The includes are scattered over the file and here they are not separated by blank lines. Long before here, the larger header has already been included in the POSIX.1b section. The formatting in that section is better than here, but the header itself is much worse. It gives the following undocumented namespace pollution in : TIMEVAL_TO_TIMESPEC() and TIMESPEC_TO_TIMEVAL(). There are both under __BSD_VISIBLE, so the pollution is not very bad. However, the reason for existence of the 3 little headers , and is to avoid namespace pollution. 3 is too many even if they worked. Adding pollution to _timespec.h since FreeBSD-5 turned the split of the timespec headers into nonsense. Originally, _timespec.h declared struct timespec but not time_t, and timespec.h existed to also declare time_t. timespec.h always had the polluting conversion macros. Now _timespec.h is further from matching its name (it declares timespec, not _timespec), and timespec.h is unrelated to its name (it also declares timespec, but is not needed for that, leaving its only use as defining the conversion macros). Also, much the same commit that added the declaration of time_t to _timespec.h also increased the pollution in . timespec in stat.h was new in POSIX.1-2008. has always had massive namespace pollution in FreeBSD, by including the massively polluted . struct timespec was a small part of this pollution before 2008 and became non-pollution in 2008. Old versions of stat.h were at least careful not to use struct timespec in stat structs except under __BSD_VISIBLE. In my version, the pollution is mostly fixed by removing the incude of and including only in the !BSD_VISIBLE case (stat.h doesn't use it, but some buggy applications do?) and in the BSD_VISIBLE case (buggy applications certainly need this). > /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ Style bug: the comment does less than echo the code. The code gives the correct condition, and the comment only echos 1/3 of the condition but with excessive details (this is not the place to give IEC numbers for everything, and even the definition of the feature test macros in only has 1 IEC number. I think /dev/null is the best place to give these numbers). The code is short, so it is obvious that this only applies to the timespec_get() function in it. > #define TIME_UTC 1 /* time elapsed since epoch */ Style bug: space instead of tab after #define. has this bug in 16 out of 26 #defines (all of the newer ones). > int timespec_get(struct timespec *ts, int base); Style bug: the function name is not indented. misformats all its prototypes like this. Namespace pollution: ts and 'base' are in the application namespace. doesn't have this bug in most of its prototypes. All of the old ones are correct. timer_oshandle_np() has this bug. Newer prototypes are often unsorted within their subsections. > +#endif > > __END_DECLS The C standard has a general problem with specifying reserved names for struct members. I couldn't find a single one. In old time APIs, some names starting with tm_ are reserved since they are in struct tm. This reservation is only implicit. Similarly for tv_ in struct timespec. POSIX is quite different. It reserves both tm_ and tv_. POSIX reserves so many prefixes and allows so much nested pollution that it is hard to know if the application namespace is nonempty. It reserves tv_ only in and , but allows polluting many other headers with all of the symbols in these headers. FreeBSD doesn't extend struct timespec, so the implicit reservation of tv_sec and tv_nsec is all that is needed when struct timespec must be declared, and the ifdefs and organization don't need to be different for C11 to exclude tv_extension. Bruce From owner-svn-src-head@freebsd.org Tue Sep 18 20:47:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D871310A8A44; Tue, 18 Sep 2018 20:47:13 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F97E82C9F; Tue, 18 Sep 2018 20:47:06 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE11E25141; Tue, 18 Sep 2018 20:47:06 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8IKl6Wm055684; Tue, 18 Sep 2018 20:47:06 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IKl66q055682; Tue, 18 Sep 2018 20:47:06 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809182047.w8IKl66q055682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 18 Sep 2018 20:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338757 - in head: etc usr.bin/mail X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc usr.bin/mail X-SVN-Commit-Revision: 338757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 20:47:14 -0000 Author: brd Date: Tue Sep 18 20:47:06 2018 New Revision: 338757 URL: https://svnweb.freebsd.org/changeset/base/338757 Log: Move mail.rc install to usr.bin/mail. This leverages CONFS to do the install Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17216 Modified: head/etc/Makefile head/usr.bin/mail/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Sep 18 20:46:55 2018 (r338756) +++ head/etc/Makefile Tue Sep 18 20:47:06 2018 (r338757) @@ -34,10 +34,6 @@ BIN1+= ${SRCTOP}/usr.bin/locate/locate/locate.rc BIN1+= hosts.lpd printcap .endif -.if ${MK_MAIL} != "no" -BIN1+= ${SRCTOP}/usr.bin/mail/misc/mail.rc -.endif - .if ${MK_OPENSSL} != "no" SSL= ${SRCTOP}/crypto/openssl/apps/openssl.cnf .endif Modified: head/usr.bin/mail/Makefile ============================================================================== --- head/usr.bin/mail/Makefile Tue Sep 18 20:46:55 2018 (r338756) +++ head/usr.bin/mail/Makefile Tue Sep 18 20:47:06 2018 (r338757) @@ -1,6 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 1/25/94 # $FreeBSD$ +CONFS= misc/mail.rc PROG= mail SRCS= version.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \ getname.c head.c v7.local.c lex.c list.c main.c names.c popen.c \ From owner-svn-src-head@freebsd.org Tue Sep 18 20:50:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B3C610A8C2E; Tue, 18 Sep 2018 20:50:08 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 440DC831B3; Tue, 18 Sep 2018 20:50:08 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AD1E2514A; Tue, 18 Sep 2018 20:50:08 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8IKo80t055869; Tue, 18 Sep 2018 20:50:08 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IKo7KS055867; Tue, 18 Sep 2018 20:50:07 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809182050.w8IKo7KS055867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 18 Sep 2018 20:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338758 - in head: etc usr.bin/locate/locate X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc usr.bin/locate/locate X-SVN-Commit-Revision: 338758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 20:50:08 -0000 Author: brd Date: Tue Sep 18 20:50:07 2018 New Revision: 338758 URL: https://svnweb.freebsd.org/changeset/base/338758 Log: Move install of locate.rc to usr.bin/locate/locate/ This leverages CONFS to handle the install and purges an old comment. Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17215 Modified: head/etc/Makefile head/usr.bin/locate/locate/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Sep 18 20:47:06 2018 (r338757) +++ head/etc/Makefile Tue Sep 18 20:50:07 2018 (r338758) @@ -26,10 +26,6 @@ BIN1= \ # NB: keep these sorted by MK_* knobs -.if ${MK_LOCATE} != "no" -BIN1+= ${SRCTOP}/usr.bin/locate/locate/locate.rc -.endif - .if ${MK_LPR} != "no" BIN1+= hosts.lpd printcap .endif Modified: head/usr.bin/locate/locate/Makefile ============================================================================== --- head/usr.bin/locate/locate/Makefile Tue Sep 18 20:47:06 2018 (r338757) +++ head/usr.bin/locate/locate/Makefile Tue Sep 18 20:50:07 2018 (r338758) @@ -1,6 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +CONFS= locate.rc PROG= locate SRCS= util.c locate.c CFLAGS+= -I${.CURDIR} -DMMAP # -DDEBUG (print time) -O2 (10% faster) @@ -14,10 +15,6 @@ SCRIPTSDIR= ${LIBEXECDIR} SCRIPTSNAME_${script}= locate.${script:R} .endfor MLINKS+= locate.updatedb.8 updatedb.8 - -# only /usr/src/etc/Makefile install files in /etc -# ${INSTALL} -o root -g wheel -m 644 \ -# ${.CURDIR}/locate.rc ${DESTDIR}/etc .include "../../Makefile.inc" .include From owner-svn-src-head@freebsd.org Tue Sep 18 20:52:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B04A910A8E1F; Tue, 18 Sep 2018 20:52:25 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66EFC835B8; Tue, 18 Sep 2018 20:52:25 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61D85252EC; Tue, 18 Sep 2018 20:52:25 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8IKqPq5060622; Tue, 18 Sep 2018 20:52:25 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IKqOVo060619; Tue, 18 Sep 2018 20:52:24 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809182052.w8IKqOVo060619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 18 Sep 2018 20:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338759 - in head: etc sbin/bsdlabel X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc sbin/bsdlabel X-SVN-Commit-Revision: 338759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 20:52:25 -0000 Author: brd Date: Tue Sep 18 20:52:24 2018 New Revision: 338759 URL: https://svnweb.freebsd.org/changeset/base/338759 Log: Move disktab to sbin/bsdlabel/ This leverages CONFS to handle the install. Approved by: re (blanket, pkgbase), will (mentor) Differential Revision: https://reviews.freebsd.org/D17217 Added: head/sbin/bsdlabel/disktab - copied unchanged from r338758, head/etc/disktab Deleted: head/etc/disktab Modified: head/etc/Makefile head/sbin/bsdlabel/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Sep 18 20:50:07 2018 (r338758) +++ head/etc/Makefile Tue Sep 18 20:52:24 2018 (r338759) @@ -13,7 +13,6 @@ SUBDIR+=sendmail .endif BIN1= \ - disktab \ group \ hosts.allow \ libalias.conf \ Modified: head/sbin/bsdlabel/Makefile ============================================================================== --- head/sbin/bsdlabel/Makefile Tue Sep 18 20:50:07 2018 (r338758) +++ head/sbin/bsdlabel/Makefile Tue Sep 18 20:52:24 2018 (r338759) @@ -3,6 +3,7 @@ .PATH: ${SRCTOP}/sys/geom +CONFS= disktab PACKAGE=runtime PROG= bsdlabel SRCS= bsdlabel.c geom_bsd_enc.c Copied: head/sbin/bsdlabel/disktab (from r338758, head/etc/disktab) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/bsdlabel/disktab Tue Sep 18 20:52:24 2018 (r338759, copy of r338758, head/etc/disktab) @@ -0,0 +1,204 @@ +# $FreeBSD$ +# +# Disk geometry and partition layout tables. +# See disktab(5) for format of this file. +# + +# +# Floppy formats: +# +# To make a filesystem on a floppy: +# fdformat [-f ] fd[.] +# disklabel -B -r -w fd[.] fd +# newfs fd[.] +# +# with : +# -t 2 - two heads +# -u 9|15|18 - sectors per track +# (using the default value of 1/4096 is not much useful for floppies) +# -l 1 - interleave 1 (for most floppies) +# -i 65536 - bytes of data per i-node +# (the default -i value will render you with a floppy wasting way +# too much space in i-node areas) +# + +fd360:\ + :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#40:\ + :pa#720:oa#0:ba#4096:fa#512:\ + :pc#720:oc#0:bc#4096:fc#512: + +fd720:\ + :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#80:\ + :pa#1440:oa#0:ba#4096:fa#512:\ + :pc#1440:oc#0:bc#4096:fc#512: + +fd1200|floppy5|5in|5.25in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#360:ns#15:nc#80:\ + :pa#2400:oa#0:ba#4096:fa#512:\ + :pc#2400:oc#0:bc#4096:fc#512: + +fd1440|floppy|floppy3|3in|3.5in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pc#2880:oc#0:bc#4096:fc#512: + +fd2880|2.88MB 3.5in Extra High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#300:ns#36:nc#80:\ + :pa#5760:oa#0:ba#4096:fa#512:\ + :pb#5760:ob#0:bb#4096:fa#512:\ + :pc#5760:oc#0:bb#4096:fa#512: + +# +# Stressed floppy-formats. No guarantees given. +# + +fd800:\ + :ty=floppy:se#512:nt#2:rm#300:ns#10:nc#80:\ + :pa#1600:oa#0:ba#4096:fa#512:\ + :pc#1600:oc#0:bc#4096:fc#512: + +fd820:\ + :ty=floppy:se#512:nt#2:rm#300:ns#10:nc#82:\ + :pa#1640:oa#0:ba#4096:fa#512:\ + :pc#1640:oc#0:bc#4096:fc#512: + +fd1480:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#82:\ + :pa#2952:oa#0:ba#4096:fa#512:\ + :pc#2952:oc#0:bc#4096:fc#512: + +fd1720:\ + :ty=floppy:se#512:nt#2:rm#300:ns#21:nc#82:\ + :pa#3444:oa#0:ba#4096:fa#512:\ + :pc#3444:oc#0:bc#4096:fc#512: + +# +# LS-120 floppy-format. +# +fd120m|floppy120|floppy120m|3.5in LS-120 Floppy:\ + :ty=floppy:se#512:nt#8:rm#300:ns#32:nc#963:\ + :pa#246528:oa#0:ba#4096:fa#512:\ + :pc#246528:oc#0:bc#4096:fc#512: + +# +# Harddisk formats +# +qp120at|Quantum Peripherals 120MB IDE:\ + :dt=ESDI:ty=winchester:se#512:nt#9:ns#32:nc#813:sf: \ + :pa#13824:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#13824:ob#13824:tb=swap: \ + :pc#234144:oc#0: \ + :ph#206496:oh#27648:th=4.2BSD:bh#4096:fh#512: + +pan60|Panasonic Laptop's 60MB IDE:\ + :dt=ST506:ty=winchester:se#512:nt#13:ns#17:nc#565:\ + :pa#13260:oa#0:ta=4.2BSD:ba#4096:fa#512:\ + :pb#13260:ob#13260:tb=swap: \ + :pc#124865:oc#0: \ + :ph#97682:oh#26520:th=4.2BSD:bh#4096:fh#512: + +mk156|toshiba156|Toshiba MK156 156Mb:\ + :dt=SCSI:ty=winchester:se#512:nt#10:ns#35:nc#825:\ + :pa#15748:oa#0:ba#4096:fa#512:ta=4.2BSD:\ + :pb#15748:ob#15748:tb=swap:\ + :pc#288750:oc#0:\ + :ph#257250:oh#31500:bh#4096:fh#512:th=4.2BSD: + +cp3100|Connor Peripherals 100MB IDE:\ + :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \ + :pa#12144:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#12144:ob#12144:tb=swap: \ + :pc#202224:oc#0: \ + :ph#177936:oh#24288:th=4.2BSD:bh#4096:fh#512: + +# a == root +# b == swap +# c == d == whole disk +# e == /var +# f == scratch +# h == /usr + +cp3100new|Connor Peripherals 100MB IDE, with a different configuration:\ + :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \ + :pa#15840:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#24288:ob#15840:tb=swap: \ + :pc#202224:oc#0: \ + :pd#202224:od#0: \ + :pe#15840:oe#40128:te=4.2BSD:be#4096:fe#512: \ + :pg#15840:og#55968:tg=4.2BSD:bg#4096:fg#512: \ + :ph#130416:oh#71808:th=4.2BSD:bh#4096:fh#512: + +maxtor4380|Maxtor XT4380E ESDI :\ + :dt=ESDI:ty=winchester:se#512:nt#15:ns#36:nc#1222:sf: \ + :pa#21600:oa#0:ta=4.2BSD:ba#4096:fa#512:\ + :pb#21600:ob#21600:tb=swap: \ + :pc#659880:oc#0: \ + :pd#216000:od#53200:td=4.2BSD:bd#4096:fd#512: \ + :ph#398520:oh#269200:th=4.2BSD:bh#4096:fh#512: + +miniscribe9380|compaq38|Miniscribe 9380 ESDI :\ + :ty=winchester:dt=ESDI:se#512:nt#15:ns#35:nc#1223:rm#3600:sf: \ + :pa#21000:oa#0:ba#8192:fa#1024:ta=4.2BSD: \ + :pb#42000:ob#21000:tb=swap: \ + :pc#642075:oc#0: \ + :pd#21000:od#63000:bd#8192:fd#1024:td=4.2BSD: \ + :ph#556500:oh#84000:bh#8192:fh#1024:th=4.2BSD: + +ida4|compaq88|Compaq IDA (4 drives) :\ + :ty=winchester:dt=IDA:se#512:nt#16:ns#63:nc#1644:rm#3600:\ + :pa#20160:oa#0:ba#8192:fa#1024:ta=4.2BSD: \ + :pb#80640:ob#20160:tb=swap: \ + :pc#1659168:oc#0: \ + :pd#201600:od#100800:bd#8192:fd#1024:td=4.2BSD: \ + :pe#20160:oe#1310400:be#8192:fe#1024:te=4.2BSD: \ + :ph#1008000:oh#302400:bh#8192:fh#1024:th=4.2BSD: \ + :pg#302400:og#1330560:bg#4096:fg#512:tg=4.2BSD: + +fuji513|Fujitsu M22XXXX: \ + :ty=winchester:dt=ESDI:se#512:nt#16:ns#63:nc#954:rm#3600:\ + :pa#20160:oa#82656:ba#4096:fa#512:ta=4.2BSD: \ + :pb#40320:ob#102816:tb=swap: \ + :pc#961632:oc#0: \ + :ph#656208:oh#143136:bh#4096:fh#512:th=4.2BSD: + +sony650|Sony 650 MB MOD|\ + :ty=removable:dt=SCSI:se#512:nt#1:ns#31:nc#18600:ts#1:rm#4800:\ + :pc#576600:oc#0:\ + :pa#576600:oa#0:ta=4.2BSD:ba#8192:fa#1024: + +mta3230|mo230|IBM MTA-3230 230 Meg 3.5inch Magneto-Optical:\ + :ty=removeable:dt=SCSI:rm#3600:\ + :se#512:nt#64:ns#32:nc#216:sc#2048:su#444384:\ + :pa#444384:oa#0:ba#4096:fa#0:ta=4.2BSD:\ + :pc#444384:oc#0: + +minimum:ty=mfs:se#512:nt#1:rm#300:\ + :ns#2880:nc#1:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pc#2880:oc#0:bc#4096:fc#512: + +minimum2:ty=mfs:se#512:nt#1:rm#300:\ + :ns#5760:nc#1:\ + :pa#5760:oa#0:ba#4096:fa#512:\ + :pc#5760:oc#0:bc#4096:fc#512: + +minimum3:ty=mfs:se#512:nt#1:rm#300:\ + :ns#8640:nc#1:\ + :pa#8640:oa#0:ba#4096:fa#512:\ + :pc#8640:oc#0:bc#4096:fc#512: + +zip100|zip 100:\ + :ty=removable:se#512:nc#96:nt#64:ns#32:\ + :pa#196608:oa#0:ba#4096:fa#512:\ + :pc#196608:oc#0:bc#4096:fc#512: + +zip250|zip 250:\ + :ty=removable:se#512:nc#239:nt#64:ns#32:\ + :pa#489472:oa#0:ba#4096:fa#512:\ + :pc#489472:oc#0:bc#4096:fc#512: + +orb2200|orb22|orb:\ + :ty=removable:ns#63:nt#128:nc#4273:sc#1008:su#4307184:se#512:\ + :pa#4307184:oa#0:ba#8192:fa#1024:\ + :pc#4307184:oc#0:bc#8192:fc#1024: + From owner-svn-src-head@freebsd.org Tue Sep 18 20:54:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E55F10A8F1A; Tue, 18 Sep 2018 20:54:39 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9CBC837DA; Tue, 18 Sep 2018 20:54:38 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0811252F7; Tue, 18 Sep 2018 20:54:38 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8IKscV1060745; Tue, 18 Sep 2018 20:54:38 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IKscKd060742; Tue, 18 Sep 2018 20:54:38 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809182054.w8IKscKd060742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 18 Sep 2018 20:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338760 - in head: etc lib/libalias/libalias X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc lib/libalias/libalias X-SVN-Commit-Revision: 338760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 20:54:39 -0000 Author: brd Date: Tue Sep 18 20:54:37 2018 New Revision: 338760 URL: https://svnweb.freebsd.org/changeset/base/338760 Log: Move libalias.conf to lib/libalias/libalias/ This leveages CONFS to handle the install. Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17218 Added: head/lib/libalias/libalias/libalias.conf - copied unchanged from r338759, head/etc/libalias.conf Deleted: head/etc/libalias.conf Modified: head/etc/Makefile head/lib/libalias/libalias/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Sep 18 20:52:24 2018 (r338759) +++ head/etc/Makefile Tue Sep 18 20:54:37 2018 (r338760) @@ -15,7 +15,6 @@ SUBDIR+=sendmail BIN1= \ group \ hosts.allow \ - libalias.conf \ login.access \ phones \ rc.bsdextended \ Modified: head/lib/libalias/libalias/Makefile ============================================================================== --- head/lib/libalias/libalias/Makefile Tue Sep 18 20:52:24 2018 (r338759) +++ head/lib/libalias/libalias/Makefile Tue Sep 18 20:54:37 2018 (r338760) @@ -2,6 +2,7 @@ .PATH: ${SRCTOP}/sys/netinet/libalias +CONFS= libalias.conf PACKAGE=lib${LIB} LIB= alias SHLIBDIR?= /lib Copied: head/lib/libalias/libalias/libalias.conf (from r338759, head/etc/libalias.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libalias/libalias/libalias.conf Tue Sep 18 20:54:37 2018 (r338760, copy of r338759, head/etc/libalias.conf) @@ -0,0 +1,8 @@ +# $FreeBSD$ +/lib/libalias_cuseeme.so +/lib/libalias_ftp.so +/lib/libalias_irc.so +/lib/libalias_nbt.so +/lib/libalias_pptp.so +/lib/libalias_skinny.so +/lib/libalias_smedia.so From owner-svn-src-head@freebsd.org Tue Sep 18 21:34:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24CF110A9A6D; Tue, 18 Sep 2018 21:34:38 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C61F384949; Tue, 18 Sep 2018 21:34:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6C8925969; Tue, 18 Sep 2018 21:34:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8ILYbx1080969; Tue, 18 Sep 2018 21:34:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8ILYbpn080968; Tue, 18 Sep 2018 21:34:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201809182134.w8ILYbpn080968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 18 Sep 2018 21:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338761 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 338761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 21:34:38 -0000 Author: np Date: Tue Sep 18 21:34:37 2018 New Revision: 338761 URL: https://svnweb.freebsd.org/changeset/base/338761 Log: cxgbe(4): Enable TXRTLMT by default when the feature is available in the kernel (options RATELIMIT) and provisioned in the driver's configuration file (nethofld > 0). Submitted by: gallatin@ Approved by: re@ (kib@) Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Sep 18 20:54:37 2018 (r338760) +++ head/sys/dev/cxgbe/t4_main.c Tue Sep 18 21:34:37 2018 (r338761) @@ -1500,6 +1500,7 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) #endif ifp->if_capabilities = T4_CAP; + ifp->if_capenable = T4_CAP_ENABLE; #ifdef TCP_OFFLOAD if (vi->nofldrxq != 0) ifp->if_capabilities |= IFCAP_TOE; @@ -1509,10 +1510,11 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) ifp->if_capabilities |= IFCAP_NETMAP; #endif #ifdef RATELIMIT - if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) + if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) { ifp->if_capabilities |= IFCAP_TXRTLMT; + ifp->if_capenable |= IFCAP_TXRTLMT; + } #endif - ifp->if_capenable = T4_CAP_ENABLE; ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_UDP_IPV6 | CSUM_TCP_IPV6; From owner-svn-src-head@freebsd.org Tue Sep 18 22:41:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E6310AAF11; Tue, 18 Sep 2018 22:41:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C71C86A7A; Tue, 18 Sep 2018 22:41:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4758E263D2; Tue, 18 Sep 2018 22:41:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8IMfV3T014255; Tue, 18 Sep 2018 22:41:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8IMfVrm014254; Tue, 18 Sep 2018 22:41:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201809182241.w8IMfVrm014254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 18 Sep 2018 22:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338762 - head/usr.sbin/cxgbetool X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/usr.sbin/cxgbetool X-SVN-Commit-Revision: 338762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 18 Sep 2018 22:41:31 -0000 Author: np Date: Tue Sep 18 22:41:30 2018 New Revision: 338762 URL: https://svnweb.freebsd.org/changeset/base/338762 Log: cxgbetool(8): Clarify the meaning of the "queue" parameter used to steer traffic to a particular queue. Submitted by: Krishnamraju Eraparaju @ Chelsio Approved by: re@ (kib@) Modified: head/usr.sbin/cxgbetool/cxgbetool.8 Modified: head/usr.sbin/cxgbetool/cxgbetool.8 ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.8 Tue Sep 18 21:34:37 2018 (r338761) +++ head/usr.sbin/cxgbetool/cxgbetool.8 Tue Sep 18 22:41:30 2018 (r338762) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Aug 8, 2018 +.Dd Sep 18, 2018 .Dt CXGBETOOL 8 .Os .Sh NAME @@ -418,9 +418,12 @@ Filter has priority over active and server regions of Operational parameters that can be used with filters with .Cm action pass Ns : .It Cm queue -Rx queue index to which to deliver the packet. By default, packets that hit a -filter with action pass are delivered based on their RSS hash as usual. Use -this to steer them to a particular queue. +Context id of an ingress queue to which to deliver the packet. +The context id is available in +.Va dev.cxgbe.%d.rxq.%d.cntxt_id . +By default, packets that hit a filter with action pass are delivered based on +their RSS hash as usual. +Use this to steer them to a particular queue. .It Cm rpttid Report the filter tid instead of the RSS hash in the rx descriptor. 0 (default) or 1. From owner-svn-src-head@freebsd.org Wed Sep 19 09:29:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 912EE1094F6E; Wed, 19 Sep 2018 09:29:07 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 457F8791D5; Wed, 19 Sep 2018 09:29:07 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25D2151ED; Wed, 19 Sep 2018 09:29:07 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J9T7RS043960; Wed, 19 Sep 2018 09:29:07 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J9T69s043957; Wed, 19 Sep 2018 09:29:06 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809190929.w8J9T69s043957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Wed, 19 Sep 2018 09:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338794 - in head: etc lib/lib80211 X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc lib/lib80211 X-SVN-Commit-Revision: 338794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 09:29:07 -0000 Author: brd Date: Wed Sep 19 09:29:06 2018 New Revision: 338794 URL: https://svnweb.freebsd.org/changeset/base/338794 Log: Move regdomain.xml to lib/lib80211/ This leverages CONFS to handle the install. lib80211 was picked because it is where this file is actually used from. Approved by: re (blanket, pkgbase), will (mentor) Differential Revision: https://reviews.freebsd.org/D17229 Added: head/lib/lib80211/regdomain.xml - copied unchanged from r338793, head/etc/regdomain.xml Deleted: head/etc/regdomain.xml Modified: head/etc/Makefile head/lib/lib80211/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed Sep 19 08:13:58 2018 (r338793) +++ head/etc/Makefile Wed Sep 19 09:29:06 2018 (r338794) @@ -36,10 +36,6 @@ SSL= ${SRCTOP}/crypto/openssl/apps/openssl.cnf BIN1+= rc.sendmail .endif -.if ${MK_WIRELESS} != "no" -BIN1+= regdomain.xml -.endif - .if ${MK_SENDMAIL} == "no" ETCMAIL=mailer.conf aliases .else Modified: head/lib/lib80211/Makefile ============================================================================== --- head/lib/lib80211/Makefile Wed Sep 19 08:13:58 2018 (r338793) +++ head/lib/lib80211/Makefile Wed Sep 19 09:29:06 2018 (r338794) @@ -1,5 +1,6 @@ # $FreeBSD$ +CONFS= regdomain.xml PACKAGE=lib${LIB} LIB= 80211 SHLIBDIR?= /lib Copied: head/lib/lib80211/regdomain.xml (from r338793, head/etc/regdomain.xml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/lib80211/regdomain.xml Wed Sep 19 09:29:06 2018 (r338794, copy of r338793, head/etc/regdomain.xml) @@ -0,0 +1,1943 @@ + + + + + + + + + + + DEBUG + 0x1ff + + + + FCC + 0x10 + + + + + 30 + IEEE80211_CHAN_B + + + + + + 30 + IEEE80211_CHAN_G + + + + + + 17 + + + + 23 + + + + 23 + IEEE80211_CHAN_PASSIVE + + + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT20 + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT40 + + + + + + 17 + IEEE80211_CHAN_HT20 + + + + 17 + IEEE80211_CHAN_HT40 + + + + 23 + IEEE80211_CHAN_HT20 + + + + 23 + IEEE80211_CHAN_HT40 + + + + + + + + FCC3 + 0x3a + + + + 30 + IEEE80211_CHAN_B + + + + + + 30 + IEEE80211_CHAN_G + + + + + + 17 + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT20 + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT40 + + + + + + 17 + IEEE80211_CHAN_HT20 + + + + 17 + IEEE80211_CHAN_HT40 + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT20 + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + + + + + FCC4 + 0x12 + + + + 30 + IEEE80211_CHAN_B + + + + + + 30 + IEEE80211_CHAN_G + + + + + + 23 + + + + 27 + + + + 30 + + + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT20 + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT40 + + + + + + JAPAN + 0x40 + + + + + 23 + IEEE80211_CHAN_B + + + + 23 + IEEE80211_CHAN_B + + + + + + 23 + IEEE80211_CHAN_G + + + + + + 23 + + + + 23 + + + + 23 + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + + + 23 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT20 + + + + 23 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT40 + + + + + + 23 + IEEE80211_CHAN_HT20 + + + + 23 + IEEE80211_CHAN_HT40 + + + + 23 + IEEE80211_CHAN_HT20 + + + + 23 + IEEE80211_CHAN_HT40 + + + + 23 + IEEE80211_CHAN_HT20 + + + + 23 + IEEE80211_CHAN_HT40 + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + + + ETSI + 0x30 + + + + 30 + IEEE80211_CHAN_B + + + + + + 30 + IEEE80211_CHAN_G + + + + + + 17 + + + + 24 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT20 + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT40 + + + + + + 17 + IEEE80211_CHAN_HT20 + + + + 17 + IEEE80211_CHAN_HT40 + + + + 24 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 24 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + + + + + ETSI2 + 0x32 + + + + 30 + IEEE80211_CHAN_B + + + + + + 30 + IEEE80211_CHAN_G + + + + + + 17 + + + + 24 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT20 + + + + + + 17 + IEEE80211_CHAN_HT20 + + + + 24 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + + + + + ETSI3 + 0x33 + + + + + 30 + IEEE80211_CHAN_B + + + + + + 30 + IEEE80211_CHAN_G + + + + + + 17 + + + + 24 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT20 + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT40 + + + + + + 17 + IEEE80211_CHAN_HT20 + + + + 17 + IEEE80211_CHAN_HT40 + + + + 24 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 24 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + + + APAC + 0x50 + + + + 30 + IEEE80211_CHAN_B + + + + + + 30 + IEEE80211_CHAN_G + + + + + + 17 + + + + 23 + IEEE80211_CHAN_PASSIVE + + + + 23 + + + + 23 + + + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT20 + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT40 + + + + + + 17 + IEEE80211_CHAN_HT20 + + + + 17 + IEEE80211_CHAN_HT40 + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + + + + 23 + IEEE80211_CHAN_HT20 + + + + 23 + IEEE80211_CHAN_HT40 + + + + + + + + APAC2 + 0x51 + + + + 30 + IEEE80211_CHAN_B + + + + + + 30 + IEEE80211_CHAN_G + + + + + + 17 + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + + + + 23 + + + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT20 + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT40 + + + + + + 17 + IEEE80211_CHAN_HT20 + + + + 17 + IEEE80211_CHAN_HT40 + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + IEEE80211_CHAN_HT20 + + + + 23 + IEEE80211_CHAN_HT40 + + + + + + + + APAC3 + 0x5d + + + + 30 + IEEE80211_CHAN_B + + + + + + 30 + IEEE80211_CHAN_G + + + + + + 17 + + + + 23 + IEEE80211_CHAN_PASSIVE + IEEE80211_CHAN_DFS + + + + 23 + + + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT20 + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_HT40 + + + + + + 17 + IEEE80211_CHAN_HT20 + + + + 17 + IEEE80211_CHAN_HT40 + + + + 23 + IEEE80211_CHAN_HT20 + IEEE80211_CHAN_PASSIVE + + + + 23 + IEEE80211_CHAN_HT40 + IEEE80211_CHAN_PASSIVE + + + + 23 + IEEE80211_CHAN_HT20 + + + + 23 + IEEE80211_CHAN_HT40 + + + + + + KOREA + 0x45 + + + + + 30 + IEEE80211_CHAN_B + + + + 30 + IEEE80211_CHAN_B + IEEE80211_CHAN_PASSIVE + + + + + + 30 + IEEE80211_CHAN_G + + + + 30 + IEEE80211_CHAN_G + IEEE80211_CHAN_PASSIVE + + + + + + 17 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Sep 19 14:36:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05CA7109D272; Wed, 19 Sep 2018 14:36:59 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE698831D6; Wed, 19 Sep 2018 14:36:58 +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 A56E910417; Wed, 19 Sep 2018 14:36:58 +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 w8JEaw7c000602; Wed, 19 Sep 2018 14:36:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JEawx4000600; Wed, 19 Sep 2018 14:36:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809191436.w8JEawx4000600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 19 Sep 2018 14:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338798 - in head/sys: kern ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: kern ufs/ufs X-SVN-Commit-Revision: 338798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 14:36:59 -0000 Author: kib Date: Wed Sep 19 14:36:57 2018 New Revision: 338798 URL: https://svnweb.freebsd.org/changeset/base/338798 Log: Fix state of dquot-less vnodes after failed quotaoff. UFS quotaoff iterates over all mp vnodes, and derefences and clears the pointers to corresponding dquots. If SU work items transiently reference some of dquots,quotaoff() would eventually fail, but all processed vnodes are already stripped from dquots. The state is problematic, since quotas are left enabled, but there is no dquots where blocks and inodes can be accounted. The result is assertion failures and NULL pointer dereferences. Fix it by suspending writes around quotaoff() call. Since the filesystem is synced, no dandling references to dquots from SU workitems can left behind, which means that quotaoff succeeds. The complication there is that quotaoff VFS op is performed with the mount point busied, while to suspend, we need to start write on the mp. If vn_start_write() is called on busied mp, system might deadlock against parallel unmount request. Handle this by unbusy-ing mp before starting write, which in turn requires changing the quotaoff() interface to return with the mount point not busied, same as was done for quotaon(). Reviewed by: mckusick Reported and tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (gjb) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D17208 Modified: head/sys/kern/vfs_syscalls.c head/sys/ufs/ufs/ufs_quota.c head/sys/ufs/ufs/ufs_vfsops.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Wed Sep 19 10:26:45 2018 (r338797) +++ head/sys/kern/vfs_syscalls.c Wed Sep 19 14:36:57 2018 (r338798) @@ -190,7 +190,8 @@ sys_quotactl(struct thread *td, struct quotactl_args * * Require that Q_QUOTAON handles the vfs_busy() reference on * its own, always returning with ubusied mount point. */ - if ((uap->cmd >> SUBCMDSHIFT) != Q_QUOTAON) + if ((uap->cmd >> SUBCMDSHIFT) != Q_QUOTAON && + (uap->cmd >> SUBCMDSHIFT) != Q_QUOTAOFF) vfs_unbusy(mp); return (error); } Modified: head/sys/ufs/ufs/ufs_quota.c ============================================================================== --- head/sys/ufs/ufs/ufs_quota.c Wed Sep 19 10:26:45 2018 (r338797) +++ head/sys/ufs/ufs/ufs_quota.c Wed Sep 19 14:36:57 2018 (r338798) @@ -712,6 +712,34 @@ again: return (error); } +static int +quotaoff_inchange1(struct thread *td, struct mount *mp, int type) +{ + int error; + bool need_resume; + + /* + * mp is already suspended on unmount. If not, suspend it, to + * avoid the situation where quotaoff operation eventually + * failing due to SU structures still keeping references on + * dquots, but vnode's references are already clean. This + * would cause quota accounting leak and asserts otherwise. + * Note that the thread has already called vn_start_write(). + */ + if (mp->mnt_susp_owner == td) { + need_resume = false; + } else { + error = vfs_write_suspend_umnt(mp); + if (error != 0) + return (error); + need_resume = true; + } + error = quotaoff1(td, mp, type); + if (need_resume) + vfs_write_resume(mp, VR_START_WRITE); + return (error); +} + /* * Turns off quotas, assumes that ump->um_qflags are already checked * and QTF_CLOSING is set to indicate operation in progress. Fixes @@ -721,10 +749,9 @@ int quotaoff_inchange(struct thread *td, struct mount *mp, int type) { struct ufsmount *ump; - int i; - int error; + int error, i; - error = quotaoff1(td, mp, type); + error = quotaoff_inchange1(td, mp, type); ump = VFSTOUFS(mp); UFS_LOCK(ump); Modified: head/sys/ufs/ufs/ufs_vfsops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vfsops.c Wed Sep 19 10:26:45 2018 (r338797) +++ head/sys/ufs/ufs/ufs_vfsops.c Wed Sep 19 14:36:57 2018 (r338798) @@ -94,7 +94,8 @@ ufs_quotactl(mp, cmds, id, arg) void *arg; { #ifndef QUOTA - if ((cmds >> SUBCMDSHIFT) == Q_QUOTAON) + if ((cmds >> SUBCMDSHIFT) == Q_QUOTAON || + (cmds >> SUBCMDSHIFT) == Q_QUOTAOFF) vfs_unbusy(mp); return (EOPNOTSUPP); @@ -117,13 +118,13 @@ ufs_quotactl(mp, cmds, id, arg) break; default: - if (cmd == Q_QUOTAON) + if (cmd == Q_QUOTAON || cmd == Q_QUOTAOFF) vfs_unbusy(mp); return (EINVAL); } } if ((u_int)type >= MAXQUOTAS) { - if (cmd == Q_QUOTAON) + if (cmd == Q_QUOTAON || cmd == Q_QUOTAOFF) vfs_unbusy(mp); return (EINVAL); } @@ -134,7 +135,11 @@ ufs_quotactl(mp, cmds, id, arg) break; case Q_QUOTAOFF: + vfs_ref(mp); + vfs_unbusy(mp); + vn_start_write(NULL, &mp, V_WAIT | V_MNTREF); error = quotaoff(td, mp, type); + vn_finished_write(mp); break; case Q_SETQUOTA32: From owner-svn-src-head@freebsd.org Wed Sep 19 14:38:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B9FB109D36A; Wed, 19 Sep 2018 14:38:02 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4118B833BB; Wed, 19 Sep 2018 14:38:02 +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 3BCF510428; Wed, 19 Sep 2018 14:38:02 +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 w8JEc28T000695; Wed, 19 Sep 2018 14:38:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JEc2RR000694; Wed, 19 Sep 2018 14:38:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809191438.w8JEc2RR000694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 19 Sep 2018 14:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338799 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 338799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 14:38:02 -0000 Author: kib Date: Wed Sep 19 14:38:01 2018 New Revision: 338799 URL: https://svnweb.freebsd.org/changeset/base/338799 Log: Fix ZFS VFS op quotactl to follow busy protocol. Reviewed by: avg, mckusick Tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (gjb) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D17208 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Sep 19 14:36:57 2018 (r338798) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Sep 19 14:38:01 2018 (r338799) @@ -198,6 +198,8 @@ zfs_quotactl(vfs_t *vfsp, int cmds, uid_t id, void *ar break; default: error = EINVAL; + if (cmd == Q_QUOTAON || cmd == Q_QUOTAOFF) + vfs_unbusy(vfsp); goto done; } } @@ -255,9 +257,11 @@ zfs_quotactl(vfs_t *vfsp, int cmds, uid_t id, void *ar case Q_QUOTAON: // As far as I can tell, you can't turn quotas on or off on zfs error = 0; + vfs_unbusy(vfsp); break; case Q_QUOTAOFF: error = ENOTSUP; + vfs_unbusy(vfsp); break; case Q_SETQUOTA: error = copyin(&dqblk, arg, sizeof(dqblk)); From owner-svn-src-head@freebsd.org Wed Sep 19 14:56:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE4B6109DE6E; Wed, 19 Sep 2018 14:56:54 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8435684118; Wed, 19 Sep 2018 14:56:54 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7AC921079F; Wed, 19 Sep 2018 14:56:54 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8JEusl3010767; Wed, 19 Sep 2018 14:56:54 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JEurPC010763; Wed, 19 Sep 2018 14:56:53 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809191456.w8JEurPC010763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Wed, 19 Sep 2018 14:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338800 - in head: etc usr.bin/tip/tip X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc usr.bin/tip/tip X-SVN-Commit-Revision: 338800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 14:56:55 -0000 Author: brd Date: Wed Sep 19 14:56:53 2018 New Revision: 338800 URL: https://svnweb.freebsd.org/changeset/base/338800 Log: Move remote & phones to usr.bin/tip/tip/ Approved by: re (blanket, pkgbase), will (mentor) Differential Revision: https://reviews.freebsd.org/D17219 Added: head/usr.bin/tip/tip/phones - copied unchanged from r338799, head/etc/phones head/usr.bin/tip/tip/remote - copied unchanged from r338799, head/etc/remote Deleted: head/etc/phones head/etc/remote Modified: head/etc/Makefile head/usr.bin/tip/tip/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Wed Sep 19 14:38:01 2018 (r338799) +++ head/etc/Makefile Wed Sep 19 14:56:53 2018 (r338800) @@ -16,10 +16,8 @@ BIN1= \ group \ hosts.allow \ login.access \ - phones \ rc.bsdextended \ rc.firewall \ - remote \ termcap.small # NB: keep these sorted by MK_* knobs Modified: head/usr.bin/tip/tip/Makefile ============================================================================== --- head/usr.bin/tip/tip/Makefile Wed Sep 19 14:38:01 2018 (r338799) +++ head/usr.bin/tip/tip/Makefile Wed Sep 19 14:56:53 2018 (r338800) @@ -31,6 +31,7 @@ # explicitly to remcap.c if not 1024 # CONNECT enable ~C command (connect pgm to remote) +CONFS= phones remote PROG= tip LINKS= ${BINDIR}/tip ${BINDIR}/cu MAN= tip.1 cu.1 @@ -46,6 +47,9 @@ SRCS= acu.c acutab.c cmds.c cmdtab.c cu.c hunt.c log.c # -- remote.o depends on the Makefile because of DEFBR and DEFFS # -- log.o depends on the Makefile because of ACULOG acutab.o log.o remote.o: Makefile + +# Don't rebuild based on remote.c +remote: .MADE .include Copied: head/usr.bin/tip/tip/phones (from r338799, head/etc/phones) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/tip/tip/phones Wed Sep 19 14:56:53 2018 (r338800, copy of r338799, head/etc/phones) @@ -0,0 +1,8 @@ +# $FreeBSD$ +# From: @(#)phones 5.2 (Berkeley) 6/30/90 +# +# phones -- remote host phone number data base +# see tip(1), phones(5) +# examples: +#system1 9=2225551212 +#system2 9995551212 Copied: head/usr.bin/tip/tip/remote (from r338799, head/etc/remote) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/tip/tip/remote Wed Sep 19 14:56:53 2018 (r338800, copy of r338799, head/etc/remote) @@ -0,0 +1,76 @@ +# $FreeBSD$ +# +# @(#)remote 5.2 (Berkeley) 6/30/90 +# +# remote -- remote host description file +# see tip(1), remote(5) +# +# at ACU type +# br bit rate (defaults to 9600) +# cu call unit (default is dv) +# du make a call flag (dial up) +# dv device to use for the tty +# el EOL marks (default is NULL) +# fs frame size (default is BUFSIZ) -- used in buffering writes on +# receive operations +# ie input EOF marks (default is NULL) +# oe output EOF string (default is NULL) +# pa The parity type to use: even, odd, none, zero, one (default even) +# pn phone numbers (@ =>'s search phones file; possibly taken from +# PHONES environment variable) +# tc to continue a capability + +# Example systems +unixshell|Unix Access:\ + :pn=\@:tc=unix57600: +dosbbs|DOS-based BBS:\ + :pn=\@:tc=dos57600: + +# UNIX system definitions +unix57600|57600 Baud dial-out to a UNIX system:\ + :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial57600: +unix33600|33600 Baud dial-out to a UNIX system:\ + :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial33600: + +# DOS system definitions +dos57600|57600 Baud dial-out to a DOS system:\ + :el=^U^C^R^O^D^S^Q:ie=%$:oe=^Z:pa=none:tc=dial57600: + +# 33.6k and 56k modems run the com port at 115200 bps to allow for the +# compression performed in the modem. Note that some serial hardware +# does not support speeds above 38400 bps and that speeds above that have +# never been formally standardized. Modern architectures with 16550 or +# better UARTs typically have no issues with the higher speeds. +dial57600|57600 Baud Hayes attributes:\ + br#115200:tc=dial: +dial33600|33600 Baud Hayes attributes:\ + br#115200:tc=dial: +# 14.4k and 28.8k modems ran the port at 4x. Some rare 19.2 baud modems +# did too, but those aren't included in this example. +dial28800|28800 Baud Hayes attributes:\ + br#115200:tc=dial: +dial14400|14400 Baud Hayes attributes:\ + br#57600:tc=dial: +dial|Generic dialing parameters:\ + :dv=/dev/cuau0:cu=/dev/cuau0:at=hayes:du:pa=none: + +# Hardwired line +cuau0c|cua0c:dv=/dev/cuau0:br#9600:pa=none: + +# Finger friendly shortcuts +uart0|com1:dv=/dev/cuau0:br#9600:pa=none: +uart1|com2:dv=/dev/cuau1:br#9600:pa=none: +uart2|com3:dv=/dev/cuau2:br#9600:pa=none: +uart3|com4:dv=/dev/cuau3:br#9600:pa=none: +uart4|com5:dv=/dev/cuau4:br#9600:pa=none: +uart5|com6:dv=/dev/cuau5:br#9600:pa=none: +uart6|com7:dv=/dev/cuau6:br#9600:pa=none: +uart7|com8:dv=/dev/cuau7:br#9600:pa=none: +ucom1:dv=/dev/cuaU0:br#9600:pa=none: +ucom2:dv=/dev/cuaU1:br#9600:pa=none: +ucom3:dv=/dev/cuaU2:br#9600:pa=none: +ucom4:dv=/dev/cuaU3:br#9600:pa=none: +ucom5:dv=/dev/cuaU4:br#9600:pa=none: +ucom6:dv=/dev/cuaU5:br#9600:pa=none: +ucom7:dv=/dev/cuaU6:br#9600:pa=none: +ucom8:dv=/dev/cuaU7:br#9600:pa=none: From owner-svn-src-head@freebsd.org Wed Sep 19 15:39:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59542109F585; Wed, 19 Sep 2018 15:39:17 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FD1686003; Wed, 19 Sep 2018 15:39:17 +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 068E210E59; Wed, 19 Sep 2018 15:39:17 +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 w8JFdGfv031195; Wed, 19 Sep 2018 15:39:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JFdGft031194; Wed, 19 Sep 2018 15:39:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809191539.w8JFdGft031194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 19 Sep 2018 15:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338801 - 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: 338801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 15:39:17 -0000 Author: kib Date: Wed Sep 19 15:39:16 2018 New Revision: 338801 URL: https://svnweb.freebsd.org/changeset/base/338801 Log: amd64 pmap: remove tautological assert. pm_pcid is unsigned. Reviewed by: cem, markj CID: 1395727 Noted by: cem Sponsored by: The FreeBSD Foundation Approved by: re (gjb) MFC after: 3 days Differential revision: https://reviews.freebsd.org/D17235 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Sep 19 14:56:53 2018 (r338800) +++ head/sys/amd64/amd64/pmap.c Wed Sep 19 15:39:16 2018 (r338801) @@ -7442,8 +7442,7 @@ pmap_pcid_alloc_checked(pmap_t pmap, u_int cpuid) uint64_t cached; cached = pmap_pcid_alloc(pmap, cpuid); - KASSERT(pmap->pm_pcids[cpuid].pm_pcid >= 0 && - pmap->pm_pcids[cpuid].pm_pcid < PMAP_PCID_OVERMAX, + KASSERT(pmap->pm_pcids[cpuid].pm_pcid < PMAP_PCID_OVERMAX, ("pmap %p cpu %d pcid %#x", pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); KASSERT(pmap->pm_pcids[cpuid].pm_pcid != PMAP_PCID_KERN || From owner-svn-src-head@freebsd.org Wed Sep 19 16:02:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B044410A0006; Wed, 19 Sep 2018 16:02:34 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 666C686F11; Wed, 19 Sep 2018 16:02:34 +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 6166B1139E; Wed, 19 Sep 2018 16:02:34 +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 w8JG2YYT046255; Wed, 19 Sep 2018 16:02:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JG2Y0X046254; Wed, 19 Sep 2018 16:02:34 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809191602.w8JG2Y0X046254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 19 Sep 2018 16:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338802 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 338802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 16:02:34 -0000 Author: mjg Date: Wed Sep 19 16:02:33 2018 New Revision: 338802 URL: https://svnweb.freebsd.org/changeset/base/338802 Log: vm: check for empty kstack cache before locking The current cache logic checks the total number of stacks in the kernel, which even on small boxes significantly exceeds the 128 limit (e.g. an 8-way box with zfs has almost 800 stacks allocated). Stacks are cached earlier for each main thread. As a result the code is rarely executed, but when it is then (on boxes like the above) it always fails. Since there are no provisions made for NUMA and release time is approaching, just do a quick check to avoid acquiring the lock. Approved by: re (kib) Modified: head/sys/vm/vm_glue.c Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Wed Sep 19 15:39:16 2018 (r338801) +++ head/sys/vm/vm_glue.c Wed Sep 19 16:02:33 2018 (r338802) @@ -327,7 +327,7 @@ vm_thread_new(struct thread *td, int pages) else if (pages > KSTACK_MAX_PAGES) pages = KSTACK_MAX_PAGES; - if (pages == kstack_pages) { + if (pages == kstack_pages && kstack_cache != NULL) { mtx_lock(&kstack_cache_mtx); if (kstack_cache != NULL) { ks_ce = kstack_cache; From owner-svn-src-head@freebsd.org Wed Sep 19 16:08:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5759A10A024D for ; Wed, 19 Sep 2018 16:08:33 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C534087222 for ; Wed, 19 Sep 2018 16:08:32 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr1-x443.google.com with SMTP id v16-v6so6378260wro.11 for ; Wed, 19 Sep 2018 09:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=g5o8Cq4wfQGNa1A8BdvGQLXuyIZuTMiQucjTQtFEOUE=; b=Kc0qm1Yi0wax+xbXHFW2EBUAyFIDf/0xXROGPjgqaqt88WA9VniLHW4hxBbtz6ltJh AgH00jCm7TnZoOIyGjCTIyGPtg4c6beKt8Yt2SDMlujQJy+mwfYYN3hq590cXeDgc1RP mx2IhgGxjhcH5cV3LcZ7UBXqLLHVaq1zlv1ykd0hcrFHFqS0xyRHpYFn6rtnXhjkUhqK 64RFU2NZqaLHIUy3dW5YnLe3abjB+pY0YVO6QjZMf+3xkTSZ6oaaP94cVrNes/3ASxTo dl7zoKLSSR6a7JNHQfHPJQGPZG+DcUvGKhYmQ72YCTAhD5Vnd+/bjSp3+HBME6f7j6Xp zC6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=g5o8Cq4wfQGNa1A8BdvGQLXuyIZuTMiQucjTQtFEOUE=; b=aDoPNEYxBbqwBWmfbb5jqAHmZAgtiUfdXtUHfyMcrIq6+MxGnb+/A2tqctln0lAn5y p8OI3M5af7B8gR48U2Xltz+HO/oI7FQcFIHVBXhEzk/kuoxDmVUn8N91Ra17AwxXkI+L eTeN2f7m29BLp7KrHCrvgBWfHY0vS6q/mav+f+AL6ZA/+VmBgKWVDxx5q1mY0p3F+OQb F0ZgpA9Oy4ANd0+OYIjtEf02CDwPFjb3APbcn/6iRDOP5eLMOtTRoX+LTEPKRlV3Frwo xI7gEMRCSaExs9NgTSrm6i73V8LUtzVBFHTF/4GRbZN1M5JCD9ucmCe/Fszk7yUdaquB wPmw== X-Gm-Message-State: APzg51CjGUVwypmmA7b1Am+Oy9U+u0sXmc9QIkHdUAFIQg1oPe9XuqcW 8yT5MQKZpVFFOVhG7s54crKWdg== X-Google-Smtp-Source: ANB0VdbjbGDwhQZdIkVS3PjhcGWXZfBYHIXQmaLISYaK0Zu5lnqFfhpK1Bbj85klNMNxTqeSKa96Eg== X-Received: by 2002:a5d:4990:: with SMTP id r16-v6mr29778056wrq.116.1537373311542; Wed, 19 Sep 2018 09:08:31 -0700 (PDT) Received: from mutt-hbsd ([193.19.118.171]) by smtp.gmail.com with ESMTPSA id y137-v6sm4411186wmc.3.2018.09.19.09.08.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Sep 2018 09:08:30 -0700 (PDT) Date: Wed, 19 Sep 2018 12:08:19 -0400 From: Shawn Webb To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338802 - head/sys/vm Message-ID: <20180919160819.lfzrey3upzri4tll@mutt-hbsd> References: <201809191602.w8JG2Y0X046254@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3huvumm73ebqbljo" Content-Disposition: inline In-Reply-To: <201809191602.w8JG2Y0X046254@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 12.0-ALPHA5 FreeBSD 12.0-ALPHA5 X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20180622 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 16:08:33 -0000 --3huvumm73ebqbljo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 19, 2018 at 04:02:34PM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Wed Sep 19 16:02:33 2018 > New Revision: 338802 > URL: https://svnweb.freebsd.org/changeset/base/338802 >=20 > Log: > vm: check for empty kstack cache before locking > =20 > The current cache logic checks the total number of stacks in the kernel, > which even on small boxes significantly exceeds the 128 limit (e.g. an > 8-way box with zfs has almost 800 stacks allocated). > =20 > Stacks are cached earlier for each main thread. > =20 > As a result the code is rarely executed, but when it is then (on boxes = like > the above) it always fails. Since there are no provisions made for NUMA= and > release time is approaching, just do a quick check to avoid acquiring t= he > lock. > =20 > Approved by: re (kib) >=20 > Modified: > head/sys/vm/vm_glue.c >=20 > Modified: head/sys/vm/vm_glue.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/vm/vm_glue.c Wed Sep 19 15:39:16 2018 (r338801) > +++ head/sys/vm/vm_glue.c Wed Sep 19 16:02:33 2018 (r338802) > @@ -327,7 +327,7 @@ vm_thread_new(struct thread *td, int pages) > else if (pages > KSTACK_MAX_PAGES) > pages =3D KSTACK_MAX_PAGES; > =20 > - if (pages =3D=3D kstack_pages) { > + if (pages =3D=3D kstack_pages && kstack_cache !=3D NULL) { > mtx_lock(&kstack_cache_mtx); > if (kstack_cache !=3D NULL) { > ks_ce =3D kstack_cache; Since kstack_cache is guaranteed not to be NULL, can the second conditional that checks for kstack_cache not being NULL be removed? Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --3huvumm73ebqbljo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAluidG4ACgkQaoRlj1JF bu4f8xAAlfGz+6Wb3F6Hyip/fhypaiv/G2hAsEwV2pPvMDk0qIkqFxDrLE/shsgp UpjfCnkNFm9g/bVTxouPcDtuj5Tj1jLxBTlZcATw1lGvUTL30lUscT+bnIcw2ylz xwPhHpYdYjokhq91ju/faZ4IVTODhr3vDx9GyZVr7MDcRmSDQSWy4mW2+zoNCBg+ gF+I5lqpA4cN16tkLW+1nh+czdKsg8gn4k7JIp06DKwn5Zr1JeH5ZTnnAVYl27vR Pu8xtEcLHsMTDLw3VzGHiUdps5D9gfpy0GddqZvuFhYMcRiv87oX+78DCEFBoOQ5 IS0LfVb7ajacHzlGSq4ZbMb6rJOVAcfSSqHTdrxDL7TMIw1JG444HtGJPNeSd/nf tX1XRiHxvD86BgnF9sbXKX+wbrHC7ajvxXnEpHdZNXyKUhc5uPZYCcXgtsgMNkbm RAqJfP52d1WKbjnukWT3RdolwtzGViB60LD48xor9W0ImjQHHV22fa9l8CSh2mze 1SoCsnFw62g1Ulpgx3opzmvbHwHJ6OimvxFGBRmIFV7lfzGcdeeWRcbdEBa9xSSI 10FDVd9POeZ5ueKab8RGilQKcrnujzNsw0iSZfvwRCWqYNCjc90/zfZZ2nAkSyJ3 1Va8s8SC/UCJ/RpSw3leFkXeCf0ZioHs+7HB2HTrGcvyIdTFjRM= =G9fa -----END PGP SIGNATURE----- --3huvumm73ebqbljo-- From owner-svn-src-head@freebsd.org Wed Sep 19 16:12:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0137310A059B; Wed, 19 Sep 2018 16:12:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt0-x244.google.com (mail-qt0-x244.google.com [IPv6:2607:f8b0:400d:c0d::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90A2488035; Wed, 19 Sep 2018 16:12:30 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt0-x244.google.com with SMTP id l2-v6so450681qtr.12; Wed, 19 Sep 2018 09:12:30 -0700 (PDT) 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=vgZ3VoZKBjSqYD82gDl0Smoc8ZF5v0ZAaexyYfmQ8V4=; b=HEgOgW4vfgUiem/JEroOHcO1VcjftnuIbKo8KxjWzLhC50LVZagfteOOpH/QrGIiSk www4dsosOXuKFBeFw+KM0iUfg77Qet0kBpox96x3YR3JFUIF94lHYOiCzDXvJDrIBI/d sEBegRdaXA1VG232PegqO3xtT/oiRLKHNDJUmKcsALiU/cp3H9l+GvlssFbdCaY1G0dH 3jQXYFDRJhjYrxojArikUkewYTI7IOxeIwEBMX/yudOZNAV9HK9gvQnZ1PR7GMUpwi/E awYS102a6IuE7tuZZW8R1N6DdNwkLQRe4KuNLFHeM6QBnGO0QaWmrzfX3dXjhUdAust8 wLvA== 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=vgZ3VoZKBjSqYD82gDl0Smoc8ZF5v0ZAaexyYfmQ8V4=; b=s5OS/4kLeKhzcS4064uw1GHrUPejyG2BYbeLIQOzqDhy5UGOkPXUn4Ih44BqLPtzGE WAWZg3IlF4RmiqAORavO43C+AVEsnM2oWkmPZvepJEnBC9viZcZSOf9OSJ4YgSOOXS3/ 87JzK+yTpPi62fy/UH3/tF0BV/Y5rDkiC0m09PoSdaEjXCYIepiVoqLqa8TIt4InL3pd IB96Xgfq8CKalUzImDD5qmShnyToun4/tlVliOsqVreFJuBbP3p7GA3HRbv4JS/EQdve ELibImILW08uu3/oM/KUPK60ZweEXF5luMsMLaJUW0UZCp11ftvPg4PaSdb4VrtgFTBQ KA4g== X-Gm-Message-State: APzg51ASpWVv4aJSLlPhQyzURlNhpUp30WU6eyQIF4PlqokrikR9woyE AD8KhV1GBQl4ck1X+e41Hm4ShigNtKhM3rWXJZC1ww== X-Google-Smtp-Source: ANB0VdYpBJaKRvf2+cuZlf9SEivhGz97pNSZNgqDyhULM4u84kNSs6DfXY2P85T+WFJRm5zhqkN3Rq8JGDpjDh2nsQw= X-Received: by 2002:aed:3244:: with SMTP id y62-v6mr24329489qtd.292.1537373550152; Wed, 19 Sep 2018 09:12:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:3602:0:0:0:0:0 with HTTP; Wed, 19 Sep 2018 09:12:29 -0700 (PDT) In-Reply-To: <20180919160819.lfzrey3upzri4tll@mutt-hbsd> References: <201809191602.w8JG2Y0X046254@repo.freebsd.org> <20180919160819.lfzrey3upzri4tll@mutt-hbsd> From: Mateusz Guzik Date: Wed, 19 Sep 2018 18:12:29 +0200 Message-ID: Subject: Re: svn commit: r338802 - head/sys/vm To: Shawn Webb Cc: Mateusz Guzik , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 16:12:31 -0000 On Wed, Sep 19, 2018 at 6:08 PM, Shawn Webb wrote: > On Wed, Sep 19, 2018 at 04:02:34PM +0000, Mateusz Guzik wrote: > > Author: mjg > > Date: Wed Sep 19 16:02:33 2018 > > New Revision: 338802 > > URL: https://svnweb.freebsd.org/changeset/base/338802 > > > > Log: > > vm: check for empty kstack cache before locking > > > > The current cache logic checks the total number of stacks in the > kernel, > > which even on small boxes significantly exceeds the 128 limit (e.g. an > > 8-way box with zfs has almost 800 stacks allocated). > > > > Stacks are cached earlier for each main thread. > > > > As a result the code is rarely executed, but when it is then (on boxes > like > > the above) it always fails. Since there are no provisions made for > NUMA and > > release time is approaching, just do a quick check to avoid acquiring > the > > lock. > > > > Approved by: re (kib) > > > > Modified: > > head/sys/vm/vm_glue.c > > > > Modified: head/sys/vm/vm_glue.c > > ============================================================ > ================== > > --- head/sys/vm/vm_glue.c Wed Sep 19 15:39:16 2018 (r338801) > > +++ head/sys/vm/vm_glue.c Wed Sep 19 16:02:33 2018 (r338802) > > @@ -327,7 +327,7 @@ vm_thread_new(struct thread *td, int pages) > > else if (pages > KSTACK_MAX_PAGES) > > pages = KSTACK_MAX_PAGES; > > > > - if (pages == kstack_pages) { > > + if (pages == kstack_pages && kstack_cache != NULL) { > > mtx_lock(&kstack_cache_mtx); > > if (kstack_cache != NULL) { > > ks_ce = kstack_cache; > > Since kstack_cache is guaranteed not to be NULL, can the second > conditional that checks for kstack_cache not being NULL be removed? > > The one with the lock held? By the time we get there someone else might have removed the last cached stack making the pointer NULL. Checking a condition before locking and then checking again is a common optimization pattern for cases where the condition is likely false. -- Mateusz Guzik From owner-svn-src-head@freebsd.org Wed Sep 19 16:13:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A899E10A065F for ; Wed, 19 Sep 2018 16:13:53 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B6B9883DE for ; Wed, 19 Sep 2018 16:13:53 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wm1-x344.google.com with SMTP id o18-v6so7678098wmc.0 for ; Wed, 19 Sep 2018 09:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=t7uTJ3gidu1o2m7Ra6g0Wowxi8se3U1ltUVPpybRDQQ=; b=Lt0CbYwMdt3uWEh/lIBMfm83YSMQXW+s2ngQNywpFwlKFG+mUJq1GvRSiH4JXvQiaw 1RN135qMVe+3ueEmTJHv08EVdSLTwumnbI+TVs4RUbT+UEA8SKIAp/jED45pgcCk1//+ Yko6D0cgXVD+x82W/rn8hApI0D8Luz8foiJkiMbHnMa2NV8zlJOuLy09K6bZT4sLLksI vaj0RFDE2UxEzY89RZ72sx+wd/d948cyYGqTCUm+BT3xh17HQhczzmkm+aDAFBtraLCc MLe8u7pVMrpsG18+3ejDaRpbrpMAPU6YXXa7dD2cbQujTKyawJ0XsU81XSEkpf8IX2v8 e9KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=t7uTJ3gidu1o2m7Ra6g0Wowxi8se3U1ltUVPpybRDQQ=; b=mY9B1+qYkR8/B0Nv30Cevyz1LCO33IFvMnfsrygP/6tmzFGsCO7F+lKPLnjqWlteOu GMiEq374Tq2Wu3olMIM67geqDTaC1wepjp5X17MjGRH/hKJDP6VdVH3ANQlP1RQDRBkX RH2Vor/LY5Os6Lzro9kfFwZu3Au0a2ltSNvlgNhTY2GSngkne3Btkq0nABmv7FC6irLV isHx0fdbdhuLyErdvGS1FKN5S61eQKes1qejYVP2TU0urDDsYHyRRIHeBfZvAi57CVJl MWQBSdihrMgIh4qcBXwurdepzdfA0tTN1tHuTxGMXRW3yTxPsTdINbY7WMWjtNOBMD8X lojA== X-Gm-Message-State: APzg51ATb7g16fMeB54lX0PScaeZnOE74GYq0zwX4K9lfvB4V5JpDEzo id2vKI7hWUY+fbccHmvqJeleQQ== X-Google-Smtp-Source: ANB0VdYBOFgQRSzCoTQulzft4UyziIQWIAoKFXCE7ZZRoEMAOiWJKLYm6ea8vp9zPZMdd+kx1sHD1Q== X-Received: by 2002:a1c:ee57:: with SMTP id m84-v6mr20543892wmh.9.1537373631882; Wed, 19 Sep 2018 09:13:51 -0700 (PDT) Received: from mutt-hbsd ([193.19.118.171]) by smtp.gmail.com with ESMTPSA id 14-v6sm10677803wmp.32.2018.09.19.09.13.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Sep 2018 09:13:50 -0700 (PDT) Date: Wed, 19 Sep 2018 12:13:43 -0400 From: Shawn Webb To: Mateusz Guzik Cc: Mateusz Guzik , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338802 - head/sys/vm Message-ID: <20180919161343.ltn7ykiop2lzzgcj@mutt-hbsd> References: <201809191602.w8JG2Y0X046254@repo.freebsd.org> <20180919160819.lfzrey3upzri4tll@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7k4dlpxs4gushcjn" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hbsd 12.0-ALPHA5 FreeBSD 12.0-ALPHA5 X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20180622 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 16:13:54 -0000 --7k4dlpxs4gushcjn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 19, 2018 at 06:12:29PM +0200, Mateusz Guzik wrote: > On Wed, Sep 19, 2018 at 6:08 PM, Shawn Webb > wrote: >=20 > > On Wed, Sep 19, 2018 at 04:02:34PM +0000, Mateusz Guzik wrote: > > > Author: mjg > > > Date: Wed Sep 19 16:02:33 2018 > > > New Revision: 338802 > > > URL: https://svnweb.freebsd.org/changeset/base/338802 > > > > > > Log: > > > vm: check for empty kstack cache before locking > > > > > > The current cache logic checks the total number of stacks in the > > kernel, > > > which even on small boxes significantly exceeds the 128 limit (e.g.= an > > > 8-way box with zfs has almost 800 stacks allocated). > > > > > > Stacks are cached earlier for each main thread. > > > > > > As a result the code is rarely executed, but when it is then (on bo= xes > > like > > > the above) it always fails. Since there are no provisions made for > > NUMA and > > > release time is approaching, just do a quick check to avoid acquiri= ng > > the > > > lock. > > > > > > Approved by: re (kib) > > > > > > Modified: > > > head/sys/vm/vm_glue.c > > > > > > Modified: head/sys/vm/vm_glue.c > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > --- head/sys/vm/vm_glue.c Wed Sep 19 15:39:16 2018 (r33880= 1) > > > +++ head/sys/vm/vm_glue.c Wed Sep 19 16:02:33 2018 (r33880= 2) > > > @@ -327,7 +327,7 @@ vm_thread_new(struct thread *td, int pages) > > > else if (pages > KSTACK_MAX_PAGES) > > > pages =3D KSTACK_MAX_PAGES; > > > > > > - if (pages =3D=3D kstack_pages) { > > > + if (pages =3D=3D kstack_pages && kstack_cache !=3D NULL) { > > > mtx_lock(&kstack_cache_mtx); > > > if (kstack_cache !=3D NULL) { > > > ks_ce =3D kstack_cache; > > > > Since kstack_cache is guaranteed not to be NULL, can the second > > conditional that checks for kstack_cache not being NULL be removed? > > > > > The one with the lock held? By the time we get there someone else might > have removed the last cached stack making the pointer NULL. >=20 > Checking a condition before locking and then checking again is a common > optimization pattern for cases where the condition is likely false. Ah, I understand now. Thanks for the clarification! --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --7k4dlpxs4gushcjn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAluidbYACgkQaoRlj1JF bu47pw//ZB5VcPYu/cXoOkHWlSxfUgIN1xwQqbEQiI4O50S3DSUBi97JJD3s9zRx b8x4Cc4Cq1C5KdJzrg7KBOWZLOJL/Y3K4r1q6T2ADgn3Hd8qjCriqZhvLz3lZvQ5 q4eBwo19G/M6v6lcPJIZEwrUaZh3GgVqGbqvntlzmOkbrNwogE1x6f0EUp0RSbRQ qCEePYihRFlKuwdVzykcQj8bzbK4BaT3oEKvTq4aJ71JAdWDo/CebDA6eKMAeS9q nq9EKZNT9u9E+jjONIJ6JGQ/q3LF+4QHH+Omkj8JQD05/7oef6Otoq/yaSw4ghu0 2WdgT8PuZAdi/sS84Ma0C8ujXO3g9bflyYcS2smMyFXXEqPzDgEBRJQ5v6JnvTOn kr5yR70EdefLbcTHhg2YbnjlBnQ7Wv3Vo5LclpNOEPLHCjrjLzAvyvh7Xg9cLbQX 6JaOsWXkA2uVIsGnMahu2dvFnFIzguBcgEB1gzaGsSVdYJgiS0BryIhbTpigbuv+ 0ydKXKr2qFdJw+iBJMkCuFRqE1SwqlF6MIYb7LJOJGbJxtQI8mNEMq+77Kt1Fb1E ZyAJLkcIZmo8W7nYxOPjuB+u/oCjcaRKsyioY2qNcdbQMwvBXeZQgEpHobnV4/3q zGY8qBGKTISTxox7aqsa4ltIRwKfyv0PlLJjOunOcO/9/6m3CG0= =n6/0 -----END PGP SIGNATURE----- --7k4dlpxs4gushcjn-- From owner-svn-src-head@freebsd.org Wed Sep 19 16:37:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D00AB10A131C; Wed, 19 Sep 2018 16:37: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79009892CF; Wed, 19 Sep 2018 16:37: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 73E051188F; Wed, 19 Sep 2018 16:37: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 w8JGbhMf061600; Wed, 19 Sep 2018 16:37:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JGbhHM061599; Wed, 19 Sep 2018 16:37:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809191637.w8JGbhHM061599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 19 Sep 2018 16:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338803 - head/sys/i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/i386/i386 X-SVN-Commit-Revision: 338803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 16:37:44 -0000 Author: kib Date: Wed Sep 19 16:37:43 2018 New Revision: 338803 URL: https://svnweb.freebsd.org/changeset/base/338803 Log: Convert i386 NPX hardware context save methods to ifuncs. Since ifunc-capable linker is now required on i386, bring this code in line with the amd64 counterpart. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D16736 Modified: head/sys/i386/i386/npx.c Modified: head/sys/i386/i386/npx.c ============================================================================== --- head/sys/i386/i386/npx.c Wed Sep 19 16:02:33 2018 (r338802) +++ head/sys/i386/i386/npx.c Wed Sep 19 16:37:43 2018 (r338803) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -183,7 +184,6 @@ CTASSERT(X86_XSTATE_XCR0_OFFSET >= offsetof(struct sav static void fpu_clean_state(void); -static void fpusave(union savefpu *); static void fpurstor(union savefpu *); int hw_float; @@ -206,8 +206,6 @@ struct xsave_area_elm_descr { u_int size; } *xsave_area_desc; -static int use_xsaveopt; - static volatile u_int npx_traps_while_probing; alias_for_inthand_t probetrap; @@ -314,6 +312,69 @@ cleanup: return (hw_float); } +static void +npxsave_xsaveopt(union savefpu *addr) +{ + + xsaveopt((char *)addr, xsave_mask); +} + +static void +fpusave_xsave(union savefpu *addr) +{ + + xsave((char *)addr, xsave_mask); +} + +static void +fpusave_fxsave(union savefpu *addr) +{ + + fxsave((char *)addr); +} + +static void +fpusave_fnsave(union savefpu *addr) +{ + + fnsave((char *)addr); +} + +static void +init_xsave(void) +{ + + if (use_xsave) + return; + if (!cpu_fxsr || (cpu_feature2 & CPUID2_XSAVE) == 0) + return; + use_xsave = 1; + TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); +} + +DEFINE_IFUNC(, void, npxsave_core, (union savefpu *), static) +{ + + init_xsave(); + if (use_xsave) + return ((cpu_stdext_feature & CPUID_EXTSTATE_XSAVEOPT) != 0 ? + npxsave_xsaveopt : fpusave_xsave); + if (cpu_fxsr) + return (fpusave_fxsave); + return (fpusave_fnsave); +} + +DEFINE_IFUNC(, void, fpusave, (union savefpu *), static) +{ + + init_xsave(); + if (use_xsave) + return (fpusave_xsave); + if (cpu_fxsr) + return (fpusave_fxsave); + return (fpusave_fnsave); +} + /* * Enable XSAVE if supported and allowed by user. * Calculate the xsave_mask. @@ -325,13 +386,8 @@ npxinit_bsp1(void) uint64_t xsave_mask_user; TUNABLE_INT_FETCH("hw.lazy_fpu_switch", &lazy_fpu_switch); - if (cpu_fxsr && (cpu_feature2 & CPUID2_XSAVE) != 0) { - use_xsave = 1; - TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); - } if (!use_xsave) return; - cpuid_count(0xd, 0x0, cp); xsave_mask = XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; if ((cp[0] & xsave_mask) != xsave_mask) @@ -345,14 +401,9 @@ npxinit_bsp1(void) xsave_mask &= ~XFEATURE_AVX512; if ((xsave_mask & XFEATURE_MPX) != XFEATURE_MPX) xsave_mask &= ~XFEATURE_MPX; - - cpuid_count(0xd, 0x1, cp); - if ((cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0) - use_xsaveopt = 1; } /* - * Calculate the fpu save area size. */ static void @@ -867,15 +918,11 @@ npxdna(void) * npxsave() atomically with checking fpcurthread. */ void -npxsave(addr) - union savefpu *addr; +npxsave(union savefpu *addr) { stop_emulating(); - if (use_xsaveopt) - xsaveopt((char *)addr, xsave_mask); - else - fpusave(addr); + npxsave_core(addr); } void npxswitch(struct thread *td, struct pcb *pcb); @@ -1097,19 +1144,6 @@ npxsetregs(struct thread *td, union savefpu *addr, cha } critical_exit(); return (error); -} - -static void -fpusave(addr) - union savefpu *addr; -{ - - if (use_xsave) - xsave((char *)addr, xsave_mask); - else if (cpu_fxsr) - fxsave(addr); - else - fnsave(addr); } static void From owner-svn-src-head@freebsd.org Wed Sep 19 17:20:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBE8C10A23DF for ; Wed, 19 Sep 2018 17:20:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-13.consmr.mail.bf2.yahoo.com (sonic314-13.consmr.mail.bf2.yahoo.com [74.6.132.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72FF48AA56 for ; Wed, 19 Sep 2018 17:20:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 5CsOz08VM1m8SKkO5PBcIUn22jga2QBpMzrAD0Xph8ELNoe5NDs9jp4CucSwlp9 av.b8j5AgBbAuxHie.0OPWBjStDIbk0yZ1YVwRKZbwCfvK9BgvbIw_F_94Q6kn3CGaRS5w7pvIV5 o8fCiLtxML_JSxT7u_7XvStq3uVL57OuZl6nsEuMXMUtMHodZbRt_eCxp4TlmBfJUJH4ERaJ584G MI.E2MyLtOod6AAxen9nWjMVv1rMk19uIYpGnA9uyp_J5cATDbrg4oYqbCHhp2a2d_7cXik1iBVE Oe6Mw410eGisRsFxegCDY.w8Wprgii17E4LdZCabnO3RnKBrAbniYYZTX87l9YeeOfgyMAGk3NZ8 SQTZxrpx84oBGUEBEOZ8Magksy4UZvMIf6g1Q64snet0b8VSQcwcPp3.OGooPCzOlVQuTz5KCeij NWX8MbUfgN7Z2ftxpItyv0S8PAUqEJNioqfRXkYdK_eEgBRaO2HFs45QGGTxdrUd6ng2A.H5m4Gi tIXpDUjIVAHhcZYZdke03Tybrtw4IsgiXSGx6SrIWZGcSMiZ3.I6jbChuFKLz3IFStdMmzT.mC4E soTMYvGH1dXswUDQsf75O3KrB1G3g.uX7kNOti8qtEaEb5FbOl7UEy1a8BJrBLFAL1hTVq1A65b6 oobpOzTCbmnovMP99qJ5wIxyjg3ZKltmiKmHJ2kHiAelzkyjKxHaxz91COr9Tk..8FGE.WEY8acC LTeJIH.T1LIoH92qt8y4wXLJDuUse.KD7.AmHaoFidlbfhC3LwggZerIcf1i6VPRJqlNPncBG2Sy X5_Lai6InxA6egv_jpGzPPaF4cg_2k0dCYwmzcPaIvDsTOpBSilk37241wLMfUkL_AJMT5Qfw97v XlSLXnKNq44VtFAKq3IsMggUTeVeRFRQIcioN9THKOpTMWfwCAvgwuPvxCQllYfPYx9mSDNAdQ9N SPcAn77ytppY.a5d6ITcaNeyB0E8xZF2uH3jipbEI0ul_AkJjtnlOjLYpwcqvrHfEvFkY6VePt4r WFvRXSWftMg-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.bf2.yahoo.com with HTTP; Wed, 19 Sep 2018 17:20:16 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp421.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID ec244eb94db3bee720a955a2bb70cf49; Wed, 19 Sep 2018 17:20:13 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336601 - head Date: Wed, 19 Sep 2018 10:20:11 -0700 References: To: "Piotr P. Stefaniak" , svn-src-head@freebsd.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 17:20:18 -0000 [I was asked what the fix might be. So I suggest specifics.] On 2018-Sep-16, at 10:06 AM, Mark Millard wrote: > Looks like this head/ObsoleteFiles.inc update has a typo > in each thing added to OLD_FILES . . . >=20 > # ls -lTdt /usr/tests/usr.bin/indent/* > -r--r--r-- 1 root wheel 121 Sep 13 22:53:30 2018 = /usr/tests/usr.bin/indent/Kyuafile > . . . > -r--r--r-- 1 root wheel 295 Sep 13 22:53:29 2018 = /usr/tests/usr.bin/indent/binary.0 > -r--r--r-- 1 root wheel 92 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/sac.0.pro > -r--r--r-- 1 root wheel 130 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/sac.0.stdout > -r--r--r-- 1 root wheel 122 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/sac.0 > -r--r--r-- 1 root wheel 94 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/nsac.0.pro > -r--r--r-- 1 root wheel 130 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/nsac.0.stdout > -r--r--r-- 1 root wheel 123 May 1 19:35:24 2018 = /usr/tests/usr.bin/indent/nsac.0 >=20 > vs. ( note usr.bin vs. usr/bin ): >=20 > Modified: head/ObsoleteFiles.inc > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/ObsoleteFiles.inc Sun Jul 22 12:04:21 2018 = (r336600) > +++ head/ObsoleteFiles.inc Sun Jul 22 12:45:02 2018 = (r336601) > @@ -38,6 +38,13 @@ > # xargs -n1 | sort | uniq -d; > # done >=20 > +# 20180722: indent(1) option renamed, test files follow > +OLD_FILES+=3Dusr/bin/indent/tests/nsac.0 > +OLD_FILES+=3Dusr/bin/indent/tests/nsac.0.pro > +OLD_FILES+=3Dusr/bin/indent/tests/nsac.0.stdout > +OLD_FILES+=3Dusr/bin/indent/tests/sac.0 > +OLD_FILES+=3Dusr/bin/indent/tests/sac.0.pro > +OLD_FILES+=3Dusr/bin/indent/tests/sac.0.stdout > # 20180721: move of libmlx5.so.1 and libibverbs.so.1 > OLD_LIBS+=3Dusr/lib/libmlx5.so.1 > OLD_LIBS+=3Dusr/lib/libibverbs.so.1 As near as I can tell the fix would be something like (leading whitespace seems to be disappearing): # svnlite diff /usr/src/ObsoleteFiles.inc Index: /usr/src/ObsoleteFiles.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- /usr/src/ObsoleteFiles.inc (revision 338675) +++ /usr/src/ObsoleteFiles.inc (working copy) @@ -48,12 +48,12 @@ # 20180725: Cleanup old libcasper.so.0 OLD_LIBS+=3Dlib/libcasper.so.0 # 20180722: indent(1) option renamed, test files follow -OLD_FILES+=3Dusr/bin/indent/tests/nsac.0 -OLD_FILES+=3Dusr/bin/indent/tests/nsac.0.pro -OLD_FILES+=3Dusr/bin/indent/tests/nsac.0.stdout -OLD_FILES+=3Dusr/bin/indent/tests/sac.0 -OLD_FILES+=3Dusr/bin/indent/tests/sac.0.pro -OLD_FILES+=3Dusr/bin/indent/tests/sac.0.stdout +OLD_FILES+=3Dusr/tests/usr.bin/indent/nsac.0 +OLD_FILES+=3Dusr/tests/usr.bin/indent/nsac.0.pro +OLD_FILES+=3Dusr/tests/usr.bin/indent/nsac.0.stdout +OLD_FILES+=3Dusr/tests/usr.bin/indent/sac.0 +OLD_FILES+=3Dusr/tests/usr.bin/indent/sac.0.pro +OLD_FILES+=3Dusr/tests/usr.bin/indent/sac.0.stdout # 20180721: move of libmlx5.so.1 and libibverbs.so.1 OLD_LIBS+=3Dusr/lib/libmlx5.so.1 OLD_LIBS+=3Dusr/lib/libibverbs.so.1 This is sort of like the older part of the file: # 20170322: rename to _test to match the FreeBSD test suite name = scheme OLD_FILES+=3Dusr/tests/usr.bin/col/col OLD_FILES+=3Dusr/tests/usr.bin/diff/diff OLD_FILES+=3Dusr/tests/usr.bin/ident/ident OLD_FILES+=3Dusr/tests/usr.bin/mkimg/mkimg OLD_FILES+=3Dusr/tests/usr.bin/sdiff/sdiff OLD_FILES+=3Dusr/tests/usr.bin/soelim/soelim OLD_FILES+=3Dusr/tests/usr.sbin/pw/pw_config OLD_FILES+=3Dusr/tests/usr.sbin/pw/pw_etcdir OLD_FILES+=3Dusr/tests/usr.sbin/pw/pw_groupadd OLD_FILES+=3Dusr/tests/usr.sbin/pw/pw_groupdel OLD_FILES+=3Dusr/tests/usr.sbin/pw/pw_groupmod OLD_FILES+=3Dusr/tests/usr.sbin/pw/pw_lock OLD_FILES+=3Dusr/tests/usr.sbin/pw/pw_useradd OLD_FILES+=3Dusr/tests/usr.sbin/pw/pw_userdel OLD_FILES+=3Dusr/tests/usr.sbin/pw/pw_usermod OLD_FILES+=3Dusr/tests/usr.sbin/pw/pw_usernext =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Wed Sep 19 18:49:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BAA410A3CB2; Wed, 19 Sep 2018 18:49:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AA318D4B7; Wed, 19 Sep 2018 18:49:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B7C812DF8; Wed, 19 Sep 2018 18:49:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8JIncNY028824; Wed, 19 Sep 2018 18:49:38 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JIncmT028823; Wed, 19 Sep 2018 18:49:38 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201809191849.w8JIncmT028823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 19 Sep 2018 18:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338804 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 338804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 18:49:38 -0000 Author: bz Date: Wed Sep 19 18:49:37 2018 New Revision: 338804 URL: https://svnweb.freebsd.org/changeset/base/338804 Log: Update udp6_output() inp locking to avoid concurrency issues with route cache updates. Bring over locking changes applied to udp_output() for the route cache in r297225 and fixed in r306559 which achieve multiple things: (1) acquire an exclusive inp lock earlier depending on the expected conditions; we add a comment explaining this in udp6, (2) having acquired the exclusive lock earlier eliminates a slight possible chance for a race condition which was present in v4 for multiple years as well and is now gone, and (3) only pass the inp_route6 to ip6_output() if we are holding an exclusive inp lock, so that possible route cache updates in case of routing table generation number changes can happen safely. In addition this change (as the legacy IP counterpart) decomposes the tracking of inp and pcbinfo lock and adds extra assertions, that the two together are acquired correctly. PR: 230950 Reviewed by: karels, markj Approved by: re (gjb) Pointyhat to: bz (for completely missing this bit) Differential Revision: https://reviews.freebsd.org/D17230 Modified: head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Wed Sep 19 16:37:43 2018 (r338803) +++ head/sys/netinet6/udp6_usrreq.c Wed Sep 19 18:49:37 2018 (r338804) @@ -698,7 +698,7 @@ udp6_output(struct socket *so, int flags_arg, struct m u_int32_t ulen, plen; uint16_t cscov; u_short fport; - uint8_t nxt, unlock_udbinfo; + uint8_t nxt, unlock_inp, unlock_udbinfo; /* addr6 has been validated in udp6_send(). */ sin6 = (struct sockaddr_in6 *)addr6; @@ -734,7 +734,22 @@ udp6_output(struct socket *so, int flags_arg, struct m inp = sotoinpcb(so); KASSERT(inp != NULL, ("%s: inp == NULL", __func__)); - INP_RLOCK(inp); + /* + * In the following cases we want a write lock on the inp for either + * local operations or for possible route cache updates in the IPv6 + * output path: + * - on connected sockets (sin6 is NULL) for route cache updates, + * - when we are not bound to an address and source port (it is + * in6_pcbsetport() which will require the write lock). + */ + if (sin6 == NULL || (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) && + inp->inp_lport == 0)) { + INP_WLOCK(inp); + unlock_inp = UH_WLOCKED; + } else { + INP_RLOCK(inp); + unlock_inp = UH_RLOCKED; + } nxt = (inp->inp_socket->so_proto->pr_protocol == IPPROTO_UDP) ? IPPROTO_UDP : IPPROTO_UDPLITE; @@ -758,7 +773,10 @@ udp6_output(struct socket *so, int flags_arg, struct m * potential race in which the factors causing us to * select the UDPv4 output routine are invalidated? */ - INP_RUNLOCK(inp); + if (unlock_inp == UH_WLOCKED) + INP_WUNLOCK(inp); + else + INP_RUNLOCK(inp); if (sin6) in6_sin6_2_sin_in_sock((struct sockaddr *)sin6); pru = inetsw[ip_protox[nxt]].pr_usrreqs; @@ -772,7 +790,10 @@ udp6_output(struct socket *so, int flags_arg, struct m if (control) { if ((error = ip6_setpktopts(control, &opt, inp->in6p_outputopts, td->td_ucred, nxt)) != 0) { - INP_RUNLOCK(inp); + if (unlock_inp == UH_WLOCKED) + INP_WUNLOCK(inp); + else + INP_RUNLOCK(inp); ip6_clearpktopts(&opt, -1); if (control) m_freem(control); @@ -786,12 +807,6 @@ udp6_output(struct socket *so, int flags_arg, struct m pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol); if (sin6 != NULL && IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) && inp->inp_lport == 0) { - INP_RUNLOCK(inp); - /* - * XXX there is a short window here which could lead to a race; - * should we re-check that what got us here is still valid? - */ - INP_WLOCK(inp); INP_HASH_WLOCK(pcbinfo); unlock_udbinfo = UH_WLOCKED; } else if (sin6 != NULL && @@ -972,9 +987,10 @@ udp6_output(struct socket *so, int flags_arg, struct m UDPLITE_PROBE(send, NULL, inp, ip6, inp, udp6); else UDP_PROBE(send, NULL, inp, ip6, inp, udp6); - error = ip6_output(m, optp, &inp->inp_route6, flags, + error = ip6_output(m, optp, + (unlock_inp == UH_WLOCKED) ? &inp->inp_route6 : NULL, flags, inp->in6p_moptions, NULL, inp); - if (unlock_udbinfo == UH_WLOCKED) + if (unlock_inp == UH_WLOCKED) INP_WUNLOCK(inp); else INP_RUNLOCK(inp); @@ -987,12 +1003,20 @@ udp6_output(struct socket *so, int flags_arg, struct m release: if (unlock_udbinfo == UH_WLOCKED) { + KASSERT(unlock_inp == UH_WLOCKED, ("%s: excl udbinfo lock, " + "non-excl inp lock: pcbinfo %p %#x inp %p %#x", + __func__, pcbinfo, unlock_udbinfo, inp, unlock_inp)); INP_HASH_WUNLOCK(pcbinfo); INP_WUNLOCK(inp); } else if (unlock_udbinfo == UH_RLOCKED) { + KASSERT(unlock_inp == UH_RLOCKED, ("%s: non-excl udbinfo lock, " + "excl inp lock: pcbinfo %p %#x inp %p %#x", + __func__, pcbinfo, unlock_udbinfo, inp, unlock_inp)); INP_HASH_RUNLOCK_ET(pcbinfo, et); INP_RUNLOCK(inp); - } else + } else if (unlock_inp == UH_WLOCKED) + INP_WUNLOCK(inp); + else INP_RUNLOCK(inp); if (control) { ip6_clearpktopts(&opt, -1); From owner-svn-src-head@freebsd.org Wed Sep 19 19:13:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E216310A44F3; Wed, 19 Sep 2018 19:13:44 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94D3A8E3F8; Wed, 19 Sep 2018 19:13:44 +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 8F1B4132ED; Wed, 19 Sep 2018 19:13:44 +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 w8JJDivb043757; Wed, 19 Sep 2018 19:13:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JJDie5043755; Wed, 19 Sep 2018 19:13:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201809191913.w8JJDie5043755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 19 Sep 2018 19:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338806 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 338806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 19:13:45 -0000 Author: markj Date: Wed Sep 19 19:13:43 2018 New Revision: 338806 URL: https://svnweb.freebsd.org/changeset/base/338806 Log: Move kernel vmem arena initialization to vm_kern.c. This keeps the initialization coupled together with the kmem_* KPI implementation, which is the main user of these arenas. No functional change intended. Reviewed by: alc Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17247 Modified: head/sys/vm/vm_init.c head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_init.c ============================================================================== --- head/sys/vm/vm_init.c Wed Sep 19 19:13:29 2018 (r338805) +++ head/sys/vm/vm_init.c Wed Sep 19 19:13:43 2018 (r338806) @@ -98,12 +98,6 @@ extern void uma_startup1(void); extern void uma_startup2(void); extern void vm_radix_reserve_kva(void); -#if VM_NRESERVLEVEL > 0 -#define KVA_QUANTUM (1 << (VM_LEVEL_0_ORDER + PAGE_SHIFT)) -#else - /* On non-superpage architectures want large import sizes. */ -#define KVA_QUANTUM (PAGE_SIZE * 1024) -#endif long physmem; /* @@ -113,57 +107,14 @@ static void vm_mem_init(void *); SYSINIT(vm_mem, SI_SUB_VM, SI_ORDER_FIRST, vm_mem_init, NULL); /* - * Import kva into the kernel arena. - */ -static int -kva_import(void *unused, vmem_size_t size, int flags, vmem_addr_t *addrp) -{ - vm_offset_t addr; - int result; - - KASSERT((size % KVA_QUANTUM) == 0, - ("kva_import: Size %jd is not a multiple of %d", - (intmax_t)size, (int)KVA_QUANTUM)); - addr = vm_map_min(kernel_map); - result = vm_map_find(kernel_map, NULL, 0, &addr, size, 0, - VMFS_SUPER_SPACE, VM_PROT_ALL, VM_PROT_ALL, MAP_NOFAULT); - if (result != KERN_SUCCESS) - return (ENOMEM); - - *addrp = addr; - - return (0); -} - -#if VM_NRESERVLEVEL > 0 -/* - * Import a superpage from the normal kernel arena into the special - * arena for allocations with different permissions. - */ -static int -kernel_rwx_alloc(void *arena, vmem_size_t size, int flags, vmem_addr_t *addrp) -{ - - KASSERT((size % KVA_QUANTUM) == 0, - ("kernel_rwx_alloc: Size %jd is not a multiple of %d", - (intmax_t)size, (int)KVA_QUANTUM)); - return (vmem_xalloc(arena, size, KVA_QUANTUM, 0, 0, VMEM_ADDR_MIN, - VMEM_ADDR_MAX, flags, addrp)); -} -#endif - -/* * vm_init initializes the virtual memory system. * This is done only by the first cpu up. * * The start and end address of physical memory is passed in. */ -/* ARGSUSED*/ static void -vm_mem_init(dummy) - void *dummy; +vm_mem_init(void *dummy) { - int domain; /* * Initializes resident memory structures. From here on, all physical @@ -183,39 +134,6 @@ vm_mem_init(dummy) vm_object_init(); vm_map_startup(); kmem_init(virtual_avail, virtual_end); - - /* - * Initialize the kernel_arena. This can grow on demand. - */ - vmem_init(kernel_arena, "kernel arena", 0, 0, PAGE_SIZE, 0, 0); - vmem_set_import(kernel_arena, kva_import, NULL, NULL, KVA_QUANTUM); - -#if VM_NRESERVLEVEL > 0 - /* - * In an architecture with superpages, maintain a separate arena - * for allocations with permissions that differ from the "standard" - * read/write permissions used for memory in the kernel_arena. - */ - kernel_rwx_arena = vmem_create("kernel rwx arena", 0, 0, PAGE_SIZE, - 0, M_WAITOK); - vmem_set_import(kernel_rwx_arena, kernel_rwx_alloc, - (vmem_release_t *)vmem_xfree, kernel_arena, KVA_QUANTUM); -#endif - - for (domain = 0; domain < vm_ndomains; domain++) { - vm_dom[domain].vmd_kernel_arena = vmem_create( - "kernel arena domain", 0, 0, PAGE_SIZE, 0, M_WAITOK); - vmem_set_import(vm_dom[domain].vmd_kernel_arena, - (vmem_import_t *)vmem_alloc, NULL, kernel_arena, - KVA_QUANTUM); -#if VM_NRESERVLEVEL > 0 - vm_dom[domain].vmd_kernel_rwx_arena = vmem_create( - "kernel rwx arena domain", 0, 0, PAGE_SIZE, 0, M_WAITOK); - vmem_set_import(vm_dom[domain].vmd_kernel_rwx_arena, - kernel_rwx_alloc, (vmem_release_t *)vmem_xfree, - vm_dom[domain].vmd_kernel_arena, KVA_QUANTUM); -#endif - } #ifndef UMA_MD_SMALL_ALLOC /* Set up radix zone to use noobj_alloc. */ Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Wed Sep 19 19:13:29 2018 (r338805) +++ head/sys/vm/vm_kern.c Wed Sep 19 19:13:43 2018 (r338806) @@ -121,6 +121,13 @@ SYSCTL_ULONG(_vm, OID_AUTO, max_kernel_address, CTLFLA #endif "Max kernel address"); +#if VM_NRESERVLEVEL > 0 +#define KVA_QUANTUM (1 << (VM_LEVEL_0_ORDER + PAGE_SHIFT)) +#else +/* On non-superpage architectures want large import sizes. */ +#define KVA_QUANTUM (PAGE_SIZE * 1024) +#endif + /* * kva_alloc: * @@ -645,17 +652,59 @@ kmem_init_zero_region(void) } /* + * Import kva into the kernel arena. + */ +static int +kva_import(void *unused, vmem_size_t size, int flags, vmem_addr_t *addrp) +{ + vm_offset_t addr; + int result; + + KASSERT((size % KVA_QUANTUM) == 0, + ("kva_import: Size %jd is not a multiple of %d", + (intmax_t)size, (int)KVA_QUANTUM)); + addr = vm_map_min(kernel_map); + result = vm_map_find(kernel_map, NULL, 0, &addr, size, 0, + VMFS_SUPER_SPACE, VM_PROT_ALL, VM_PROT_ALL, MAP_NOFAULT); + if (result != KERN_SUCCESS) + return (ENOMEM); + + *addrp = addr; + + return (0); +} + +#if VM_NRESERVLEVEL > 0 +/* + * Import a superpage from the normal kernel arena into the special + * arena for allocations with different permissions. + */ +static int +kernel_rwx_alloc(void *arena, vmem_size_t size, int flags, vmem_addr_t *addrp) +{ + + KASSERT((size % KVA_QUANTUM) == 0, + ("kernel_rwx_alloc: Size %jd is not a multiple of %d", + (intmax_t)size, (int)KVA_QUANTUM)); + return (vmem_xalloc(arena, size, KVA_QUANTUM, 0, 0, VMEM_ADDR_MIN, + VMEM_ADDR_MAX, flags, addrp)); +} +#endif + +/* * kmem_init: * * Create the kernel map; insert a mapping covering kernel text, * data, bss, and all space allocated thus far (`boostrap' data). The * new map will thus map the range between VM_MIN_KERNEL_ADDRESS and * `start' as allocated, and the range between `start' and `end' as free. + * Create the kernel vmem arena and its per-domain children. */ void kmem_init(vm_offset_t start, vm_offset_t end) { vm_map_t m; + int domain; m = vm_map_create(kernel_pmap, VM_MIN_KERNEL_ADDRESS, end); m->system_map = 1; @@ -671,6 +720,39 @@ kmem_init(vm_offset_t start, vm_offset_t end) start, VM_PROT_ALL, VM_PROT_ALL, MAP_NOFAULT); /* ... and ending with the completion of the above `insert' */ vm_map_unlock(m); + + /* + * Initialize the kernel_arena. This can grow on demand. + */ + vmem_init(kernel_arena, "kernel arena", 0, 0, PAGE_SIZE, 0, 0); + vmem_set_import(kernel_arena, kva_import, NULL, NULL, KVA_QUANTUM); + +#if VM_NRESERVLEVEL > 0 + /* + * In an architecture with superpages, maintain a separate arena + * for allocations with permissions that differ from the "standard" + * read/write permissions used for memory in the kernel_arena. + */ + kernel_rwx_arena = vmem_create("kernel rwx arena", 0, 0, PAGE_SIZE, + 0, M_WAITOK); + vmem_set_import(kernel_rwx_arena, kernel_rwx_alloc, + (vmem_release_t *)vmem_xfree, kernel_arena, KVA_QUANTUM); +#endif + + for (domain = 0; domain < vm_ndomains; domain++) { + vm_dom[domain].vmd_kernel_arena = vmem_create( + "kernel arena domain", 0, 0, PAGE_SIZE, 0, M_WAITOK); + vmem_set_import(vm_dom[domain].vmd_kernel_arena, + (vmem_import_t *)vmem_alloc, NULL, kernel_arena, + KVA_QUANTUM); +#if VM_NRESERVLEVEL > 0 + vm_dom[domain].vmd_kernel_rwx_arena = vmem_create( + "kernel rwx arena domain", 0, 0, PAGE_SIZE, 0, M_WAITOK); + vmem_set_import(vm_dom[domain].vmd_kernel_rwx_arena, + kernel_rwx_alloc, (vmem_release_t *)vmem_xfree, + vm_dom[domain].vmd_kernel_arena, KVA_QUANTUM); +#endif + } } /* From owner-svn-src-head@freebsd.org Wed Sep 19 19:35:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6F3210A4B97; Wed, 19 Sep 2018 19:35:04 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 771258ED94; Wed, 19 Sep 2018 19:35:04 +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 67ED01361D; Wed, 19 Sep 2018 19:35:04 +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 w8JJZ4f5054231; Wed, 19 Sep 2018 19:35:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JJZ2ob054223; Wed, 19 Sep 2018 19:35:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809191935.w8JJZ2ob054223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 19 Sep 2018 19:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338807 - in head/sys: amd64/amd64 amd64/include dev/drm2 dev/drm2/i915 i386/i386 i386/include x86/iommu X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/include dev/drm2 dev/drm2/i915 i386/i386 i386/include x86/iommu X-SVN-Commit-Revision: 338807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 19:35:05 -0000 Author: kib Date: Wed Sep 19 19:35:02 2018 New Revision: 338807 URL: https://svnweb.freebsd.org/changeset/base/338807 Log: Convert x86 cache invalidation functions to ifuncs. This simplifies the runtime logic and reduces the number of runtime-constant branches. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D16736 Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/pmap.h head/sys/dev/drm2/drm_os_freebsd.c head/sys/dev/drm2/i915/intel_ringbuffer.c head/sys/i386/i386/pmap.c head/sys/i386/i386/vm_machdep.c head/sys/i386/include/pmap.h head/sys/x86/iommu/intel_utils.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Sep 19 19:13:43 2018 (r338806) +++ head/sys/amd64/amd64/pmap.c Wed Sep 19 19:35:02 2018 (r338807) @@ -648,6 +648,10 @@ static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static void pmap_invalidate_cache_range_selfsnoop(vm_offset_t sva, + vm_offset_t eva); +static void pmap_invalidate_cache_range_all(vm_offset_t sva, + vm_offset_t eva); static void pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); @@ -2171,36 +2175,62 @@ pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pmap_invalidate_page(pmap, va); } +DEFINE_IFUNC(, void, pmap_invalidate_cache_range, + (vm_offset_t sva, vm_offset_t eva), static) +{ + + if ((cpu_feature & CPUID_SS) != 0) + return (pmap_invalidate_cache_range_selfsnoop); + if ((cpu_feature & CPUID_CLFSH) != 0) + return (pmap_force_invalidate_cache_range); + return (pmap_invalidate_cache_range_all); +} + #define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) -void -pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force) +static void +pmap_invalidate_cache_range_check_align(vm_offset_t sva, vm_offset_t eva) { - if (force) { - sva &= ~(vm_offset_t)(cpu_clflush_line_size - 1); - } else { - KASSERT((sva & PAGE_MASK) == 0, - ("pmap_invalidate_cache_range: sva not page-aligned")); - KASSERT((eva & PAGE_MASK) == 0, - ("pmap_invalidate_cache_range: eva not page-aligned")); - } + KASSERT((sva & PAGE_MASK) == 0, + ("pmap_invalidate_cache_range: sva not page-aligned")); + KASSERT((eva & PAGE_MASK) == 0, + ("pmap_invalidate_cache_range: eva not page-aligned")); +} - if ((cpu_feature & CPUID_SS) != 0 && !force) - ; /* If "Self Snoop" is supported and allowed, do nothing. */ - else if ((cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0 && - eva - sva < PMAP_CLFLUSH_THRESHOLD) { +static void +pmap_invalidate_cache_range_selfsnoop(vm_offset_t sva, vm_offset_t eva) +{ + + pmap_invalidate_cache_range_check_align(sva, eva); +} + +void +pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva) +{ + + sva &= ~(vm_offset_t)(cpu_clflush_line_size - 1); + if (eva - sva >= PMAP_CLFLUSH_THRESHOLD) { /* - * XXX: Some CPUs fault, hang, or trash the local APIC - * registers if we use CLFLUSH on the local APIC - * range. The local APIC is always uncached, so we - * don't need to flush for that range anyway. + * The supplied range is bigger than 2MB. + * Globally invalidate cache. */ - if (pmap_kextract(sva) == lapic_paddr) - return; + pmap_invalidate_cache(); + return; + } + /* + * XXX: Some CPUs fault, hang, or trash the local APIC + * registers if we use CLFLUSH on the local APIC range. The + * local APIC is always uncached, so we don't need to flush + * for that range anyway. + */ + if (pmap_kextract(sva) == lapic_paddr) + return; + + if ((cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0) { /* - * Otherwise, do per-cache line flush. Use the sfence + * Do per-cache line flush. Use the sfence * instruction to insure that previous stores are * included in the write-back. The processor * propagates flush to other processors in the cache @@ -2210,10 +2240,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset for (; sva < eva; sva += cpu_clflush_line_size) clflushopt(sva); sfence(); - } else if ((cpu_feature & CPUID_CLFSH) != 0 && - eva - sva < PMAP_CLFLUSH_THRESHOLD) { - if (pmap_kextract(sva) == lapic_paddr) - return; + } else { /* * Writes are ordered by CLFLUSH on Intel CPUs. */ @@ -2223,17 +2250,17 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset clflush(sva); if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); - } else { - - /* - * No targeted cache flush methods are supported by CPU, - * or the supplied range is bigger than 2MB. - * Globally invalidate cache. - */ - pmap_invalidate_cache(); } } +static void +pmap_invalidate_cache_range_all(vm_offset_t sva, vm_offset_t eva) +{ + + pmap_invalidate_cache_range_check_align(sva, eva); + pmap_invalidate_cache(); +} + /* * Remove the specified set of pages from the data and instruction caches. * @@ -6938,7 +6965,7 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, int mo for (tmpsize = 0; tmpsize < size; tmpsize += PAGE_SIZE) pmap_kenter_attr(va + tmpsize, pa + tmpsize, mode); pmap_invalidate_range(kernel_pmap, va, va + tmpsize); - pmap_invalidate_cache_range(va, va + tmpsize, FALSE); + pmap_invalidate_cache_range(va, va + tmpsize); return ((void *)(va + offset)); } @@ -7297,7 +7324,7 @@ pmap_change_attr_locked(vm_offset_t va, vm_size_t size */ if (changed) { pmap_invalidate_range(kernel_pmap, base, tmpva); - pmap_invalidate_cache_range(base, tmpva, FALSE); + pmap_invalidate_cache_range(base, tmpva); } return (error); } Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Wed Sep 19 19:13:43 2018 (r338806) +++ head/sys/amd64/include/pmap.h Wed Sep 19 19:35:02 2018 (r338807) @@ -431,8 +431,8 @@ void pmap_invalidate_range(pmap_t, vm_offset_t, vm_off void pmap_invalidate_all(pmap_t); void pmap_invalidate_cache(void); void pmap_invalidate_cache_pages(vm_page_t *pages, int count); -void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, - boolean_t force); +void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); +void pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); void pmap_get_mapping(pmap_t pmap, vm_offset_t va, uint64_t *ptr, int *num); boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); Modified: head/sys/dev/drm2/drm_os_freebsd.c ============================================================================== --- head/sys/dev/drm2/drm_os_freebsd.c Wed Sep 19 19:13:43 2018 (r338806) +++ head/sys/dev/drm2/drm_os_freebsd.c Wed Sep 19 19:35:02 2018 (r338807) @@ -395,8 +395,8 @@ drm_clflush_virt_range(char *addr, unsigned long lengt { #if defined(__i386__) || defined(__amd64__) - pmap_invalidate_cache_range((vm_offset_t)addr, - (vm_offset_t)addr + length, TRUE); + pmap_force_invalidate_cache_range((vm_offset_t)addr, + (vm_offset_t)addr + length); #else DRM_ERROR("drm_clflush_virt_range not implemented on this architecture"); #endif Modified: head/sys/dev/drm2/i915/intel_ringbuffer.c ============================================================================== --- head/sys/dev/drm2/i915/intel_ringbuffer.c Wed Sep 19 19:13:43 2018 (r338806) +++ head/sys/dev/drm2/i915/intel_ringbuffer.c Wed Sep 19 19:35:02 2018 (r338807) @@ -471,8 +471,8 @@ init_pipe_control(struct intel_ring_buffer *ring) if (pc->cpu_page == NULL) goto err_unpin; pmap_qenter((uintptr_t)pc->cpu_page, &obj->pages[0], 1); - pmap_invalidate_cache_range((vm_offset_t)pc->cpu_page, - (vm_offset_t)pc->cpu_page + PAGE_SIZE, FALSE); + pmap_force_invalidate_cache_range((vm_offset_t)pc->cpu_page, + (vm_offset_t)pc->cpu_page + PAGE_SIZE); pc->obj = obj; ring->private = pc; @@ -1102,8 +1102,9 @@ static int init_status_page(struct intel_ring_buffer * } pmap_qenter((vm_offset_t)ring->status_page.page_addr, &obj->pages[0], 1); - pmap_invalidate_cache_range((vm_offset_t)ring->status_page.page_addr, - (vm_offset_t)ring->status_page.page_addr + PAGE_SIZE, FALSE); + pmap_force_invalidate_cache_range( + (vm_offset_t)ring->status_page.page_addr, + (vm_offset_t)ring->status_page.page_addr + PAGE_SIZE); ring->status_page.obj = obj; memset(ring->status_page.page_addr, 0, PAGE_SIZE); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed Sep 19 19:13:43 2018 (r338806) +++ head/sys/i386/i386/pmap.c Wed Sep 19 19:35:02 2018 (r338807) @@ -148,6 +148,7 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#include #include #include #include @@ -314,6 +315,10 @@ static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_page_t m, vm_prot_t prot, vm_page_t mpte); static void pmap_flush_page(vm_page_t m); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static void pmap_invalidate_cache_range_selfsnoop(vm_offset_t sva, + vm_offset_t eva); +static void pmap_invalidate_cache_range_all(vm_offset_t sva, + vm_offset_t eva); static void pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); @@ -1407,37 +1412,62 @@ pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pmap_invalidate_page(pmap, va); } +DEFINE_IFUNC(, void, pmap_invalidate_cache_range, (vm_offset_t, vm_offset_t), + static) +{ + + if ((cpu_feature & CPUID_SS) != 0) + return (pmap_invalidate_cache_range_selfsnoop); + if ((cpu_feature & CPUID_CLFSH) != 0) + return (pmap_force_invalidate_cache_range); + return (pmap_invalidate_cache_range_all); +} + #define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) +static void +pmap_invalidate_cache_range_check_align(vm_offset_t sva, vm_offset_t eva) +{ + + KASSERT((sva & PAGE_MASK) == 0, + ("pmap_invalidate_cache_range: sva not page-aligned")); + KASSERT((eva & PAGE_MASK) == 0, + ("pmap_invalidate_cache_range: eva not page-aligned")); +} + +static void +pmap_invalidate_cache_range_selfsnoop(vm_offset_t sva, vm_offset_t eva) +{ + + pmap_invalidate_cache_range_check_align(sva, eva); +} + void -pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force) +pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva) { - if (force) { - sva &= ~(vm_offset_t)(cpu_clflush_line_size - 1); - } else { - KASSERT((sva & PAGE_MASK) == 0, - ("pmap_invalidate_cache_range: sva not page-aligned")); - KASSERT((eva & PAGE_MASK) == 0, - ("pmap_invalidate_cache_range: eva not page-aligned")); + sva &= ~(vm_offset_t)(cpu_clflush_line_size - 1); + if (eva - sva >= PMAP_CLFLUSH_THRESHOLD) { + /* + * The supplied range is bigger than 2MB. + * Globally invalidate cache. + */ + pmap_invalidate_cache(); + return; } - if ((cpu_feature & CPUID_SS) != 0 && !force) - ; /* If "Self Snoop" is supported and allowed, do nothing. */ - else if ((cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0 && - eva - sva < PMAP_CLFLUSH_THRESHOLD) { -#ifdef DEV_APIC + /* + * XXX: Some CPUs fault, hang, or trash the local APIC + * registers if we use CLFLUSH on the local APIC + * range. The local APIC is always uncached, so we + * don't need to flush for that range anyway. + */ + if (pmap_kextract(sva) == lapic_paddr) + return; + + if ((cpu_stdext_feature & CPUID_STDEXT_CLFLUSHOPT) != 0) { /* - * XXX: Some CPUs fault, hang, or trash the local APIC - * registers if we use CLFLUSH on the local APIC - * range. The local APIC is always uncached, so we - * don't need to flush for that range anyway. - */ - if (pmap_kextract(sva) == lapic_paddr) - return; -#endif - /* - * Otherwise, do per-cache line flush. Use the sfence + * Do per-cache line flush. Use the sfence * instruction to insure that previous stores are * included in the write-back. The processor * propagates flush to other processors in the cache @@ -1447,12 +1477,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset for (; sva < eva; sva += cpu_clflush_line_size) clflushopt(sva); sfence(); - } else if ((cpu_feature & CPUID_CLFSH) != 0 && - eva - sva < PMAP_CLFLUSH_THRESHOLD) { -#ifdef DEV_APIC - if (pmap_kextract(sva) == lapic_paddr) - return; -#endif + } else { /* * Writes are ordered by CLFLUSH on Intel CPUs. */ @@ -1462,17 +1487,17 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset clflush(sva); if (cpu_vendor_id != CPU_VENDOR_INTEL) mfence(); - } else { - - /* - * No targeted cache flush methods are supported by CPU, - * or the supplied range is bigger than 2MB. - * Globally invalidate cache. - */ - pmap_invalidate_cache(); } } +static void +pmap_invalidate_cache_range_all(vm_offset_t sva, vm_offset_t eva) +{ + + pmap_invalidate_cache_range_check_align(sva, eva); + pmap_invalidate_cache(); +} + void pmap_invalidate_cache_pages(vm_page_t *pages, int count) { @@ -5479,7 +5504,7 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, int mo for (tmpsize = 0; tmpsize < size; tmpsize += PAGE_SIZE) pmap_kenter_attr(va + tmpsize, pa + tmpsize, mode); pmap_invalidate_range(kernel_pmap, va, va + tmpsize); - pmap_invalidate_cache_range(va, va + size, FALSE); + pmap_invalidate_cache_range(va, va + size); return ((void *)(va + offset)); } @@ -5718,7 +5743,7 @@ pmap_change_attr(vm_offset_t va, vm_size_t size, int m */ if (changed) { pmap_invalidate_range(kernel_pmap, base, tmpva); - pmap_invalidate_cache_range(base, tmpva, FALSE); + pmap_invalidate_cache_range(base, tmpva); } return (0); } Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Wed Sep 19 19:13:43 2018 (r338806) +++ head/sys/i386/i386/vm_machdep.c Wed Sep 19 19:35:02 2018 (r338807) @@ -650,7 +650,7 @@ sf_buf_invalidate(struct sf_buf *sf) * settings are recalculated. */ pmap_qenter(sf->kva, &m, 1); - pmap_invalidate_cache_range(sf->kva, sf->kva + PAGE_SIZE, FALSE); + pmap_invalidate_cache_range(sf->kva, sf->kva + PAGE_SIZE); } /* Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Wed Sep 19 19:13:43 2018 (r338806) +++ head/sys/i386/include/pmap.h Wed Sep 19 19:35:02 2018 (r338807) @@ -394,8 +394,8 @@ void pmap_invalidate_range(pmap_t, vm_offset_t, vm_off void pmap_invalidate_all(pmap_t); void pmap_invalidate_cache(void); void pmap_invalidate_cache_pages(vm_page_t *pages, int count); -void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, - boolean_t force); +void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); +void pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); void *pmap_trm_alloc(size_t size, int flags); void pmap_trm_free(void *addr, size_t size); Modified: head/sys/x86/iommu/intel_utils.c ============================================================================== --- head/sys/x86/iommu/intel_utils.c Wed Sep 19 19:13:43 2018 (r338806) +++ head/sys/x86/iommu/intel_utils.c Wed Sep 19 19:35:02 2018 (r338807) @@ -368,8 +368,7 @@ dmar_flush_transl_to_ram(struct dmar_unit *unit, void * If DMAR does not snoop paging structures accesses, flush * CPU cache to memory. */ - pmap_invalidate_cache_range((uintptr_t)dst, (uintptr_t)dst + sz, - TRUE); + pmap_force_invalidate_cache_range((uintptr_t)dst, (uintptr_t)dst + sz); } void From owner-svn-src-head@freebsd.org Wed Sep 19 20:52:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C065310A6886; Wed, 19 Sep 2018 20:52:48 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6AB3691A46; Wed, 19 Sep 2018 20:52:48 +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 4A1B41432B; Wed, 19 Sep 2018 20:52:48 +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 w8JKqmJM095801; Wed, 19 Sep 2018 20:52:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JKqlR4095797; Wed, 19 Sep 2018 20:52:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201809192052.w8JKqlR4095797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 19 Sep 2018 20:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338810 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 338810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 20:52:49 -0000 Author: emaste Date: Wed Sep 19 20:52:47 2018 New Revision: 338810 URL: https://svnweb.freebsd.org/changeset/base/338810 Log: openssh: rename local macro to avoid OpenSSL 1.1.1 conflict Local changes introduced an OPENSSH_VERSION macro, but this conflicts with a macro of the same name introduced with OepnsSL 1.1.1 Reviewed by: des Approved by: re (gjb) MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/crypto/openssh/ssh.c head/crypto/openssh/sshd.c head/crypto/openssh/version.h Modified: head/crypto/openssh/ssh.c ============================================================================== --- head/crypto/openssh/ssh.c Wed Sep 19 19:54:13 2018 (r338809) +++ head/crypto/openssh/ssh.c Wed Sep 19 20:52:47 2018 (r338810) @@ -811,10 +811,10 @@ main(int ac, char **av) *options.version_addendum != '\0') fprintf(stderr, "%s %s, %s\n", SSH_RELEASE, options.version_addendum, - OPENSSL_VERSION); + OPENSSL_VERSION_STRING); else fprintf(stderr, "%s, %s\n", SSH_RELEASE, - OPENSSL_VERSION); + OPENSSL_VERSION_STRING); if (opt == 'V') exit(0); break; @@ -1078,7 +1078,7 @@ main(int ac, char **av) if (debug_flag) /* version_addendum is always NULL at this point */ - logit("%s, %s", SSH_RELEASE, OPENSSL_VERSION); + logit("%s, %s", SSH_RELEASE, OPENSSL_VERSION_STRING); /* Parse the configuration files */ process_config_files(host_arg, pw, 0); Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Wed Sep 19 19:54:13 2018 (r338809) +++ head/crypto/openssh/sshd.c Wed Sep 19 20:52:47 2018 (r338810) @@ -939,10 +939,10 @@ usage(void) if (options.version_addendum && *options.version_addendum != '\0') fprintf(stderr, "%s %s, %s\n", SSH_RELEASE, - options.version_addendum, OPENSSL_VERSION); + options.version_addendum, OPENSSL_VERSION_STRING); else fprintf(stderr, "%s, %s\n", - SSH_RELEASE, OPENSSL_VERSION); + SSH_RELEASE, OPENSSL_VERSION_STRING); fprintf(stderr, "usage: sshd [-46DdeiqTt] [-C connection_spec] [-c host_cert_file]\n" " [-E log_file] [-f config_file] [-g login_grace_time]\n" Modified: head/crypto/openssh/version.h ============================================================================== --- head/crypto/openssh/version.h Wed Sep 19 19:54:13 2018 (r338809) +++ head/crypto/openssh/version.h Wed Sep 19 20:52:47 2018 (r338810) @@ -9,7 +9,7 @@ #define SSH_VERSION_FREEBSD "FreeBSD-20180909" #ifdef WITH_OPENSSL -#define OPENSSL_VERSION SSLeay_version(SSLEAY_VERSION) +#define OPENSSL_VERSION_STRING SSLeay_version(SSLEAY_VERSION) #else -#define OPENSSL_VERSION "without OpenSSL" +#define OPENSSL_VERSION_STRING "without OpenSSL" #endif From owner-svn-src-head@freebsd.org Wed Sep 19 22:53:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6C7710A97EE; Wed, 19 Sep 2018 22:53:53 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D7A1966B0; Wed, 19 Sep 2018 22:53:53 +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 62E19156DF; Wed, 19 Sep 2018 22:53:53 +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 w8JMrrxh057859; Wed, 19 Sep 2018 22:53:53 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JMrr2S057858; Wed, 19 Sep 2018 22:53:53 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201809192253.w8JMrr2S057858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 19 Sep 2018 22:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338813 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 338813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 22:53:53 -0000 Author: jhb Date: Wed Sep 19 22:53:52 2018 New Revision: 338813 URL: https://svnweb.freebsd.org/changeset/base/338813 Log: Clear all of the VFP state in fill_fpregs(). Zero the entire FP register set structure returned for ptrace() if a thread hasn't used FP registers rather than leaking garbage in the fp_sr and fp_cr fields. Reviewed by: emaste, andrew Approved by: re (rgrimes) MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17140 Modified: head/sys/arm64/arm64/machdep.c Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Wed Sep 19 22:39:40 2018 (r338812) +++ head/sys/arm64/arm64/machdep.c Wed Sep 19 22:53:52 2018 (r338813) @@ -236,7 +236,7 @@ fill_fpregs(struct thread *td, struct fpreg *regs) regs->fp_sr = pcb->pcb_fpustate.vfp_fpsr; } else #endif - memset(regs->fp_q, 0, sizeof(regs->fp_q)); + memset(regs, 0, sizeof(*regs)); return (0); } From owner-svn-src-head@freebsd.org Wed Sep 19 23:45:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C68210AA8A1; Wed, 19 Sep 2018 23:45:19 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 53A41703E3; Wed, 19 Sep 2018 23:45:19 +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 4E85515ED6; Wed, 19 Sep 2018 23:45:19 +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 w8JNjJQ1084202; Wed, 19 Sep 2018 23:45:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8JNjIv3084198; Wed, 19 Sep 2018 23:45:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201809192345.w8JNjIv3084198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 19 Sep 2018 23:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338814 - in head/sys/riscv: include riscv X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys/riscv: include riscv X-SVN-Commit-Revision: 338814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 19 Sep 2018 23:45:19 -0000 Author: jhb Date: Wed Sep 19 23:45:18 2018 New Revision: 338814 URL: https://svnweb.freebsd.org/changeset/base/338814 Log: Various fixes for floating point on RISC-V. - Explicitly load an empty initial state into FP registers when taking the fault on the first FP instruction in a thread. Setting SSTATE.FS to INITIAL is just a marker to let context switch restore code know that it can load FP registers with zeroes instead of memory loads. It does not imply that the hardware will reset all registers to zero on first access. In addition, set the state to CLEAN instead of INITIAL after the first FP instruction. cpu_switch() doesn't do anything for INITIAL and only restores from the pcb if the state is CLEAN. We could perhaps change cpu_switch to call fpe_state_clear if the state was INITIAL and leave SSTATE.FS set to INITIAL instead of CLEAN after the first FP instruction. However, adding this complexity to cpu_switch() doesn't seem worth the supposed gain. - Only save the current FPU registers in fill_fpregs() if the request is made to save the current thread's registers. Previously if a debugger requested FP registers via ptrace() it was getting a copy of the debugger's FP registers rather than the debugee's. - Zero the entire FP register set structure returned for ptrace() if a thread hasn't used FP registers rather than leaking garbage in the fp_fcsr field. - If a debugger writes FP registers via ptrace(), always mark the pcb as having valid FP registers and set SSTATUS.FS_MASK to CLEAN so that the registers will be restored when the debugged thread resumes. - Be more explicit about clearing the SSTATUS.FS field before setting it to CLEAN on the first FP instruction trap. Submitted by: br, markj Approved by: re (rgrimes) Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D17141 Modified: head/sys/riscv/include/fpe.h head/sys/riscv/riscv/machdep.c head/sys/riscv/riscv/swtch.S head/sys/riscv/riscv/trap.c Modified: head/sys/riscv/include/fpe.h ============================================================================== --- head/sys/riscv/include/fpe.h Wed Sep 19 22:53:52 2018 (r338813) +++ head/sys/riscv/include/fpe.h Wed Sep 19 23:45:18 2018 (r338814) @@ -34,5 +34,6 @@ #define _MACHINE_FPE_H_ void fpe_state_save(struct thread *td); +void fpe_state_clear(void); #endif /* !_MACHINE_FPE_H_ */ Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Wed Sep 19 22:53:52 2018 (r338813) +++ head/sys/riscv/riscv/machdep.c Wed Sep 19 23:45:18 2018 (r338814) @@ -204,13 +204,14 @@ fill_fpregs(struct thread *td, struct fpreg *regs) * If we have just been running FPE instructions we will * need to save the state to memcpy it below. */ - fpe_state_save(td); + if (td == curthread) + fpe_state_save(td); memcpy(regs->fp_x, pcb->pcb_x, sizeof(regs->fp_x)); regs->fp_fcsr = pcb->pcb_fcsr; } else #endif - memset(regs->fp_x, 0, sizeof(regs->fp_x)); + memset(regs, 0, sizeof(*regs)); return (0); } @@ -219,12 +220,17 @@ int set_fpregs(struct thread *td, struct fpreg *regs) { #ifdef FPE + struct trapframe *frame; struct pcb *pcb; + frame = td->td_frame; pcb = td->td_pcb; memcpy(pcb->pcb_x, regs->fp_x, sizeof(regs->fp_x)); pcb->pcb_fcsr = regs->fp_fcsr; + pcb->pcb_fpflags |= PCB_FP_STARTED; + frame->tf_sstatus &= ~SSTATUS_FS_MASK; + frame->tf_sstatus |= SSTATUS_FS_CLEAN; #endif return (0); Modified: head/sys/riscv/riscv/swtch.S ============================================================================== --- head/sys/riscv/riscv/swtch.S Wed Sep 19 22:53:52 2018 (r338813) +++ head/sys/riscv/riscv/swtch.S Wed Sep 19 23:45:18 2018 (r338814) @@ -154,6 +154,59 @@ END(fpe_state_save) #endif /* FPE */ /* + * void + * fpe_state_clear(void) + */ +ENTRY(fpe_state_clear) + /* + * Enable FPE usage in supervisor mode, + * so we can access registers. + */ + li t0, SSTATUS_FS_INITIAL + csrs sstatus, t0 + + fscsr zero + fcvt.d.l f0, zero + fcvt.d.l f1, zero + fcvt.d.l f2, zero + fcvt.d.l f3, zero + fcvt.d.l f4, zero + fcvt.d.l f5, zero + fcvt.d.l f6, zero + fcvt.d.l f7, zero + fcvt.d.l f8, zero + fcvt.d.l f9, zero + fcvt.d.l f10, zero + fcvt.d.l f11, zero + fcvt.d.l f12, zero + fcvt.d.l f13, zero + fcvt.d.l f14, zero + fcvt.d.l f15, zero + fcvt.d.l f16, zero + fcvt.d.l f17, zero + fcvt.d.l f18, zero + fcvt.d.l f19, zero + fcvt.d.l f20, zero + fcvt.d.l f21, zero + fcvt.d.l f22, zero + fcvt.d.l f23, zero + fcvt.d.l f24, zero + fcvt.d.l f25, zero + fcvt.d.l f26, zero + fcvt.d.l f27, zero + fcvt.d.l f28, zero + fcvt.d.l f29, zero + fcvt.d.l f30, zero + fcvt.d.l f31, zero + + /* Disable FPE usage in supervisor mode. */ + li t0, SSTATUS_FS_MASK + csrc sstatus, t0 + + ret +END(fpe_state_clear) + +/* * void cpu_throw(struct thread *old, struct thread *new) */ ENTRY(cpu_throw) Modified: head/sys/riscv/riscv/trap.c ============================================================================== --- head/sys/riscv/riscv/trap.c Wed Sep 19 22:53:52 2018 (r338813) +++ head/sys/riscv/riscv/trap.c Wed Sep 19 23:45:18 2018 (r338814) @@ -57,6 +57,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FPE +#include +#endif #include #include #include @@ -363,7 +366,9 @@ do_trap_user(struct trapframe *frame) * May be a FPE trap. Enable FPE usage * for this thread and try again. */ - frame->tf_sstatus |= SSTATUS_FS_INITIAL; + fpe_state_clear(); + frame->tf_sstatus &= ~SSTATUS_FS_MASK; + frame->tf_sstatus |= SSTATUS_FS_CLEAN; pcb->pcb_fpflags |= PCB_FP_STARTED; break; } From owner-svn-src-head@freebsd.org Thu Sep 20 09:21:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92B81109610F; Thu, 20 Sep 2018 09:21:06 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4758884121; Thu, 20 Sep 2018 09:21:06 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4266D1BFB7; Thu, 20 Sep 2018 09:21:06 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8K9L6xM080269; Thu, 20 Sep 2018 09:21:06 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8K9L5od080266; Thu, 20 Sep 2018 09:21:05 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809200921.w8K9L5od080266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 20 Sep 2018 09:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338822 - in head: etc usr.sbin/lpr/lpd X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc usr.sbin/lpr/lpd X-SVN-Commit-Revision: 338822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 20 Sep 2018 09:21:06 -0000 Author: brd Date: Thu Sep 20 09:21:05 2018 New Revision: 338822 URL: https://svnweb.freebsd.org/changeset/base/338822 Log: Move hosts.lpd and printcap to usr.sbin/lpr/lpd/ This leverages CONFS to handle the install Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17238 Added: head/usr.sbin/lpr/lpd/hosts.lpd - copied unchanged from r338821, head/etc/hosts.lpd head/usr.sbin/lpr/lpd/printcap - copied unchanged from r338821, head/etc/printcap Deleted: head/etc/hosts.lpd head/etc/printcap Modified: head/etc/Makefile head/usr.sbin/lpr/lpd/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Sep 20 08:03:21 2018 (r338821) +++ head/etc/Makefile Thu Sep 20 09:21:05 2018 (r338822) @@ -22,10 +22,6 @@ BIN1= \ # NB: keep these sorted by MK_* knobs -.if ${MK_LPR} != "no" -BIN1+= hosts.lpd printcap -.endif - .if ${MK_OPENSSL} != "no" SSL= ${SRCTOP}/crypto/openssl/apps/openssl.cnf .endif Modified: head/usr.sbin/lpr/lpd/Makefile ============================================================================== --- head/usr.sbin/lpr/lpd/Makefile Thu Sep 20 08:03:21 2018 (r338821) +++ head/usr.sbin/lpr/lpd/Makefile Thu Sep 20 09:21:05 2018 (r338822) @@ -1,6 +1,7 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +CONFS= hosts.lpd printcap PROG= lpd MAN= lpd.8 SRCS= lpd.c printjob.c recvjob.c lpdchar.c modes.c Copied: head/usr.sbin/lpr/lpd/hosts.lpd (from r338821, head/etc/hosts.lpd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/lpr/lpd/hosts.lpd Thu Sep 20 09:21:05 2018 (r338822, copy of r338821, head/etc/hosts.lpd) @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +# See lpd(8) +#machine.domain Copied: head/usr.sbin/lpr/lpd/printcap (from r338821, head/etc/printcap) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/lpr/lpd/printcap Thu Sep 20 09:21:05 2018 (r338822, copy of r338821, head/etc/printcap) @@ -0,0 +1,54 @@ +# @(#)printcap 5.3 (Berkeley) 6/30/90 +# $FreeBSD$ + +# +# This enables a simple local "raw" printer, hooked up to the first +# parallel port. No kind of filtering is done, so everything you pass +# to the "lpr" command will be printed unmodified. +# +# Remember, for further print queues you're going to add, you have +# to choose different spool directories (the "sd" capability below), +# otherwise you will greatly confuse lpd. +# +# For some advanced printing, have a look at the "apsfilter" package. +# It plugs into the lpd system, allowing you to print a variety of +# different file types by converting everything to PostScript(tm) +# format. For more information about apsfilter visit +# +# http://www.apsfilter.org/ +# +# If you don't have a PostScript(tm) printer, don't panic, but do +# also install the latest "ghostscript" package for best printer support. +# +# Do also refer to the "printing" section of the handbook. +# +# https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/printing.html +# +# A local copy can be found under +# +# /usr/share/doc/handbook/handbook.{html,latin1}. +# +# Banner pages are now suppressed by default. Remove the :sh: capability +# to turn them back on. +# +#lp|local line printer:\ +# :sh:\ +# :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs: +# +# Sample remote printer. The physical printer is on machine "lphost". +# You can perform any kind of local filtering directly. If you need +# local filters (e.g. LF -> CR-LF conversion for HP printers), create +# a filter script that sends the proper escape sequence to the printer +# and then concatenates stdin to stdout. +# +#remote|sample remote printer:\ +# :sh:\ +# :rm=lphost:sd=/var/spool/output/lphost:lf=/var/log/lpd-errs:\ +# :if=/usr/local/libexec/if-script: +# +# Simple Russian printer with hardware CP866 character set, output filter +# used for KOI8-R -> CP866 conversion +# +#lp|Russian local line printer:\ +# :sh:of=/usr/libexec/lpr/ru/koi2alt:\ +# :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs: From owner-svn-src-head@freebsd.org Thu Sep 20 09:26:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C38C11096409; Thu, 20 Sep 2018 09:26:11 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7176284556; Thu, 20 Sep 2018 09:26:11 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D6F61C127; Thu, 20 Sep 2018 09:26:11 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8K9QBuq085208; Thu, 20 Sep 2018 09:26:11 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8K9QALB085203; Thu, 20 Sep 2018 09:26:10 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809200926.w8K9QALB085203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 20 Sep 2018 09:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338823 - in head: etc lib/libopie X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc lib/libopie X-SVN-Commit-Revision: 338823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 20 Sep 2018 09:26:12 -0000 Author: brd Date: Thu Sep 20 09:26:10 2018 New Revision: 338823 URL: https://svnweb.freebsd.org/changeset/base/338823 Log: Move opieaccess to lib/libopie/ This leverages CONFS to do the install Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17241 Added: head/lib/libopie/opieaccess - copied unchanged from r338822, head/etc/opieaccess Deleted: head/etc/opieaccess Modified: head/etc/Makefile head/lib/libopie/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Sep 20 09:21:05 2018 (r338822) +++ head/etc/Makefile Thu Sep 20 09:26:10 2018 (r338823) @@ -70,7 +70,7 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ - master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; + master.passwd nsmb.conf ${DESTDIR}/etc; .if ${MK_TCSH} == "no" sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd @@ -206,7 +206,7 @@ distrib-dirs: ${MTREES:N/*} distrib-cleanup .PHONY etc-examples: ${META_DEPS} cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${BIN1} ${BIN2} nsmb.conf opieaccess \ + ${BIN1} ${BIN2} nsmb.conf \ ${DESTDIR}${SHAREDIR}/examples/etc .include Modified: head/lib/libopie/Makefile ============================================================================== --- head/lib/libopie/Makefile Thu Sep 20 09:21:05 2018 (r338822) +++ head/lib/libopie/Makefile Thu Sep 20 09:26:10 2018 (r338823) @@ -2,6 +2,9 @@ # # $FreeBSD$ # + +CONFS= opieaccess +CONFSMODE= 600 PACKAGE=lib${LIB} OPIE_DIST?= ${SRCTOP}/contrib/opie DIST_DIR= ${OPIE_DIST}/${.CURDIR:T} Copied: head/lib/libopie/opieaccess (from r338822, head/etc/opieaccess) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libopie/opieaccess Thu Sep 20 09:26:10 2018 (r338823, copy of r338822, head/etc/opieaccess) @@ -0,0 +1,13 @@ +# $FreeBSD$ +# +# This file controls whether UNIX passwords are to be permitted. Rules +# are matched in order, and the search terminates when the first matching +# rule has been found. Default action is "deny". See opieaccess(5) for +# more information. +# +# Each rule has the form: +# +# permit address netmask +# deny address netmask +# +#permit 127.0.0.1 255.255.255.255 From owner-svn-src-head@freebsd.org Thu Sep 20 09:31:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7F341096590; Thu, 20 Sep 2018 09:31:28 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69A8784966; Thu, 20 Sep 2018 09:31:28 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 643111C170; Thu, 20 Sep 2018 09:31:28 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8K9VSCv088496; Thu, 20 Sep 2018 09:31:28 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8K9VRBw088494; Thu, 20 Sep 2018 09:31:27 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809200931.w8K9VRBw088494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 20 Sep 2018 09:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338824 - in head: etc lib/libsmb X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc lib/libsmb X-SVN-Commit-Revision: 338824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 20 Sep 2018 09:31:29 -0000 Author: brd Date: Thu Sep 20 09:31:27 2018 New Revision: 338824 URL: https://svnweb.freebsd.org/changeset/base/338824 Log: Move nsmb.conf to lib/libsmb/ This leverages CONFS to do the install Approved by: re (pkgbase, blanket), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17243 Added: head/lib/libsmb/nsmb.conf - copied unchanged from r338823, head/etc/nsmb.conf Deleted: head/etc/nsmb.conf Modified: head/etc/Makefile head/lib/libsmb/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Sep 20 09:26:10 2018 (r338823) +++ head/etc/Makefile Thu Sep 20 09:31:27 2018 (r338824) @@ -70,7 +70,7 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ - master.passwd nsmb.conf ${DESTDIR}/etc; + master.passwd ${DESTDIR}/etc; .if ${MK_TCSH} == "no" sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd @@ -206,7 +206,7 @@ distrib-dirs: ${MTREES:N/*} distrib-cleanup .PHONY etc-examples: ${META_DEPS} cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${BIN1} ${BIN2} nsmb.conf \ + ${BIN1} ${BIN2} \ ${DESTDIR}${SHAREDIR}/examples/etc .include Modified: head/lib/libsmb/Makefile ============================================================================== --- head/lib/libsmb/Makefile Thu Sep 20 09:26:10 2018 (r338823) +++ head/lib/libsmb/Makefile Thu Sep 20 09:31:27 2018 (r338824) @@ -2,6 +2,8 @@ .include +CONFS= nsmb.conf +CONFSMODE= 600 PACKAGE=lib${LIB} CONTRIBDIR= ${SRCTOP}/contrib/smbfs .PATH: ${CONTRIBDIR}/lib/smb Copied: head/lib/libsmb/nsmb.conf (from r338823, head/etc/nsmb.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libsmb/nsmb.conf Thu Sep 20 09:31:27 2018 (r338824, copy of r338823, head/etc/nsmb.conf) @@ -0,0 +1,56 @@ +# $FreeBSD$ +# +# smbfs lookups configuration files in next order: +# 1. ~/.nsmbrc +# 2. /etc/nsmb.conf - if this file found it will +# override values with same keys from user files. +# +# +# This file consist from a set of sections. Each section started by section name +# surrounded with square brackets: +# [section_name] +# +# End of the section marked either by new section or by the end of file. +# Each section can contain zero or more parameters: +# [section_name] +# key=value +# +# where 'key' represents parameter name and 'value' a value assigned +# to this parameter. +# +# SMB library uses next forms of section names (please note that the section +# name should be in upper case when it refers to server, user or share): +# A) [default] +# B) [SERVER] +# C) [SERVER:USER] +# D) [SERVER:USER:SHARE] +# +# Here is the map of possible keywords: +# +# keyword/section A B C D Comment +# +# addr - + - - IP address of SMB server +# charsets + + + + local:remote charset pair +# nbns + + - - address of NetBIOS name server (WINS) +# nbscope + + - - NetBIOS scope +# nbtimeout + + - - timeout for NetBIOS name servers +# password - - + + a plain text password used to access to the given share +# retry_count + + - - number of retries before connection marked as broken +# timeout + + - - SMB request timeout +# workgroup + + + + name of workgroup +# + +# A simple configuration example: + +# First, define a workgroup. +#[default] +#workgroup=SALES + +# The 'FSERVER' is an NT server. +#[FSERVER] +#charsets=koi8-r:cp866 +#addr=fserv.coolcorp.com + +#[FSERVER:JOE] +# use persistent password cache for user 'joe' +#password=$$1767877DF From owner-svn-src-head@freebsd.org Thu Sep 20 09:34:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F16D6109680C; Thu, 20 Sep 2018 09:34:55 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A460F84C18; Thu, 20 Sep 2018 09:34:55 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F6CC1C2F8; Thu, 20 Sep 2018 09:34:55 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8K9YtPb090104; Thu, 20 Sep 2018 09:34:55 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8K9YtOr090103; Thu, 20 Sep 2018 09:34:55 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809200934.w8K9YtOr090103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 20 Sep 2018 09:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338825 - in head: etc secure/usr.bin/openssl X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc secure/usr.bin/openssl X-SVN-Commit-Revision: 338825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 20 Sep 2018 09:34:56 -0000 Author: brd Date: Thu Sep 20 09:34:55 2018 New Revision: 338825 URL: https://svnweb.freebsd.org/changeset/base/338825 Log: Move the openssl.cnf install to secure/usr.bin/openssl/ This leverages CONFS to do the install Approved by: re (pkgbase, blanket), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17245 Modified: head/etc/Makefile head/secure/usr.bin/openssl/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Sep 20 09:31:27 2018 (r338824) +++ head/etc/Makefile Thu Sep 20 09:34:55 2018 (r338825) @@ -22,10 +22,6 @@ BIN1= \ # NB: keep these sorted by MK_* knobs -.if ${MK_OPENSSL} != "no" -SSL= ${SRCTOP}/crypto/openssl/apps/openssl.cnf -.endif - .if ${MK_SENDMAIL} != "no" BIN1+= rc.sendmail .endif @@ -94,10 +90,6 @@ distribution: .endif .if ${MK_SENDMAIL} != "no" ${_+_}cd ${.CURDIR}/sendmail; ${MAKE} distribution -.endif -.if ${MK_OPENSSL} != "no" - cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - ${SSL} ${DESTDIR}/etc/ssl .endif .if ${MK_KERBEROS} != "no" cd ${.CURDIR}/root; \ Modified: head/secure/usr.bin/openssl/Makefile ============================================================================== --- head/secure/usr.bin/openssl/Makefile Thu Sep 20 09:31:27 2018 (r338824) +++ head/secure/usr.bin/openssl/Makefile Thu Sep 20 09:34:55 2018 (r338825) @@ -1,5 +1,7 @@ # $FreeBSD$ +CONFS= openssl.cnf +CONFSDIR= /etc/ssl PROG= openssl LIBADD= ssl crypto From owner-svn-src-head@freebsd.org Thu Sep 20 10:58:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E50A6109837B; Thu, 20 Sep 2018 10:58:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 976D2875F7; Thu, 20 Sep 2018 10:58:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91D381D019; Thu, 20 Sep 2018 10:58:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KAwtkL031747; Thu, 20 Sep 2018 10:58:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KAwrZR031731; Thu, 20 Sep 2018 10:58:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201809201058.w8KAwrZR031731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 20 Sep 2018 10:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338826 - in head: contrib/mandoc contrib/mdocml usr.bin/mandoc X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head: contrib/mandoc contrib/mdocml usr.bin/mandoc X-SVN-Commit-Revision: 338826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: 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, 20 Sep 2018 10:58:56 -0000 Author: bapt Date: Thu Sep 20 10:58:52 2018 New Revision: 338826 URL: https://svnweb.freebsd.org/changeset/base/338826 Log: Import mandoc 1.14.4 Approved by: re (kib) MFC after: 1 week Added: - copied from r338825, head/contrib/mdocml/ head/contrib/mandoc/compat_strndup.c - copied unchanged from r338821, vendor/mandoc/dist/compat_strndup.c head/contrib/mandoc/test-noop.c - copied unchanged from r338821, vendor/mandoc/dist/test-noop.c head/contrib/mandoc/test-strndup.c - copied unchanged from r338821, vendor/mandoc/dist/test-strndup.c Directory Properties: head/contrib/mandoc/ (props changed) Deleted: head/contrib/mdocml/ Modified: head/contrib/mandoc/INSTALL head/contrib/mandoc/LICENSE head/contrib/mandoc/Makefile head/contrib/mandoc/Makefile.depend head/contrib/mandoc/NEWS head/contrib/mandoc/TODO head/contrib/mandoc/apropos.1 head/contrib/mandoc/cgi.c head/contrib/mandoc/chars.c head/contrib/mandoc/config.h head/contrib/mandoc/configure head/contrib/mandoc/configure.local.example head/contrib/mandoc/eqn.7 head/contrib/mandoc/eqn_term.c head/contrib/mandoc/gmdiff head/contrib/mandoc/html.c head/contrib/mandoc/html.h head/contrib/mandoc/lib.in head/contrib/mandoc/libmandoc.h head/contrib/mandoc/main.c head/contrib/mandoc/man.1 head/contrib/mandoc/man.7 head/contrib/mandoc/man.cgi.8 head/contrib/mandoc/man.conf.5 head/contrib/mandoc/man_html.c head/contrib/mandoc/man_term.c head/contrib/mandoc/man_validate.c head/contrib/mandoc/mandoc.1 head/contrib/mandoc/mandoc.c head/contrib/mandoc/mandoc.css head/contrib/mandoc/mandoc.h head/contrib/mandoc/mandoc_aux.c head/contrib/mandoc/mandoc_char.7 head/contrib/mandoc/mandoc_html.3 head/contrib/mandoc/mandocdb.c head/contrib/mandoc/mansearch.c head/contrib/mandoc/mdoc.7 head/contrib/mandoc/mdoc.c head/contrib/mandoc/mdoc_html.c head/contrib/mandoc/mdoc_man.c head/contrib/mandoc/mdoc_markdown.c head/contrib/mandoc/mdoc_state.c head/contrib/mandoc/mdoc_term.c head/contrib/mandoc/mdoc_validate.c head/contrib/mandoc/out.h head/contrib/mandoc/read.c head/contrib/mandoc/roff.7 head/contrib/mandoc/roff.c head/contrib/mandoc/roff.h head/contrib/mandoc/roff_html.c head/contrib/mandoc/st.in head/contrib/mandoc/tag.c head/contrib/mandoc/tbl.7 head/contrib/mandoc/tbl_html.c head/contrib/mandoc/term_ascii.c head/contrib/mandoc/term_ps.c head/contrib/mandoc/tree.c head/usr.bin/mandoc/Makefile Modified: head/contrib/mandoc/INSTALL ============================================================================== --- head/contrib/mdocml/INSTALL Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/INSTALL Thu Sep 20 10:58:52 2018 (r338826) @@ -1,4 +1,4 @@ -$Id: INSTALL,v 1.20 2017/07/28 14:57:56 schwarze Exp $ +$Id: INSTALL,v 1.22 2018/07/31 15:34:00 schwarze Exp $ About the portable mandoc distribution -------------------------------------- @@ -18,7 +18,7 @@ tech@ mailing list, too. Enjoy using the mandoc toolset! -Ingo Schwarze, Karlsruhe, July 2017 +Ingo Schwarze, Karlsruhe, August 2018 Installation @@ -54,8 +54,6 @@ generates. If anything looks wrong or different from wish, read the file "configure.local.example", create and edit a file "configure.local", and re-run "./configure" until the result seems right to you. -On Solaris 10 and earlier, you may have to run "ksh ./configure" -because the native /bin/sh lacks some POSIX features. 5. Run "make". Any POSIX-compatible make, in particular both BSD make and GNU make, @@ -83,12 +81,14 @@ apropos(1) will not find the new pages. 10. To set up a man.cgi(8) server, read its manual page. -Note that some man(7) pages may contain low-level roff(7) markup -that mandoc does not yet understand. On some BSD systems using -mandoc, third-party software is vetted on whether it may be formatted -with mandoc. If not, groff(1) is pulled in as a dependency and -used to install a pre-formatted "catpage" instead of directly as -manual page source. +Note that a very small number of man(7) pages contain low-level +roff(7) markup that mandoc does not yet understand. On some BSD +systems using mandoc, third-party software is vetted on whether it +may be formatted with mandoc. If not, groff(1) is pulled in as a +dependency and used to install pre-formatted "catpages" instead of +manual page sources. This mechanism is used much less frequently +than in the past. On OpenBSD, only 25 out of about 10000 ports +still require formatting with groff(1). Understanding mandoc dependencies Modified: head/contrib/mandoc/LICENSE ============================================================================== --- head/contrib/mdocml/LICENSE Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/LICENSE Thu Sep 20 10:58:52 2018 (r338826) @@ -1,17 +1,17 @@ -$Id: LICENSE,v 1.17 2017/06/23 15:58:14 schwarze Exp $ +$Id: LICENSE,v 1.19 2018/07/31 10:18:15 schwarze Exp $ With the exceptions noted below, all code and documentation contained in the mandoc toolkit is protected by the Copyright of the following developers: Copyright (c) 2008-2012, 2014 Kristaps Dzonsons -Copyright (c) 2010-2017 Ingo Schwarze +Copyright (c) 2010-2018 Ingo Schwarze +Copyright (c) 1999, 2004, 2017 Marc Espie Copyright (c) 2009, 2010, 2011, 2012 Joerg Sonnenberger Copyright (c) 2013 Franco Fichtner Copyright (c) 2014 Baptiste Daroussin Copyright (c) 2016 Ed Maste Copyright (c) 2017 Michael Stapelberg -Copyright (c) 1999, 2004 Marc Espie Copyright (c) 1998, 2004, 2010 Todd C. Miller Copyright (c) 2008, 2017 Otto Moerbeek Copyright (c) 2004 Ted Unangst Modified: head/contrib/mandoc/Makefile ============================================================================== --- head/contrib/mdocml/Makefile Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/Makefile Thu Sep 20 10:58:52 2018 (r338826) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.516 2017/07/20 16:24:53 schwarze Exp $ +# $Id: Makefile,v 1.519 2018/07/31 15:34:00 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons -# Copyright (c) 2011, 2013-2017 Ingo Schwarze +# Copyright (c) 2011, 2013-2018 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -15,7 +15,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -VERSION = 1.14.3 +VERSION = 1.14.4 # === LIST OF FILES ==================================================== @@ -30,6 +30,7 @@ TESTSRCS = test-be32toh.c \ test-isblank.c \ test-mkdtemp.c \ test-nanosleep.c \ + test-noop.c \ test-ntohl.c \ test-O_DIRECTORY.c \ test-ohash.c \ @@ -46,6 +47,7 @@ TESTSRCS = test-be32toh.c \ test-stringlist.c \ test-strlcat.c \ test-strlcpy.c \ + test-strndup.c \ test-strptime.c \ test-strsep.c \ test-strtonum.c \ @@ -70,6 +72,7 @@ SRCS = att.c \ compat_stringlist.c \ compat_strlcat.c \ compat_strlcpy.c \ + compat_strndup.c \ compat_strsep.c \ compat_strtonum.c \ compat_vasprintf.c \ @@ -249,6 +252,7 @@ COMPAT_OBJS = compat_err.o \ compat_strcasestr.o \ compat_strlcat.o \ compat_strlcpy.o \ + compat_strndup.o \ compat_strsep.o \ compat_strtonum.o \ compat_vasprintf.o @@ -544,12 +548,12 @@ regress-distcheck: ! -path regress/regress.pl \ ! -path regress/regress.pl.1 -dist: mandoc.sha256 +dist: mandoc-$(VERSION).sha256 -mandoc.sha256: mandoc.tar.gz - sha256 mandoc.tar.gz > $@ +mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz + sha256 mandoc-$(VERSION).tar.gz > $@ -mandoc.tar.gz: $(DISTFILES) +mandoc-$(VERSION).tar.gz: $(DISTFILES) ls regress/*/*/*.mandoc_* && exit 1 || true mkdir -p .dist/mandoc-$(VERSION)/ $(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION) Modified: head/contrib/mandoc/Makefile.depend ============================================================================== --- head/contrib/mdocml/Makefile.depend Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/Makefile.depend Thu Sep 20 10:58:52 2018 (r338826) @@ -16,6 +16,7 @@ compat_strcasestr.o: compat_strcasestr.c config.h compat_stringlist.o: compat_stringlist.c config.h compat_stringlist.h compat_strlcat.o: compat_strlcat.c config.h compat_strlcpy.o: compat_strlcpy.c config.h +compat_strndup.o: compat_strndup.c config.h compat_strsep.o: compat_strsep.c config.h compat_strtonum.o: compat_strtonum.c config.h compat_vasprintf.o: compat_vasprintf.c config.h @@ -29,7 +30,7 @@ demandoc.o: demandoc.c config.h mandoc.h roff.h man.h eqn.o: eqn.c config.h mandoc_aux.h mandoc.h roff.h libmandoc.h libroff.h eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h -html.o: html.c config.h mandoc_aux.h mandoc.h roff.h out.h html.h manconf.h main.h +html.o: html.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h out.h html.h manconf.h main.h lib.o: lib.c config.h mandoc.h roff.h mdoc.h libmdoc.h lib.in main.o: main.c config.h mandoc_aux.h mandoc.h mandoc_xr.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h Modified: head/contrib/mandoc/NEWS ============================================================================== --- head/contrib/mdocml/NEWS Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/NEWS Thu Sep 20 10:58:52 2018 (r338826) @@ -1,6 +1,83 @@ -$Id: NEWS,v 1.26 2017/07/28 14:57:56 schwarze Exp $ +$Id: NEWS,v 1.32 2018/08/08 14:47:38 schwarze Exp $ This file lists the most important changes in the mandoc.bsd.lv distribution. + +Changes in version 1.14.4, released on August 8, 2018 + + --- MAJOR NEW FEATURES --- + * In ASCII output, render mathematical symbols and greek letters + as transliterations conveying the characters' meanings rather + than trying to imitate their shape. Consequently, such characters + can now be used in portable manual pages. All the same, please + limit their use to contexts where they really matter, for example + when showing complicated mathematical formulae. + * First steps towards better support for small screens in HTML + output (responsive design): avoid most style= attributes, in + particular all hard-coded indentations and column widths, and + provide a better mandoc.css style sheet with a @media query, + using em units throughout, and avoiding redundancy in selectors. + * Better HTML output with some more fitting HTML elements, eliminating + needless class= attributes, and avoiding various HTML syntax errors + (element nesting, URL-fragment syntax, duplicate id= attributes). + --- MINOR NEW FEATURES --- + * When a man(1) argument contains a slash, imply -l like in man-db. + * Use TIOCGWINSZ to reduce the default -Owidth and -Oindent during + interactive use on terminals narrower than 79 columns. + * Generated PostScript files are now more than 50% smaller. + * Terminal rendering of eqn(7) is improved in several respects. + * Simplified and nicer output from the mdoc(7) .Lk macro, formatting + all links in-line, even long ones. + * roff(7) \n+ and \n- numerical register auto-increment and -decrement + * roff(7) .nr optional third argument (auto-increment step size) + * Autodetect in ./configure whether the compiler can use -W and -static, + allowing to build on Solaris 10 and 11 without any configure.local. + --- RELIABILITY BUGFIXES --- + * Only activate UTF-8 output when the user really selected UTF-8, + not some other multibyte character encoding. + * Prevent excessive .ll arguments from generating infinite output. + * Fix out of bounds accesses to parse buffers that could happen when + using renamed or user defined macros after roff(7) conditionals. + * Avoid an assertion failure in certain .Bl -column lists. + * Avoid a NULL pointer access on deroff() failure after '.SS ""'. + * Fix a segfault that could be triggered by two invalid .Dt macros. + * Fix two syntax errors in generated PDF files. + * Properly state the page size in generated PostScript files. + * Close a memory leak caused by missing gzclose(3). + * Fix misformatting of man(7) documents lacking .SH macros + in PostScript and PDF output. + * And many minor bugfixes. + --- THANKS TO --- + * Marc Espie (OpenBSD) for implementing the size reduction of + PostScript files, one additional patch for code simplification, + and two bug reports. + * Theo Buehler (OpenBSD) for a bugfix patch, + and Theo de Raadt (OpenBSD) for checking it. + * John Gardner for more than a dozen suggestions regarding HTML output. + * Mike Williams for teaching me how to use %%DocumentMedia and + setpagedevice in PostScript files. + * Werner Lemberg (groff) for feedback on mdoc(7) language changes. + * Colin Watson (man-db) for feedback on man-db semantics. + * Jason McIntyre (OpenBSD) for lots of feedback and suggestions + on diagnostic messages and on the documentation. + * Thomas Klausner (NetBSD) for suggesting two new style messages + and one new feature, for two bug reports, and for release testing. + * Leah Neukirchen (Void Linux) for suggesting a new style message, + five bug reports, and release testing. + * Anthony Bentley (OpenBSD) for reporting multiple bugs and missing + features. + * Paul Irofti (OpenBSD) and Nate Bargmann for suggesting new features. + * Michael Stapelberg (Debian) for bug reports and release testing. + * Christian Weisgerber, Jonathan Gray, Stuart Henderson, + Ted Unangst (OpenBSD), Takeshi Nakayama (NetBSD), + Anton Lazarov, Jakub Klinkovsky, Jan Stary, Jesper Wallin, + Will Backmam, and Wolfgang Mueller for bug reports. + * Sevan Janiyan (NetBSD) for additions to lib.in. + * George Brown for suggesting code simplifications. + * David Coppa, Igor Sobrado (OpenBSD), and Alexander Kuleshov + for documentation improvements. + * Laura Morales and Raf Czlonka for questions resulting in better + documentation. + * Yuri Pankov (illumos) for release testing. Changes in version 1.14.3, released on August 5, 2017 Modified: head/contrib/mandoc/TODO ============================================================================== --- head/contrib/mdocml/TODO Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/TODO Thu Sep 20 10:58:52 2018 (r338826) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.246 2017/07/24 11:15:12 schwarze Exp $ +* $Id: TODO,v 1.258 2018/08/06 14:16:30 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -38,6 +38,18 @@ are mere guesses, and some may be wrong. --- missing roff features ---------------------------------------------- +- .nop prints its arguments as text, + see groff(7) for an example + +- .ft CB selects constant-width bold font + see groff_out(7) for examples + +- \*(.T prints the device being used, + see groff_char(7) for an example + +- \[charNN], \[charNNN] prints a single-byte codepoint + see groff_char(7) for examples + - .ad (adjust margins) .ad l -- adjust left margin only (flush left) .ad r -- adjust right margin only (flush right) @@ -52,10 +64,6 @@ are mere guesses, and some may be wrong. found by naddy@ in xloadimage(1) loc ** exist *** algo * size * imp * -- .nr third argument (auto-increment step size, requires \n+) - found by bentley@ in sbcl(1) Mon, 9 Dec 2013 18:36:57 -0700 - loc * exist * algo * size * imp ** - - .ns (no-space mode) occurs in xine-config(1) when implementing this, also let .TH set it reported by brad@ Sat, 15 Jan 2011 15:45:23 -0500 @@ -65,10 +73,6 @@ are mere guesses, and some may be wrong. found by jca@ in ratpoison(1) Sun, 30 Jun 2013 12:01:09 +0200 loc * exist ** algo ** size ** imp ** -- \n+ and \n- numerical register increment and decrement - found by bentley@ in sbcl(1) Mon, 9 Dec 2013 18:36:57 -0700 - loc * exist * algo * size * imp ** - - \w'' improve width measurements would not be very useful without an expression parser, see below needed for Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 @@ -87,9 +91,11 @@ are mere guesses, and some may be wrong. Found by naddy@ in devel/cutils cobfusc(1) Mon, 16 Feb 2015 19:10:52 +0100 loc *** exist *** algo *** size ** imp * -- using undefined strings or macros defines them to be empty - wl@ Mon, 14 Nov 2011 14:37:01 +0000 - loc * exist * algo * size * imp * +- check for missing roff escape sequences, implement those that are + trivial even if not usually appearing in manual pages, gracefully + ignore the non-trivial ones, document what they are supposed to do + and what mandoc does instead + loc * exist ** algo * size * imp * --- missing mdoc features ---------------------------------------------- @@ -146,10 +152,6 @@ are mere guesses, and some may be wrong. is not safe, e.g. `.Bl -column .It Pf a b .' gives "ab." but should give "ab ." -- check whether it is correct that `D1' uses INDENT+1; - does it need its own constant? - loc * exist ** algo ** size * imp ** - - prohibit `Nm' from having non-text HEAD children (e.g., NetBSD mDNSShared/dns-sd.1) (mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified) @@ -170,6 +172,25 @@ are mere guesses, and some may be wrong. uqs@ Thu, 2 Jun 2011 11:33:35 +0200 loc * exist ** algo *** size * imp ** +--- missing man features ----------------------------------------------- + +- .SY and .YS, + used by many groff manual pages + +- preserve punctuation following .ME, + see ditroff(7) for an example + +- .TQ tagged paragraph continuation, + see groff_diff(7) for examples + +- groff_www(7) .MTO and .URL + These macros were used by the GNU grep(1) man page. + The groff_www(7) manual page itself uses them, too. + We should probably *not* add them to mandoc. + Just mentioning this here to keep track of the abuse. + Laura Morales 20 Apr 2018 07:33:02 +0200 + loc ** exist * algo * size ** imp * + --- missing tbl features ----------------------------------------------- - the "s" layout column specifier is used for placement of data @@ -177,6 +198,13 @@ are mere guesses, and some may be wrong. synaptics(4) found by tedu@ Mon, 17 Aug 2015 21:17:42 -0400 loc * exist ** algo *** size * imp ** +- vertical centering in cells vertically spanned with ^ + pali dot rohar at gmail dot com 16 Jul 2018 13:03:35 +0200 + loc * exist *** algo *** size ** imp * + +- support .ds requests inside tbl(7) code, + see tbl(1) for an example + - support mdoc(7) and man(7) macros inside tbl(7) code; probably requires the parser reorg and letting tbl(7) use roff_node such that macro sets can mix; @@ -195,6 +223,18 @@ are mere guesses, and some may be wrong. suggested by bentley@ Tue, 14 Oct 2014 04:10:55 -0600 loc * exist ** algo * size * imp ** +- implement horizontal and vertical alignment in HTML output + pali dot rohar at gmail dot com 16 Jul 2018 13:03:35 +0200 + loc * exist * algo * size * imp *** + +- implement cell spanning in HTML output + pali dot rohar at gmail dot com 16 Jul 2018 13:03:35 +0200 + loc * exist * algo ** size ** imp ** + +- implement table borders in HTML output + pali dot rohar at gmail dot com 16 Jul 2018 13:03:35 +0200 + loc * exist * algo ** size ** imp ** + --- missing eqn features ----------------------------------------------- - In a matrix, break the output line after each matrix line. @@ -219,12 +259,15 @@ are mere guesses, and some may be wrong. surrounded by blanks, not when it is part of an unquoted word. Also, check whether there are more such cases (e.g., +?). reported by bentley@ 20 Jun 2017 02:04:29 -0600 + loc * exist ** algo ** size * imp * - Primes, opprime, and ' bentley@ Thu, 13 Jul 2017 23:14:20 -0600 --- missing misc features ---------------------------------------------- +- man -ks 1,8 route; kn@ Jul 13, 2018 orally + - italic correction (\/) in PostScript mode Werner LEMBERG on groff at gnu dot org Sun, 10 Nov 2013 12:47:46 loc ** exist ** algo * size * imp * @@ -298,6 +341,9 @@ are mere guesses, and some may be wrong. * formatting issues: ugly output ************************************************************************ +- .UR can nest inside .TP, + see roff(7) for examples + - revisit empty in-line macros look at the difference between "Em x Em ." and "Sq x Em ." Carsten Kunze Fri, 12 Dec 2014 00:15:41 +0100 @@ -375,6 +421,17 @@ are mere guesses, and some may be wrong. --- HTML issues -------------------------------------------------------- +- wrap Sh and Ss content into
+ Laura Morales 21 Apr 2018 18:10:48 +0200 + (Evaluate whether this is really useful and has no adverse + side effects before implementing; if it is possible, + it does seem cleaner.) + loc ** exist ** algo * size * imp *** + +- format ".IP *" etc. as
    rather than
    + https://github.com/Debian/debiman/issues/67 + loc ** exist ** algo ** size * imp *** + - .Bf at the beginning of a paragraph inserts a bogus 1ex horizontal space, see for example random(3). Introduced in http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_html.c.diff?r1=1.91&r2=1.92 @@ -471,6 +528,10 @@ are mere guesses, and some may be wrong. * warning issues ************************************************************************ +- warn about duplicate .Sh/.Ss heads + gre(4): Rename duplicate sections 20 Apr 2018 15:27:33 +0200 + loc * exist * algo * size * imp ** + - style message about macros inside .Bd -literal and .Dl, in particular font changing macros like .Cm, .Ar, .Fa (from the mdoclint TODO) @@ -509,6 +570,10 @@ are mere guesses, and some may be wrong. but just the overall format loc ** exist ** algo *** size ** imp ** +- makewhatis -p complains about language subdirectories: + /usr/local/man//ru: Unknown directory part + + ************************************************************************ * documentation issues ************************************************************************ @@ -562,7 +627,7 @@ are mere guesses, and some may be wrong. - Enable HTTP compression by detecting gzip encoding and filtering output through libz. - - Sandbox (see OpenSSH). + - Privilege separation (see OpenSSH). - Enable caching support via HTTP 304 and If-Modified-Since. - Have Mac OSX systems automatically disable -static compilation of the CGI: -static isn't supported. @@ -570,6 +635,16 @@ are mere guesses, and some may be wrong. ************************************************************************ * to improve in the groff_mdoc(7) macros ************************************************************************ + +- .Cd # arch1, arch2 in section 4 pages: + find better way to indicate multiple architectures, maybe: + allow .Dt vgafb 4 "macppc sparc64" + already shown as "Device Drivers Manual (macppc sparc64)" + for apropos, make that "vgafb(4) - macppc # sparc64" instead of "- all" + groff can be made to show multiple arches, too, but it is + tedious to do the string parsing in roff code... + jmc@ 23 Apr 2018 07:24:52 +0100 [man for vgafb(4)...] + loc ** exist ** algo * size * imp *** - use uname(1) to set doc-default-operating-system at install time tobimensch Mon, 1 Dec 2014 00:25:07 +0100 Modified: head/contrib/mandoc/apropos.1 ============================================================================== --- head/contrib/mdocml/apropos.1 Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/apropos.1 Thu Sep 20 10:58:52 2018 (r338826) @@ -1,4 +1,4 @@ -.\" $Id: apropos.1,v 1.46 2017/07/04 23:40:01 schwarze Exp $ +.\" $Id: apropos.1,v 1.47 2018/02/23 18:54:02 schwarze Exp $ .\" .\" Copyright (c) 2011, 2012 Kristaps Dzonsons .\" Copyright (c) 2011, 2012, 2014, 2017 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 8 2018 $ +.Dd $Mdocdate: February 23 2018 $ .Dt APROPOS 1 .Os .Sh NAME @@ -74,7 +74,7 @@ would. If the standard output is a terminal device and .Fl c is not specified, use -.Xr less 1 +.Xr more 1 to paginate them. In .Fl a @@ -328,13 +328,36 @@ Text production: .It Li \&Ox Ta Ox No version reference .It Li \&Dx Ta Dx No version reference .El +.Pp +In general, macro keys are supposed to yield complete results without +expecting the user to consider actual macro usage. +For example, results include: +.Pp +.Bl -tag -width 3n -offset 3n -compact +.It Li \&Fa +function arguments appearing on +.Ic \&Fn +lines +.It Li \&Fn +fuction names marked up with +.Ic \&Fo +macros +.It Li \&In +include file names marked up with +.Ic \&Fd +macros +.It Li \&Vt +types appearing as function return types and +.It \& +types appearing in function arguments in the SYNOPSIS +.El .Sh ENVIRONMENT .Bl -tag -width MANPAGER .It Ev MANPAGER Any non-empty value of the environment variable .Ev MANPAGER is used instead of the standard pagination program, -.Xr less 1 ; +.Xr more 1 ; see .Xr man 1 for details. @@ -357,7 +380,7 @@ Specifies the pagination program to use when .Ev MANPAGER is not defined. If neither PAGER nor MANPAGER is defined, -.Xr less 1 +.Xr more 1 .Fl s is used. Only used if Modified: head/contrib/mandoc/cgi.c ============================================================================== --- head/contrib/mdocml/cgi.c Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/cgi.c Thu Sep 20 10:58:52 2018 (r338826) @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.156 2017/06/24 14:38:32 schwarze Exp $ */ +/* $Id: cgi.c,v 1.158 2018/05/29 20:32:45 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -356,6 +356,8 @@ resp_begin_html(int code, const char *msg, const char "\n" "\n" " \n" + " \n" " \n" " ", @@ -398,7 +400,7 @@ resp_searchform(const struct req *req, enum focus focu /* Write query input box. */ - printf(" <input type=\"text\" name=\"query\" value=\""); + printf(" <input type=\"search\" name=\"query\" value=\""); if (req->q.query != NULL) html_print(req->q.query); printf( "\" size=\"40\""); @@ -434,7 +436,7 @@ resp_searchform(const struct req *req, enum focus focu printf(" selected=\"selected\""); puts(">All Architectures</option>"); for (i = 0; i < arch_MAX; i++) { - printf(" <option value=\"%s\"", arch_names[i]); + printf(" <option"); if (NULL != req->q.arch && 0 == strcmp(arch_names[i], req->q.arch)) printf(" selected=\"selected\""); @@ -447,12 +449,10 @@ resp_searchform(const struct req *req, enum focus focu if (req->psz > 1) { puts(" <select name=\"manpath\">"); for (i = 0; i < (int)req->psz; i++) { - printf(" <option "); + printf(" <option"); if (strcmp(req->q.manpath, req->p[i]) == 0) - printf("selected=\"selected\" "); - printf("value=\""); - html_print(req->p[i]); - printf("\">"); + printf(" selected=\"selected\""); + printf(">"); html_print(req->p[i]); puts("</option>"); } Modified: head/contrib/mandoc/chars.c ============================================================================== --- head/contrib/mdocml/chars.c Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/chars.c Thu Sep 20 10:58:52 2018 (r338826) @@ -1,4 +1,4 @@ -/* $Id: chars.c,v 1.71 2017/06/14 20:57:07 schwarze Exp $ */ +/* $Id: chars.c,v 1.73 2017/08/23 13:01:29 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -70,17 +70,17 @@ static struct ln lines[] = { /* Text markers. */ { "ci", "O", 0x25cb }, { "bu", "+\bo", 0x2022 }, - { "dd", "|\b=", 0x2021 }, - { "dg", "|\b-", 0x2020 }, + { "dd", "<**>", 0x2021 }, + { "dg", "<*>", 0x2020 }, { "lz", "<>", 0x25ca }, { "sq", "[]", 0x25a1 }, - { "ps", "<par>", 0x00b6 }, - { "sc", "<sec>", 0x00a7 }, + { "ps", "<paragraph>", 0x00b6 }, + { "sc", "<section>", 0x00a7 }, { "lh", "<=", 0x261c }, { "rh", "=>", 0x261e }, { "at", "@", 0x0040 }, { "sh", "#", 0x0023 }, - { "CR", "_|", 0x21b5 }, + { "CR", "<cr>", 0x21b5 }, { "OK", "\\/", 0x2713 }, { "CL", "<club>", 0x2663 }, { "SP", "<spade>", 0x2660 }, @@ -173,11 +173,11 @@ static struct ln lines[] = { { "OR", "v", 0x2228 }, { "no", "~", 0x00ac }, { "tno", "~", 0x00ac }, - { "te", "3", 0x2203 }, - { "fa", "-\bV", 0x2200 }, - { "st", "-)", 0x220b }, - { "tf", ".:.", 0x2234 }, - { "3d", ".:.", 0x2234 }, + { "te", "<there\037exists>", 0x2203 }, + { "fa", "<for\037all>", 0x2200 }, + { "st", "<such\037that>", 0x220b }, + { "tf", "<therefore>", 0x2234 }, + { "3d", "<therefore>", 0x2234 }, { "or", "|", 0x007c }, /* Mathematicals. */ @@ -193,8 +193,8 @@ static struct ln lines[] = { { "tmu", "x", 0x00d7 }, { "c*", "O\bx", 0x2297 }, { "c+", "O\b+", 0x2295 }, - { "di", "-:-", 0x00f7 }, - { "tdi", "-:-", 0x00f7 }, + { "di", "/", 0x00f7 }, + { "tdi", "/", 0x00f7 }, { "f/", "/", 0x2044 }, { "**", "*", 0x2217 }, { "<=", "<=", 0x2264 }, @@ -210,38 +210,38 @@ static struct ln lines[] = { { "=~", "=~", 0x2245 }, { "~~", "~~", 0x2248 }, { "~=", "~=", 0x2248 }, - { "pt", "oc", 0x221d }, + { "pt", "<proportional\037to>", 0x221d }, { "es", "{}", 0x2205 }, - { "mo", "E", 0x2208 }, - { "nm", "!E", 0x2209 }, - { "sb", "(=", 0x2282 }, - { "nb", "(!=", 0x2284 }, - { "sp", "=)", 0x2283 }, - { "nc", "!=)", 0x2285 }, - { "ib", "(=\b_", 0x2286 }, - { "ip", "=\b_)", 0x2287 }, - { "ca", "(^)", 0x2229 }, - { "cu", "U", 0x222a }, - { "/_", "_\b/", 0x2220 }, - { "pp", "_\b|", 0x22a5 }, - { "is", "'\b,\bI", 0x222b }, - { "integral", "'\b,\bI", 0x222b }, - { "sum", "E", 0x2211 }, - { "product", "TT", 0x220f }, - { "coproduct", "U", 0x2210 }, - { "gr", "V", 0x2207 }, - { "sr", "\\/", 0x221a }, - { "sqrt", "\\/", 0x221a }, + { "mo", "<element\037of>", 0x2208 }, + { "nm", "<not\037element\037of>", 0x2209 }, + { "sb", "<proper\037subset>", 0x2282 }, + { "nb", "<not\037subset>", 0x2284 }, + { "sp", "<proper\037superset>", 0x2283 }, + { "nc", "<not\037superset>", 0x2285 }, + { "ib", "<subset\037or\037equal>", 0x2286 }, + { "ip", "<superset\037or\037equal>", 0x2287 }, + { "ca", "<intersection>", 0x2229 }, + { "cu", "<union>", 0x222a }, + { "/_", "<angle>", 0x2220 }, + { "pp", "<perpendicular>", 0x22a5 }, + { "is", "<integral>", 0x222b }, + { "integral", "<integral>", 0x222b }, + { "sum", "<sum>", 0x2211 }, + { "product", "<product>", 0x220f }, + { "coproduct", "<coproduct>", 0x2210 }, + { "gr", "<nabla>", 0x2207 }, + { "sr", "<sqrt>", 0x221a }, + { "sqrt", "<sqrt>", 0x221a }, { "lc", "|~", 0x2308 }, { "rc", "~|", 0x2309 }, { "lf", "|_", 0x230a }, { "rf", "_|", 0x230b }, - { "if", "oo", 0x221e }, - { "Ah", "N", 0x2135 }, - { "Im", "I", 0x2111 }, - { "Re", "R", 0x211c }, + { "if", "<infinity>", 0x221e }, + { "Ah", "<Aleph>", 0x2135 }, + { "Im", "<Im>", 0x2111 }, + { "Re", "<Re>", 0x211c }, { "wp", "P", 0x2118 }, - { "pd", "a", 0x2202 }, + { "pd", "<del>", 0x2202 }, { "-h", "/h", 0x210f }, { "hbar", "/h", 0x210f }, { "12", "1/2", 0x00bd }, @@ -251,9 +251,9 @@ static struct ln lines[] = { { "38", "3/8", 0x215C }, { "58", "5/8", 0x215D }, { "78", "7/8", 0x215E }, - { "S1", "1", 0x00B9 }, - { "S2", "2", 0x00B2 }, - { "S3", "3", 0x00B3 }, + { "S1", "^1", 0x00B9 }, + { "S2", "^2", 0x00B2 }, + { "S3", "^3", 0x00B3 }, /* Ligatures. */ { "ff", "ff", 0xfb00 }, @@ -346,8 +346,8 @@ static struct ln lines[] = { { "oa", "o\ba", 0x00e5 }, /* Special letters. */ - { "-D", "-\bD", 0x00d0 }, - { "Sd", "d", 0x00f0 }, + { "-D", "Dh", 0x00d0 }, + { "Sd", "dh", 0x00f0 }, { "TP", "Th", 0x00de }, { "Tp", "th", 0x00fe }, { ".i", "i", 0x0131 }, @@ -364,68 +364,68 @@ static struct ln lines[] = { { "Fn", ",\bf", 0x0192 }, /* Units. */ - { "de", "<deg>", 0x00b0 }, - { "%0", "%o", 0x2030 }, + { "de", "<degree>", 0x00b0 }, + { "%0", "<permille>", 0x2030 }, { "fm", "\'", 0x2032 }, { "sd", "''", 0x2033 }, - { "mc", ",\bu", 0x00b5 }, + { "mc", "<micro>", 0x00b5 }, { "Of", "_\ba", 0x00aa }, { "Om", "_\bo", 0x00ba }, /* Greek characters. */ { "*A", "A", 0x0391 }, { "*B", "B", 0x0392 }, - { "*G", "G", 0x0393 }, - { "*D", "_\b/_\b\\", 0x0394 }, + { "*G", "<Gamma>", 0x0393 }, + { "*D", "<Delta>", 0x0394 }, { "*E", "E", 0x0395 }, { "*Z", "Z", 0x0396 }, { "*Y", "H", 0x0397 }, - { "*H", "-\bO", 0x0398 }, + { "*H", "<Theta>", 0x0398 }, { "*I", "I", 0x0399 }, { "*K", "K", 0x039a }, - { "*L", "/\\", 0x039b }, + { "*L", "<Lambda>", 0x039b }, { "*M", "M", 0x039c }, { "*N", "N", 0x039d }, - { "*C", "_\bH", 0x039e }, + { "*C", "<Xi>", 0x039e }, { "*O", "O", 0x039f }, - { "*P", "TT", 0x03a0 }, + { "*P", "<Pi>", 0x03a0 }, { "*R", "P", 0x03a1 }, - { "*S", "S", 0x03a3 }, + { "*S", "<Sigma>", 0x03a3 }, { "*T", "T", 0x03a4 }, { "*U", "Y", 0x03a5 }, - { "*F", "I\bO", 0x03a6 }, + { "*F", "<Phi>", 0x03a6 }, { "*X", "X", 0x03a7 }, - { "*Q", "I\bY", 0x03a8 }, - { "*W", "_\bO", 0x03a9 }, - { "*a", "a", 0x03b1 }, - { "*b", "B", 0x03b2 }, - { "*g", "y", 0x03b3 }, - { "*d", "d", 0x03b4 }, - { "*e", "e", 0x03b5 }, - { "*z", ",\bC", 0x03b6 }, - { "*y", "n", 0x03b7 }, - { "*h", "-\b0", 0x03b8 }, - { "*i", "i", 0x03b9 }, - { "*k", "k", 0x03ba }, - { "*l", ">\b\\", 0x03bb }, - { "*m", ",\bu", 0x03bc }, - { "*n", "v", 0x03bd }, - { "*c", ",\bE", 0x03be }, + { "*Q", "<Psi>", 0x03a8 }, + { "*W", "<Omega>", 0x03a9 }, + { "*a", "<alpha>", 0x03b1 }, + { "*b", "<beta>", 0x03b2 }, + { "*g", "<gamma>", 0x03b3 }, + { "*d", "<delta>", 0x03b4 }, + { "*e", "<epsilon>", 0x03b5 }, + { "*z", "<zeta>", 0x03b6 }, + { "*y", "<eta>", 0x03b7 }, + { "*h", "<theta>", 0x03b8 }, + { "*i", "<iota>", 0x03b9 }, + { "*k", "<kappa>", 0x03ba }, + { "*l", "<lambda>", 0x03bb }, + { "*m", "<mu>", 0x03bc }, + { "*n", "<nu>", 0x03bd }, + { "*c", "<xi>", 0x03be }, { "*o", "o", 0x03bf }, - { "*p", "-\bn", 0x03c0 }, - { "*r", "p", 0x03c1 }, - { "*s", "-\bo", 0x03c3 }, - { "*t", "~\bt", 0x03c4 }, - { "*u", "u", 0x03c5 }, - { "*f", "|\bo", 0x03d5 }, - { "*x", "x", 0x03c7 }, - { "*q", "|\bu", 0x03c8 }, - { "*w", "w", 0x03c9 }, - { "+h", "-\b0", 0x03d1 }, - { "+f", "|\bo", 0x03c6 }, - { "+p", "-\bw", 0x03d6 }, - { "+e", "e", 0x03f5 }, - { "ts", "s", 0x03c2 }, + { "*p", "<pi>", 0x03c0 }, + { "*r", "<rho>", 0x03c1 }, + { "*s", "<sigma>", 0x03c3 }, + { "*t", "<tau>", 0x03c4 }, + { "*u", "<upsilon>", 0x03c5 }, + { "*f", "<phi>", 0x03d5 }, + { "*x", "<chi>", 0x03c7 }, + { "*q", "<psi>", 0x03c8 }, + { "*w", "<omega>", 0x03c9 }, + { "+h", "<theta>", 0x03d1 }, + { "+f", "<phi>", 0x03c6 }, + { "+p", "<pi>", 0x03d6 }, + { "+e", "<epsilon>", 0x03f5 }, + { "ts", "<sigma>", 0x03c2 }, }; static struct ohash mchars; Copied: head/contrib/mandoc/compat_strndup.c (from r338821, vendor/mandoc/dist/compat_strndup.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/mandoc/compat_strndup.c Thu Sep 20 10:58:52 2018 (r338826, copy of r338821, vendor/mandoc/dist/compat_strndup.c) @@ -0,0 +1,50 @@ +#include "config.h" + +#if HAVE_STRNDUP + +int dummy; + +#else + +/* $Id: compat_strndup.c,v 1.1 2018/02/27 11:16:23 schwarze Exp $ */ +/* OpenBSD: strndup.c,v 1.2 2015/08/31 02:53:57 guenther Exp */ +/* + * Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include <sys/types.h> + +#include <stdlib.h> +#include <string.h> + +char * +strndup(const char *str, size_t maxlen) +{ + char *copy; + size_t len; + + for (len = 0; len < maxlen && str[len] != '\0'; len++) + continue; + + copy = malloc(len + 1); + if (copy != NULL) { + (void)memcpy(copy, str, len); + copy[len] = '\0'; + } + + return copy; +} + +#endif Modified: head/contrib/mandoc/config.h ============================================================================== --- head/contrib/mdocml/config.h Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/config.h Thu Sep 20 10:58:52 2018 (r338826) @@ -38,6 +38,7 @@ #define HAVE_STRINGLIST 1 #define HAVE_STRLCAT 1 #define HAVE_STRLCPY 1 +#define HAVE_STRNDUP 1 #define HAVE_STRPTIME 1 #define HAVE_STRSEP 1 #define HAVE_STRTONUM 1 @@ -47,6 +48,7 @@ #define HAVE_OHASH 1 #define BINM_APROPOS "apropos" +#define BINM_CATMAN "catman" #define BINM_MAKEWHATIS "makewhatis" #define BINM_MAN "man" #define BINM_SOELIM "soelim" Modified: head/contrib/mandoc/configure ============================================================================== --- head/contrib/mdocml/configure Thu Sep 20 09:34:55 2018 (r338825) +++ head/contrib/mandoc/configure Thu Sep 20 10:58:52 2018 (r338826) @@ -1,8 +1,8 @@ #!/bin/sh # -# $Id: configure,v 1.64 2017/07/01 09:47:30 schwarze Exp $ +# $Id: configure,v 1.66 2018/07/31 15:34:00 schwarze Exp $ # -# Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org> +# Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -27,7 +27,7 @@ set -e # 3: config.log exec 3> config.log -echo "config.log: writing..." +echo "file config.log: writing..." # --- default settings ------------------------------------------------- # Initialize all variables here, @@ -41,14 +41,13 @@ OSNAME= UTF8_LOCALE= CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -` -CFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings" -CFLAGS="${CFLAGS} -Wno-unused-parameter" +CFLAGS= LDADD= LDFLAGS= LD_NANOSLEEP= LD_OHASH= LD_RECVMSG= -STATIC="-static" +STATIC= BUILD_CGI=0 BUILD_CATMAN=0 @@ -83,6 +82,7 @@ HAVE_STRCASESTR= HAVE_STRINGLIST= HAVE_STRLCAT= HAVE_STRLCPY= +HAVE_STRNDUP= HAVE_STRPTIME= HAVE_STRSEP= HAVE_STRTONUM= @@ -126,27 +126,25 @@ LN="ln -f" # --- manual settings from configure.local ----------------------------- if [ -r ./configure.local ]; then - echo "configure.local: reading..." 1>&2 - echo "configure.local: reading..." 1>&3 + echo "file configure.local: reading..." 1>&2 + echo "file configure.local: reading..." 1>&3 cat ./configure.local 1>&3 . ./configure.local else - echo "configure.local: no (fully automatic configuration)" 1>&2 - echo "configure.local: no (fully automatic configuration)" 1>&3 + echo "file configure.local: no (fully automatic configuration)" 1>&2 + echo "file configure.local: no (fully automatic configuration)" 1>&3 fi echo 1>&3 -# --- tests for config.h ---------------------------------------------- +# --- tests functions -------------------------------------------------- -COMP="${CC} ${CFLAGS} -Wno-unused -Werror" - # Check whether this HAVE_ setting is manually overridden. # If yes, use the override, if no, do not decide anything yet. -# Arguments: lower-case test name, manual value *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Sep 20 11:44:38 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BD681099216; Thu, 20 Sep 2018 11:44:38 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA2CA894CD; Thu, 20 Sep 2018 11:44:37 +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 D0F091D850; Thu, 20 Sep 2018 11:44:37 +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 w8KBibpP057572; Thu, 20 Sep 2018 11:44:37 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KBiaaI057566; Thu, 20 Sep 2018 11:44:36 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201809201144.w8KBiaaI057566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska <mm@FreeBSD.org> Date: Thu, 20 Sep 2018 11:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338827 - in head/contrib/libarchive: . libarchive libarchive/test test_utils X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head/contrib/libarchive: . libarchive libarchive/test test_utils X-SVN-Commit-Revision: 338827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 11:44:38 -0000 Author: mm Date: Thu Sep 20 11:44:36 2018 New Revision: 338827 URL: https://svnweb.freebsd.org/changeset/base/338827 Log: MFV r338797: Sync libarchive with vendor. Relevant vendor changes: PR #1019: Add allocation check for the zip_entry struct Oss-Fuzz #10192: Handle whitespace-only ACL fields correctly Approved by: re (kib) MFC after: 1 week Modified: head/contrib/libarchive/README.md head/contrib/libarchive/libarchive/archive_acl.c head/contrib/libarchive/libarchive/archive_cryptor.c head/contrib/libarchive/libarchive/archive_read_support_format_ar.c head/contrib/libarchive/libarchive/archive_read_support_format_zip.c head/contrib/libarchive/libarchive/test/test_sparse_basic.c head/contrib/libarchive/test_utils/test_main.c Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/README.md ============================================================================== --- head/contrib/libarchive/README.md Thu Sep 20 10:58:52 2018 (r338826) +++ head/contrib/libarchive/README.md Thu Sep 20 11:44:36 2018 (r338827) @@ -78,7 +78,6 @@ Currently, the library automatically detects and reads * POSIX pax interchange format * POSIX octet-oriented cpio * SVR4 ASCII cpio - * POSIX octet-oriented cpio * Binary cpio (big-endian or little-endian) * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions) * ZIP archives (with uncompressed or "deflate" compressed entries, including support for encrypted Zip archives) Modified: head/contrib/libarchive/libarchive/archive_acl.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_acl.c Thu Sep 20 10:58:52 2018 (r338826) +++ head/contrib/libarchive/libarchive/archive_acl.c Thu Sep 20 11:44:36 2018 (r338827) @@ -2058,6 +2058,12 @@ next_field(const char **p, const char **start, } *sep = **p; + /* If the field is only whitespace, bail out now. */ + if (**p == '\0') { + *end = *p; + return; + } + /* Trim trailing whitespace to locate end of field. */ *end = *p - 1; while (**end == ' ' || **end == '\t' || **end == '\n') { Modified: head/contrib/libarchive/libarchive/archive_cryptor.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_cryptor.c Thu Sep 20 10:58:52 2018 (r338826) +++ head/contrib/libarchive/libarchive/archive_cryptor.c Thu Sep 20 11:44:36 2018 (r338827) @@ -316,7 +316,14 @@ aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *k memcpy(ctx->key, key, key_len); memset(ctx->nonce, 0, sizeof(ctx->nonce)); ctx->encr_pos = AES_BLOCK_SIZE; +#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + if (!EVP_CIPHER_CTX_reset(ctx->ctx)) { + EVP_CIPHER_CTX_free(ctx->ctx); + ctx->ctx = NULL; + } +#else EVP_CIPHER_CTX_init(ctx->ctx); +#endif return 0; } Modified: head/contrib/libarchive/libarchive/archive_read_support_format_ar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_ar.c Thu Sep 20 10:58:52 2018 (r338826) +++ head/contrib/libarchive/libarchive/archive_read_support_format_ar.c Thu Sep 20 11:44:36 2018 (r338827) @@ -459,6 +459,7 @@ ar_parse_common_header(struct ar *ar, struct archive_e uint64_t n; /* Copy remaining header */ + archive_entry_set_filetype(entry, AE_IFREG); archive_entry_set_mtime(entry, (time_t)ar_atol10(h + AR_date_offset, AR_date_size), 0L); archive_entry_set_uid(entry, Modified: head/contrib/libarchive/libarchive/archive_read_support_format_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Thu Sep 20 10:58:52 2018 (r338826) +++ head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Thu Sep 20 11:44:36 2018 (r338827) @@ -2708,6 +2708,11 @@ slurp_central_directory(struct archive_read *a, struct return ARCHIVE_FATAL; zip_entry = calloc(1, sizeof(struct zip_entry)); + if (zip_entry == NULL) { + archive_set_error(&a->archive, ENOMEM, + "Can't allocate zip entry"); + return ARCHIVE_FATAL; + } zip_entry->next = zip->zip_entries; zip_entry->flags |= LA_FROM_CENTRAL_DIRECTORY; zip->zip_entries = zip_entry; Modified: head/contrib/libarchive/libarchive/test/test_sparse_basic.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_sparse_basic.c Thu Sep 20 10:58:52 2018 (r338826) +++ head/contrib/libarchive/libarchive/test/test_sparse_basic.c Thu Sep 20 11:44:36 2018 (r338827) @@ -422,6 +422,7 @@ verify_sparse_file(struct archive *a, const char *path assert(sparse->type == END); assertEqualInt(expected_offset, archive_entry_size(ae)); + failure(path); assertEqualInt(holes_seen, expected_holes); assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); @@ -457,6 +458,7 @@ verify_sparse_file2(struct archive *a, const char *pat /* Verify the number of holes only, not its offset nor its * length because those alignments are deeply dependence on * its filesystem. */ + failure(path); assertEqualInt(blocks, archive_entry_sparse_count(ae)); archive_entry_free(ae); } Modified: head/contrib/libarchive/test_utils/test_main.c ============================================================================== --- head/contrib/libarchive/test_utils/test_main.c Thu Sep 20 10:58:52 2018 (r338826) +++ head/contrib/libarchive/test_utils/test_main.c Thu Sep 20 11:44:36 2018 (r338827) @@ -2166,7 +2166,7 @@ void assertVersion(const char *prog, const char *base) /* Skip arbitrary third-party version numbers. */ while (s > 0 && (*q == ' ' || *q == '-' || *q == '/' || *q == '.' || - isalnum(*q))) { + isalnum((unsigned char)*q))) { ++q; --s; } From owner-svn-src-head@freebsd.org Thu Sep 20 13:29:44 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9191E109CD12; Thu, 20 Sep 2018 13:29:44 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48A588D120; Thu, 20 Sep 2018 13:29:44 +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 41FE91E8B3; Thu, 20 Sep 2018 13:29:44 +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 w8KDTiKg008871; Thu, 20 Sep 2018 13:29:44 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KDTiab008870; Thu, 20 Sep 2018 13:29:44 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809201329.w8KDTiab008870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik <mjg@FreeBSD.org> Date: Thu, 20 Sep 2018 13:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338828 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 13:29:44 -0000 Author: mjg Date: Thu Sep 20 13:29:43 2018 New Revision: 338828 URL: https://svnweb.freebsd.org/changeset/base/338828 Log: amd64: move fusufault after all users A lot of function have the following check: cmpq %rax,%rdi /* verify address is valid */ ja fusufault The label is present earlier in kernel .text, which means this is a jump backwards. Absent any information in branch predictor, the cpu predicts it as taken. Since it is almost never taken in practice, this results in a completely avoidable misprediction. Move it past all consumers, so that it is predicted as not taken. Approved by: re (kib) Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Thu Sep 20 11:44:36 2018 (r338827) +++ head/sys/amd64/amd64/support.S Thu Sep 20 13:29:43 2018 (r338828) @@ -755,16 +755,6 @@ ENTRY(fubyte_smap) ret END(fubyte_smap) - ALIGN_TEXT - /* Fault entry clears PSL.AC */ -fusufault: - movq PCPU(CURPCB),%rcx - xorl %eax,%eax - movq %rax,PCB_ONFAULT(%rcx) - decq %rax - POP_FRAME_POINTER - ret - /* * Store a 64-bit word, a 32-bit word, a 16-bit word, or an 8-bit byte to * user memory. @@ -915,6 +905,16 @@ ENTRY(subyte_smap) POP_FRAME_POINTER ret END(subyte_smap) + + ALIGN_TEXT + /* Fault entry clears PSL.AC */ +fusufault: + movq PCPU(CURPCB),%rcx + xorl %eax,%eax + movq %rax,PCB_ONFAULT(%rcx) + decq %rax + POP_FRAME_POINTER + ret /* * copyinstr(from, to, maxlen, int *lencopied) From owner-svn-src-head@freebsd.org Thu Sep 20 13:32:41 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CA0D109D063; Thu, 20 Sep 2018 13:32: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 280588D58E; Thu, 20 Sep 2018 13:32: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 1F8991EA46; Thu, 20 Sep 2018 13:32: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 w8KDWf9t014011; Thu, 20 Sep 2018 13:32:41 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KDWeX4014010; Thu, 20 Sep 2018 13:32:40 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809201332.w8KDWeX4014010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik <mjg@FreeBSD.org> Date: Thu, 20 Sep 2018 13:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338829 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 338829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 13:32:41 -0000 Author: mjg Date: Thu Sep 20 13:32:40 2018 New Revision: 338829 URL: https://svnweb.freebsd.org/changeset/base/338829 Log: fd: prevent inlining of _fdrop thorough kern_descrip.c fdrop is used in several places in the file and almost never has to call _fdrop. Thus inlining it is a pure waste of space. Approved by: re (kib) Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Sep 20 13:29:43 2018 (r338828) +++ head/sys/kern/kern_descrip.c Thu Sep 20 13:32:40 2018 (r338829) @@ -2936,8 +2936,11 @@ fgetvp_write(struct thread *td, int fd, cap_rights_t * /* * Handle the last reference to a file being closed. + * + * Without the noinline attribute clang keeps inlining the func thorough this + * file when fdrop is used. */ -int +int __noinline _fdrop(struct file *fp, struct thread *td) { int error; From owner-svn-src-head@freebsd.org Thu Sep 20 15:13:33 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 792E1109FBB6; Thu, 20 Sep 2018 15:13:33 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) (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 CFE2171424; Thu, 20 Sep 2018 15:13:32 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from hammy.vangyzen.net (unknown [70.97.188.230]) by smtp.vangyzen.net (Postfix) with ESMTPSA id E4C1F564FA; Thu, 20 Sep 2018 10:13:25 -0500 (CDT) Subject: Re: svn commit: r338829 - head/sys/kern To: Mateusz Guzik <mjg@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201809201332.w8KDWeX4014010@repo.freebsd.org> From: Eric van Gyzen <eric@vangyzen.net> Message-ID: <67e2771b-a680-221f-2451-9906d91f58d3@vangyzen.net> Date: Thu, 20 Sep 2018 10:13:24 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <201809201332.w8KDWeX4014010@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 15:13:33 -0000 On 9/20/18 8:32 AM, Mateusz Guzik wrote: > fd: prevent inlining of _fdrop thorough kern_descrip.c > > fdrop is used in several places in the file and almost never has to call > _fdrop. Thus inlining it is a pure waste of space. > > -int > +int __noinline > _fdrop(struct file *fp, struct thread *td) I wonder if some compilers have an attribute for "cold" versus "hot" that would indicate that the function is called seldom versus often. It could influence not only inlining, but also prediction of branches that lead to an unconditional call to it. Eric From owner-svn-src-head@freebsd.org Thu Sep 20 15:45:13 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FF7310A09A8; Thu, 20 Sep 2018 15:45:13 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 354CD72604; Thu, 20 Sep 2018 15:45:13 +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 2C3651FFBF; Thu, 20 Sep 2018 15:45:13 +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 w8KFjCD2081309; Thu, 20 Sep 2018 15:45:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KFjCr5081308; Thu, 20 Sep 2018 15:45:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201809201545.w8KFjCr5081308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston <markj@FreeBSD.org> Date: Thu, 20 Sep 2018 15:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338830 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 338830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 15:45:13 -0000 Author: markj Date: Thu Sep 20 15:45:12 2018 New Revision: 338830 URL: https://svnweb.freebsd.org/changeset/base/338830 Log: Change the domain selection policy in kmem_back(). Ensure that pages backing the same virtual large page come from the same physical domain, as kmem_malloc_domain() does. PR: 231038 Reviewed by: alc, kib Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17248 Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Thu Sep 20 13:32:40 2018 (r338829) +++ head/sys/vm/vm_kern.c Thu Sep 20 15:45:12 2018 (r338830) @@ -122,11 +122,12 @@ SYSCTL_ULONG(_vm, OID_AUTO, max_kernel_address, CTLFLA "Max kernel address"); #if VM_NRESERVLEVEL > 0 -#define KVA_QUANTUM (1 << (VM_LEVEL_0_ORDER + PAGE_SHIFT)) +#define KVA_QUANTUM_SHIFT (VM_LEVEL_0_ORDER + PAGE_SHIFT) #else /* On non-superpage architectures want large import sizes. */ -#define KVA_QUANTUM (PAGE_SIZE * 1024) +#define KVA_QUANTUM_SHIFT (10 + PAGE_SHIFT) #endif +#define KVA_QUANTUM (1 << KVA_QUANTUM_SHIFT) /* * kva_alloc: @@ -416,9 +417,10 @@ kmem_malloc(vm_size_t size, int flags) } /* - * kmem_back: + * kmem_back_domain: * - * Allocate physical pages for the specified virtual address range. + * Allocate physical pages from the specified domain for the specified + * virtual address range. */ int kmem_back_domain(int domain, vm_object_t object, vm_offset_t addr, @@ -479,24 +481,39 @@ retry: return (KERN_SUCCESS); } +/* + * kmem_back: + * + * Allocate physical pages for the specified virtual address range. + */ int kmem_back(vm_object_t object, vm_offset_t addr, vm_size_t size, int flags) { - struct vm_domainset_iter di; - int domain; - int ret; + vm_offset_t end, next, start; + int domain, rv; KASSERT(object == kernel_object, ("kmem_back: only supports kernel object.")); - vm_domainset_iter_malloc_init(&di, kernel_object, &domain, &flags); - do { - ret = kmem_back_domain(domain, object, addr, size, flags); - if (ret == KERN_SUCCESS) + for (start = addr, end = addr + size; addr < end; addr = next) { + /* + * We must ensure that pages backing a given large virtual page + * all come from the same physical domain. + */ + if (vm_ndomains > 1) { + domain = (addr >> KVA_QUANTUM_SHIFT) % vm_ndomains; + next = roundup2(addr + 1, KVA_QUANTUM); + if (next > end || next < start) + next = end; + } else + next = end; + rv = kmem_back_domain(domain, object, addr, next - addr, flags); + if (rv != KERN_SUCCESS) { + kmem_unback(object, start, addr - start); break; - } while (vm_domainset_iter_malloc(&di, &domain, &flags) == 0); - - return (ret); + } + } + return (rv); } /* From owner-svn-src-head@freebsd.org Thu Sep 20 15:45:54 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E452D10A0A2F; Thu, 20 Sep 2018 15:45:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A36572767; Thu, 20 Sep 2018 15:45:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 950A21FFC7; Thu, 20 Sep 2018 15:45:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KFjrXv081398; Thu, 20 Sep 2018 15:45:53 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KFjrAn081397; Thu, 20 Sep 2018 15:45:53 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201809201545.w8KFjrAn081397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Date: Thu, 20 Sep 2018 15:45:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338831 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 338831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 15:45:54 -0000 Author: bz Date: Thu Sep 20 15:45:53 2018 New Revision: 338831 URL: https://svnweb.freebsd.org/changeset/base/338831 Log: In icmp6_rip6_input(), once we have a lock, make sure the inp is not freed. This can happen since the list traversal and locking was converted to epoch(9). If the inp is marked "freed", skip it. This prevents a NULL pointer deref panic in ip6_savecontrol_v4() trying to access the socket hanging off the inp, which was gone by the time we got there. Reported by: andrew Tested by: andrew Approved by: re (gjb) Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Thu Sep 20 15:45:12 2018 (r338830) +++ head/sys/netinet6/icmp6.c Thu Sep 20 15:45:53 2018 (r338831) @@ -1936,6 +1936,10 @@ icmp6_rip6_input(struct mbuf **mp, int off) !IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src)) continue; INP_RLOCK(in6p); + if (__predict_false(in6p->inp_flags2 & INP_FREED)) { + INP_RUNLOCK(in6p); + continue; + } if (ICMP6_FILTER_WILLBLOCK(icmp6->icmp6_type, in6p->in6p_icmp6filt)) { INP_RUNLOCK(in6p); From owner-svn-src-head@freebsd.org Thu Sep 20 15:54:08 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5193E10A0D8A; Thu, 20 Sep 2018 15:54:08 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C45F772C59; Thu, 20 Sep 2018 15:54:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf1-x444.google.com with SMTP id i26-v6so4561744pfo.12; Thu, 20 Sep 2018 08:54:07 -0700 (PDT) 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:user-agent; bh=VozWUpGeXDkfHigUTzpKHDZWr+AiO0VMSwubzBobnqw=; b=gV83bbTblVS2olQAXRAR7IDV165Ox2BT7T9Kr0yR/rqtgi2oesFsef2HFxw14b7o/8 kpRIRTsXVJZtwgntcD3fTCcopLXWm5FRBPc8IaHxoqdGuhV6l5PWheSJ1cyMM43Kx9Wr EnVA0enjYlnQG7Clb/0BbWmH6xleJT3mrPu/X9Z6rsgNoGAoPQEI8o/dr1dDt7FlvUqm gID37wAM9UaFA6N6+82jtnkvOHTsG+tmMwWeADHc77YyGBek7gaLsG7TfpL1AGq5f1sK Mx9ST7/6t9l8q24OqmzrCo81xkFv8INexZS8Q1oQ3QFwC/MtaSrCGssaBjcfIyQVrQos hxNw== 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:user-agent; bh=VozWUpGeXDkfHigUTzpKHDZWr+AiO0VMSwubzBobnqw=; b=Ypnot4/oY+7D9YYfndWs1m7hTBd17VPaojQC9W6yA64AJaQyvcxRVdwk7FQp6UuMnv j2LKlP6GFu8QVYO7M2XiAcSaikH987WhfTT34B79CR1qOlLGz/OAwayLqbLjCs7J5Ki4 +tTvAT3jm4LqK0Luoy7FWBorH9M4p0LtfA7MUfcfucka8BrQuv6wtxHXzI7fFL/QKE1n TNFXjGJhmmDJMLM6V0lDCaYpF4SmtbjsmPZacGUti9vSHusCOg2jlWEAD9H7/5hxC5l4 g82AxjGwlHj2g54btwheLaHKTi7b21Fat/OtO9r97d+4YTp3psPiIstW0N7cXODxY8N0 HSKw== X-Gm-Message-State: APzg51CP/dqMlNkoTAC42IrZz12k9ia5mpzQBga4ligV0QJ3+nAPZN7X fHe/GONBmFsobz2IJLKeP85J/XiF X-Google-Smtp-Source: ANB0VdZqFulXySEloYb0/aJBO7BxJQ1y38bQ1X9SFY3t0bOCDCzIYMmaik5R2v7lBnUf7bYYnpffYQ== X-Received: by 2002:aa7:8713:: with SMTP id b19-v6mr42043084pfo.151.1537458846369; Thu, 20 Sep 2018 08:54:06 -0700 (PDT) Received: from raichu (toroon0560w-lp130-01-174-88-78-8.dsl.bell.ca. [174.88.78.8]) by smtp.gmail.com with ESMTPSA id l9-v6sm32128714pgg.79.2018.09.20.08.54.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 08:54:05 -0700 (PDT) Sender: Mark Johnston <markjdb@gmail.com> Date: Thu, 20 Sep 2018 11:54:02 -0400 From: Mark Johnston <markj@freebsd.org> To: Matt Macy <mmacy@freebsd.org>, jmd@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src Message-ID: <20180920155402.GF99168@raichu> References: <201807150023.w6F0NBx1065422@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807150023.w6F0NBx1065422@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 15:54:08 -0000 On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: > Author: mmacy > Date: Sun Jul 15 00:23:10 2018 > New Revision: 336299 > URL: https://svnweb.freebsd.org/changeset/base/336299 > > Log: > msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd > > This corresponds to the latest status (hasn't changed in 9+ > years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, > cpowl (the complex power functions for float complex, double > complex, and long double complex) which are required for C99 > compliance and were missing from FreeBSD. Also required for > some numerical codes using complex numbered Hamiltonians. > > Thanks to jhb for tracking down the issue with making > weak_reference compile on powerpc. > > When asked to review, bde said "I don't like it" - but > provided no actionable feedback or superior implementations. > > Discussed with: jhb > Submitted by: jmd > Differential Revision: https://reviews.freebsd.org/D15919 This seems to have broken the gcc build: https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of 'long double' [-Werror=overflow] if( y >= LDBL_MAX ) ^~ From owner-svn-src-head@freebsd.org Thu Sep 20 16:23:33 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CCA910A185D for <svn-src-head@mailman.ysv.freebsd.org>; Thu, 20 Sep 2018 16:23:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-14.consmr.mail.bf2.yahoo.com (sonic311-14.consmr.mail.bf2.yahoo.com [74.6.131.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4226173BB3 for <svn-src-head@freebsd.org>; Thu, 20 Sep 2018 16:23:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: l52IsKEVM1kv8kOHE9b75t0UXrYnDflcWLQdKhUFKGh6W7S4tfBcVKEZA.AjgwS MUctOaT4_p9P8DWtL8oZGGw7GsxSHTDHY3UeWiLbTiE3X_Ww0U9.eq.9aQwFJL0V_g0zKbRLvhu6 _TpXU5thT9RVfCSqaBubAAIZQRCvFBOOaiZcA4T6vCmASf1aoMQrimlhd_IqCoRZO2B4yhoJC0Dk 8OdORa3Slub.gy8O8cmLuinwSUC0X67hyoEeYJ1ZdfN5puOYPVUQDSk7b6KHjKjydsW_rU4UJv4W IPXLVBnTTvIW.YFzLNltUc2dTnV5JsqRYtWJ2QaRZ8o7zJnvCyBB1bNtVzwg16IUUxhnfI_HYHYV fxmSLDumpLsbv.sKcWK.XOrqjovT6YxyfJcd7QfhJYUfwto30NJ37ZfuC0ncrE8yGofzGNxNPACQ CD5idjzlCc_Quofc2D.Q7V0o5zDEveIs01tf8L0.bMcK8zuxCsZHeBbo483_AGs_uzMnOpV5sb9_ n_Iz5JmFO3eVoxIZbTmXAA0lQ0UUWd7M4m0VEpjVMlsuufzL6XCvlHptKi4Cp61UVSdNWt6FerQ9 W4MZJpYkBwUFcm6RApjOEUIA7VmDB2_TUkQIiTtkD6_UkkwrHS4opAuMJ9rcitrpipzEJNlk62x6 gHzNOQFMDoM1ymLTOsr3Xa4TzbjPk9Hh_IrmFB7o1sB5z0YquYxVemxkENC0tS6lVJ8ErNaz6TNu RvXo6LJN2pifZirs_ozuMnPu_Ua5.godKrjX7sGy88l5cNp6DhSjyVkdk3EYlq0o3.bxZ0LXlKXd TE.cUY69lEOZ4S.C_K8aQ4kWdwgp_Sx9C7GvD4ZKEY0FoEBxsMft1YfM5ag5WW3XfuR3lmW6HfLz uobMk2FlCqt6EhU5LgOwku4aQRO5D8PNLoV.61Wlfr28T.BybIPjXNK42Ee00BWw0GQnKWgL3wlF ER72ePucBBu9n1PluerQIMdXZFpA8EdnnCM2byaNFktlOYeYy32vSzGQbSF6tdu0ArJqB4bbXbAY dXBr2auOrJ8U- Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.bf2.yahoo.com with HTTP; Thu, 20 Sep 2018 16:23:27 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp432.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID e9f13776f482519eb0513d44f31510d7; Thu, 20 Sep 2018 16:23:23 +0000 (UTC) From: Mark Millard <marklmi@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src Message-Id: <EC459786-9C7E-4898-ACF2-A1A3E7393F9C@yahoo.com> Date: Thu, 20 Sep 2018 09:23:21 -0700 To: Mark Johnston <markj@FreeBSD.org>, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 16:23:33 -0000 Mark Johnston markj at freebsd.org wrote on Thu Sep 20 15:54:08 UTC 2018 : > On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: > > Author: mmacy > > Date: Sun Jul 15 00:23:10 2018 > > New Revision: 336299 > > URL: https://svnweb.freebsd.org/changeset/base/336299 > >=20 > > Log: > > msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd > > =20 > > This corresponds to the latest status (hasn't changed in 9+ > > years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, > > cpowl (the complex power functions for float complex, double > > complex, and long double complex) which are required for C99 > > compliance and were missing from FreeBSD. Also required for > > some numerical codes using complex numbered Hamiltonians. > > =20 > > Thanks to jhb for tracking down the issue with making > > weak_reference compile on powerpc. > > =20 > > When asked to review, bde said "I don't like it" - but > > provided no actionable feedback or superior implementations. > > =20 > > Discussed with: jhb > > Submitted by: jmd > > Differential Revision: https://reviews.freebsd.org/D15919 >=20 > This seems to have broken the gcc build: > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ >=20 > /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating constant = exceeds range of 'long double' [-Werror=3Doverflow] > if( y >=3D LDBL_MAX ) Building with a more recent vintage of the devel/amd64-gcc port does not do this (devel/powerpc64-=3Dgcc master port). I've built locally multiple-times since the below that has by John Baldwin: QUOTE Revision 475290 - Directory Listing=20 Modified Wed Jul 25 00:50:53 2018 UTC (8 weeks, 1 day ago) by jhb Drop builtin float.h for amd64-gcc. GCC's builtin <float.h> header is not compatible with sys/x86/include/float.h. Drop the builtin header for now. If at some point GCC's notion of floating point constants for i386 can converge with sys/x86/include/float.h this can be restored. Reviewed by: bapt Differential Revision:=09 https://reviews.freebsd.org/D16073 END QUOTE Until ci.freebsd.org updates to be based on a version that includes the change the issue will exists there. There was activity on svn-src-head and freebsd-current starting back on 2018-Jun-28 that reported the issue and lead to the change, with subject: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build = (lib32 part of build) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu Sep 20 16:37:51 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDEF310A2163; Thu, 20 Sep 2018 16:37:50 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D4BE743B0; Thu, 20 Sep 2018 16:37:50 +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 96880207EE; Thu, 20 Sep 2018 16:37:50 +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 w8KGbojK007223; Thu, 20 Sep 2018 16:37:50 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KGbosU007222; Thu, 20 Sep 2018 16:37:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201809201637.w8KGbosU007222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston <markj@FreeBSD.org> Date: Thu, 20 Sep 2018 16:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338832 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 338832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 16:37:51 -0000 Author: markj Date: Thu Sep 20 16:37:50 2018 New Revision: 338832 URL: https://svnweb.freebsd.org/changeset/base/338832 Log: Fix variable name typo in the bsdinstall ttys hardening code. Submitted by: Jörg Pernfuß <code.jpe@gmail.com> Reviewed by: allanjude, dab, emaste Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D12476 Modified: head/usr.sbin/bsdinstall/scripts/config Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Thu Sep 20 15:45:53 2018 (r338831) +++ head/usr.sbin/bsdinstall/scripts/config Thu Sep 20 16:37:50 2018 (r338832) @@ -35,9 +35,9 @@ rm $BSDINSTALL_TMPETC/rc.conf.* cat $BSDINSTALL_CHROOT/etc/sysctl.conf $BSDINSTALL_TMPETC/sysctl.conf.* >> $BSDINSTALL_TMPETC/sysctl.conf rm $BSDINSTALL_TMPETC/sysctl.conf.* -if [ -f $BSDINSTALL_TMPTEC/ttys.hardening ]; then - cat $BSDINSTALL_TMPTEC/ttys.hardening > $BSDINSTALL_TMPTEC/ttys - rm $BSDINSTALL_TMPTEC/ttys.hardening +if [ -f $BSDINSTALL_TMPETC/ttys.hardening ]; then + cat $BSDINSTALL_TMPETC/ttys.hardening > $BSDINSTALL_TMPETC/ttys + rm $BSDINSTALL_TMPETC/ttys.hardening fi cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc From owner-svn-src-head@freebsd.org Thu Sep 20 16:39:27 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD04E10A2212; Thu, 20 Sep 2018 16:39:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70CDE74543; Thu, 20 Sep 2018 16:39:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 959AB10B768; Thu, 20 Sep 2018 12:39:25 -0400 (EDT) Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src To: Mark Johnston <markj@freebsd.org>, Matt Macy <mmacy@freebsd.org>, jmd@freebsd.org References: <201807150023.w6F0NBx1065422@repo.freebsd.org> <20180920155402.GF99168@raichu> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: John Baldwin <jhb@FreeBSD.org> Message-ID: <e0f71549-3ae2-05b2-b4e7-228ae39c7f3c@FreeBSD.org> Date: Thu, 20 Sep 2018 09:39:24 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180920155402.GF99168@raichu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 20 Sep 2018 12:39:26 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 16:39:27 -0000 On 9/20/18 8:54 AM, Mark Johnston wrote: > On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: >> Author: mmacy >> Date: Sun Jul 15 00:23:10 2018 >> New Revision: 336299 >> URL: https://svnweb.freebsd.org/changeset/base/336299 >> >> Log: >> msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd >> >> This corresponds to the latest status (hasn't changed in 9+ >> years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, >> cpowl (the complex power functions for float complex, double >> complex, and long double complex) which are required for C99 >> compliance and were missing from FreeBSD. Also required for >> some numerical codes using complex numbered Hamiltonians. >> >> Thanks to jhb for tracking down the issue with making >> weak_reference compile on powerpc. >> >> When asked to review, bde said "I don't like it" - but >> provided no actionable feedback or superior implementations. >> >> Discussed with: jhb >> Submitted by: jmd >> Differential Revision: https://reviews.freebsd.org/D15919 > > This seems to have broken the gcc build: > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ > > /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of 'long double' [-Werror=overflow] > if( y >= LDBL_MAX ) > ^~ Which architecture? i386 doesn't get build with i386-xtoolchain-gcc pending some patches I haven't yet posted for review related to the weirdness we do with floating point on i386. -- John Baldwin                                                                              From owner-svn-src-head@freebsd.org Thu Sep 20 18:24:33 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A16910A49AA; Thu, 20 Sep 2018 18:24:33 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DACB78155; Thu, 20 Sep 2018 18:24:33 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4889A219F3; Thu, 20 Sep 2018 18:24:33 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KIOXHm063324; Thu, 20 Sep 2018 18:24:33 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KIOWws063319; Thu, 20 Sep 2018 18:24:32 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201809201824.w8KIOWws063319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd <shurd@FreeBSD.org> Date: Thu, 20 Sep 2018 18:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338834 - in head/share/man: man4 man9 X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: in head/share/man: man4 man9 X-SVN-Commit-Revision: 338834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 18:24:33 -0000 Author: shurd Date: Thu Sep 20 18:24:32 2018 New Revision: 338834 URL: https://svnweb.freebsd.org/changeset/base/338834 Log: Add iflib.4 manpage The new manpage documents the tunables and statistic sysctls exposed by iflib. Reviewed by: bcr Approved by: re (gjb) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16920 Added: head/share/man/man4/iflib.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/bnxt.4 head/share/man/man4/em.4 head/share/man/man9/iflib.9 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Sep 20 16:43:58 2018 (r338833) +++ head/share/man/man4/Makefile Thu Sep 20 18:24:32 2018 (r338834) @@ -202,6 +202,7 @@ MAN= aac.4 \ icmp6.4 \ ida.4 \ if_ipsec.4 \ + iflib.4 \ ifmib.4 \ ig4.4 \ igmp.4 \ Modified: head/share/man/man4/bnxt.4 ============================================================================== --- head/share/man/man4/bnxt.4 Thu Sep 20 16:43:58 2018 (r338833) +++ head/share/man/man4/bnxt.4 Thu Sep 20 18:24:32 2018 (r338834) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2017 +.Dd September 20, 2018 .Dt BNXT 4 .Os .Sh NAME @@ -110,7 +110,7 @@ These variables must be set before loading the driver, or through the use of .Xr kenv 1 . These are provided by the -.Xr iflib 9 +.Xr iflib 4 framework, and might be better documented there. .Bl -tag -width indent .It Va dev.bnxt.X.iflib.override_nrxds Modified: head/share/man/man4/em.4 ============================================================================== --- head/share/man/man4/em.4 Thu Sep 20 16:43:58 2018 (r338833) +++ head/share/man/man4/em.4 Thu Sep 20 18:24:32 2018 (r338834) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 22, 2017 +.Dd September 20, 2018 .Dt EM 4 .Os .Sh NAME @@ -298,6 +298,7 @@ issue to .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , +.Xr iflib 4 , .Xr led 4 , .Xr netintro 4 , .Xr ng_ether 4 , Added: head/share/man/man4/iflib.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/iflib.4 Thu Sep 20 18:24:32 2018 (r338834) @@ -0,0 +1,195 @@ +.\" $FreeBSD$ +.Dd September 20, 2018 +.Dt IFLIB 4 +.Os +.Sh NAME +.Nm iflib +.Nd Network Interface Driver Framework +.Sh SYNOPSIS +.Cd "device pci" +.Cd "device iflib" +.Sh DESCRIPTION +.Nm +is a framework for network interface drivers for +.Fx . +It is designed to remove a large amount of the boilerplate that is often +needed for modern network interface devices, allowing driver authors to +focus on the specific code needed for their hardware. +This allows for a shared set of +.Xr sysctl 8 +names, rather than each driver naming them individually. +.Sh SYSCTL VARIABLES +These variables must be set before loading the driver, either via +.Xr loader.conf 5 +or through the use of +.Xr kenv 1 . +They are all prefixed by +.Va dev.X.Y.iflib. +where X is the driver name, and Y is the instance number. +.Bl -tag -width indent +.It Va override_nrxds +Override the number of RX descriptors for each queue. +The value is a comma separated list of positive integers. +Some drivers only use a single value, but others may use more. +These numbers must be powers of two, and zero means to use the default. +Individual drivers may have additional restrictions on allowable values. +Defaults to all zeros. +.It Va override_ntxds +Override the number of TX descriptors for each queue. +The value is a comma separated list of positive integers. +Some drivers only use a single value, but others may use more. +These numbers must be powers of two, and zero means to use the default. +Individual drivers may have additional restrictions on allowable values. +Defaults to all zeros. +.It Va override_qs_enable +When set, allows the number of transmit and receive queues to be different. +If not set, the lower of the number of TX or RX queues will be used for both. +.It Va override_nrxqs +Set the number of RX queues. +If zero, the number of RX queues is derived from the number of cores on the +socket connected to the controller. +Defaults to 0. +.It Va override_ntxqs +Set the number of TX queues. +If zero, the number of TX queues is derived from the number of cores on the +socket connected to the controller. +.It Va disable_msix +Disables MSI-X interrupts for the device. +.El +.Pp +These +.Xr sysctl 8 +variables can be changed at any time: +.Bl -tag -width indent +.It Va tx_abdicate +Controls how the transmit ring is serviced. +If set to zero, when a frame is submitted to the transmission ring, the same +task that is submitting it will service the ring unless there's already a +task servicing the TX ring. +This ensures that whenever there is a pending transmission, +the transmit ring is being serviced. +This results in higher transmit throughput. +If set to a non-zero value, task returns immediately and the transmit +ring is serviced by a different task. +This returns control to the caller faster and under high receive load, +may result in fewer dropped RX frames. +.It Va rx_budget +Sets the maximum number of frames to be received at a time. +Zero (the default) indicates the default (currently 16) should be used. +.El +.Pp +There are also some global sysctls which can change behaviour for all drivers, +and may be changed at any time. +.Bl -tag -width indent +.It Va net.iflib.min_tx_latency +If this is set to a non-zero value, iflib will avoid any attempt to combine +multiple transmits, and notify the hardware as quickly as possible of +new descriptors. +This will lower the maximum throughput, but will also lower transmit latency. +.It Va net.iflib.no_tx_batch +Some NICs allow processing completed transmit descriptors in batches. +Doing so usually increases the transmit throughput by reducing the number of +transmit interrupts. +Setting this to a non-zero value will disable the use of this feature. +.El +.Pp +These +.Xr sysctl 8 +variables are read-only: +.Bl -tag -width indent +.It Va driver_version +A string indicating the internal version of the driver. +.El +.Pp +There are a number of queue state +.Xr sysctl 8 +variables as well: +.Bl -tag -width indent +.It Va txqZ +The following are repeated for each transmit queue, where Z is the transmit +queue instance number: +.Bl -tag -width indent +.It Va r_abdications +Number of consumer abdications in the MP ring for this queue. +An abdication occurs on every ring submission when tx_abdicate is true. +.It Va r_restarts +Number of consumer restarts in the MP ring for this queue. +A restart occurs when an attempt to drain a non-empty ring fails, +and the ring is already in the STALLED state. +.It Va r_stalls +Number of consumer stalls in the MP ring for this queue. +A stall occurs when an attempt to drain a non-empty ring fails. +.It Va r_starts +Number of normal consumer starts in the MP ring for this queue. +A start occurs when the MP ring transitions from IDLE to BUSY. +.It Va r_drops +Number of drops in the MP ring for this queue. +A drop occurs when there is an attempt to add an entry to an MP ring with +no available space. +.It Va r_enqueues +Number of entries which have been enqueued to the MP ring for this queue. +.It Va ring_state +MP (soft) ring state. +This privides a snapshot of the current MP ring state, including the producer +head and tail indexes, the consumer index, and the state. +The state is one of "IDLE", "BUSY", +"STALLED", or "ABDICATED". +.It Va txq_cleaned +The number of transmit descriptors which have been reclaimed. +Total cleaned. +.It Va txq_processed +The number of transmit descriptors which have been processed, but may not yet +have been reclaimed. +.It Va txq_in_use +Descriptors which have been added to the transmit queue, +but have not yet been cleaned. +This value will include both untransmitted descriptors as well as descriptors +which have been processed. +.It Va txq_cidx_processed +The transmit queue consumer index of the next descriptor to process. +.It Va txq_cidx +The transmit queue consumer index of the oldest descriptor to reclaim. +.It Va txq_pidx +The transmit queue producer index where the next descriptor to transmit will +be inserted. +.It Va no_tx_dma_setup +Number of times DMA mapping a transmit mbuf failed for reasons other than EFBIG. +.It Va txd_encap_efbig +Number of times DMA mapping a transmit mbuf failed due to requiring too many +segments. +.It Va tx_map_failed +Number of times DMA mapping a transmit mbuf failed for any reason +(sum of no_tx_dma_setup and txd_encap_efbig) +.It Va no_desc_avail +Number of times a descriptor couldn't be added to the transmit ring because +the transmit ring was full. +.It Va mbuf_defrag_failed +Number of times both +.Xr m_collapse 9 +and +.Xr m_defrag 9 +failed after an EFBIG error +result from DMA mapping a transmit mbuf. +.It Va m_pullups +Number of times m_pullup was called attempting to parse a header. +.It Va mbuf_defrag +Number of times m_defrag was called. +.El +.It Va rxqZ +The following are repeated for each receive queue, where Z is the +receive queue instance number: +.Bl -tag -width indent +.It Va rxq_fl0.credits +Credits currently available in the receive ring. +.It Va rxq_fl0.cidx +Current receive ring consumer index. +.It Va rxq_fl0.pidx +Current receive ring producer index. +.El +.El +Additional OIDs useful for driver and iflib development are exposed when the +INVARIANTS and/or WITNESS options are enabled in the kernel. +.Sh SEE ALSO +.Xr iflib 9 +.Sh HISTORY +This framework was introduced in 11.0. Modified: head/share/man/man9/iflib.9 ============================================================================== --- head/share/man/man9/iflib.9 Thu Sep 20 16:43:58 2018 (r338833) +++ head/share/man/man9/iflib.9 Thu Sep 20 18:24:32 2018 (r338834) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd May 3, 2018 +.Dd September 20, 2018 .Dt IFLIB 9 .Os .Sh NAME @@ -32,6 +32,7 @@ Device-dependent transmit and receive functions, used .Nm based drivers. .Sh SEE ALSO +.Xr iflib 4 , .Xr iflibdd 9 , .Xr iflibdi 9 , .Xr iflibtxrx 9 , From owner-svn-src-head@freebsd.org Thu Sep 20 18:25:27 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 573FB10A4A39; Thu, 20 Sep 2018 18:25:27 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D01B782DD; Thu, 20 Sep 2018 18:25:27 +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 07AF921A09; Thu, 20 Sep 2018 18:25:27 +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 w8KIPQQY063410; Thu, 20 Sep 2018 18:25:26 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KIPQT2063409; Thu, 20 Sep 2018 18:25:26 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809201825.w8KIPQT2063409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik <mjg@FreeBSD.org> Date: Thu, 20 Sep 2018 18:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338835 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 338835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 18:25:27 -0000 Author: mjg Date: Thu Sep 20 18:25:26 2018 New Revision: 338835 URL: https://svnweb.freebsd.org/changeset/base/338835 Log: vfs: remove lookup_shared tunable Reviewed by: kib, jhb Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17253 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Thu Sep 20 18:24:32 2018 (r338834) +++ head/sys/kern/vfs_lookup.c Thu Sep 20 18:25:26 2018 (r338835) @@ -160,10 +160,6 @@ nameiinit(void *dummy __unused) } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nameiinit, NULL); -static int lookup_shared = 1; -SYSCTL_INT(_vfs, OID_AUTO, lookup_shared, CTLFLAG_RWTUN, &lookup_shared, 0, - "enables shared locks for path name translation"); - static int lookup_cap_dotdot = 1; SYSCTL_INT(_vfs, OID_AUTO, lookup_cap_dotdot, CTLFLAG_RWTUN, &lookup_cap_dotdot, 0, @@ -307,8 +303,6 @@ namei(struct nameidata *ndp) ("namei: flags contaminated with nameiops")); MPASS(ndp->ni_startdir == NULL || ndp->ni_startdir->v_type == VDIR || ndp->ni_startdir->v_type == VBAD); - if (!lookup_shared) - cnp->cn_flags &= ~LOCKSHARED; fdp = p->p_fd; TAILQ_INIT(&ndp->ni_cap_tracker); ndp->ni_lcf = 0; @@ -660,10 +654,7 @@ lookup(struct nameidata *ndp) * We use shared locks until we hit the parent of the last cn then * we adjust based on the requesting flags. */ - if (lookup_shared) - cnp->cn_lkflags = LK_SHARED; - else - cnp->cn_lkflags = LK_EXCLUSIVE; + cnp->cn_lkflags = LK_SHARED; dp = ndp->ni_startdir; ndp->ni_startdir = NULLVP; vn_lock(dp, @@ -1087,7 +1078,7 @@ nextname: VOP_UNLOCK(dp, 0); success: /* - * Because of lookup_shared we may have the vnode shared locked, but + * Because of shared lookup we may have the vnode shared locked, but * the caller may want it to be exclusively locked. */ if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags) && From owner-svn-src-head@freebsd.org Thu Sep 20 18:29:56 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33D2810A4C01; Thu, 20 Sep 2018 18:29:56 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB3267855A; Thu, 20 Sep 2018 18:29:55 +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 D632B21A12; Thu, 20 Sep 2018 18:29:55 +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 w8KITtHc063617; Thu, 20 Sep 2018 18:29:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KITt25063613; Thu, 20 Sep 2018 18:29:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201809201829.w8KITt25063613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston <markj@FreeBSD.org> Date: Thu, 20 Sep 2018 18:29:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338836 - in head/sys: kern vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: kern vm X-SVN-Commit-Revision: 338836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 18:29:56 -0000 Author: markj Date: Thu Sep 20 18:29:55 2018 New Revision: 338836 URL: https://svnweb.freebsd.org/changeset/base/338836 Log: Ensure that imports into per-domain kmem arenas are KVA_QUANTUM-aligned. The old code appears to assume that vmem_alloc() would import size-aligned KVA chunks from the parent kernel_arena, but vmem doesn't provide this guarantee. Also remove the unused global RWX arena and add comments explaining why we have per-domain arenas. Reported by: alc Reviewed by: alc, kib (previous version) Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17249 Modified: head/sys/kern/subr_vmem.c head/sys/vm/vm_kern.c head/sys/vm/vm_kern.h Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Thu Sep 20 18:25:26 2018 (r338835) +++ head/sys/kern/subr_vmem.c Thu Sep 20 18:29:55 2018 (r338836) @@ -241,9 +241,6 @@ static struct vmem buffer_arena_storage; static struct vmem transient_arena_storage; /* kernel and kmem arenas are aliased for backwards KPI compat. */ vmem_t *kernel_arena = &kernel_arena_storage; -#if VM_NRESERVLEVEL > 0 -vmem_t *kernel_rwx_arena = NULL; -#endif vmem_t *kmem_arena = &kernel_arena_storage; vmem_t *buffer_arena = &buffer_arena_storage; vmem_t *transient_arena = &transient_arena_storage; Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Thu Sep 20 18:25:26 2018 (r338835) +++ head/sys/vm/vm_kern.c Thu Sep 20 18:29:55 2018 (r338836) @@ -669,7 +669,7 @@ kmem_init_zero_region(void) } /* - * Import kva into the kernel arena. + * Import KVA from the kernel map into the kernel arena. */ static int kva_import(void *unused, vmem_size_t size, int flags, vmem_addr_t *addrp) @@ -691,22 +691,20 @@ kva_import(void *unused, vmem_size_t size, int flags, return (0); } -#if VM_NRESERVLEVEL > 0 /* - * Import a superpage from the normal kernel arena into the special - * arena for allocations with different permissions. + * Import KVA from a parent arena into a per-domain arena. Imports must be + * KVA_QUANTUM-aligned and a multiple of KVA_QUANTUM in size. */ static int -kernel_rwx_alloc(void *arena, vmem_size_t size, int flags, vmem_addr_t *addrp) +kva_import_domain(void *arena, vmem_size_t size, int flags, vmem_addr_t *addrp) { KASSERT((size % KVA_QUANTUM) == 0, - ("kernel_rwx_alloc: Size %jd is not a multiple of %d", + ("kva_import_domain: Size %jd is not a multiple of %d", (intmax_t)size, (int)KVA_QUANTUM)); return (vmem_xalloc(arena, size, KVA_QUANTUM, 0, 0, VMEM_ADDR_MIN, VMEM_ADDR_MAX, flags, addrp)); } -#endif /* * kmem_init: @@ -744,30 +742,30 @@ kmem_init(vm_offset_t start, vm_offset_t end) vmem_init(kernel_arena, "kernel arena", 0, 0, PAGE_SIZE, 0, 0); vmem_set_import(kernel_arena, kva_import, NULL, NULL, KVA_QUANTUM); -#if VM_NRESERVLEVEL > 0 - /* - * In an architecture with superpages, maintain a separate arena - * for allocations with permissions that differ from the "standard" - * read/write permissions used for memory in the kernel_arena. - */ - kernel_rwx_arena = vmem_create("kernel rwx arena", 0, 0, PAGE_SIZE, - 0, M_WAITOK); - vmem_set_import(kernel_rwx_arena, kernel_rwx_alloc, - (vmem_release_t *)vmem_xfree, kernel_arena, KVA_QUANTUM); -#endif - for (domain = 0; domain < vm_ndomains; domain++) { + /* + * Initialize the per-domain arenas. These are used to color + * the KVA space in a way that ensures that virtual large pages + * are backed by memory from the same physical domain, + * maximizing the potential for superpage promotion. + */ vm_dom[domain].vmd_kernel_arena = vmem_create( "kernel arena domain", 0, 0, PAGE_SIZE, 0, M_WAITOK); vmem_set_import(vm_dom[domain].vmd_kernel_arena, - (vmem_import_t *)vmem_alloc, NULL, kernel_arena, - KVA_QUANTUM); + kva_import_domain, NULL, kernel_arena, KVA_QUANTUM); + + /* + * In architectures with superpages, maintain separate arenas + * for allocations with permissions that differ from the + * "standard" read/write permissions used for kernel memory, + * so as not to inhibit superpage promotion. + */ #if VM_NRESERVLEVEL > 0 vm_dom[domain].vmd_kernel_rwx_arena = vmem_create( "kernel rwx arena domain", 0, 0, PAGE_SIZE, 0, M_WAITOK); vmem_set_import(vm_dom[domain].vmd_kernel_rwx_arena, - kernel_rwx_alloc, (vmem_release_t *)vmem_xfree, - vm_dom[domain].vmd_kernel_arena, KVA_QUANTUM); + kva_import_domain, (vmem_release_t *)vmem_xfree, + kernel_arena, KVA_QUANTUM); #endif } } Modified: head/sys/vm/vm_kern.h ============================================================================== --- head/sys/vm/vm_kern.h Thu Sep 20 18:25:26 2018 (r338835) +++ head/sys/vm/vm_kern.h Thu Sep 20 18:29:55 2018 (r338836) @@ -70,7 +70,6 @@ extern vm_map_t kernel_map; extern vm_map_t exec_map; extern vm_map_t pipe_map; extern struct vmem *kernel_arena; -extern struct vmem *kernel_rwx_arena; extern struct vmem *kmem_arena; extern struct vmem *buffer_arena; extern struct vmem *transient_arena; From owner-svn-src-head@freebsd.org Thu Sep 20 18:30:18 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F8FB10A4C48; Thu, 20 Sep 2018 18:30:18 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1644A78681; Thu, 20 Sep 2018 18:30:18 +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 111E021A1A; Thu, 20 Sep 2018 18:30:18 +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 w8KIUHQc063712; Thu, 20 Sep 2018 18:30:17 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KIUHFq063711; Thu, 20 Sep 2018 18:30:17 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809201830.w8KIUHFq063711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik <mjg@FreeBSD.org> Date: Thu, 20 Sep 2018 18:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338837 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 18:30:18 -0000 Author: mjg Date: Thu Sep 20 18:30:17 2018 New Revision: 338837 URL: https://svnweb.freebsd.org/changeset/base/338837 Log: amd64: macroify copyin/copyout and provide erms variants Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17257 Modified: head/sys/amd64/amd64/copyout.c head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/copyout.c ============================================================================== --- head/sys/amd64/amd64/copyout.c Thu Sep 20 18:29:55 2018 (r338836) +++ head/sys/amd64/amd64/copyout.c Thu Sep 20 18:30:17 2018 (r338837) @@ -159,20 +159,41 @@ DEFINE_IFUNC(, int, copyinstr, (const void *, void *, copyinstr_smap : copyinstr_nosmap); } -int copyin_nosmap(const void *udaddr, void *kaddr, size_t len); -int copyin_smap(const void *udaddr, void *kaddr, size_t len); +int copyin_nosmap_std(const void *udaddr, void *kaddr, size_t len); +int copyin_smap_std(const void *udaddr, void *kaddr, size_t len); +int copyin_nosmap_erms(const void *udaddr, void *kaddr, size_t len); +int copyin_smap_erms(const void *udaddr, void *kaddr, size_t len); DEFINE_IFUNC(, int, copyin, (const void *, void *, size_t), static) { - return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? - copyin_smap : copyin_nosmap); + switch (cpu_stdext_feature & (CPUID_STDEXT_SMAP | CPUID_STDEXT_ERMS)) { + case CPUID_STDEXT_SMAP: + return (copyin_smap_std); + case CPUID_STDEXT_ERMS: + return (copyin_nosmap_erms); + case CPUID_STDEXT_SMAP | CPUID_STDEXT_ERMS: + return (copyin_smap_erms); + default: + return (copyin_nosmap_std); + + } } -int copyout_nosmap(const void *kaddr, void *udaddr, size_t len); -int copyout_smap(const void *kaddr, void *udaddr, size_t len); +int copyout_nosmap_std(const void *kaddr, void *udaddr, size_t len); +int copyout_smap_std(const void *kaddr, void *udaddr, size_t len); +int copyout_nosmap_erms(const void *kaddr, void *udaddr, size_t len); +int copyout_smap_erms(const void *kaddr, void *udaddr, size_t len); DEFINE_IFUNC(, int, copyout, (const void *, void *, size_t), static) { - return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? - copyout_smap : copyout_nosmap); + switch (cpu_stdext_feature & (CPUID_STDEXT_SMAP | CPUID_STDEXT_ERMS)) { + case CPUID_STDEXT_SMAP: + return (copyout_smap_std); + case CPUID_STDEXT_ERMS: + return (copyout_nosmap_erms); + case CPUID_STDEXT_SMAP | CPUID_STDEXT_ERMS: + return (copyout_smap_erms); + default: + return (copyout_nosmap_std); + } } Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Thu Sep 20 18:29:55 2018 (r338836) +++ head/sys/amd64/amd64/support.S Thu Sep 20 18:30:17 2018 (r338837) @@ -281,62 +281,30 @@ END(fillw) * returns to *curpcb->pcb_onfault instead of the function. */ +.macro SMAP_DISABLE smap +.if \smap + stac +.endif +.endmacro + + +.macro SMAP_ENABLE smap +.if \smap + clac +.endif +.endmacro + /* * copyout(from_kernel, to_user, len) * %rdi, %rsi, %rdx */ -ENTRY(copyout_nosmap) +.macro COPYOUT smap erms PUSH_FRAME_POINTER movq PCPU(CURPCB),%rax - movq $copyout_fault,PCB_ONFAULT(%rax) - testq %rdx,%rdx /* anything to do? */ - jz done_copyout - - /* - * Check explicitly for non-user addresses. This check is essential - * because it prevents usermode from writing into the kernel. We do - * not verify anywhere else that the user did not specify a rogue - * address. - */ - /* - * First, prevent address wrapping. - */ - movq %rsi,%rax - addq %rdx,%rax - jc copyout_fault -/* - * XXX STOP USING VM_MAXUSER_ADDRESS. - * It is an end address, not a max, so every time it is used correctly it - * looks like there is an off by one error, and of course it caused an off - * by one error in several places. - */ - movq $VM_MAXUSER_ADDRESS,%rcx - cmpq %rcx,%rax - ja copyout_fault - - xchgq %rdi,%rsi - /* bcopy(%rsi, %rdi, %rdx) */ - movq %rdx,%rcx - - shrq $3,%rcx - rep - movsq - movb %dl,%cl - andb $7,%cl - je done_copyout - rep - movsb - - jmp done_copyout -END(copyout_nosmap) - -ENTRY(copyout_smap) - PUSH_FRAME_POINTER - movq PCPU(CURPCB),%rax /* Trap entry clears PSL.AC */ movq $copyout_fault,PCB_ONFAULT(%rax) testq %rdx,%rdx /* anything to do? */ - jz done_copyout + jz 2f /* * Check explicitly for non-user addresses. If 486 write protection @@ -365,24 +333,43 @@ ENTRY(copyout_smap) /* bcopy(%rsi, %rdi, %rdx) */ movq %rdx,%rcx + SMAP_DISABLE \smap +.if \erms == 0 shrq $3,%rcx - stac rep movsq movb %dl,%cl andb $7,%cl je 1f +.endif rep movsb -1: clac - -done_copyout: +1: + SMAP_ENABLE \smap +2: xorl %eax,%eax movq PCPU(CURPCB),%rdx movq %rax,PCB_ONFAULT(%rdx) POP_FRAME_POINTER ret +.endmacro +ENTRY(copyout_nosmap_std) + COPYOUT smap=0 erms=0 +END(copyout_nosmap_std) + +ENTRY(copyout_smap_std) + COPYOUT smap=1 erms=0 +END(copyout_smap_std) + +ENTRY(copyout_nosmap_erms) + COPYOUT smap=0 erms=1 +END(copyout_nosmap_erms) + +ENTRY(copyout_smap_erms) + COPYOUT smap=1 erms=1 +END(copyout_smap_erms) + ALIGN_TEXT copyout_fault: movq PCPU(CURPCB),%rdx @@ -390,18 +377,17 @@ copyout_fault: movq $EFAULT,%rax POP_FRAME_POINTER ret -END(copyout_smap) /* * copyin(from_user, to_kernel, len) * %rdi, %rsi, %rdx */ -ENTRY(copyin_nosmap) +.macro COPYIN smap erms PUSH_FRAME_POINTER movq PCPU(CURPCB),%rax movq $copyin_fault,PCB_ONFAULT(%rax) testq %rdx,%rdx /* anything to do? */ - jz done_copyin + jz 2f /* * make sure address is valid @@ -416,56 +402,44 @@ ENTRY(copyin_nosmap) xchgq %rdi,%rsi movq %rdx,%rcx movb %cl,%al - shrq $3,%rcx /* copy longword-wise */ - rep - movsq - movb %al,%cl - andb $7,%cl /* copy remaining bytes */ - je done_copyin - rep - movsb - jmp done_copyin -END(copyin_nosmap) - -ENTRY(copyin_smap) - PUSH_FRAME_POINTER - movq PCPU(CURPCB),%rax - movq $copyin_fault,PCB_ONFAULT(%rax) - testq %rdx,%rdx /* anything to do? */ - jz done_copyin - - /* - * make sure address is valid - */ - movq %rdi,%rax - addq %rdx,%rax - jc copyin_fault - movq $VM_MAXUSER_ADDRESS,%rcx - cmpq %rcx,%rax - ja copyin_fault - - xchgq %rdi,%rsi - movq %rdx,%rcx - movb %cl,%al + SMAP_DISABLE \smap +.if \erms == 0 shrq $3,%rcx /* copy longword-wise */ - stac rep movsq movb %al,%cl andb $7,%cl /* copy remaining bytes */ - je 1f + je 1 +.endif rep movsb -1: clac -done_copyin: +1: + SMAP_ENABLE \smap +2: xorl %eax,%eax movq PCPU(CURPCB),%rdx movq %rax,PCB_ONFAULT(%rdx) POP_FRAME_POINTER ret -END(copyin_smap) +.endmacro + +ENTRY(copyin_nosmap_std) + COPYIN smap=0 erms=0 +END(copyin_nosmap_std) + +ENTRY(copyin_smap_std) + COPYIN smap=1 erms=0 +END(copyin_smap_std) + +ENTRY(copyin_nosmap_erms) + COPYIN smap=0 erms=1 +END(copyin_nosmap_erms) + +ENTRY(copyin_smap_erms) + COPYIN smap=1 erms=1 +END(copyin_smap_erms) ALIGN_TEXT copyin_fault: From owner-svn-src-head@freebsd.org Thu Sep 20 18:39:23 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40D8110A5648 for <svn-src-head@mailman.ysv.freebsd.org>; Thu, 20 Sep 2018 18:39:23 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-22.consmr.mail.gq1.yahoo.com (sonic312-22.consmr.mail.gq1.yahoo.com [98.137.69.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2F817986D for <svn-src-head@freebsd.org>; Thu, 20 Sep 2018 18:39:22 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 0.mw8GAVM1nP2n3wuiL4i0aG4EQi.xiI9lN58jWEAodnR1sD0gL9B0GllzMSwr9 f67Hi5qRKpm.OhNdjg6Z4klBwWzuDR8VQy9ElU0PqCeIm8SoC92LwSxGsHySb1ix5cmzY9vBT.XF hQ6e6ACZuQuxPIovdsDz4i8SxwACBtjPIGUp7o04Jgcg.Wt5rsedDY72Jp0fCjlYw0yJmIVIMlJi cK7Mga1ZLefqE9hnGjsOECenphszIHkbft8_CQDiz7SQwdPmAMIZqWA8XFz8N3kSmc18HSH4yb4s jjGgOiKQN0YYbh0TpgcJPgkFT_0DODtXbgO.fV0kDaHo4g3CRq6DI3iGbwgF4Vr7s7.qHGfgUyNf 7ukBE9MRSbu758AWPlf9zv7ExdsSTRi2v0Y_owYVvLQUc7JiNfTNKXKXShryAz_.K6pququpuLAw 658kw6_uxOHITi7RossV2NnMKLnBd0FhwxXqwEhXA3Oqsml94p.hDCy.LuKePjv5UDYDjCAvC73c C4.oVYcilbrL9zqjXHomm.llK8Yo_BKc.ge2OnjbSEY1CNJ6l1YAfidBq2SEAUSpCyPDol2ixbaP 0qNU2TYdBqJ.xNy1iltIp5uuLxL3PHz4KOQQPwSI2sfpUNBLm5boNHQdAZfl6YWbNX66xidsbZVR 7J4jQ1JyvFPhUjkAveQtEVUplBH7TiMxTombO1JjmD9McOMfgp2SJ4PUY7AOtsfwtQ5gOFJpJfDz zk.jVxtLIeG5ePT1qnLM0uU3kfEa0p5eFKd35T83wJsff4aDOEahhiQNrfUGITMceX.LudiyVjSR VfF71ylE4itlLLb315wgGFZjowbGxu1TMqBF2e0a3MvsFo5YPokL68QO8rDN12bLDL1EskRztwVV hEMIMYu5UK_nfwJuHq4jAfLLKuUac.LpxFu83bo8Sbb2_HQAyzsbLVhiNUVjn1ObnhbKz2ebtoBp uv5GLWLDQcaUf_eZ.AY73_vvcl3ZIP899DwX3DvFo50iInRB9IRcOcKxDZkSVUVlnXczURqrODC4 z7sNroqB8 Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Thu, 20 Sep 2018 18:39:15 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp420.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 164d462b1d2135f88b2d29934995be1b; Thu, 20 Sep 2018 18:29:05 +0000 (UTC) From: Mark Millard <marklmi@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src Message-Id: <B77041C9-BA4D-49FB-82F6-B3417E4800ED@yahoo.com> Date: Thu, 20 Sep 2018 11:29:04 -0700 To: John Baldwin <jhb@freebsd.org>, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 18:39:23 -0000 John Baldwin jhb at FreeBSD.org wrote on Thu Sep 20 16:39:27 UTC 2018 : > On 9/20/18 8:54 AM, Mark Johnston wrote: > > On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: > >> Author: mmacy > >> Date: Sun Jul 15 00:23:10 2018 > >> New Revision: 336299 > >> URL: https://svnweb.freebsd.org/changeset/base/336299 > >> > >> Log: > >> msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd > >> =20 > >> This corresponds to the latest status (hasn't changed in 9+ > >> years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, > >> cpowl (the complex power functions for float complex, double > >> complex, and long double complex) which are required for C99 > >> compliance and were missing from FreeBSD. Also required for > >> some numerical codes using complex numbered Hamiltonians. > >> =20 > >> Thanks to jhb for tracking down the issue with making > >> weak_reference compile on powerpc. > >> =20 > >> When asked to review, bde said "I don't like it" - but > >> provided no actionable feedback or superior implementations. > >> =20 > >> Discussed with: jhb > >> Submitted by: jmd > >> Differential Revision: https://reviews.freebsd.org/D15919 > >=20 > > This seems to have broken the gcc build: > > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ > >=20 > > /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating = constant exceeds range of 'long double' [-Werror=3Doverflow] > > if( y >=3D LDBL_MAX ) > > ^~ >=20 > Which architecture? i386 doesn't get build with i386-xtoolchain-gcc = pending > some patches I haven't yet posted for review related to the weirdness = we do > with floating point on i386. Looking at: https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/7260/consoleText (the most recent completed build attempt when I looked) It is the same as the 2018-Jun-28 list report about lib32 failing to build in the amd64 build (that lead to your ports' head -r475290): --- lib/msun__L --- --- e_powl.o --- /usr/local/bin/x86_64-unknown-freebsd11.1-gcc -DCOMPAT_32BIT -march=3Di686= -mmmx -msse -msse2 -m32 = -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 = --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp = -B/usr/local/x86_64-unknown-freebsd11.1/bin/ = -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 -O2 = -pipe -I/workspace/src/lib/msun/x86 -I/workspace/src/lib/msun/ld80 = -I/workspace/src/lib/msun/i387 -I/workspace/src/lib/msun/src = -I/workspace/src/lib/libc/include -I/workspace/src/lib/libc/i386 -g = -MD -MF.depend.e_powl.o -MTe_powl.o -std=3Dgnu99 = -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign = -Wno-error=3Daddress -Wno-error=3Darray-bounds -Wno-error=3Dattributes = -Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered = -Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline = -Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing = -Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable = -Wno-error=3Dunused-function -Wno-error=3Dunused-value = -Wno-error=3Dmisleading-indentation -Wno-error=3Dnonnull-compare = -Wno-error=3Dshift-negative-value -Wno-error=3Dtautological-compare = -Wno-error=3Dunused-const-variable -Wno-unknown-pragmas -c = /workspace/src/lib/msun/ld80/e_powl.c -o e_powl.o --- secure/lib/libcrypto__L --- . . . --- lib/msun__L --- /workspace/src/lib/msun/ld80/e_powl.c: In function 'powl': /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating constant = exceeds range of 'long double' [-Werror=3Doverflow] if( y >=3D LDBL_MAX ) ^~ /workspace/src/lib/msun/ld80/e_powl.c:286:1: error: floating constant = exceeds range of 'long double' [-Werror=3Doverflow] if( y <=3D -LDBL_MAX ) ^~ /workspace/src/lib/msun/ld80/e_powl.c:297:1: error: floating constant = exceeds range of 'long double' [-Werror=3Doverflow] if( x >=3D LDBL_MAX ) ^~ /workspace/src/lib/msun/ld80/e_powl.c:321:1: error: floating constant = exceeds range of 'long double' [-Werror=3Doverflow] if( x <=3D -LDBL_MAX ) ^~ /workspace/src/lib/msun/ld80/e_powl.c: In function 'powil': /workspace/src/lib/msun/ld80/e_powl.c:577:3: error: floating constant = exceeds range of 'long double' [-Werror=3Doverflow] return( LDBL_MAX ); ^~~~~~ Your ports' head -r475290 does avoid the problem and allow such builds but ci.freebsd.org has not updated to some version with the changes as I understand. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu Sep 20 18:54:18 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31D6610A5E8F; Thu, 20 Sep 2018 18:54:18 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 781547A2DE; Thu, 20 Sep 2018 18:54:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 4A5031063CC; Fri, 21 Sep 2018 04:54:07 +1000 (AEST) Date: Fri, 21 Sep 2018 04:54:07 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> X-X-Sender: bde@besplex.bde.org To: John Baldwin <jhb@freebsd.org> cc: Mark Johnston <markj@freebsd.org>, Matt Macy <mmacy@freebsd.org>, jmd@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src In-Reply-To: <e0f71549-3ae2-05b2-b4e7-228ae39c7f3c@FreeBSD.org> Message-ID: <20180921032926.Y2248@besplex.bde.org> References: <201807150023.w6F0NBx1065422@repo.freebsd.org> <20180920155402.GF99168@raichu> <e0f71549-3ae2-05b2-b4e7-228ae39c7f3c@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=6I5d2MoRAAAA:8 a=REFjb305Bk5Pg-0-Aw0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 18:54:18 -0000 On Thu, 20 Sep 2018, John Baldwin wrote: > On 9/20/18 8:54 AM, Mark Johnston wrote: >> On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: >>> Author: mmacy >>> Date: Sun Jul 15 00:23:10 2018 >>> New Revision: 336299 >>> URL: https://svnweb.freebsd.org/changeset/base/336299 >>> >>> Log: >>> msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd >>> >>> This corresponds to the latest status (hasn't changed in 9+ >>> years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, >>> cpowl (the complex power functions for float complex, double >>> complex, and long double complex) which are required for C99 >>> compliance and were missing from FreeBSD. Also required for >>> some numerical codes using complex numbered Hamiltonians. >>> >>> Thanks to jhb for tracking down the issue with making >>> weak_reference compile on powerpc. >>> >>> When asked to review, bde said "I don't like it" - but >>> provided no actionable feedback or superior implementations. >>> >>> Discussed with: jhb >>> Submitted by: jmd >>> Differential Revision: https://reviews.freebsd.org/D15919 >> >> This seems to have broken the gcc build: >> https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ >> >> /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of 'long double' [-Werror=overflow] >> if( y >= LDBL_MAX ) >> ^~ > > Which architecture? i386 doesn't get build with i386-xtoolchain-gcc pending > some patches I haven't yet posted for review related to the weirdness we do > with floating point on i386. It can only be i386, since only amd64 and i386 use this file (or anything in ld80)0, and amd64 doesn't have the problem. The powl() is completely broken on i386 (even worse than the previous imprecise misimplementation). It depends on bugs in clang to work. i386 still uses a default rounding precision of 53 bits. gcc supports this and rounds long double constants to 53 bits. This breaks most of the constants in this file, since they are only correct when rounded to 64 bits. This loses even more than 11 bits of accuracy since the bits are lost at a more critical stage than in the imprecise version. clang is too incompatible to do correct default rounding. gcc's technically correct rounding is inconvenient, but all other files in ld80 are carefully written to use either 53-bit (double) constants or spell the long double constants in binary (best done using the LD80C() macro) so that they work with either gcc or clang. 53-bit constants are also faster. Not all other files in ld80 arei careful to switch the rounding precision at runtime (best done using the ENTERI() macro), so callers must do the switch in general. Even for the functions that switch internally, this gives a null internal switch which is faster, and the external switch should be around multiple FP operations both for efficiency and so that the external operations are actually in 64-bit precision too. LDBL_MAX has always been broken on i386. Before 2002, it was DBL_MAX. Then its precision was correct (53 bits) but its exponent range was wrong. Now its precision is wrong (64 bits) but its exponent range is correct. Thus it is unusable in libm (except in ld128 where there are no i386 parts). gcc detects its brokenness, and this already caused problems in catrigl.c. I tested catrigl.c a lot, but apparently I without enoygh warning flags, so catrigl.c was committed before this was fixed. LDBL_MAX is not ifdefed in x86/float.h. If it had the correctly rounded value, then clang would detect this problem too. Correct rounding for clang would require it to be a hex constant, since it is to hard to represent binary precision 53 in decimal precision when the compiler will round to binary precision 64. The correctly rounded LDBL_MAX would be inconsistent with incorrectly rounded other constants. clang has the following partly related bugs near x86/float.h: - the declarations of float_t and double_t (these are in math.h) are not ifdefed, but clang does the dubious optimization of using SSE[2] for floats and [doubles] if -march is used at compile time to indicate that SSE[2] is usable at runtime. float_t and double_t don't vary, so are only correct when the i387 is used for all precisions. The misdeclarations as long double are only efficiency bugs. Optimal code should use float_t and double_t a lot, but this guarantees that the dubious optimizations are negative when float_t and double_t are wider than necessary (negative optimizations then result from extra conversions). - the predefined value of FLT_EVAL_METHOD is wrong. This varies with the SSE optimization, but is always wrong since clang doesn't understand that the default long double precision is only 53. Only a value of -1 (indeterminate) means that the evaluation method is very context-dependent. Since indeterminate can be almost anything, it may even allow incorrect rounding at compile time, and it certainly allows the differences given by the SSE optimizations. Hopefully you fixed all these problems in gcc ports. I never used a gcc port except 4.8 when it was installed for a few months on freefall. It seemed to get everything wrong: - float.h wasn't even a "fixed" copy of the system one. IIRC, it was claimed to be MI, so didn't need to start with the system one. But it used 64-bit precision LDBL constants and FLT_EVAL_METHOD = 2 (which requires a default rounding precision of 64 bits). - since float.h didn't understand that the default rounding precision was 53 bits, it seems unlikely that the compile-time rounding precision was 53 bits. gcc should still have the FreeBSD gcc-compile-time option to configure this. It was implemented by a gcc maintainer and didn't require special porting for gcc-4. Rather the reverse -- it is entwined with the i386 code so it is hard to avoid. There should be a gcc-runtime option to select the precision. The default can be changed to 64 bits without breaking much except testing of MFCs and code outside of /usr/src. FreeBSD barely uses floating point outside of libm, and we fixed all of the large extra-precision bugs in libm. I test most double functions in libm for this, but not by default (float functions were fixed first and get more regression testing since they are easier to test). I also only test most long double functions in 64-bit precisions and haven't done much testing of them to see how bad they are in 53-bit precision. Switching the precision to 64-bits internally defeats this test. Bruce From owner-svn-src-head@freebsd.org Thu Sep 20 19:06:21 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB4F210A63DA; Thu, 20 Sep 2018 19:06:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F79C7A936; Thu, 20 Sep 2018 19:06:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pl1-x634.google.com with SMTP id s17-v6so4776743plp.7; Thu, 20 Sep 2018 12:06:21 -0700 (PDT) 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:user-agent; bh=d3OJCJ9+4YU3/Wu7CIxbEGw5avnahHKETHigXolTnQI=; b=aGvpcJlMTNzvFCP//MBsaQul3cse8oO2axfBR3o6BCBk/n5ph7yoq/uI5wjq+zQn8H HVH6W7xY1RPabNDz8W92Qk5FJf3PvyQbN78KwbK8kggdzWhiJVN36NW+DIrfvQSjBhNn saPCDXHIjnEUamLDPfyxFNFviNOn3YiVyhyDahNvdv8KKmVMnpDLekg/3+GEUpIDgtvf haP/7RWe5a6rPcFHL59lkq23UoO4dG0FIQFi/7gngrlkLBrdNqYNq00a1W2ofBtVby6b CdRBioH/lyFYnYhKQOQr56hdBtxYTdSyvs3szO7u+YGl0qpdm+Mcjh7mec1cCHWgP+pX z9Rw== 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:user-agent; bh=d3OJCJ9+4YU3/Wu7CIxbEGw5avnahHKETHigXolTnQI=; b=KdXZsSwueUQrG6QVfXoA4NvWKwOtv1PirolfrEk6WbYytoJKyR3yl5JdZj4Ax1tPga nUWp/UwMHgiIZgqSCpF55K4sPu3oed5sQbnK2RO1qcOTj1sPgFyO87SePifb/UEH6TpI aCLD019LzyGtOBbsOGTrrS0BzyHl7XSUpwzLtG/A/9Vzfnkh1n5FgeoY7km3SbCyrmNO s+HyUk4uplSEzB+vubZ489/iHswQiT4Y5zbVyxJ3y4DwJTCl4S0NEL8jQfdjwfT1MnhL /917chilSzderf34RrM7vBmvQWefGqbOy1gPTsY73ARIHPskcFidfEmsYXF7JOYoeSHu LABg== X-Gm-Message-State: APzg51AQB9UzJIRuw3N/4iVl5f6QERHmQHgTqtsof378fnOwuN5xnJb3 maf0McaN4nkkR+PyWJO+iWTLLMiO X-Google-Smtp-Source: ANB0VdYqLKegn5V0R6fYn5NGcG02EVAk6kRiJ50kJD2QodvnZNrtWgdpoI92SU0PJ//0MQgK4EPS5A== X-Received: by 2002:a17:902:6b89:: with SMTP id p9-v6mr40387592plk.272.1537470379163; Thu, 20 Sep 2018 12:06:19 -0700 (PDT) Received: from raichu (toroon0560w-lp130-01-174-88-78-8.dsl.bell.ca. [174.88.78.8]) by smtp.gmail.com with ESMTPSA id b126-v6sm40392394pga.49.2018.09.20.12.06.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 12:06:17 -0700 (PDT) Sender: Mark Johnston <markjdb@gmail.com> Date: Thu, 20 Sep 2018 15:06:14 -0400 From: Mark Johnston <markj@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: Matt Macy <mmacy@freebsd.org>, jmd@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src Message-ID: <20180920190614.GI99168@raichu> References: <201807150023.w6F0NBx1065422@repo.freebsd.org> <20180920155402.GF99168@raichu> <e0f71549-3ae2-05b2-b4e7-228ae39c7f3c@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <e0f71549-3ae2-05b2-b4e7-228ae39c7f3c@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 19:06:22 -0000 On Thu, Sep 20, 2018 at 09:39:24AM -0700, John Baldwin wrote: > On 9/20/18 8:54 AM, Mark Johnston wrote: > > On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: > >> Author: mmacy > >> Date: Sun Jul 15 00:23:10 2018 > >> New Revision: 336299 > >> URL: https://svnweb.freebsd.org/changeset/base/336299 > >> > >> Log: > >> msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd > >> > >> This corresponds to the latest status (hasn't changed in 9+ > >> years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, > >> cpowl (the complex power functions for float complex, double > >> complex, and long double complex) which are required for C99 > >> compliance and were missing from FreeBSD. Also required for > >> some numerical codes using complex numbered Hamiltonians. > >> > >> Thanks to jhb for tracking down the issue with making > >> weak_reference compile on powerpc. > >> > >> When asked to review, bde said "I don't like it" - but > >> provided no actionable feedback or superior implementations. > >> > >> Discussed with: jhb > >> Submitted by: jmd > >> Differential Revision: https://reviews.freebsd.org/D15919 > > > > This seems to have broken the gcc build: > > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ > > > > /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of 'long double' [-Werror=overflow] > > if( y >= LDBL_MAX ) > > ^~ > > Which architecture? i386 doesn't get build with i386-xtoolchain-gcc pending > some patches I haven't yet posted for review related to the weirdness we do > with floating point on i386. This is the -m32 build on amd64. I haven't tested it myself, but Mark Millard noted that the issue might be fixed by a gcc update. From owner-svn-src-head@freebsd.org Thu Sep 20 19:35:36 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4412610A760E; Thu, 20 Sep 2018 19:35:36 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D01497CA02; Thu, 20 Sep 2018 19:35:35 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB45B225A1; Thu, 20 Sep 2018 19:35:35 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KJZZS9001883; Thu, 20 Sep 2018 19:35:35 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KJZZtb001882; Thu, 20 Sep 2018 19:35:35 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201809201935.w8KJZZtb001882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd <shurd@FreeBSD.org> Date: Thu, 20 Sep 2018 19:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338838 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 338838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 19:35:36 -0000 Author: shurd Date: Thu Sep 20 19:35:35 2018 New Revision: 338838 URL: https://svnweb.freebsd.org/changeset/base/338838 Log: Fix capabilities handling for iflib drivers Various capabilities were not being handled correctly in the SIOCSIFCAP handler. Specifically: IFCAP_RXCSUM and IFCAP_RXCSUM_IPV6 could be set even if not supported It was impossible to disable IFCAP_RXCSUM and/or IFCAP_RXCSUM_IPV6 via ifconfig since it does ioctl() per command-line flag rather than combine them into a single call. IFCAP_VLAN_HWCSUM could not be modified via the ioctl() Setting any combination of the three IFCAP_WOL flags would set only IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC. For example, setting only IFCAP_WOL_UCAST would result in both IFCAP_WOL_MCAST and IFCAP_WOL_MAGIC being enabled, but IFCAP_WOL_UCAST would not be enabled. Because if_vlancap() was called before if_togglecapenable(), vlan flags were sometimes not applied correctly. Interfaces were being unnecessarily stopped and restarted for WoL PR: 231151 Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp> Reported by: Shirkdog <mshirk@daemon-security.com> Reviewed by: galladin Approved by: re (gjb) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D17158 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Thu Sep 20 18:30:17 2018 (r338837) +++ head/sys/net/iflib.c Thu Sep 20 19:35:35 2018 (r338838) @@ -4100,9 +4100,10 @@ iflib_if_qflush(if_t ifp) } -#define IFCAP_FLAGS (IFCAP_TXCSUM_IPV6 | IFCAP_RXCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \ - IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTAGGING | IFCAP_HWSTATS | \ - IFCAP_VLAN_MTU | IFCAP_VLAN_HWFILTER | IFCAP_VLAN_HWTSO) +#define IFCAP_FLAGS (IFCAP_HWCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \ + IFCAP_TSO | IFCAP_VLAN_HWTAGGING | IFCAP_HWSTATS | \ + IFCAP_VLAN_MTU | IFCAP_VLAN_HWFILTER | \ + IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM) static int iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) @@ -4223,39 +4224,51 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) } case SIOCSIFCAP: { - int mask, setmask; + int mask, setmask, oldmask; - mask = ifr->ifr_reqcap ^ if_getcapenable(ifp); + oldmask = if_getcapenable(ifp); + mask = ifr->ifr_reqcap ^ oldmask; + mask &= ctx->ifc_softc_ctx.isc_capabilities; setmask = 0; #ifdef TCP_OFFLOAD setmask |= mask & (IFCAP_TOE4|IFCAP_TOE6); #endif setmask |= (mask & IFCAP_FLAGS); + setmask |= (mask & IFCAP_WOL); - if (setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) - setmask |= (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); - if ((mask & IFCAP_WOL) && - (if_getcapabilities(ifp) & IFCAP_WOL) != 0) - setmask |= (mask & (IFCAP_WOL_MCAST|IFCAP_WOL_MAGIC)); - if_vlancap(ifp); /* + * If we're disabling any RX csum, disable all the ones + * the driver supports. This assumes all supported are + * enabled. + * + * Otherwise, if they've changed, enable all of them. + */ + if ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) < + (oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6))) + setmask &= ~(IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); + else if ((setmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != + (oldmask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6))) + setmask |= (mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)); + + /* * want to ensure that traffic has stopped before we change any of the flags */ if (setmask) { CTX_LOCK(ctx); bits = if_getdrvflags(ifp); - if (bits & IFF_DRV_RUNNING) + if (bits & IFF_DRV_RUNNING && setmask & ~IFCAP_WOL) iflib_stop(ctx); STATE_LOCK(ctx); if_togglecapenable(ifp, setmask); STATE_UNLOCK(ctx); - if (bits & IFF_DRV_RUNNING) + if (bits & IFF_DRV_RUNNING && setmask & ~IFCAP_WOL) iflib_init_locked(ctx); STATE_LOCK(ctx); if_setdrvflags(ifp, bits); STATE_UNLOCK(ctx); CTX_UNLOCK(ctx); } + if_vlancap(ifp); break; } case SIOCGPRIVATE_0: From owner-svn-src-head@freebsd.org Thu Sep 20 19:45:28 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B7B210A7B5A; Thu, 20 Sep 2018 19:45:28 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C50A47D031; Thu, 20 Sep 2018 19:45:27 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BFE7F22768; Thu, 20 Sep 2018 19:45:27 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KJjRhL007114; Thu, 20 Sep 2018 19:45:27 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KJjR1O007113; Thu, 20 Sep 2018 19:45:27 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201809201945.w8KJjR1O007113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" <ae@FreeBSD.org> Date: Thu, 20 Sep 2018 19:45:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338839 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 338839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 19:45:28 -0000 Author: ae Date: Thu Sep 20 19:45:27 2018 New Revision: 338839 URL: https://svnweb.freebsd.org/changeset/base/338839 Log: Add new field max_hdrsize to struct encap_config. It is currently unused and reserved for future use to keep KBI/KPI. Also add several spare pointers to be able extend structure if it will be needed. Approved by: re (gjb) Modified: head/sys/netinet/ip_encap.h Modified: head/sys/netinet/ip_encap.h ============================================================================== --- head/sys/netinet/ip_encap.h Thu Sep 20 19:35:35 2018 (r338838) +++ head/sys/netinet/ip_encap.h Thu Sep 20 19:45:27 2018 (r338839) @@ -48,12 +48,15 @@ typedef int (*encap_input_t)(struct mbuf *, int , int, struct encap_config { int proto; /* protocol */ int min_length; /* minimum packet length */ + int max_hdrsize; /* maximum header size */ int exact_match; /* a packet is exactly matched */ #define ENCAP_DRV_LOOKUP 0x7fffffff encap_lookup_t lookup; encap_check_t check; encap_input_t input; + + void *pad[3]; }; struct encaptab; From owner-svn-src-head@freebsd.org Thu Sep 20 20:06:45 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A598010A861D; Thu, 20 Sep 2018 20:06:45 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C4317DC74; Thu, 20 Sep 2018 20:06:45 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5731D22AC6; Thu, 20 Sep 2018 20:06:45 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8KK6jbQ017337; Thu, 20 Sep 2018 20:06:45 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KK6jE2017336; Thu, 20 Sep 2018 20:06:45 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201809202006.w8KK6jE2017336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd <shurd@FreeBSD.org> Date: Thu, 20 Sep 2018 20:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338840 - head/sys/dev/e1000 X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/dev/e1000 X-SVN-Commit-Revision: 338840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 20:06:45 -0000 Author: shurd Date: Thu Sep 20 20:06:44 2018 New Revision: 338840 URL: https://svnweb.freebsd.org/changeset/base/338840 Log: Add IFCAP_TSO6 for igb It seems igb supports TSO6, but the capability got lost in the iflib update. Restore this capability. PR: 231476 Reported by: lev Reviewed by: erj Approved by: re (gjb) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D17242 Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Sep 20 19:45:27 2018 (r338839) +++ head/sys/dev/e1000/if_em.c Thu Sep 20 20:06:44 2018 (r338840) @@ -709,7 +709,8 @@ em_set_num_queues(if_ctx_t ctx) #define IGB_CAPS \ IFCAP_HWCSUM | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | \ IFCAP_VLAN_HWCSUM | IFCAP_WOL | IFCAP_VLAN_HWFILTER | IFCAP_TSO4 | \ - IFCAP_LRO | IFCAP_VLAN_HWTSO | IFCAP_JUMBO_MTU | IFCAP_HWCSUM_IPV6; + IFCAP_LRO | IFCAP_VLAN_HWTSO | IFCAP_JUMBO_MTU | IFCAP_HWCSUM_IPV6 |\ + IFCAP_TSO6 /********************************************************************* * Device initialization routine From owner-svn-src-head@freebsd.org Thu Sep 20 20:32:09 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CA4310A9175; Thu, 20 Sep 2018 20:32: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 537917F0A3; Thu, 20 Sep 2018 20:32: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 4E6C222F9A; Thu, 20 Sep 2018 20:32: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 w8KKW9x9032455; Thu, 20 Sep 2018 20:32:09 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KKW96K032454; Thu, 20 Sep 2018 20:32:09 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809202032.w8KKW96K032454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik <mjg@FreeBSD.org> Date: Thu, 20 Sep 2018 20:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338841 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 20:32:09 -0000 Author: mjg Date: Thu Sep 20 20:32:08 2018 New Revision: 338841 URL: https://svnweb.freebsd.org/changeset/base/338841 Log: amd64: macroify copyin/copyout and provide erms variants, follow up Fix a fat-fingered typo with a "funny" side-effect: when doing copyin on a cpu without ERMS and with size being a multiply of 8 a page fault would be triggered resulting in EFAULT. Pointy hat: mjg Approved by: re (implicit) Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Thu Sep 20 20:06:44 2018 (r338840) +++ head/sys/amd64/amd64/support.S Thu Sep 20 20:32:08 2018 (r338841) @@ -410,7 +410,7 @@ copyout_fault: movsq movb %al,%cl andb $7,%cl /* copy remaining bytes */ - je 1 + je 1f .endif rep movsb From owner-svn-src-head@freebsd.org Thu Sep 20 22:10:19 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A13DB10AB2D7; Thu, 20 Sep 2018 22:10:19 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B6AB8268A; Thu, 20 Sep 2018 22:10:19 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-wr1-f67.google.com with SMTP id s14-v6so10894610wrw.6; Thu, 20 Sep 2018 15:10:19 -0700 (PDT) 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=LXoAOuurjKupVKDQ1syPykkljelcDrJxhYJZ7UE2Noc=; b=BBusSx4/+L0UzS/vQSClwKuXNLollLW+nHW7GKuFCP4sVy1+l9iEd7ALglv3YLV5iJ kKmtCE/9uqJIkp9EuWdxMoT2SlWxosY7BrIpnrXcw/Zo8wXdTVQfmsH2ft31GtE1NOcq Xa5vm1w2oU8J8zSi0nuG9mWBwDBunucN7CjnmRCdgBuAcE4+kjJ3d2zXf9HbMeZ71uUH DG/M0DuTpdNQHhwIbxEDjmHnzR3+QMkeHDvdhvw/yw1vuKejpk8fIs0rYqajm0pI0hGR qILecWfLxvBh/lw8b8EmUO+v/D7ng+J66xmBuicgG2ZOokQjL5vSsLbAiN9esjRZ0a5t hanA== X-Gm-Message-State: ABuFfogIpX+xtOoviUA9v7aA9hH9Xi7LIBOxHskQUEYU2J7c8DpJXHek Kl+XbimCGkPyqkPUsoXgb4/DPvFY1zPfzKaeU1KTTP1dl0s= X-Google-Smtp-Source: ACcGV6378Wjs2e+kcIqFN0OWUeZavr1lR1NGUuagxczkKAVd32oZ+RuuTr06G1GalzvT2YErkrg8IzK5zPkELZczeRY= X-Received: by 2002:adf:e991:: with SMTP id h17-v6mr4623441wrm.238.1537479828165; Thu, 20 Sep 2018 14:43:48 -0700 (PDT) MIME-Version: 1.0 References: <201807150023.w6F0NBx1065422@repo.freebsd.org> <20180920155402.GF99168@raichu> <e0f71549-3ae2-05b2-b4e7-228ae39c7f3c@FreeBSD.org> <20180920190614.GI99168@raichu> In-Reply-To: <20180920190614.GI99168@raichu> From: Li-Wen Hsu <lwhsu@freebsd.org> Date: Fri, 21 Sep 2018 00:43:37 +0300 Message-ID: <CAKBkRUyzkw9Y=n3RLaANVSaj+Rx5KYBU9LaFw-PFnEKbr86eow@mail.gmail.com> Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src To: Mark Johnston <markj@freebsd.org> Cc: John Baldwin <jhb@freebsd.org>, mmacy@freebsd.org, Johannes M Dieterich <jmd@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 22:10:19 -0000 On Thu, Sep 20, 2018 at 10:06 PM Mark Johnston <markj@freebsd.org> wrote: > > On Thu, Sep 20, 2018 at 09:39:24AM -0700, John Baldwin wrote: > > On 9/20/18 8:54 AM, Mark Johnston wrote: > > > On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: > > >> Author: mmacy > > >> Date: Sun Jul 15 00:23:10 2018 > > >> New Revision: 336299 > > >> URL: https://svnweb.freebsd.org/changeset/base/336299 > > >> > > >> Log: > > >> msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd > > >> > > >> This corresponds to the latest status (hasn't changed in 9+ > > >> years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, > > >> cpowl (the complex power functions for float complex, double > > >> complex, and long double complex) which are required for C99 > > >> compliance and were missing from FreeBSD. Also required for > > >> some numerical codes using complex numbered Hamiltonians. > > >> > > >> Thanks to jhb for tracking down the issue with making > > >> weak_reference compile on powerpc. > > >> > > >> When asked to review, bde said "I don't like it" - but > > >> provided no actionable feedback or superior implementations. > > >> > > >> Discussed with: jhb > > >> Submitted by: jmd > > >> Differential Revision: https://reviews.freebsd.org/D15919 > > > > > > This seems to have broken the gcc build: > > > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ > > > > > > /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of 'long double' [-Werror=overflow] > > > if( y >= LDBL_MAX ) > > > ^~ > > > > Which architecture? i386 doesn't get build with i386-xtoolchain-gcc pending > > some patches I haven't yet posted for review related to the weirdness we do > > with floating point on i386. > > This is the -m32 build on amd64. I haven't tested it myself, but Mark > Millard noted that the issue might be fixed by a gcc update. > I suspect this. Each build is in a fresh created jail with the latest branch of packages from pkg.freebsd.org. At the beginning of (warning: 56MB file) https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/7262/consoleText There is: New packages to be INSTALLED: amd64-xtoolchain-gcc: 0.4_1 amd64-gcc: 6.4.0_2 mpfr: 4.0.1 gmp: 6.1.2 mpc: 1.1.0_1 amd64-binutils: 2.30_5,1 Number of packages to be installed: 6 Or is there a newer version of devel/amd64-gcc I am not aware? -- Li-Wen Hsu <lwhsu@FreeBSD.org> https://lwhsu.org From owner-svn-src-head@freebsd.org Thu Sep 20 23:59:43 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C77810ACF2E; Thu, 20 Sep 2018 23:59:43 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8108854D4; Thu, 20 Sep 2018 23:59:42 +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 B2F0D2506C; Thu, 20 Sep 2018 23:59:42 +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 w8KNxgcv036385; Thu, 20 Sep 2018 23:59:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8KNxg5f036384; Thu, 20 Sep 2018 23:59:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201809202359.w8KNxg5f036384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber <gjb@FreeBSD.org> Date: Thu, 20 Sep 2018 23:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338849 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 338849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 20 Sep 2018 23:59:43 -0000 Author: gjb Date: Thu Sep 20 23:59:42 2018 New Revision: 338849 URL: https://svnweb.freebsd.org/changeset/base/338849 Log: Update head from ALPHA6 to ALPHA7 as part of the 12.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Thu Sep 20 23:06:59 2018 (r338848) +++ head/sys/conf/newvers.sh Thu Sep 20 23:59:42 2018 (r338849) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="ALPHA6" +BRANCH="ALPHA7" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-head@freebsd.org Fri Sep 21 00:00:43 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 418E710ACFE1; Fri, 21 Sep 2018 00:00:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E76678582C; Fri, 21 Sep 2018 00:00:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id A1DD710B77D; Thu, 20 Sep 2018 20:00:34 -0400 (EDT) Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src To: Li-Wen Hsu <lwhsu@freebsd.org>, Mark Johnston <markj@freebsd.org> References: <201807150023.w6F0NBx1065422@repo.freebsd.org> <20180920155402.GF99168@raichu> <e0f71549-3ae2-05b2-b4e7-228ae39c7f3c@FreeBSD.org> <20180920190614.GI99168@raichu> <CAKBkRUyzkw9Y=n3RLaANVSaj+Rx5KYBU9LaFw-PFnEKbr86eow@mail.gmail.com> Cc: mmacy@freebsd.org, Johannes M Dieterich <jmd@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: John Baldwin <jhb@FreeBSD.org> Message-ID: <e8cf25eb-a087-ffa5-9e31-11a42afde7a2@FreeBSD.org> Date: Thu, 20 Sep 2018 17:00:33 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <CAKBkRUyzkw9Y=n3RLaANVSaj+Rx5KYBU9LaFw-PFnEKbr86eow@mail.gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 20 Sep 2018 20:00:35 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 00:00:43 -0000 On 9/20/18 2:43 PM, Li-Wen Hsu wrote: > On Thu, Sep 20, 2018 at 10:06 PM Mark Johnston <markj@freebsd.org> wrote: >> >> On Thu, Sep 20, 2018 at 09:39:24AM -0700, John Baldwin wrote: >>> On 9/20/18 8:54 AM, Mark Johnston wrote: >>>> On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: >>>>> Author: mmacy >>>>> Date: Sun Jul 15 00:23:10 2018 >>>>> New Revision: 336299 >>>>> URL: https://svnweb.freebsd.org/changeset/base/336299 >>>>> >>>>> Log: >>>>> msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd >>>>> >>>>> This corresponds to the latest status (hasn't changed in 9+ >>>>> years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, >>>>> cpowl (the complex power functions for float complex, double >>>>> complex, and long double complex) which are required for C99 >>>>> compliance and were missing from FreeBSD. Also required for >>>>> some numerical codes using complex numbered Hamiltonians. >>>>> >>>>> Thanks to jhb for tracking down the issue with making >>>>> weak_reference compile on powerpc. >>>>> >>>>> When asked to review, bde said "I don't like it" - but >>>>> provided no actionable feedback or superior implementations. >>>>> >>>>> Discussed with: jhb >>>>> Submitted by: jmd >>>>> Differential Revision: https://reviews.freebsd.org/D15919 >>>> >>>> This seems to have broken the gcc build: >>>> https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ >>>> >>>> /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of 'long double' [-Werror=overflow] >>>> if( y >= LDBL_MAX ) >>>> ^~ >>> >>> Which architecture? i386 doesn't get build with i386-xtoolchain-gcc pending >>> some patches I haven't yet posted for review related to the weirdness we do >>> with floating point on i386. >> >> This is the -m32 build on amd64. I haven't tested it myself, but Mark >> Millard noted that the issue might be fixed by a gcc update. >> > > I suspect this. Each build is in a fresh created jail with the latest > branch of packages from pkg.freebsd.org. > > At the beginning of (warning: 56MB file) > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/7262/consoleText > > There is: > > New packages to be INSTALLED: > amd64-xtoolchain-gcc: 0.4_1 > amd64-gcc: 6.4.0_2 > mpfr: 4.0.1 > gmp: 6.1.2 > mpc: 1.1.0_1 > amd64-binutils: 2.30_5,1 > > Number of packages to be installed: 6 > > Or is there a newer version of devel/amd64-gcc I am not aware? That has the change Mark Millard is thinking of: https://svnweb.freebsd.org/ports?view=revision&revision=475290 However, I suspect this is due to a different issue. I still have some patches that I need to get an i386 world to build with external GCC that I'm not sure of and haven't posted for review yet. I bet these also matter for the -m32 build: Index: lib/libc/tests/stdio/printfloat_test.c =================================================================== --- lib/libc/tests/stdio/printfloat_test.c (revision 338373) +++ lib/libc/tests/stdio/printfloat_test.c (working copy) @@ -315,7 +315,7 @@ testfmt("0x1p-1074", "%a", 0x1p-1074); testfmt("0x1.2345p-1024", "%a", 0x1.2345p-1024); -#if (LDBL_MANT_DIG == 64) +#if (LDBL_MANT_DIG == 64) && !defined(__i386__) testfmt("0x1.921fb54442d18468p+1", "%La", 0x3.243f6a8885a308dp0L); testfmt("0x1p-16445", "%La", 0x1p-16445L); testfmt("0x1.30ecap-16381", "%La", 0x9.8765p-16384L); Index: sys/x86/include/float.h =================================================================== --- sys/x86/include/float.h (revision 338373) +++ sys/x86/include/float.h (working copy) @@ -86,10 +86,18 @@ #define LDBL_EPSILON 1.0842021724855044340E-19L #define LDBL_DIG 18 #define LDBL_MIN_EXP (-16381) +#if defined(__i386__) +#define LDBL_MIN 3.3621031431120935e-4932L +#else #define LDBL_MIN 3.3621031431120935063E-4932L +#endif #define LDBL_MIN_10_EXP (-4931) #define LDBL_MAX_EXP 16384 +#if defined(__i386__) +#define LDBL_MAX 1.1897314953572316e+4932L +#else #define LDBL_MAX 1.1897314953572317650E+4932L +#endif #define LDBL_MAX_10_EXP 4932 #if __ISO_C_VISIBLE >= 2011 #define LDBL_TRUE_MIN 3.6451995318824746025E-4951L -- John Baldwin                                                                              From owner-svn-src-head@freebsd.org Fri Sep 21 01:05:56 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0281210AE597 for <svn-src-head@mailman.ysv.freebsd.org>; Fri, 21 Sep 2018 01:05:56 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-20.consmr.mail.gq1.yahoo.com (sonic302-20.consmr.mail.gq1.yahoo.com [98.137.68.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 841A78740F for <svn-src-head@freebsd.org>; Fri, 21 Sep 2018 01:05:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: tVUeD2QVM1m.q.RcdEUDdvloljpj0KrQT91an0aLMWRfIoifzxiGMM7eepBt9gC 0O6CZLT6CLWsK9PAvvRgXhlutwC_ENWuN.6qN3AsFbEfeRlXwEZ030Ii_cUJJcgK17SQpq8gdX4H LGxmiRRDBp9XgiL1i.4jKmbgpwGrReevO49yjphOZ_ZK3pZcjKM.Fn7tsM10BpE3a8lnCj_j4_W5 8yGWJVxa_DU0U2MhfjrWUOE2p3IBbaJbs7d6Y_GXcy6ktei4Zq1Nh0optFONbErdm95wZ.ZpX6RQ 857yihn2xh_udTqOPwC6MlPDe7UtWUAOowe90bGAoRPNpHbGYeWqkzLf55TS97jRouWSs2UqA0kz RdC.2zU5DVUw7hvAD35J8eeW083hvKxaNODKV_inccyJcOM5OCz0nkh9PqCiViNyYhu5qGU4YP1o KTLR6PR8rI87zdLRfTmseZKpoFsfi8ptHTxQyUyUN6.IJmzWfl1R2IIVT1xCl61PilrJ3YHUsY.i 7fKWp2RiAxtuYgAKhkGNzi_KIk2Bek8qzSXoU.i9VZQxzCCZUxso.XR6dGdBPR7A483ERbG0_zdY fAYbmhWBminE1NxCGOoQgd3J7B2IoSzFlvgRkdyBkccmb93vG2ky55hHob2T9azXqCUHzPA8Jql4 TV1sSno1i4ILOCb56_Ma1zIADvRns1njX7Yb.0o4h4aamxpQqu.mQCCwp5IgFPluUpT55jLBMmbF vk6PPakQ8LxwdtsLam2Vzj0Ltf7ETO8qdoZfON625IrIs0C_YNN.T.T903Vvy25HWHxQ4Vkuns1I HptNcsvp8G.l8asYKDERGGq4zXBDWz3NuIfV1kRU5u3PKTB9E4W9029sVFpkN30luDNWmMWWkuaZ Qh_WgDvP6RRtotKM_wn4fPXdWSEvRYIPwP66XEVMSfTi08hANDH32J2tPAKTp0rEOdzgtAkaYmv4 TSYgMH3dUozEyWZtzECDNWaLW3kw3yhJFuasstaFgV4Ce5zqx78Bl7pziUDcMXqKPNThZ7JNS04Y puHomxuN_ Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Fri, 21 Sep 2018 01:05:48 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp413.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 8fcc11f2e4a8c60a1df9553dfa3be07f; Fri, 21 Sep 2018 01:05:43 +0000 (UTC) From: Mark Millard <marklmi@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src Message-Id: <21AF98BF-12EE-49DD-B485-54537B26FBF8@yahoo.com> Date: Thu, 20 Sep 2018 18:05:41 -0700 To: Li-Wen Hsu <lwhsu@freebsd.org>, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 01:05:56 -0000 Li-Wen Hsu lwhsu at freebsd.org wrote on Thu Sep 20 22:10:19 UTC 2018 : > On Thu, Sep 20, 2018 at 10:06 PM Mark Johnston <markj at freebsd.org> = wrote: > > > > On Thu, Sep 20, 2018 at 09:39:24AM -0700, John Baldwin wrote: > > > On 9/20/18 8:54 AM, Mark Johnston wrote: > > > > On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: > > > >> Author: mmacy > > > >> Date: Sun Jul 15 00:23:10 2018 > > > >> New Revision: 336299 > > > >> URL: https://svnweb.freebsd.org/changeset/base/336299 > > > >> > > > >> Log: > > > >> msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd > > > >> > > > >> This corresponds to the latest status (hasn't changed in 9+ > > > >> years) from openbsd of ld80/ld128 powl, and source cpowf, = cpow, > > > >> cpowl (the complex power functions for float complex, double > > > >> complex, and long double complex) which are required for C99 > > > >> compliance and were missing from FreeBSD. Also required for > > > >> some numerical codes using complex numbered Hamiltonians. > > > >> > > > >> Thanks to jhb for tracking down the issue with making > > > >> weak_reference compile on powerpc. > > > >> > > > >> When asked to review, bde said "I don't like it" - but > > > >> provided no actionable feedback or superior implementations. > > > >> > > > >> Discussed with: jhb > > > >> Submitted by: jmd > > > >> Differential Revision: https://reviews.freebsd.org/D15919 > > > > > > > > This seems to have broken the gcc build: > > > > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ > > > > > > > > /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating = constant exceeds range of 'long double' [-Werror=3Doverflow] > > > > if( y >=3D LDBL_MAX ) > > > > ^~ > > > > > > Which architecture? i386 doesn't get build with = i386-xtoolchain-gcc pending > > > some patches I haven't yet posted for review related to the = weirdness we do > > > with floating point on i386. > > > > This is the -m32 build on amd64. I haven't tested it myself, but = Mark > > Millard noted that the issue might be fixed by a gcc update. > > >=20 > I suspect this. Each build is in a fresh created jail with the latest > branch of packages from pkg.freebsd.org. >=20 > At the beginning of (warning: 56MB file) > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/7262/consoleText >=20 > There is: >=20 > New packages to be INSTALLED: > amd64-xtoolchain-gcc: 0.4_1 > amd64-gcc: 6.4.0_2 > mpfr: 4.0.1 > gmp: 6.1.2 > mpc: 1.1.0_1 > amd64-binutils: 2.30_5,1 >=20 > Number of packages to be installed: 6 >=20 > Or is there a newer version of devel/amd64-gcc I am not aware? I wonder when ci.freebsd.org started using "amd64-gcc: 6.4.0_2". Looking: = https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/6665/consoleText from back on 2018-Jul-26. This suggests being based on -r475319 (2018-Jul-25) for devel/powerpc-gcc (the master port). Looks like -r475290 (the float.h removal) is the first version with PORT_REVISION being 2, as are all later versions at this point. Technically -r476273 (2018-Aug-2) removed a typo from -r475290 but at the time the typo seemed to not make an operational difference. Still, ci.freebsd.org seems to not be using the version with the typo fixed. Looks like system head being built was -r338831. (I'm only at -r338675 so far.) I've started a buildworld buildkernel based -on head -r3338675 and based on master port: # svnlite diff /usr/ports/devel/powerpc64-gcc/ | more Index: /usr/ports/devel/powerpc64-gcc/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- /usr/ports/devel/powerpc64-gcc/Makefile (revision 480180) +++ /usr/ports/devel/powerpc64-gcc/Makefile (working copy) @@ -16,7 +16,8 @@ LIB_DEPENDS=3D libgmp.so:math/gmp \ libmpfr.so:math/mpfr \ libmpc.so:math/mpc -BUILD_DEPENDS=3D ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils +BUILD_DEPENDS=3D ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils \ + objdump:devel/binutils RUN_DEPENDS=3D ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils =20 USES=3D gmake iconv libtool tar:xz makeinfo compiler which does not have -r478209 involved ( un-breaking devel/aarch64-none-elf-gcc ). # svnlite diff /usr/ports/devel/amd64-gcc/ | more # So no differences there (relative to -r480180). (The objdump is from having built systems based on WITHOUT_BINUTILS and WITHOUT_BINUTILS_BOOTSTRAP at times but some devel/*-gcc builds trying to use objdump in the configuration part of gcc's build.) My past builds using at or after -r475290 for various system head revisions have completed without being stopped by an error but it has been a while. I will see for this one, but it is only into building lib32 so far. (Note: My port builds are via devel/poudriere-devel tied to my /usr/ports/ and to my /usr/obj/DESTDIRs/clang-amd64-installworld-poud/ that is installed from the same build that I install and boot from, just with distrib-dirs distribution DB_FROM_SRC=3D1 also involved with the installworld .) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Sep 21 01:37:09 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2F8810AF015; Fri, 21 Sep 2018 01:37:09 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 576B2889C8; Fri, 21 Sep 2018 01:37:09 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33D272608D; Fri, 21 Sep 2018 01:37:09 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8L1b9X2087322; Fri, 21 Sep 2018 01:37:09 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8L1b8aT087320; Fri, 21 Sep 2018 01:37:08 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201809210137.w8L1b8aT087320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy <mmacy@FreeBSD.org> Date: Fri, 21 Sep 2018 01:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338850 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 338850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 01:37:10 -0000 Author: mmacy Date: Fri Sep 21 01:37:08 2018 New Revision: 338850 URL: https://svnweb.freebsd.org/changeset/base/338850 Log: fix vlan locking to permit sx acquisition in ioctl calls - update vlan(9) to handle changes earlier this year in multicast locking Tested by: np@, darkfiberu at gmail.com PR: 230510 Reviewed by: mjoras@, shurd@, sbruno@ Approved by: re (gjb@) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16808 Modified: head/sys/net/if_var.h head/sys/net/if_vlan.c Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Sep 20 23:59:42 2018 (r338849) +++ head/sys/net/if_var.h Fri Sep 21 01:37:08 2018 (r338850) @@ -411,6 +411,7 @@ struct ifnet { #define NET_EPOCH_ENTER_ET(et) epoch_enter_preempt(net_epoch_preempt, &(et)) #define NET_EPOCH_EXIT() epoch_exit_preempt(net_epoch_preempt, &nep_et) #define NET_EPOCH_EXIT_ET(et) epoch_exit_preempt(net_epoch_preempt, &(et)) +#define NET_EPOCH_WAIT() epoch_wait_preempt(net_epoch_preempt) /* Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Thu Sep 20 23:59:42 2018 (r338849) +++ head/sys/net/if_vlan.c Fri Sep 21 01:37:08 2018 (r338850) @@ -87,11 +87,11 @@ __FBSDID("$FreeBSD$"); #define UP_AND_RUNNING(ifp) \ ((ifp)->if_flags & IFF_UP && (ifp)->if_drv_flags & IFF_DRV_RUNNING) -LIST_HEAD(ifvlanhead, ifvlan); +CK_SLIST_HEAD(ifvlanhead, ifvlan); struct ifvlantrunk { struct ifnet *parent; /* parent interface of this trunk */ - struct rmlock lock; + struct mtx lock; #ifdef VLAN_ARRAY #define VLAN_ARRAY_SIZE (EVL_VLID_MASK + 1) struct ifvlan *vlans[VLAN_ARRAY_SIZE]; /* static table */ @@ -117,7 +117,7 @@ struct ifvlantrunk { struct ifvlan *_next; \ size_t _i; \ for (_i = 0; _i < (1 << (_trunk)->hwidth); _i++) \ - LIST_FOREACH_SAFE((_ifv), &(_trunk)->hash[_i], ifv_list, _next) + CK_SLIST_FOREACH_SAFE((_ifv), &(_trunk)->hash[_i], ifv_list, _next) #endif /* VLAN_ARRAY */ /* @@ -146,13 +146,13 @@ struct ifvlantrunk { for (_i = 0; \ !(_cond) && _i < (1 << (_trunk)->hwidth); \ _i = (_touch && ((_trunk) != NULL) ? 0 : _i + 1), _touch = false) \ - if (((_ifv) = LIST_FIRST(&(_trunk)->hash[_i])) != NULL && \ + if (((_ifv) = CK_SLIST_FIRST(&(_trunk)->hash[_i])) != NULL && \ (_touch = true)) #endif /* VLAN_ARRAY */ struct vlan_mc_entry { struct sockaddr_dl mc_addr; - SLIST_ENTRY(vlan_mc_entry) mc_entries; + CK_SLIST_ENTRY(vlan_mc_entry) mc_entries; }; struct ifvlan { @@ -173,9 +173,9 @@ struct ifvlan { uint8_t ifvm_pcp; /* Priority Code Point (PCP). */ } ifv_mib; struct task lladdr_task; - SLIST_HEAD(, vlan_mc_entry) vlan_mc_listhead; + CK_SLIST_HEAD(, vlan_mc_entry) vlan_mc_listhead; #ifndef VLAN_ARRAY - LIST_ENTRY(ifvlan) ifv_list; + CK_SLIST_ENTRY(ifvlan) ifv_list; #endif }; #define ifv_proto ifv_mib.ifvm_proto @@ -205,55 +205,36 @@ static eventhandler_tag ifdetach_tag; static eventhandler_tag iflladdr_tag; /* - * if_vlan uses two module-level locks to allow concurrent modification of vlan - * interfaces and (mostly) allow for vlans to be destroyed while they are being - * used for tx/rx. To accomplish this in a way that has acceptable performance - * and cooperation with other parts of the network stack there is a - * non-sleepable rmlock(9) and an sx(9). Both locks are exclusively acquired - * when destroying a vlan interface, i.e. when the if_vlantrunk field of struct - * ifnet is de-allocated and NULL'd. Thus a reader holding either lock has a - * guarantee that the struct ifvlantrunk references a valid vlan trunk. + * if_vlan uses two module-level synchronizations primitives to allow concurrent + * modification of vlan interfaces and (mostly) allow for vlans to be destroyed + * while they are being used for tx/rx. To accomplish this in a way that has + * acceptable performance and cooperation with other parts of the network stack + * there is a non-sleepable epoch(9) and an sx(9). * - * The performance-sensitive paths that warrant using the rmlock(9) are + * The performance-sensitive paths that warrant using the epoch(9) are * vlan_transmit and vlan_input. Both have to check for the vlan interface's * existence using if_vlantrunk, and being in the network tx/rx paths the use - * of an rmlock(9) gives a measureable improvement in performance. + * of an epoch(9) gives a measureable improvement in performance. * * The reason for having an sx(9) is mostly because there are still areas that * must be sleepable and also have safe concurrent access to a vlan interface. * Since the sx(9) exists, it is used by default in most paths unless sleeping * is not permitted, or if it is not clear whether sleeping is permitted. * - * Note that despite these protections, there is still an inherent race in the - * destruction of vlans since there's no guarantee that the ifnet hasn't been - * freed/reused when the tx/rx functions are called by the stack. This can only - * be fixed by addressing ifnet's lifetime issues. */ -#define _VLAN_RM_ID ifv_rm_lock #define _VLAN_SX_ID ifv_sx -static struct rmlock _VLAN_RM_ID; static struct sx _VLAN_SX_ID; #define VLAN_LOCKING_INIT() \ - rm_init(&_VLAN_RM_ID, "vlan_rm"); \ sx_init(&_VLAN_SX_ID, "vlan_sx") #define VLAN_LOCKING_DESTROY() \ - rm_destroy(&_VLAN_RM_ID); \ sx_destroy(&_VLAN_SX_ID) -#define _VLAN_RM_TRACKER _vlan_rm_tracker -#define VLAN_RLOCK() rm_rlock(&_VLAN_RM_ID, \ - &_VLAN_RM_TRACKER) -#define VLAN_RUNLOCK() rm_runlock(&_VLAN_RM_ID, \ - &_VLAN_RM_TRACKER) -#define VLAN_WLOCK() rm_wlock(&_VLAN_RM_ID) -#define VLAN_WUNLOCK() rm_wunlock(&_VLAN_RM_ID) -#define VLAN_RLOCK_ASSERT() rm_assert(&_VLAN_RM_ID, RA_RLOCKED) -#define VLAN_WLOCK_ASSERT() rm_assert(&_VLAN_RM_ID, RA_WLOCKED) -#define VLAN_RWLOCK_ASSERT() rm_assert(&_VLAN_RM_ID, RA_LOCKED) -#define VLAN_LOCK_READER struct rm_priotracker _VLAN_RM_TRACKER +#define VLAN_RLOCK() NET_EPOCH_ENTER(); +#define VLAN_RUNLOCK() NET_EPOCH_EXIT(); +#define VLAN_RLOCK_ASSERT() MPASS(in_epoch(net_epoch_preempt)) #define VLAN_SLOCK() sx_slock(&_VLAN_SX_ID) #define VLAN_SUNLOCK() sx_sunlock(&_VLAN_SX_ID) @@ -265,25 +246,18 @@ static struct sx _VLAN_SX_ID; /* - * We also have a per-trunk rmlock(9), that is locked shared on packet - * processing and exclusive when configuration is changed. Note: This should - * only be acquired while there is a shared lock on either of the global locks - * via VLAN_SLOCK or VLAN_RLOCK. Thus, an exclusive lock on the global locks - * makes a call to TRUNK_RLOCK/TRUNK_WLOCK technically superfluous. + * We also have a per-trunk mutex that should be acquired when changing + * its state. */ -#define _TRUNK_RM_TRACKER _trunk_rm_tracker -#define TRUNK_LOCK_INIT(trunk) rm_init(&(trunk)->lock, vlanname) -#define TRUNK_LOCK_DESTROY(trunk) rm_destroy(&(trunk)->lock) -#define TRUNK_RLOCK(trunk) rm_rlock(&(trunk)->lock, \ - &_TRUNK_RM_TRACKER) -#define TRUNK_WLOCK(trunk) rm_wlock(&(trunk)->lock) -#define TRUNK_RUNLOCK(trunk) rm_runlock(&(trunk)->lock, \ - &_TRUNK_RM_TRACKER) -#define TRUNK_WUNLOCK(trunk) rm_wunlock(&(trunk)->lock) -#define TRUNK_RLOCK_ASSERT(trunk) rm_assert(&(trunk)->lock, RA_RLOCKED) -#define TRUNK_LOCK_ASSERT(trunk) rm_assert(&(trunk)->lock, RA_LOCKED) -#define TRUNK_WLOCK_ASSERT(trunk) rm_assert(&(trunk)->lock, RA_WLOCKED) -#define TRUNK_LOCK_READER struct rm_priotracker _TRUNK_RM_TRACKER +#define TRUNK_LOCK_INIT(trunk) mtx_init(&(trunk)->lock, vlanname, NULL, MTX_DEF) +#define TRUNK_LOCK_DESTROY(trunk) mtx_destroy(&(trunk)->lock) +#define TRUNK_RLOCK(trunk) NET_EPOCH_ENTER() +#define TRUNK_WLOCK(trunk) mtx_lock(&(trunk)->lock) +#define TRUNK_RUNLOCK(trunk) NET_EPOCH_EXIT(); +#define TRUNK_WUNLOCK(trunk) mtx_unlock(&(trunk)->lock) +#define TRUNK_RLOCK_ASSERT(trunk) MPASS(in_epoch(net_epoch_preempt)) +#define TRUNK_LOCK_ASSERT(trunk) MPASS(in_epoch(net_epoch_preempt) || mtx_owned(&(trunk)->lock)) +#define TRUNK_WLOCK_ASSERT(trunk) mtx_assert(&(trunk)->lock, MA_OWNED); /* * The VLAN_ARRAY substitutes the dynamic hash with a static array @@ -361,7 +335,7 @@ vlan_inithash(struct ifvlantrunk *trunk) trunk->hmask = n - 1; trunk->hash = malloc(sizeof(struct ifvlanhead) * n, M_VLAN, M_WAITOK); for (i = 0; i < n; i++) - LIST_INIT(&trunk->hash[i]); + CK_SLIST_INIT(&trunk->hash[i]); } static void @@ -372,7 +346,7 @@ vlan_freehash(struct ifvlantrunk *trunk) KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__)); for (i = 0; i < (1 << trunk->hwidth); i++) - KASSERT(LIST_EMPTY(&trunk->hash[i]), + KASSERT(CK_SLIST_EMPTY(&trunk->hash[i]), ("%s: hash table not empty", __func__)); #endif free(trunk->hash, M_VLAN); @@ -386,12 +360,12 @@ vlan_inshash(struct ifvlantrunk *trunk, struct ifvlan int i, b; struct ifvlan *ifv2; - TRUNK_WLOCK_ASSERT(trunk); + VLAN_XLOCK_ASSERT(); KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__)); b = 1 << trunk->hwidth; i = HASH(ifv->ifv_vid, trunk->hmask); - LIST_FOREACH(ifv2, &trunk->hash[i], ifv_list) + CK_SLIST_FOREACH(ifv2, &trunk->hash[i], ifv_list) if (ifv->ifv_vid == ifv2->ifv_vid) return (EEXIST); @@ -404,7 +378,7 @@ vlan_inshash(struct ifvlantrunk *trunk, struct ifvlan vlan_growhash(trunk, 1); i = HASH(ifv->ifv_vid, trunk->hmask); } - LIST_INSERT_HEAD(&trunk->hash[i], ifv, ifv_list); + CK_SLIST_INSERT_HEAD(&trunk->hash[i], ifv, ifv_list); trunk->refcnt++; return (0); @@ -416,15 +390,15 @@ vlan_remhash(struct ifvlantrunk *trunk, struct ifvlan int i, b; struct ifvlan *ifv2; - TRUNK_WLOCK_ASSERT(trunk); + VLAN_XLOCK_ASSERT(); KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__)); b = 1 << trunk->hwidth; i = HASH(ifv->ifv_vid, trunk->hmask); - LIST_FOREACH(ifv2, &trunk->hash[i], ifv_list) + CK_SLIST_FOREACH(ifv2, &trunk->hash[i], ifv_list) if (ifv2 == ifv) { trunk->refcnt--; - LIST_REMOVE(ifv2, ifv_list); + CK_SLIST_REMOVE(&trunk->hash[i], ifv2, ifvlan, ifv_list); if (trunk->refcnt < (b * b) / 2) vlan_growhash(trunk, -1); return (0); @@ -444,7 +418,7 @@ vlan_growhash(struct ifvlantrunk *trunk, int howmuch) struct ifvlanhead *hash2; int hwidth2, i, j, n, n2; - TRUNK_WLOCK_ASSERT(trunk); + VLAN_XLOCK_ASSERT(); KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__)); if (howmuch == 0) { @@ -460,21 +434,21 @@ vlan_growhash(struct ifvlantrunk *trunk, int howmuch) if (hwidth2 < VLAN_DEF_HWIDTH) return; - /* M_NOWAIT because we're called with trunk mutex held */ - hash2 = malloc(sizeof(struct ifvlanhead) * n2, M_VLAN, M_NOWAIT); + hash2 = malloc(sizeof(struct ifvlanhead) * n2, M_VLAN, M_WAITOK); if (hash2 == NULL) { printf("%s: out of memory -- hash size not changed\n", __func__); return; /* We can live with the old hash table */ } for (j = 0; j < n2; j++) - LIST_INIT(&hash2[j]); + CK_SLIST_INIT(&hash2[j]); for (i = 0; i < n; i++) - while ((ifv = LIST_FIRST(&trunk->hash[i])) != NULL) { - LIST_REMOVE(ifv, ifv_list); + while ((ifv = CK_SLIST_FIRST(&trunk->hash[i])) != NULL) { + CK_SLIST_REMOVE(&trunk->hash[i], ifv, ifvlan, ifv_list); j = HASH(ifv->ifv_vid, n2 - 1); - LIST_INSERT_HEAD(&hash2[j], ifv, ifv_list); + CK_SLIST_INSERT_HEAD(&hash2[j], ifv, ifv_list); } + NET_EPOCH_WAIT(); free(trunk->hash, M_VLAN); trunk->hash = hash2; trunk->hwidth = hwidth2; @@ -492,7 +466,7 @@ vlan_gethash(struct ifvlantrunk *trunk, uint16_t vid) TRUNK_RLOCK_ASSERT(trunk); - LIST_FOREACH(ifv, &trunk->hash[HASH(vid, trunk->hmask)], ifv_list) + CK_SLIST_FOREACH(ifv, &trunk->hash[HASH(vid, trunk->hmask)], ifv_list) if (ifv->ifv_vid == vid) return (ifv); return (NULL); @@ -508,7 +482,7 @@ vlan_dumphash(struct ifvlantrunk *trunk) for (i = 0; i < (1 << trunk->hwidth); i++) { printf("%d: ", i); - LIST_FOREACH(ifv, &trunk->hash[i], ifv_list) + CK_SLIST_FOREACH(ifv, &trunk->hash[i], ifv_list) printf("%s ", ifv->ifv_ifp->if_xname); printf("\n"); } @@ -561,7 +535,6 @@ static void trunk_destroy(struct ifvlantrunk *trunk) { VLAN_XLOCK_ASSERT(); - VLAN_WLOCK_ASSERT(); vlan_freehash(trunk); trunk->parent->if_vlantrunk = NULL; @@ -587,23 +560,19 @@ vlan_setmulti(struct ifnet *ifp) struct vlan_mc_entry *mc; int error; - /* - * XXX This stupidly needs the rmlock to avoid sleeping while holding - * the in6_multi_mtx (see in6_mc_join_locked). - */ - VLAN_RWLOCK_ASSERT(); + VLAN_XLOCK_ASSERT(); /* Find the parent. */ sc = ifp->if_softc; - TRUNK_WLOCK_ASSERT(TRUNK(sc)); ifp_p = PARENT(sc); CURVNET_SET_QUIET(ifp_p->if_vnet); /* First, remove any existing filter entries. */ - while ((mc = SLIST_FIRST(&sc->vlan_mc_listhead)) != NULL) { - SLIST_REMOVE_HEAD(&sc->vlan_mc_listhead, mc_entries); + while ((mc = CK_SLIST_FIRST(&sc->vlan_mc_listhead)) != NULL) { + CK_SLIST_REMOVE_HEAD(&sc->vlan_mc_listhead, mc_entries); (void)if_delmulti(ifp_p, (struct sockaddr *)&mc->mc_addr); + NET_EPOCH_WAIT(); free(mc, M_VLAN); } @@ -619,10 +588,10 @@ vlan_setmulti(struct ifnet *ifp) } bcopy(ifma->ifma_addr, &mc->mc_addr, ifma->ifma_addr->sa_len); mc->mc_addr.sdl_index = ifp_p->if_index; - SLIST_INSERT_HEAD(&sc->vlan_mc_listhead, mc, mc_entries); + CK_SLIST_INSERT_HEAD(&sc->vlan_mc_listhead, mc, mc_entries); } IF_ADDR_WUNLOCK(ifp); - SLIST_FOREACH (mc, &sc->vlan_mc_listhead, mc_entries) { + CK_SLIST_FOREACH (mc, &sc->vlan_mc_listhead, mc_entries) { error = if_addmulti(ifp_p, (struct sockaddr *)&mc->mc_addr, NULL); if (error) @@ -645,7 +614,6 @@ vlan_iflladdr(void *arg __unused, struct ifnet *ifp) struct ifnet *ifv_ifp; struct ifvlantrunk *trunk; struct sockaddr_dl *sdl; - VLAN_LOCK_READER; /* Need the rmlock since this is run on taskqueue_swi. */ VLAN_RLOCK(); @@ -724,12 +692,10 @@ static struct ifnet * vlan_trunkdev(struct ifnet *ifp) { struct ifvlan *ifv; - VLAN_LOCK_READER; if (ifp->if_type != IFT_L2VLAN) return (NULL); - /* Not clear if callers are sleepable, so acquire the rmlock. */ VLAN_RLOCK(); ifv = ifp->if_softc; ifp = NULL; @@ -809,10 +775,7 @@ vlan_devat(struct ifnet *ifp, uint16_t vid) { struct ifvlantrunk *trunk; struct ifvlan *ifv; - VLAN_LOCK_READER; - TRUNK_LOCK_READER; - /* Not clear if callers are sleepable, so acquire the rmlock. */ VLAN_RLOCK(); trunk = ifp->if_vlantrunk; if (trunk == NULL) { @@ -820,11 +783,9 @@ vlan_devat(struct ifnet *ifp, uint16_t vid) return (NULL); } ifp = NULL; - TRUNK_RLOCK(trunk); ifv = vlan_gethash(trunk, vid); if (ifv) ifp = ifv->ifv_ifp; - TRUNK_RUNLOCK(trunk); VLAN_RUNLOCK(); return (ifp); } @@ -1076,7 +1037,7 @@ vlan_clone_create(struct if_clone *ifc, char *name, si if_rele(p); return (ENOSPC); } - SLIST_INIT(&ifv->vlan_mc_listhead); + CK_SLIST_INIT(&ifv->vlan_mc_listhead); ifp->if_softc = ifv; /* * Set the name manually rather than using if_initname because @@ -1143,6 +1104,7 @@ vlan_clone_destroy(struct if_clone *ifc, struct ifnet * ifvlan. */ taskqueue_drain(taskqueue_thread, &ifv->lladdr_task); + NET_EPOCH_WAIT(); if_free(ifp); free(ifv, M_VLAN); ifc_free_unit(ifc, unit); @@ -1167,7 +1129,6 @@ vlan_transmit(struct ifnet *ifp, struct mbuf *m) struct ifvlan *ifv; struct ifnet *p; int error, len, mcast; - VLAN_LOCK_READER; VLAN_RLOCK(); ifv = ifp->if_softc; @@ -1227,8 +1188,6 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) { struct ifvlantrunk *trunk; struct ifvlan *ifv; - VLAN_LOCK_READER; - TRUNK_LOCK_READER; struct m_tag *mtag; uint16_t vid, tag; @@ -1289,16 +1248,13 @@ vlan_input(struct ifnet *ifp, struct mbuf *m) vid = EVL_VLANOFTAG(tag); - TRUNK_RLOCK(trunk); ifv = vlan_gethash(trunk, vid); if (ifv == NULL || !UP_AND_RUNNING(ifv->ifv_ifp)) { - TRUNK_RUNLOCK(trunk); - if_inc_counter(ifp, IFCOUNTER_NOPROTO, 1); VLAN_RUNLOCK(); + if_inc_counter(ifp, IFCOUNTER_NOPROTO, 1); m_freem(m); return; } - TRUNK_RUNLOCK(trunk); if (vlan_mtag_pcp) { /* @@ -1369,22 +1325,19 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1 if (ifv->ifv_trunk) return (EBUSY); - /* Acquire rmlock after the branch so we can M_WAITOK. */ VLAN_XLOCK(); if (p->if_vlantrunk == NULL) { trunk = malloc(sizeof(struct ifvlantrunk), M_VLAN, M_WAITOK | M_ZERO); vlan_inithash(trunk); TRUNK_LOCK_INIT(trunk); - VLAN_WLOCK(); TRUNK_WLOCK(trunk); p->if_vlantrunk = trunk; trunk->parent = p; if_ref(trunk->parent); + TRUNK_WUNLOCK(trunk); } else { - VLAN_WLOCK(); trunk = p->if_vlantrunk; - TRUNK_WLOCK(trunk); } ifv->ifv_vid = vid; /* must set this before vlan_inshash() */ @@ -1448,7 +1401,9 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1 ifp->if_link_state = p->if_link_state; + TRUNK_RLOCK(TRUNK(ifv)); vlan_capabilities(ifv); + TRUNK_RUNLOCK(TRUNK(ifv)); /* * Set up our interface address to reflect the underlying @@ -1458,12 +1413,6 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1 ((struct sockaddr_dl *)ifp->if_addr->ifa_addr)->sdl_alen = p->if_addrlen; - /* - * Configure multicast addresses that may already be - * joined on the vlan device. - */ - (void)vlan_setmulti(ifp); - TASK_INIT(&ifv->lladdr_task, 0, vlan_lladdr_fn, ifv); /* We are ready for operation now. */ @@ -1471,13 +1420,14 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1 /* Update flags on the parent, if necessary. */ vlan_setflags(ifp, 1); -done: + /* - * We need to drop the non-sleepable rmlock so that the underlying - * devices can sleep in their vlan_config hooks. + * Configure multicast addresses that may already be + * joined on the vlan device. */ - TRUNK_WUNLOCK(trunk); - VLAN_WUNLOCK(); + (void)vlan_setmulti(ifp); + +done: if (error == 0) EVENTHANDLER_INVOKE(vlan_config, p, ifv->ifv_vid); VLAN_XUNLOCK(); @@ -1510,13 +1460,6 @@ vlan_unconfig_locked(struct ifnet *ifp, int departing) parent = NULL; if (trunk != NULL) { - /* - * Both vlan_transmit and vlan_input rely on the trunk fields - * being NULL to determine whether to bail, so we need to get - * an exclusive lock here to prevent them from using bad - * ifvlans. - */ - VLAN_WLOCK(); parent = trunk->parent; /* @@ -1524,7 +1467,7 @@ vlan_unconfig_locked(struct ifnet *ifp, int departing) * empty the list of multicast groups that we may have joined * while we were alive from the parent's list. */ - while ((mc = SLIST_FIRST(&ifv->vlan_mc_listhead)) != NULL) { + while ((mc = CK_SLIST_FIRST(&ifv->vlan_mc_listhead)) != NULL) { /* * If the parent interface is being detached, * all its multicast addresses have already @@ -1541,19 +1484,14 @@ vlan_unconfig_locked(struct ifnet *ifp, int departing) "Failed to delete multicast address from parent: %d\n", error); } - SLIST_REMOVE_HEAD(&ifv->vlan_mc_listhead, mc_entries); + CK_SLIST_REMOVE_HEAD(&ifv->vlan_mc_listhead, mc_entries); + NET_EPOCH_WAIT(); free(mc, M_VLAN); } vlan_setflags(ifp, 0); /* clear special flags on parent */ - /* - * The trunk lock isn't actually required here, but - * vlan_remhash expects it. - */ - TRUNK_WLOCK(trunk); vlan_remhash(trunk, ifv); - TRUNK_WUNLOCK(trunk); ifv->ifv_trunk = NULL; /* @@ -1561,9 +1499,9 @@ vlan_unconfig_locked(struct ifnet *ifp, int departing) */ if (trunk->refcnt == 0) { parent->if_vlantrunk = NULL; + NET_EPOCH_WAIT(); trunk_destroy(trunk); } - VLAN_WUNLOCK(); } /* Disconnect from parent. */ @@ -1640,7 +1578,6 @@ vlan_link_state(struct ifnet *ifp) { struct ifvlantrunk *trunk; struct ifvlan *ifv; - VLAN_LOCK_READER; /* Called from a taskqueue_swi task, so we cannot sleep. */ VLAN_RLOCK(); @@ -1670,7 +1607,7 @@ vlan_capabilities(struct ifvlan *ifv) u_long hwa = 0; VLAN_SXLOCK_ASSERT(); - TRUNK_WLOCK_ASSERT(TRUNK(ifv)); + TRUNK_RLOCK_ASSERT(TRUNK(ifv)); p = PARENT(ifv); ifp = ifv->ifv_ifp; @@ -1771,11 +1708,11 @@ vlan_trunk_capabilities(struct ifnet *ifp) VLAN_SUNLOCK(); return; } - TRUNK_WLOCK(trunk); + TRUNK_RLOCK(trunk); VLAN_FOREACH(ifv, trunk) { vlan_capabilities(ifv); } - TRUNK_WUNLOCK(trunk); + TRUNK_RUNLOCK(trunk); VLAN_SUNLOCK(); } @@ -1789,7 +1726,6 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data struct ifvlantrunk *trunk; struct vlanreq vlr; int error = 0; - VLAN_LOCK_READER; ifr = (struct ifreq *)data; ifa = (struct ifaddr *) data; @@ -1925,16 +1861,13 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data * XXX We need the rmlock here to avoid sleeping while * holding in6_multi_mtx. */ - VLAN_RLOCK(); + VLAN_XLOCK(); trunk = TRUNK(ifv); - if (trunk != NULL) { - TRUNK_WLOCK(trunk); + if (trunk != NULL) error = vlan_setmulti(ifp); - TRUNK_WUNLOCK(trunk); - } - VLAN_RUNLOCK(); - break; + VLAN_XUNLOCK(); + break; case SIOCGVLANPCP: #ifdef VIMAGE if (ifp->if_vnet != ifp->if_home_vnet) { @@ -1971,9 +1904,9 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data ifv->ifv_capenable = ifr->ifr_reqcap; trunk = TRUNK(ifv); if (trunk != NULL) { - TRUNK_WLOCK(trunk); + TRUNK_RLOCK(trunk); vlan_capabilities(ifv); - TRUNK_WUNLOCK(trunk); + TRUNK_RUNLOCK(trunk); } VLAN_SUNLOCK(); break; From owner-svn-src-head@freebsd.org Fri Sep 21 02:03:36 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 998FA10AF9C2 for <svn-src-head@mailman.ysv.freebsd.org>; Fri, 21 Sep 2018 02:03:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-15.consmr.mail.bf2.yahoo.com (sonic313-15.consmr.mail.bf2.yahoo.com [74.6.133.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 296BA8973E for <svn-src-head@freebsd.org>; Fri, 21 Sep 2018 02:03:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: n1uvbN0VM1lrrc6J.D.MYd2nXSmCeXFEhdw7QOJR.uR.D.altuayc4NcsYUzwCR 7zmY_ASK05seQvOLrB8D8MwSZu4zSZOwvbpKGJT99XJC3txIHUr9gEjtuktp5XtD0bJg.m3cd88h 0tV1fnS7Vacx6sC_32TA02yGAMlQLKdNKY_zK6u_pFg0mJg2B_yv94TSfWM66qE01KvoVOG8JNre ocXmc19y3PrAXlq.HinHCs0ph307dkWnsCrVX57txuMq_bRe9EkK.hy1eX8KT1HuRGqu4G2jAdsa 59j86ndIP0VfFtKAihx1TsbTiCFB003Btn74d3jnMNiqldp7Y3zmN_eP1IIMUifUzZ9gFBYf1fm7 KhfMZy2xmbXqqLCJp.XqKnU8L593eJPw1Cg.bjCF4kAQ4VaFnfxmVdbbQjJxKh.xAaidae83v00l 3eYfhmtKMgTHDMWkxCOaKxe_T8pug3ZVnvAxYw7w2R4HCkz3nthh7f.bNZ7j2d7ACwDM6lDnMGK2 TLnDWhITLNuO_SaJAjseHluqHoGXiaM39TbaHk5UqXBTkT13uAsQyFkDB8TP91xycwCqOoCAUZOE ozmQp9GIeWj24p_9WF6d5J2M_Q.NB5E8EYjAaBfu7k5P4Rm.ElUS8bBSSi1ZRXOjMy6OksPDButG PvS6cd2z1QmQRNZPS7._9seeskQ89E7T5ztC_bAsOUw5QFASMfaWbh_gGl49vB18aORq1abMzvWX Q9XJ_sSGq8LtUy0vyYUSuKfPqSB52lN9nrGiP5N4aIYg4iY1SNCQKX72fKkhIbodU3Macr2.IuQv 9El3ucWvjqVZ_6olnACqRdrUWHoYH7ghXsXwUlwMHJ0_v1u40UEReNrkl.yWtRJs9ufnTC_2T84A WfMYYffMyIw9LLrvYe0etf.s73IOPBPV9k450qc_8xK7mI3utNE7_bNf4nAQ51MrjiKtTq_dYEJP xtXfZTcfREoZGLcQtW6ZCph8fK22mLjl1f9ItNqgE_Qbsk8U16R4BP5c7rk7ZYjyQCRx0qHBXz6O SJgTMKzLOCV8- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.bf2.yahoo.com with HTTP; Fri, 21 Sep 2018 02:03:29 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp406.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID c852f14a3b0767463398520a8f7b3284; Fri, 21 Sep 2018 02:03:28 +0000 (UTC) From: Mark Millard <marklmi@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src Date: Thu, 20 Sep 2018 19:03:26 -0700 References: <21AF98BF-12EE-49DD-B485-54537B26FBF8@yahoo.com> To: Mark Johnston <markj@FreeBSD.org>, Li-Wen Hsu <lwhsu@freebsd.org>, John Baldwin <jhb@freebsd.org>, svn-src-head@freebsd.org In-Reply-To: <21AF98BF-12EE-49DD-B485-54537B26FBF8@yahoo.com> Message-Id: <B4DE8C10-126A-4BDA-AF3E-45A848DAE7A8@yahoo.com> X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 02:03:36 -0000 [I've got a historical WERROR=3D used in my amd64-gcc based builds.] On 2018-Sep-20, at 6:05 PM, Mark Millard <marklmi at yahoo.com> wrote: > Li-Wen Hsu lwhsu at freebsd.org wrote on > Thu Sep 20 22:10:19 UTC 2018 : >=20 >> On Thu, Sep 20, 2018 at 10:06 PM Mark Johnston <markj at freebsd.org> = wrote: >>>=20 >>> On Thu, Sep 20, 2018 at 09:39:24AM -0700, John Baldwin wrote: >>>> On 9/20/18 8:54 AM, Mark Johnston wrote: >>>>> On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: >>>>>> Author: mmacy >>>>>> Date: Sun Jul 15 00:23:10 2018 >>>>>> New Revision: 336299 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/336299 >>>>>>=20 >>>>>> Log: >>>>>> msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd >>>>>>=20 >>>>>> This corresponds to the latest status (hasn't changed in 9+ >>>>>> years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, >>>>>> cpowl (the complex power functions for float complex, double >>>>>> complex, and long double complex) which are required for C99 >>>>>> compliance and were missing from FreeBSD. Also required for >>>>>> some numerical codes using complex numbered Hamiltonians. >>>>>>=20 >>>>>> Thanks to jhb for tracking down the issue with making >>>>>> weak_reference compile on powerpc. >>>>>>=20 >>>>>> When asked to review, bde said "I don't like it" - but >>>>>> provided no actionable feedback or superior implementations. >>>>>>=20 >>>>>> Discussed with: jhb >>>>>> Submitted by: jmd >>>>>> Differential Revision: https://reviews.freebsd.org/D15919 >>>>>=20 >>>>> This seems to have broken the gcc build: >>>>> https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ >>>>>=20 >>>>> /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating = constant exceeds range of 'long double' [-Werror=3Doverflow] >>>>> if( y >=3D LDBL_MAX ) >>>>> ^~ >>>>=20 >>>> Which architecture? i386 doesn't get build with = i386-xtoolchain-gcc pending >>>> some patches I haven't yet posted for review related to the = weirdness we do >>>> with floating point on i386. >>>=20 >>> This is the -m32 build on amd64. I haven't tested it myself, but = Mark >>> Millard noted that the issue might be fixed by a gcc update. >>>=20 >>=20 >> I suspect this. Each build is in a fresh created jail with the = latest >> branch of packages from pkg.freebsd.org. >>=20 >> At the beginning of (warning: 56MB file) >> https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/7262/consoleText >>=20 >> There is: >>=20 >> New packages to be INSTALLED: >> amd64-xtoolchain-gcc: 0.4_1 >> amd64-gcc: 6.4.0_2 >> mpfr: 4.0.1 >> gmp: 6.1.2 >> mpc: 1.1.0_1 >> amd64-binutils: 2.30_5,1 >>=20 >> Number of packages to be installed: 6 >>=20 >> Or is there a newer version of devel/amd64-gcc I am not aware? >=20 > I wonder when ci.freebsd.org started using "amd64-gcc: 6.4.0_2". > Looking: = https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/6665/consoleText > from back on 2018-Jul-26. This suggests being based on > -r475319 (2018-Jul-25) for devel/powerpc-gcc (the master > port). >=20 > Looks like -r475290 (the float.h removal) is the first version > with PORT_REVISION being 2, as are all later versions at > this point. Technically -r476273 (2018-Aug-2) removed a typo from > -r475290 but at the time the typo seemed to not make an operational > difference. Still, ci.freebsd.org seems to not be > using the version with the typo fixed. >=20 > Looks like system head being built was -r338831. (I'm only at > -r338675 so far.) >=20 > I've started a buildworld buildkernel based -on head -r3338675 > and based on master port: >=20 > # svnlite diff /usr/ports/devel/powerpc64-gcc/ | more > Index: /usr/ports/devel/powerpc64-gcc/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- /usr/ports/devel/powerpc64-gcc/Makefile (revision 480180) > +++ /usr/ports/devel/powerpc64-gcc/Makefile (working copy) > @@ -16,7 +16,8 @@ > LIB_DEPENDS=3D libgmp.so:math/gmp \ > libmpfr.so:math/mpfr \ > libmpc.so:math/mpc > -BUILD_DEPENDS=3D ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils > +BUILD_DEPENDS=3D ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils \ > + objdump:devel/binutils > RUN_DEPENDS=3D ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils >=20 > USES=3D gmake iconv libtool tar:xz makeinfo compiler >=20 > which does not have -r478209 involved ( un-breaking > devel/aarch64-none-elf-gcc ). >=20 > # svnlite diff /usr/ports/devel/amd64-gcc/ | more > # >=20 > So no differences there (relative to -r480180). >=20 >=20 > (The objdump is from having built systems based on > WITHOUT_BINUTILS and WITHOUT_BINUTILS_BOOTSTRAP at times > but some devel/*-gcc builds trying to use objdump in the > configuration part of gcc's build.) >=20 > My past builds using at or after -r475290 for various system > head revisions have completed without being stopped by an > error but it has been a while. I will see for this one, but > it is only into building lib32 so far. >=20 > (Note: My port builds are via devel/poudriere-devel tied to > my /usr/ports/ and to my > /usr/obj/DESTDIRs/clang-amd64-installworld-poud/ that is installed > from the same build that I install and boot from, just with > distrib-dirs distribution DB_FROM_SRC=3D1 also involved with the > installworld .) >=20 The build completed. The difference in what I get as a result is that I get: /usr/src/lib/msun/ld80/e_powl.c: In function 'powl': /usr/src/lib/msun/ld80/e_powl.c:275:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c:286:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c:297:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c:321:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c: In function 'powil': /usr/src/lib/msun/ld80/e_powl.c:577:3: warning: floating constant = exceeds range of 'long double' [-Woverflow] . . . /usr/src/lib/msun/ld80/e_powl.c: In function 'powl': /usr/src/lib/msun/ld80/e_powl.c:275:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c:286:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c:297:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c:321:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c: In function 'powil': /usr/src/lib/msun/ld80/e_powl.c:577:3: warning: floating constant = exceeds range of 'long double' [-Woverflow] . . . /usr/src/lib/msun/ld80/e_powl.c: In function 'powl': /usr/src/lib/msun/ld80/e_powl.c:275:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c:286:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c:297:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c:321:1: warning: floating constant = exceeds range of 'long double' [-Woverflow] /usr/src/lib/msun/ld80/e_powl.c: In function 'powil': /usr/src/lib/msun/ld80/e_powl.c:577:3: warning: floating constant = exceeds range of 'long double' [-Woverflow] from my (historically driven) use of: # Avoid db_trace.o getting: # calling '__builtin_frame_address' with a nonzero argument is unsafe # as an error? Other such points as well. WERROR=3D in my equivalent of src.conf : src.conf.amd64-xtoolchain-gcc.amd64-host = . I had given up on avoiding use of WERROR for fairly-modern-gcc-based long ago. May be things are better now and I should disable that. Anyway, the messages in both types of builds seem to fit with John Baldwin's notes about his proposed patch of sys/x86/include/float.h : overflow by lack of truncation making the value bigger. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Sep 21 07:36:03 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F45A1091CD5; Fri, 21 Sep 2018 07:36:03 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5279C72AFF; Fri, 21 Sep 2018 07:36:03 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46FF21C3E; Fri, 21 Sep 2018 07:36:03 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8L7a3em072970; Fri, 21 Sep 2018 07:36:03 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8L7a30e072969; Fri, 21 Sep 2018 07:36:03 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201809210736.w8L7a30e072969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu <lwhsu@FreeBSD.org> Date: Fri, 21 Sep 2018 07:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338851 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 338851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 07:36:03 -0000 Author: lwhsu Date: Fri Sep 21 07:36:02 2018 New Revision: 338851 URL: https://svnweb.freebsd.org/changeset/base/338851 Log: Mention setting $lines to 0 in ddb can disable paging Reviewed by: bcr (earlier version), markj Approved by: re (kib), markj (mentor) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17068 Modified: head/share/man/man4/ddb.4 Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Fri Sep 21 01:37:08 2018 (r338850) +++ head/share/man/man4/ddb.4 Fri Sep 21 07:36:02 2018 (r338851) @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2018 +.Dd September 7, 2018 .Dt DDB 4 .Os .Sh NAME @@ -1280,6 +1280,7 @@ The width of the displayed line. .It Va lines The number of lines. It is used by the built-in pager. +Setting it to 0 disables paging. .It Va tabstops Tab stop width. .It Va work Ns Ar xx From owner-svn-src-head@freebsd.org Fri Sep 21 09:27:32 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D84441094343; Fri, 21 Sep 2018 09:27:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DF27761CA; Fri, 21 Sep 2018 09:27:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84DE72E57; Fri, 21 Sep 2018 09:27:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8L9RWKS030594; Fri, 21 Sep 2018 09:27:32 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8L9RWbf030593; Fri, 21 Sep 2018 09:27:32 GMT (envelope-from des@FreeBSD.org) Message-Id: <201809210927.w8L9RWbf030593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org> Date: Fri, 21 Sep 2018 09:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338852 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 338852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 09:27:33 -0000 Author: des Date: Fri Sep 21 09:27:32 2018 New Revision: 338852 URL: https://svnweb.freebsd.org/changeset/base/338852 Log: Add an installer option to disable destructive dtrace. Submitted by: Jörg Pernfuß <code.jpe@gmail.com> Approved by: re (kib) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D12474 Modified: head/usr.sbin/bsdinstall/scripts/hardening Modified: head/usr.sbin/bsdinstall/scripts/hardening ============================================================================== --- head/usr.sbin/bsdinstall/scripts/hardening Fri Sep 21 07:36:02 2018 (r338851) +++ head/usr.sbin/bsdinstall/scripts/hardening Fri Sep 21 09:27:32 2018 (r338852) @@ -30,6 +30,7 @@ echo -n > $BSDINSTALL_TMPETC/rc.conf.hardening echo -n > $BSDINSTALL_TMPETC/sysctl.conf.hardening +echo -n > $BSDINSTALL_TMPBOOT/loader.conf.hardening exec 3>&1 FEATURES=$( dialog --backtitle "FreeBSD Installer" \ @@ -46,6 +47,7 @@ FEATURES=$( dialog --backtitle "FreeBSD Installer" \ "7 disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ "9 secure_console" "Enable console password prompt" ${secure_console:-off} \ + "10 disable_ddtrace" "Disallow DTrace destructive-mode" ${disable_ddtrace:-off} \ 2>&1 1>&3 ) exec 3>&- @@ -79,6 +81,9 @@ for feature in $FEATURES; do fi if [ "$feature" = "secure_console" ]; then sed "s/unknown off secure/unknown off insecure/g" $BSDINSTALL_CHROOT/etc/ttys > $BSDINSTALL_TMPETC/ttys.hardening + fi + if [ "$feature" = "disable_ddtrace" ]; then + echo 'security.bsd.allow_destructive_dtrace=0' >> $BSDINSTALL_TMPBOOT/loader.conf.hardening fi done From owner-svn-src-head@freebsd.org Fri Sep 21 12:27:37 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBC591098910; Fri, 21 Sep 2018 12:27:36 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 985917C3E6; Fri, 21 Sep 2018 12:27:36 +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 840535035; Fri, 21 Sep 2018 12:27:36 +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 w8LCRapb025155; Fri, 21 Sep 2018 12:27:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LCRaqe025154; Fri, 21 Sep 2018 12:27:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809211227.w8LCRaqe025154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik <mjg@FreeBSD.org> Date: Fri, 21 Sep 2018 12:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338853 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 12:27:37 -0000 Author: mjg Date: Fri Sep 21 12:27:36 2018 New Revision: 338853 URL: https://svnweb.freebsd.org/changeset/base/338853 Log: amd64: check for small size in memmove, memcpy and memset If the size is 15 bytes or less avoid spinning up rep just to copy the 8 bytes. In my tests on EPYC and old Intel microarchs without ERMS (like Westmere) it provided a nice win over the current version (e.g. for EPYC memset with 15 bytes of size goes from 59712651 ops/s to 70600095) all while almost not pessimizing the other cases. Data collected during package building shows that < 16 sizes are pretty common. Verified with the glibc test suite. Approved by: re (kib) Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Fri Sep 21 09:27:32 2018 (r338852) +++ head/sys/amd64/amd64/support.S Fri Sep 21 12:27:36 2018 (r338853) @@ -116,6 +116,8 @@ ENTRY(memmove_std) cmpq %rcx,%r8 /* overlapping && src < dst? */ jb 2f + cmpq $15,%rcx + jbe 1f shrq $3,%rcx /* copy by 64-bit words */ rep movsq @@ -124,6 +126,7 @@ ENTRY(memmove_std) jne 1f POP_FRAME_POINTER ret + ALIGN_TEXT 1: rep movsb @@ -191,6 +194,8 @@ ENTRY(memcpy_std) PUSH_FRAME_POINTER movq %rdi,%rax movq %rdx,%rcx + cmpq $15,%rcx + jbe 1f shrq $3,%rcx /* copy by 64-bit words */ rep movsq @@ -199,6 +204,7 @@ ENTRY(memcpy_std) jne 1f POP_FRAME_POINTER ret + ALIGN_TEXT 1: rep movsb @@ -227,6 +233,8 @@ ENTRY(memset_std) movzbq %sil,%r8 movabs $0x0101010101010101,%rax imulq %r8,%rax + cmpq $15,%rcx + jbe 1f shrq $3,%rcx rep stosq @@ -236,6 +244,7 @@ ENTRY(memset_std) movq %r9,%rax POP_FRAME_POINTER ret + ALIGN_TEXT 1: rep stosb From owner-svn-src-head@freebsd.org Fri Sep 21 12:51:28 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA31E10990F5; Fri, 21 Sep 2018 12:51:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 0FD787CEFC; Fri, 21 Sep 2018 12:51:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 366AE1A0B87; Fri, 21 Sep 2018 22:51:16 +1000 (AEST) Date: Fri, 21 Sep 2018 22:51:15 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> X-X-Sender: bde@besplex.bde.org To: John Baldwin <jhb@freebsd.org> cc: Li-Wen Hsu <lwhsu@freebsd.org>, Mark Johnston <markj@freebsd.org>, mmacy@freebsd.org, Johannes M Dieterich <jmd@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src In-Reply-To: <e8cf25eb-a087-ffa5-9e31-11a42afde7a2@FreeBSD.org> Message-ID: <20180921210740.G1026@besplex.bde.org> References: <201807150023.w6F0NBx1065422@repo.freebsd.org> <20180920155402.GF99168@raichu> <e0f71549-3ae2-05b2-b4e7-228ae39c7f3c@FreeBSD.org> <20180920190614.GI99168@raichu> <CAKBkRUyzkw9Y=n3RLaANVSaj+Rx5KYBU9LaFw-PFnEKbr86eow@mail.gmail.com> <e8cf25eb-a087-ffa5-9e31-11a42afde7a2@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=DZtnkrlW c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=6I5d2MoRAAAA:8 a=Dt3D8Ei3Opqq69qoWZ0A:9 a=4JLg-EYDAybyury8:21 a=1-JjhLw4zhVs5GTw:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 12:51:29 -0000 On Thu, 20 Sep 2018, John Baldwin wrote: > On 9/20/18 2:43 PM, Li-Wen Hsu wrote: >> ... >> I suspect this. Each build is in a fresh created jail with the latest >> branch of packages from pkg.freebsd.org. >> >> At the beginning of (warning: 56MB file) >> https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/7262/consoleText >> >> There is: >> >> New packages to be INSTALLED: >> amd64-xtoolchain-gcc: 0.4_1 >> amd64-gcc: 6.4.0_2 >> mpfr: 4.0.1 >> gmp: 6.1.2 >> mpc: 1.1.0_1 >> amd64-binutils: 2.30_5,1 >> >> Number of packages to be installed: 6 >> >> Or is there a newer version of devel/amd64-gcc I am not aware? > > That has the change Mark Millard is thinking of: > > https://svnweb.freebsd.org/ports?view=revision&revision=475290 > > However, I suspect this is due to a different issue. I still have some > patches that I need to get an i386 world to build with external GCC that > I'm not sure of and haven't posted for review yet. I bet these also matter > for the -m32 build: This is more broken than before. > Index: lib/libc/tests/stdio/printfloat_test.c > =================================================================== > --- lib/libc/tests/stdio/printfloat_test.c (revision 338373) > +++ lib/libc/tests/stdio/printfloat_test.c (working copy) > @@ -315,7 +315,7 @@ > testfmt("0x1p-1074", "%a", 0x1p-1074); > testfmt("0x1.2345p-1024", "%a", 0x1.2345p-1024); > > -#if (LDBL_MANT_DIG == 64) > +#if (LDBL_MANT_DIG == 64) && !defined(__i386__) > testfmt("0x1.921fb54442d18468p+1", "%La", 0x3.243f6a8885a308dp0L); > testfmt("0x1p-16445", "%La", 0x1p-16445L); > testfmt("0x1.30ecap-16381", "%La", 0x9.8765p-16384L); This is further loss of test coverage for i386. I don't know why this wasn't already turned off. Perhaps because the test is broken, but clang is compatibly broken. On i386, the default rounding precision is supposed to be 53 bits, so 64-bit hex constants can only work if their 11 lowest bits are all zero, but the first one in this ifdef only has the 2 lowest digits all zero. I don't like the method used in these tests and haven't looked at them much. I would never write ld80 long doubles in the hex used format above. This makes them unreadable by putting 1 bit to the left of the decimal point so 63 to the right. They have to be shifted left by 1 to decrypt the low bits. Shiftung 8468 gives 4234. The low 12 bits are 234, but correct rounding would give 000 (800 for some other values). This is an easy case since there are no carries. > Index: sys/x86/include/float.h > =================================================================== > --- sys/x86/include/float.h (revision 338373) > +++ sys/x86/include/float.h (working copy) > @@ -86,10 +86,18 @@ > #define LDBL_EPSILON 1.0842021724855044340E-19L > #define LDBL_DIG 18 > #define LDBL_MIN_EXP (-16381) > +#if defined(__i386__) > +#define LDBL_MIN 33621031431120935 > +#else > #define LDBL_MIN 33621031431120935063 > +#endif > #define LDBL_MIN_10_EXP (-4931) > #define LDBL_MAX_EXP 16384 > +#if defined(__i386__) > +#define LDBL_MAX 1.1897314953572316e+4932L > +#else > #define LDBL_MAX 1.1897314953572317650E+4932L > +#endif > #define LDBL_MAX_10_EXP 4932 > #if __ISO_C_VISIBLE >= 2011 > #define LDBL_TRUE_MIN 3.6451995318824746025E-4951L I already pointed out that it is difficult to write these values in decimal, since clang will round to 64 bits. Note that these values must be written in decimal to support C90. Testing shows that clang produces the following wrong values from the new limits: For LDBL_MAX, with 64-bit precision the lower 3 nybbles would be FFF; rounding 53 bits should change these nybbles to 800, but with the new value above clang gives 600. Actually, it is not very hard to write the correct value in decimal. Simply print 0x0.fffffffffffff800p16384 in decimal with enough digits. "enough" is DECIMAL_DIG = 21. The main error in the above is that it misrounds by discarding 4 decimal digits (from DECIMAL_DIG = 21 digits down to DBL_DECIMAL_DIG = 17). Since clang will round to 64 binary digits, 21 decimal digits are still needed. Correct value from this: #define LDBL_MAX 1.1897314953572316330E+4932L (This uses only 20 decimal digits, since 21 is rarely needed and is never needed in float.h and float.h now uses 20.) For LDBL_MIN, the result 16 ulps below the largest denormal which is already 1 ulp too small (on a different ulp scale). No ifdef is needed for LDBL_MIN, since all bits except the highest bit in its mantissa are 0, so rounding to any nonzero number of bits doesn't change anything. C11 added LDBL_TRUE_MIN and friends (for the denormal limit). No ifdef was added for it, and none is needed, as above With the old limits, the values produced are: For LDBL_MIN and LDBL_TRUE_MIN: correct in all cases. For LDBL_MAX: gigo (+Inf) with gcc. gigo (LDBL_MAX for non-default 64-bit precision) with clang. The clang bug breaks sanity tests and is easy to test for. E.g., when x == LDBL_MAX, then x + 0 should be x, but with clang it is +Inf unless the program has switched the runtime precision to 64 bits. Bruce From owner-svn-src-head@freebsd.org Fri Sep 21 13:02:26 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 005771099819; Fri, 21 Sep 2018 13:02:26 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A68A57D9A2; Fri, 21 Sep 2018 13:02:25 +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 A18C856AE; Fri, 21 Sep 2018 13:02:25 +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 w8LD2PUW045184; Fri, 21 Sep 2018 13:02:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LD2PiY045183; Fri, 21 Sep 2018 13:02:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201809211302.w8LD2PiY045183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste <emaste@FreeBSD.org> Date: Fri, 21 Sep 2018 13:02:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338854 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 338854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 13:02:26 -0000 Author: emaste Date: Fri Sep 21 13:02:25 2018 New Revision: 338854 URL: https://svnweb.freebsd.org/changeset/base/338854 Log: remove double space between branch and version in kernel ident Reported by: dim Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Fri Sep 21 12:27:36 2018 (r338853) +++ head/sys/conf/newvers.sh Fri Sep 21 13:02:25 2018 (r338854) @@ -293,7 +293,7 @@ done shift $((OPTIND - 1)) if [ -z "${include_metadata}" ]; then - VERINFO="${VERSION} ${svn}${git}${hg}${p4version}" + VERINFO="${VERSION}${svn}${git}${hg}${p4version}" VERSTR="${VERINFO}\\n" else VERINFO="${VERSION} #${v}${svn}${git}${hg}${p4version}: ${t}" From owner-svn-src-head@freebsd.org Fri Sep 21 13:20:41 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C06C6109A0A1; Fri, 21 Sep 2018 13:20: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7769C7E421; Fri, 21 Sep 2018 13:20: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 728005864; Fri, 21 Sep 2018 13:20: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 w8LDKf3h050912; Fri, 21 Sep 2018 13:20:41 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LDKfmP050911; Fri, 21 Sep 2018 13:20:41 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809211320.w8LDKfmP050911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik <mjg@FreeBSD.org> Date: Fri, 21 Sep 2018 13:20:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338855 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 338855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 13:20:41 -0000 Author: mjg Date: Fri Sep 21 13:20:41 2018 New Revision: 338855 URL: https://svnweb.freebsd.org/changeset/base/338855 Log: select: stop doing zero-sized memsets Approved by: re (kib) Modified: head/sys/kern/sys_generic.c Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Fri Sep 21 13:02:25 2018 (r338854) +++ head/sys/kern/sys_generic.c Fri Sep 21 13:20:41 2018 (r338855) @@ -1031,8 +1031,9 @@ kern_select(struct thread *td, int nd, fd_set *fd_in, error = copyin(name, ibits[x], ncpubytes); \ if (error != 0) \ goto done; \ - bzero((char *)ibits[x] + ncpubytes, \ - ncpbytes - ncpubytes); \ + if (ncpbytes != ncpubytes) \ + bzero((char *)ibits[x] + ncpubytes, \ + ncpbytes - ncpubytes); \ } \ } while (0) getbits(fd_in, 0); From owner-svn-src-head@freebsd.org Fri Sep 21 13:43:07 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECA40109A887; Fri, 21 Sep 2018 13:43:06 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A07077FA54; Fri, 21 Sep 2018 13:43:06 +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 9B7F95D2D; Fri, 21 Sep 2018 13:43:06 +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 w8LDh6kL065913; Fri, 21 Sep 2018 13:43:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LDh6rL065912; Fri, 21 Sep 2018 13:43:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201809211343.w8LDh6rL065912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste <emaste@FreeBSD.org> Date: Fri, 21 Sep 2018 13:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338856 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 338856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 13:43:07 -0000 Author: emaste Date: Fri Sep 21 13:43:06 2018 New Revision: 338856 URL: https://svnweb.freebsd.org/changeset/base/338856 Log: Include kernel ident in uname In non-reproducible mode we have the kernel ident as a side effect of including the build directory. Explicitly add it to the ident string in reproducible mode. Reported by: mjg Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Fri Sep 21 13:20:41 2018 (r338855) +++ head/sys/conf/newvers.sh Fri Sep 21 13:43:06 2018 (r338856) @@ -293,7 +293,7 @@ done shift $((OPTIND - 1)) if [ -z "${include_metadata}" ]; then - VERINFO="${VERSION}${svn}${git}${hg}${p4version}" + VERINFO="${VERSION}${svn}${git}${hg}${p4version} ${i}" VERSTR="${VERINFO}\\n" else VERINFO="${VERSION} #${v}${svn}${git}${hg}${p4version}: ${t}" From owner-svn-src-head@freebsd.org Fri Sep 21 13:44:06 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13381109A900; Fri, 21 Sep 2018 13:44:06 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE01B7FBB7; Fri, 21 Sep 2018 13:44:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8FA55D32; Fri, 21 Sep 2018 13:44:05 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8LDi5Mc066015; Fri, 21 Sep 2018 13:44:05 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LDi5gh066014; Fri, 21 Sep 2018 13:44:05 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201809211344.w8LDi5gh066014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" <ae@FreeBSD.org> Date: Fri, 21 Sep 2018 13:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338857 - head/sys/dev/ffec X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/dev/ffec X-SVN-Commit-Revision: 338857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 13:44:06 -0000 Author: ae Date: Fri Sep 21 13:44:05 2018 New Revision: 338857 URL: https://svnweb.freebsd.org/changeset/base/338857 Log: Fix possible NULL pointer dereference in ffec_alloc_mbufcl(). PR: 231514 Approved by: re (kib) MFC after: 1 week Modified: head/sys/dev/ffec/if_ffec.c Modified: head/sys/dev/ffec/if_ffec.c ============================================================================== --- head/sys/dev/ffec/if_ffec.c Fri Sep 21 13:43:06 2018 (r338856) +++ head/sys/dev/ffec/if_ffec.c Fri Sep 21 13:44:05 2018 (r338857) @@ -801,7 +801,8 @@ ffec_alloc_mbufcl(struct ffec_softc *sc) struct mbuf *m; m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); - m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; + if (m != NULL) + m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; return (m); } From owner-svn-src-head@freebsd.org Fri Sep 21 15:00:47 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5812A109C53F; Fri, 21 Sep 2018 15:00:47 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0EA0582445; Fri, 21 Sep 2018 15:00:47 +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 097A26891; Fri, 21 Sep 2018 15:00:47 +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 w8LF0kXN002712; Fri, 21 Sep 2018 15:00:46 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LF0kdf002711; Fri, 21 Sep 2018 15:00:46 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809211500.w8LF0kdf002711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik <mjg@FreeBSD.org> Date: Fri, 21 Sep 2018 15:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338858 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 15:00:47 -0000 Author: mjg Date: Fri Sep 21 15:00:46 2018 New Revision: 338858 URL: https://svnweb.freebsd.org/changeset/base/338858 Log: amd64: even up copyin/copyout with memcpy + other cleanup - _fault handlers for both primitives are identical, provide just one - change the copying scheme to match memcpy (in particular jump avoidance for the most common case of multiply of 8) - stop re-reading pcb address on exit, just store it locally (in r9) Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17265 Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Fri Sep 21 13:44:05 2018 (r338857) +++ head/sys/amd64/amd64/support.S Fri Sep 21 15:00:46 2018 (r338858) @@ -309,9 +309,9 @@ END(fillw) */ .macro COPYOUT smap erms PUSH_FRAME_POINTER - movq PCPU(CURPCB),%rax + movq PCPU(CURPCB),%r9 /* Trap entry clears PSL.AC */ - movq $copyout_fault,PCB_ONFAULT(%rax) + movq $copy_fault,PCB_ONFAULT(%r9) testq %rdx,%rdx /* anything to do? */ jz 2f @@ -327,7 +327,7 @@ END(fillw) */ movq %rsi,%rax addq %rdx,%rax - jc copyout_fault + jc copy_fault /* * XXX STOP USING VM_MAXUSER_ADDRESS. * It is an end address, not a max, so every time it is used correctly it @@ -336,7 +336,7 @@ END(fillw) */ movq $VM_MAXUSER_ADDRESS,%rcx cmpq %rcx,%rax - ja copyout_fault + ja copy_fault xchgq %rdi,%rsi /* bcopy(%rsi, %rdi, %rdx) */ @@ -344,21 +344,27 @@ END(fillw) SMAP_DISABLE \smap .if \erms == 0 + cmpq $15,%rcx + jbe 1f shrq $3,%rcx rep movsq movb %dl,%cl andb $7,%cl - je 1f + jne 1f + SMAP_ENABLE \smap + xorl %eax,%eax + movq %rax,PCB_ONFAULT(%r9) + POP_FRAME_POINTER + ret .endif +1: rep movsb -1: SMAP_ENABLE \smap 2: xorl %eax,%eax - movq PCPU(CURPCB),%rdx - movq %rax,PCB_ONFAULT(%rdx) + movq %rax,PCB_ONFAULT(%r9) POP_FRAME_POINTER ret .endmacro @@ -379,22 +385,14 @@ ENTRY(copyout_smap_erms) COPYOUT smap=1 erms=1 END(copyout_smap_erms) - ALIGN_TEXT -copyout_fault: - movq PCPU(CURPCB),%rdx - movq $0,PCB_ONFAULT(%rdx) - movq $EFAULT,%rax - POP_FRAME_POINTER - ret - /* * copyin(from_user, to_kernel, len) * %rdi, %rsi, %rdx */ .macro COPYIN smap erms PUSH_FRAME_POINTER - movq PCPU(CURPCB),%rax - movq $copyin_fault,PCB_ONFAULT(%rax) + movq PCPU(CURPCB),%r9 + movq $copy_fault,PCB_ONFAULT(%r9) testq %rdx,%rdx /* anything to do? */ jz 2f @@ -403,10 +401,10 @@ copyout_fault: */ movq %rdi,%rax addq %rdx,%rax - jc copyin_fault + jc copy_fault movq $VM_MAXUSER_ADDRESS,%rcx cmpq %rcx,%rax - ja copyin_fault + ja copy_fault xchgq %rdi,%rsi movq %rdx,%rcx @@ -414,22 +412,28 @@ copyout_fault: SMAP_DISABLE \smap .if \erms == 0 + cmpq $15,%rcx + jbe 1f shrq $3,%rcx /* copy longword-wise */ rep movsq movb %al,%cl andb $7,%cl /* copy remaining bytes */ - je 1f + jne 1f + SMAP_ENABLE \smap + xorl %eax,%eax + movq %rax,PCB_ONFAULT(%r9) + POP_FRAME_POINTER + ret .endif +1: rep movsb -1: SMAP_ENABLE \smap 2: xorl %eax,%eax - movq PCPU(CURPCB),%rdx - movq %rax,PCB_ONFAULT(%rdx) + movq %rax,PCB_ONFAULT(%r9) POP_FRAME_POINTER ret .endmacro @@ -451,10 +455,10 @@ ENTRY(copyin_smap_erms) END(copyin_smap_erms) ALIGN_TEXT -copyin_fault: +copy_fault: movq PCPU(CURPCB),%rdx movq $0,PCB_ONFAULT(%rdx) - movq $EFAULT,%rax + movl $EFAULT,%eax POP_FRAME_POINTER ret From owner-svn-src-head@freebsd.org Fri Sep 21 17:44:08 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C89A109F7F6; Fri, 21 Sep 2018 17:44:08 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F66288AF2; Fri, 21 Sep 2018 17:44:08 +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 0A7271042B; Fri, 21 Sep 2018 17:44:08 +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 w8LHi7s4091170; Fri, 21 Sep 2018 17:44:07 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LHi5BJ091155; Fri, 21 Sep 2018 17:44:05 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201809211744.w8LHi5BJ091155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis <brooks@FreeBSD.org> Date: Fri, 21 Sep 2018 17:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338860 - in head/gnu/usr.bin: binutils/as binutils/ld binutils/libbinutils binutils/libiberty cc/libiberty gdb/arch/amd64 gdb/arch/arm gdb/arch/i386 gdb/arch/mips gdb/arch/powerpc gdb/... X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/gnu/usr.bin: binutils/as binutils/ld binutils/libbinutils binutils/libiberty cc/libiberty gdb/arch/amd64 gdb/arch/arm gdb/arch/i386 gdb/arch/mips gdb/arch/powerpc gdb/arch/powerpc64 gdb/arch/s... X-SVN-Commit-Revision: 338860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 17:44:08 -0000 Author: brooks Date: Fri Sep 21 17:44:05 2018 New Revision: 338860 URL: https://svnweb.freebsd.org/changeset/base/338860 Log: Disable sbrk() use in GNU tools. We're studing the possibility of deprecating sbrk(). To make it easier we're removing unnecessicary uses in the base system. None of these tools require sbrk(), but they agressively prefer it for no good reason. Reviewed by: andrew Approved by: re (kib) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16141 Modified: head/gnu/usr.bin/binutils/as/config.h head/gnu/usr.bin/binutils/ld/config.h head/gnu/usr.bin/binutils/libbinutils/config.h head/gnu/usr.bin/binutils/libiberty/config.h head/gnu/usr.bin/cc/libiberty/config.h head/gnu/usr.bin/gdb/arch/amd64/config.h head/gnu/usr.bin/gdb/arch/arm/config.h head/gnu/usr.bin/gdb/arch/i386/config.h head/gnu/usr.bin/gdb/arch/mips/config.h head/gnu/usr.bin/gdb/arch/powerpc/config.h head/gnu/usr.bin/gdb/arch/powerpc64/config.h head/gnu/usr.bin/gdb/arch/sparc64/config.h Modified: head/gnu/usr.bin/binutils/as/config.h ============================================================================== --- head/gnu/usr.bin/binutils/as/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/binutils/as/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -69,7 +69,7 @@ /* #undef HAVE_REMOVE */ /* Define to 1 if you have the `sbrk' function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define to 1 if you have the <stdarg.h> header file. */ #define HAVE_STDARG_H 1 Modified: head/gnu/usr.bin/binutils/ld/config.h ============================================================================== --- head/gnu/usr.bin/binutils/ld/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/binutils/ld/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -65,7 +65,7 @@ #define HAVE_REALPATH 1 /* Define to 1 if you have the `sbrk' function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 Modified: head/gnu/usr.bin/binutils/libbinutils/config.h ============================================================================== --- head/gnu/usr.bin/binutils/libbinutils/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/binutils/libbinutils/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -104,7 +104,7 @@ #define HAVE_MKSTEMP 1 /* Define to 1 if you have the `sbrk' function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define to 1 if you have the `setmode' function. */ #define HAVE_SETMODE 1 Modified: head/gnu/usr.bin/binutils/libiberty/config.h ============================================================================== --- head/gnu/usr.bin/binutils/libiberty/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/binutils/libiberty/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -188,7 +188,7 @@ #define HAVE_RINDEX 1 /* Define to 1 if you have the `sbrk' function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 Modified: head/gnu/usr.bin/cc/libiberty/config.h ============================================================================== --- head/gnu/usr.bin/cc/libiberty/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/cc/libiberty/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -187,7 +187,7 @@ #define HAVE_RINDEX 1 /* Define to 1 if you have the `sbrk' function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 Modified: head/gnu/usr.bin/gdb/arch/amd64/config.h ============================================================================== --- head/gnu/usr.bin/gdb/arch/amd64/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/gdb/arch/amd64/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -227,7 +227,7 @@ #define HAVE_REALPATH 1 /* Define if you have the sbrk function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define if you have the setenv function. */ #define HAVE_SETENV 1 Modified: head/gnu/usr.bin/gdb/arch/arm/config.h ============================================================================== --- head/gnu/usr.bin/gdb/arch/arm/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/gdb/arch/arm/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -239,7 +239,7 @@ #define HAVE_REALPATH 1 /* Define if you have the sbrk function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define if you have the setenv function. */ #define HAVE_SETENV 1 Modified: head/gnu/usr.bin/gdb/arch/i386/config.h ============================================================================== --- head/gnu/usr.bin/gdb/arch/i386/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/gdb/arch/i386/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -227,7 +227,7 @@ #define HAVE_REALPATH 1 /* Define if you have the sbrk function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define if you have the setenv function. */ #define HAVE_SETENV 1 Modified: head/gnu/usr.bin/gdb/arch/mips/config.h ============================================================================== --- head/gnu/usr.bin/gdb/arch/mips/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/gdb/arch/mips/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -227,7 +227,7 @@ #define HAVE_REALPATH 1 /* Define if you have the sbrk function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define if you have the setenv function. */ #define HAVE_SETENV 1 Modified: head/gnu/usr.bin/gdb/arch/powerpc/config.h ============================================================================== --- head/gnu/usr.bin/gdb/arch/powerpc/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/gdb/arch/powerpc/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -227,7 +227,7 @@ #define HAVE_REALPATH 1 /* Define if you have the sbrk function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define if you have the setenv function. */ #define HAVE_SETENV 1 Modified: head/gnu/usr.bin/gdb/arch/powerpc64/config.h ============================================================================== --- head/gnu/usr.bin/gdb/arch/powerpc64/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/gdb/arch/powerpc64/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -227,7 +227,7 @@ #define HAVE_REALPATH 1 /* Define if you have the sbrk function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define if you have the setenv function. */ #define HAVE_SETENV 1 Modified: head/gnu/usr.bin/gdb/arch/sparc64/config.h ============================================================================== --- head/gnu/usr.bin/gdb/arch/sparc64/config.h Fri Sep 21 15:58:08 2018 (r338859) +++ head/gnu/usr.bin/gdb/arch/sparc64/config.h Fri Sep 21 17:44:05 2018 (r338860) @@ -227,7 +227,7 @@ #define HAVE_REALPATH 1 /* Define if you have the sbrk function. */ -#define HAVE_SBRK 1 +/* #undef HAVE_SBRK */ /* Define if you have the setenv function. */ #define HAVE_SETENV 1 From owner-svn-src-head@freebsd.org Fri Sep 21 17:49:38 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F10F109F8EA; Fri, 21 Sep 2018 17:49:38 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B86EF88D1D; Fri, 21 Sep 2018 17:49:37 +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 AF2BA10438; Fri, 21 Sep 2018 17:49:37 +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 w8LHnbci091467; Fri, 21 Sep 2018 17:49:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LHnbap091466; Fri, 21 Sep 2018 17:49:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201809211749.w8LHnbap091466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste <emaste@FreeBSD.org> Date: Fri, 21 Sep 2018 17:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338861 - head/lib/libc X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc X-SVN-Commit-Revision: 338861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 17:49:38 -0000 Author: emaste Date: Fri Sep 21 17:49:37 2018 New Revision: 338861 URL: https://svnweb.freebsd.org/changeset/base/338861 Log: libc: require ifunc-capable linker for amd64/i386 We expect to introduce optimized libc routines in the near future, which requires use of a linker that supports ifuncs. Approved by: re (gjb, kib) Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/Makefile Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Fri Sep 21 17:44:05 2018 (r338860) +++ head/lib/libc/Makefile Fri Sep 21 17:49:37 2018 (r338861) @@ -21,6 +21,11 @@ LIBC_ARCH=${MACHINE_ARCH} LIBC_ARCH=${MACHINE_CPUARCH} .endif +.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \ + defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" +.error ${LIBC_ARCH} libc requires linker ifunc support +.endif + # All library objects contain FreeBSD revision strings by default; they may be # excluded as a space-saving measure. To produce a library that does # not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS From owner-svn-src-head@freebsd.org Fri Sep 21 17:53:07 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C9AB109FB78; Fri, 21 Sep 2018 17:53:07 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C67F4891CE; Fri, 21 Sep 2018 17:53:06 +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 C17AA105E2; Fri, 21 Sep 2018 17:53:06 +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 w8LHr6Q4096298; Fri, 21 Sep 2018 17:53:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LHr6p0096297; Fri, 21 Sep 2018 17:53:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809211753.w8LHr6p0096297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov <kib@FreeBSD.org> Date: Fri, 21 Sep 2018 17:53:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338862 - 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: 338862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 17:53:07 -0000 Author: kib Date: Fri Sep 21 17:53:06 2018 New Revision: 338862 URL: https://svnweb.freebsd.org/changeset/base/338862 Log: Convert x86 TLB top-level invalidation functions to ifuncs. Note that shootdown IPI handlers are already per-mode. Suggested by: alc Reviewed by: alc, markj Tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D17184 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Sep 21 17:49:37 2018 (r338861) +++ head/sys/amd64/amd64/pmap.c Fri Sep 21 17:53:06 2018 (r338862) @@ -1704,15 +1704,94 @@ pmap_invalidate_ept(pmap_t pmap) sched_unpin(); } -void -pmap_invalidate_page(pmap_t pmap, vm_offset_t va) +static inline void +pmap_invalidate_page_pcid(pmap_t pmap, vm_offset_t va, + const bool invpcid_works1) { - cpuset_t *mask; struct invpcid_descr d; uint64_t kcr3, ucr3; uint32_t pcid; u_int cpuid, i; + cpuid = PCPU_GET(cpuid); + if (pmap == PCPU_GET(curpmap)) { + if (pmap->pm_ucr3 != PMAP_NO_CR3) { + /* + * 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; + + CPU_FOREACH(i) { + if (cpuid != i) + pmap->pm_pcids[i].pm_gen = 0; + } + + /* + * The fence is between stores to pm_gen and the read of the + * pm_active mask. We need to ensure that it is impossible + * for us to miss the bit update in pm_active and + * simultaneously observe a non-zero pm_gen in + * pmap_activate_sw(), otherwise TLB update is missed. + * Without the fence, IA32 allows such an outcome. Note that + * pm_active is updated by a locked operation, which provides + * the reciprocal fence. + */ + atomic_thread_fence_seq_cst(); +} + +static void +pmap_invalidate_page_pcid_invpcid(pmap_t pmap, vm_offset_t va) +{ + + pmap_invalidate_page_pcid(pmap, va, true); +} + +static void +pmap_invalidate_page_pcid_noinvpcid(pmap_t pmap, vm_offset_t va) +{ + + pmap_invalidate_page_pcid(pmap, va, false); +} + +static void +pmap_invalidate_page_nopcid(pmap_t pmap, vm_offset_t va) +{ +} + +DEFINE_IFUNC(static, void, pmap_invalidate_page_mode, (pmap_t, vm_offset_t), + static) +{ + + if (pmap_pcid_enabled) + return (invpcid_works ? pmap_invalidate_page_pcid_invpcid : + pmap_invalidate_page_pcid_noinvpcid); + return (pmap_invalidate_page_nopcid); +} + +void +pmap_invalidate_page(pmap_t pmap, vm_offset_t va) +{ + cpuset_t *mask; + if (pmap_type_guest(pmap)) { pmap_invalidate_ept(pmap); return; @@ -1726,52 +1805,9 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) invlpg(va); mask = &all_cpus; } else { - cpuid = PCPU_GET(cpuid); - if (pmap == PCPU_GET(curpmap)) { + if (pmap == PCPU_GET(curpmap)) invlpg(va); - if (pmap_pcid_enabled && pmap->pm_ucr3 != PMAP_NO_CR3) { - /* - * Disable context switching. pm_pcid - * is recalculated on switch, which - * might make us use wrong pcid below. - */ - critical_enter(); - pcid = pmap->pm_pcids[cpuid].pm_pcid; - - if (invpcid_works) { - 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 if (pmap_pcid_enabled) - pmap->pm_pcids[cpuid].pm_gen = 0; - if (pmap_pcid_enabled) { - CPU_FOREACH(i) { - if (cpuid != i) - pmap->pm_pcids[i].pm_gen = 0; - } - - /* - * The fence is between stores to pm_gen and the read of - * the pm_active mask. We need to ensure that it is - * impossible for us to miss the bit update in pm_active - * and simultaneously observe a non-zero pm_gen in - * pmap_activate_sw(), otherwise TLB update is missed. - * Without the fence, IA32 allows such an outcome. - * Note that pm_active is updated by a locked operation, - * which provides the reciprocal fence. - */ - atomic_thread_fence_seq_cst(); - } + pmap_invalidate_page_mode(pmap, va); mask = &pmap->pm_active; } smp_masked_invlpg(*mask, va, pmap); @@ -1781,16 +1817,82 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) /* 4k PTEs -- Chosen to exceed the total size of Broadwell L2 TLB */ #define PMAP_INVLPG_THRESHOLD (4 * 1024 * PAGE_SIZE) -void -pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +static void +pmap_invalidate_range_pcid(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, + const bool invpcid_works1) { - cpuset_t *mask; struct invpcid_descr d; - vm_offset_t addr; uint64_t kcr3, ucr3; uint32_t pcid; u_int cpuid, i; + cpuid = PCPU_GET(cpuid); + if (pmap == PCPU_GET(curpmap)) { + if (pmap->pm_ucr3 != PMAP_NO_CR3) { + 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; + } + /* 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, + vm_offset_t eva) +{ + + pmap_invalidate_range_pcid(pmap, sva, eva, true); +} + +static void +pmap_invalidate_range_pcid_noinvpcid(pmap_t pmap, vm_offset_t sva, + vm_offset_t eva) +{ + + pmap_invalidate_range_pcid(pmap, sva, eva, false); +} + +static void +pmap_invalidate_range_nopcid(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ +} + +DEFINE_IFUNC(static, void, pmap_invalidate_range_mode, (pmap_t, vm_offset_t, + vm_offset_t), static) +{ + + if (pmap_pcid_enabled) + return (invpcid_works ? pmap_invalidate_range_pcid_invpcid : + pmap_invalidate_range_pcid_noinvpcid); + return (pmap_invalidate_range_nopcid); +} + +void +pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + cpuset_t *mask; + vm_offset_t addr; + if (eva - sva >= PMAP_INVLPG_THRESHOLD) { pmap_invalidate_all(pmap); return; @@ -1805,7 +1907,6 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm ("pmap_invalidate_range: invalid type %d", pmap->pm_type)); sched_pin(); - cpuid = PCPU_GET(cpuid); if (pmap == kernel_pmap) { for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); @@ -1814,112 +1915,114 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm if (pmap == PCPU_GET(curpmap)) { for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); - if (pmap_pcid_enabled && pmap->pm_ucr3 != PMAP_NO_CR3) { - critical_enter(); - pcid = pmap->pm_pcids[cpuid].pm_pcid; - if (invpcid_works) { - 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 if (pmap_pcid_enabled) { - pmap->pm_pcids[cpuid].pm_gen = 0; } - if (pmap_pcid_enabled) { - CPU_FOREACH(i) { - if (cpuid != i) - pmap->pm_pcids[i].pm_gen = 0; - } - /* See the comment in pmap_invalidate_page(). */ - atomic_thread_fence_seq_cst(); - } + pmap_invalidate_range_mode(pmap, sva, eva); mask = &pmap->pm_active; } smp_masked_invlpg_range(*mask, sva, eva, pmap); sched_unpin(); } -void -pmap_invalidate_all(pmap_t pmap) +static inline void +pmap_invalidate_all_pcid(pmap_t pmap, bool invpcid_works1) { - cpuset_t *mask; struct invpcid_descr d; uint64_t kcr3, ucr3; uint32_t pcid; u_int cpuid, i; - if (pmap_type_guest(pmap)) { - pmap_invalidate_ept(pmap); - return; - } - - KASSERT(pmap->pm_type == PT_X86, - ("pmap_invalidate_all: invalid type %d", pmap->pm_type)); - - sched_pin(); if (pmap == kernel_pmap) { - if (pmap_pcid_enabled && invpcid_works) { + if (invpcid_works1) { bzero(&d, sizeof(d)); invpcid(&d, INVPCID_CTXGLOB); } else { invltlb_glob(); } - mask = &all_cpus; } else { cpuid = PCPU_GET(cpuid); if (pmap == PCPU_GET(curpmap)) { - if (pmap_pcid_enabled) { - critical_enter(); - pcid = pmap->pm_pcids[cpuid].pm_pcid; - if (invpcid_works) { - d.pcid = pcid; - d.pad = 0; - d.addr = 0; + 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); + if (pmap->pm_ucr3 != PMAP_NO_CR3) { + d.pcid |= PMAP_PCID_USER_PT; invpcid(&d, INVPCID_CTX); - if (pmap->pm_ucr3 != PMAP_NO_CR3) { - d.pcid |= PMAP_PCID_USER_PT; - invpcid(&d, INVPCID_CTX); - } - } else { - kcr3 = pmap->pm_cr3 | pcid; - ucr3 = pmap->pm_ucr3; - if (ucr3 != PMAP_NO_CR3) { - ucr3 |= pcid | PMAP_PCID_USER_PT; - pmap_pti_pcid_invalidate(ucr3, - kcr3); - } else { - load_cr3(kcr3); - } } - critical_exit(); } else { - invltlb(); + kcr3 = pmap->pm_cr3 | pcid; + ucr3 = pmap->pm_ucr3; + if (ucr3 != PMAP_NO_CR3) { + ucr3 |= pcid | PMAP_PCID_USER_PT; + pmap_pti_pcid_invalidate(ucr3, kcr3); + } else { + load_cr3(kcr3); + } } - } else if (pmap_pcid_enabled) { + critical_exit(); + } else pmap->pm_pcids[cpuid].pm_gen = 0; - } - if (pmap_pcid_enabled) { - CPU_FOREACH(i) { - if (cpuid != i) - pmap->pm_pcids[i].pm_gen = 0; - } - /* See the comment in pmap_invalidate_page(). */ - atomic_thread_fence_seq_cst(); - } - mask = &pmap->pm_active; } + CPU_FOREACH(i) { + if (cpuid != i) + pmap->pm_pcids[i].pm_gen = 0; + } + /* 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(pmap, true); +} + +static void +pmap_invalidate_all_pcid_noinvpcid(pmap_t pmap) +{ + + pmap_invalidate_all_pcid(pmap, false); +} + +static void +pmap_invalidate_all_nopcid(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), static) +{ + + if (pmap_pcid_enabled) + return (invpcid_works ? pmap_invalidate_all_pcid_invpcid : + pmap_invalidate_all_pcid_noinvpcid); + return (pmap_invalidate_all_nopcid); +} + +void +pmap_invalidate_all(pmap_t pmap) +{ + cpuset_t *mask; + + if (pmap_type_guest(pmap)) { + pmap_invalidate_ept(pmap); + return; + } + + KASSERT(pmap->pm_type == PT_X86, + ("pmap_invalidate_all: invalid type %d", pmap->pm_type)); + + sched_pin(); + mask = pmap == kernel_pmap ? &all_cpus : &pmap->pm_active; + pmap_invalidate_all_mode(pmap); smp_masked_invltlb(*mask, pmap); sched_unpin(); } From owner-svn-src-head@freebsd.org Fri Sep 21 18:11:14 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE98110A0282; Fri, 21 Sep 2018 18:11:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C98E8A2C6; Fri, 21 Sep 2018 18:11:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 3PtQgutHQ5Hxq3PtRgCB9L; Fri, 21 Sep 2018 12:11:06 -0600 X-Authority-Analysis: v=2.3 cv=BMcHU2YG c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=JBFolyDoGHsA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=j-OfqatTNawR962LbvcA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 2E0207A7; Fri, 21 Sep 2018 11:12:24 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w8LIB3wk071103; Fri, 21 Sep 2018 11:11:03 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w8LIB3Oq071100; Fri, 21 Sep 2018 11:11:03 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201809211811.w8LIB3Oq071100@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert <Cy.Schubert@cschubert.com> From: Cy Schubert <Cy.Schubert@cschubert.com> X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ed Maste <emaste@FreeBSD.org> cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338861 - head/lib/libc In-Reply-To: Message from Ed Maste <emaste@FreeBSD.org> of "Fri, 21 Sep 2018 17:49:37 -0000." <201809211749.w8LHnbap091466@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 21 Sep 2018 11:11:02 -0700 X-CMAE-Envelope: MS4wfNvW4OYGTXXNpJPL9Kj4ESNzmFDGYy6a3gHQwvFByJJZit7OgAlyvAd9O3Wgs8i9O132rBgIN3hBBJJXroJz0W44cfBFi0ScecXyDt7y8BQqfK9aegCG xrlCYVEkCeGwZwbSXuT7pCYVTpFoi+a2NWw2aR7TGCJcZvHtC7yG79McJSYxY2+4ymYJ9BVzUdl0oBdo0Xu82a55nLUzgk2Nb1jo73Yt8nq4uYrHoaWwe+dK kVJc5k7YjOV1bbGbLgR6v2f8IO9a/3G2RHSqd/0JHzwEScRHZ+r16AS3isQIKMLL X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 18:11:14 -0000 In message <201809211749.w8LHnbap091466@repo.freebsd.org>, Ed Maste writes: > Author: emaste > Date: Fri Sep 21 17:49:37 2018 > New Revision: 338861 > URL: https://svnweb.freebsd.org/changeset/base/338861 > > Log: > libc: require ifunc-capable linker for amd64/i386 > > We expect to introduce optimized libc routines in the near future, > which requires use of a linker that supports ifuncs. > > Approved by: re (gjb, kib) > Sponsored by: The FreeBSD Foundation > > Modified: > head/lib/libc/Makefile > > Modified: head/lib/libc/Makefile > ============================================================================= > = > --- head/lib/libc/Makefile Fri Sep 21 17:44:05 2018 (r338860) > +++ head/lib/libc/Makefile Fri Sep 21 17:49:37 2018 (r338861) > @@ -21,6 +21,11 @@ LIBC_ARCH=${MACHINE_ARCH} > LIBC_ARCH=${MACHINE_CPUARCH} > .endif > > +.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \ > + defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" > +.error ${LIBC_ARCH} libc requires linker ifunc support > +.endif > + > # All library objects contain FreeBSD revision strings by default; they may > be > # excluded as a space-saving measure. To produce a library that does > # not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAG > S > Should this require bumping __FreeBSD_version? -- Cheers, Cy Schubert <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Fri Sep 21 18:16:14 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4372D10A04CC; Fri, 21 Sep 2018 18:16:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B64CD8A69C; Fri, 21 Sep 2018 18:16:13 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-xd2d.google.com with SMTP id n18-v6so13110371ioa.9; Fri, 21 Sep 2018 11:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=26ej+rinkuDMrxONuIvhKWScOJZwxQzbKZuUBi19MrY=; b=YiZQIbg/53gkKlmlcKvjK9E4ggC5jDsIPv31mualnoHkSbrJjJ5JPVNB8RkiS0X5Sf kFGd3IdjmF2BigO9+Pw4r77T9tTwk9ko+Mu0uxUFf52ITS8IKfNaFsdHFND37C36j3TO +MY+n3zCZ8eTWLf2zwBRzPNGPs0E+mjMiW+mSyZT07tLNY94se4+PGFL3jzZyL2ufP+j u03h6w/FBulBmXvK9KJPKpJ8Q+CyxOPHeyu9K0R+gwSF+bQPyezrNHGEENxte/He5u25 gsqQ5snbNo7rq44u7TH/W3dD5MDvivY3LGDHyTcn+t8vPjgQDdS7W1znHxTdzjJZue2Z z5Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=26ej+rinkuDMrxONuIvhKWScOJZwxQzbKZuUBi19MrY=; b=OlzCYli95iONFdjDyuzSb8tyzWzSo9YP292MxdcVqhz8/H8aT66A5/fU64kW59LUIh hjOd8PohYUzSfUpC88O20kwLhSliJvRh1IrsaXsVMocwZViKdkFdWmD+x+9PUEeVx8+A qBRmNZgFbFU3ijOIJ022uVM/eeo/gO5ds5J5OLyqOAzne0Jev+q7M7iFGska+et0Lu0A HhcLvWH5mC8HxNYReV3yOccZ7cfcVVCfJzO3LrI6GwB42lvGlvLQ2L1ZNG+sziZwTQml WEdDq5i0uRMpxraB24RM5DoIPHE7Ug//W4uQtJAc+tbnwTX3xufIoPvFNdQ4QvIIjIHH IisA== X-Gm-Message-State: APzg51BShKRHsU3JZ6aadpoCyJAzWTfB2vy1ryja0owWPFgB0wtz165N iY7NkeaXbkV086kDmsR32KbdcfwbuX58dfVbKJgu/A== X-Google-Smtp-Source: ANB0VdZNdpgsmuE6ci7+ObRrm7A/rQSdQhhfhcLtJEs+TEqHqavS3YFqAfJulYZ0JISLgOj7M0FMnffGdqiju6R/MF8= X-Received: by 2002:a6b:fe0d:: with SMTP id x13-v6mr37301856ioh.294.1537553773118; Fri, 21 Sep 2018 11:16:13 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:404:0:0:0:0:0 with HTTP; Fri, 21 Sep 2018 11:15:52 -0700 (PDT) In-Reply-To: <201809211811.w8LIB3Oq071100@slippy.cwsent.com> References: <emaste@FreeBSD.org> <201809211749.w8LHnbap091466@repo.freebsd.org> <201809211811.w8LIB3Oq071100@slippy.cwsent.com> From: Ed Maste <emaste@freebsd.org> Date: Fri, 21 Sep 2018 14:15:52 -0400 X-Google-Sender-Auth: b8WmA59yRYXkN24F1HeMQgKSOfk Message-ID: <CAPyFy2DjkXz+9kPz_JL_Ep-3z66yf5os+Cf8VBPawpdZY-OHgA@mail.gmail.com> Subject: Re: svn commit: r338861 - head/lib/libc To: Cy Schubert <Cy.Schubert@cschubert.com> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 18:16:14 -0000 On 21 September 2018 at 14:11, Cy Schubert <Cy.Schubert@cschubert.com> wrote: > > Should this require bumping __FreeBSD_version? Shouldn't be necessary - as of r336901 we've had an ifunc-capable linker in the toolchain for both amd64 and i386. This commit is just a safety belt to make sure that if someone builds libc outside of the standard process and uses old GNU ld we get a hard error rather than a mysterious failure. From owner-svn-src-head@freebsd.org Fri Sep 21 20:11:59 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 118B310A2E6B; Fri, 21 Sep 2018 20:11:59 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 723A18E4BC; Fri, 21 Sep 2018 20:11:58 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from odin.corp.delphij.net (unknown [IPv6:2601:646:8882:37a:ad57:f65c:1498:9ae]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 388453ACB1; Fri, 21 Sep 2018 13:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=m7e2; t=1537560710; x=1537575110; bh=B7MIYhhtXYW4qXHsdUUbxepEXOdbJ8alGTyNWQNBKY4=; h=Reply-To:Subject:To:References:From:Date:In-Reply-To; b=ULFQSjdy73b5lvHS8d6VVQBErsJFNSrnoA8fWrNulkMNHKmWTxRcm9XzIGqrNACjD YHPc+XC9plBLUk3MbMFN0vCJ4nbLUerdcWDvKyEaQNeEcKm1BeMcSPkeTBzuxt8DUD m+UijTrjutwjuYZT8+P6NiR0YHAt/BFY3XJAKl9p+NgxvjO3Hzgodglvu9iY6bDvG6 KGCEBJzks7KLRaGpoZk+5+AlD8rF7+y02i3ukUYZUmLE2052eXJrA6cTQQU4JpJkxg nSvCm8MaofN6F+8gR7KQNV19HoSebIR/yE9rEX0tMqib+6QclP7XBWqLg5Qu6UKuTE iJiZNQegJFpeg== Reply-To: d@delphij.net Subject: Re: svn commit: r338861 - head/lib/libc To: Ed Maste <emaste@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201809211749.w8LHnbap091466@repo.freebsd.org> From: Xin Li <delphij@delphij.net> Openpgp: preference=signencrypt Autocrypt: addr=delphij@delphij.net; prefer-encrypt=mutual; keydata= xsFNBFuSR4oBEACvvEgwRIHs6IcSP/yaDtySF78Ji3rP29qdiQsxhMsOtvtffdbS56VApIWO UFb3/iN2gA8HwLvrmjijN0HEoLVX7na1WARmxRYzQMtApsZIUTtx7hnUYlsi2F5odZa6CDW9 a954DLRzYxiUwYDcu5Zjl9bglK1H8e/N9uC0Vuigr4teWfh86brzOyf819QzwFVYfMIK4ihw QGwMvTzbyVuCFy+LENkmcVYni70oQy6rZ5ktSuYbuOFvu7inRRfhSWPHziV7k+bW88sJ7xhv lBlegcnhkSudWX2M8tZ3MO1PJOcyys0CJlsBY5Weiog2lIPi05h/E9pZ9mc1Vud17iqDaL6w RaggOUhuPfDGCdO5ro82W4BZGeQMRnRF5Ntk+t2ShIH4nn3xRLV0E5nziCiKlgiMqOrz/ZTL QTVbHrCuiwD+fSK14y0oHbkOLYTYLlgh1JbwfY2Ty7elOYiWzyeJ7sJh2dF91NSEneWIOys3 mBpuvtU3nSzzTvAB48VV+Nbg1CpIOgNlPjj7uhIum/Z/VjUaJEyaLpTIRh0MVJVcbP7hXSqZ NA35EEZZVnWEOYdycm4CmEdeNPWkrAf2Ya77iR5VLGypwMlsUMQPh+sKVWDD38M8stFGBBNm d01Hi74Bsq5hKan654dOqMt5eYklrVj0ucMzFQtus7oE502UswARAQABzRxYaW4gTEkgPGRl bHBoaWpARnJlZUJTRC5vcmc+wsGXBBMBCgBBAhsDBQkJroQABQsJCAcDBRUKCQgLBRYCAwEA Ah4BAheAFiEEceNg5NEMZIki80nQQHl/fJX0g08FAluSUkoCGQEACgkQQHl/fJX0g08OIxAA pcCm2QCi6IM0o5N5ro5rTodh2rlMuf31TTYBjdf9laZvpnA8a80XBLgx7bxASxH0EOaxcJZk Hl6D0Ex8jcrwOoe9kmbzJ1ZrqBBJBup+mTrf4SwRceSqo6OGHrun8C6kOnq4X62RsvJ9j9nU PqowhXJ4zZHNk9ZXLDzWbrNvYNXxhb+GgK5SniIKMM5Jw/qlMYvxaiIwnS5So+UzIbNsycnk CLbzZxE0d9pe97G3zDvCCwUYoo6LmSx7R20yRnGgO0BlvTPHeWn5WtK1ku3aiarHJW7mRMbD 617GLdc2vuT3bDSd3XwQztgZdiOZkYCdNZVQvuOqMdTtg+phCoQyvEB0+OWoIc/9Cam826nG lazUzURU/FNKJMcxP+1eFI+D/Kl8lpLTtmcjZNbmxeYR2OG6gz7fkyX2D3Is7GEcxuAi6j8f 3OpyFxb9IX4ZsP54/C41bzbcZtQgsU30Ptp/AhJpThHzYHrskfIcLNdmu2ngD5GvrBNX/x4W dO0SgI8tsdY7UQqU9IMWYdkVP8smIUDypMS5x/VZe47afq+VxACOhL0hSixWJDt6Rbl/4iyM EE6Cgu3/YAWQhAK7B97wJj5vPxqdAtPQjkUZGtlTOJWm/NIf4MCYjoHlfan07zatzJ2XF6y6 XcRiCQXULUYpshhY7mXOTSHXZ8n6HB+Z1rjOwU0EW5JHigEQANiBmIFAfRNH3nzYNWC0yC+t fx3zsUwAsH1VaBM/cTib+yKtbBOSIlXWjJZWX3MHwoI/1LeGghB2mxkkX1L0pJ/vj1eXNR+s FZ320pYcl61Fxg/5fioG4QDTM4i3i7NR5PxDnc6UVaynSlII93DedRhZ1ROtdn4vyMgzsDiq hbL7BthDOt5KxjqdRk4qRPSw7BovEqZLOcG5IJtf/zZUzRbM7SBljEbOAfekDGx1Br+RrYSD 7/EfPwwzou9T8315IpBpIHyQF/dZNk3iFiB9Ed5CA71ZRYV5YoLWE9lL0j9kxOLQ5vHnX3mV q7QZBc7nzwZ6UhQgYmrG5+RWvuiPpGwvDRIsugJUGXucYkAQh5kuNblmkwpv6u9rNMjCNbzA ylOaqdogra5EW+RUSbRz0b4iIr8nnZeAlh7BihCe7JjOwbDjoBEEEtSfVc4hD/LENqpcYVrC hphfaOLB9YIXhnVDTVvMc9OklWT/81HzAaDQqOQCzEfY92199Ct9/CwRoQ2OpO8TO5+8A7b9 Nb33nmxMn09mb48ruRacMrfHxCWbgU4w9SEfbip4GcS5wGG6yTC+hw55Iwnnwus40NrJ0GEr 8a4rcdsLbkvlyoNHB8ZGgyJ4aFCQ1V4qE1BnlTk7Z8BYBUkJM1odPSkVvHpCnMUjVpJ3hEOC +73ZYH1dh7lZABEBAAHCwXwEGAEKACYWIQRx42Dk0QxkiSLzSdBAeX98lfSDTwUCW5JHigIb DAUJCa6EAAAKCRBAeX98lfSDTz8DEACMh3poeUb+gWNF4RWFZuLteZVo0+E1JLYXQkmtrRBL XviP+Qy0pXyFAVxLM4hNIBoIDYfK9BcwrBYf7AwSKrH0GiNwFpgHCkbZd6qoZy2gB+adTnCp VCTJKJetsH/8awkrChJWMK0ckGf3EeWMPvawG7kW7FBz70NYEZ0pOMiaEZNVtzD3wwbYWUiD FYth83XGglOExg+1ShTW5XjQPRrdyJAO+aUW4o3lVjfyUJXMgI4rmhMiLVm06GuNrbpKIF0s +4VdjQAjhrDQjfoXi9CkfsA/cONseuHNv1JGj3RqHiqHJq1dbrpodXp925zGDAnUGxCOBPoF opAHgVzR89GTut059GpwqsddZmU6y7rqifuam/ekJ+QRwc16vgt7pHqCrTY8WPxRZr2UpFU1 wlToCOdeiFep1gq1F9jzFjJnoMaAdmC6k7bgAA+RQusOgIhJL0jIej7DoAHxmxFFCfRy+lDt pXwFgQ8HMvzHI65QWmQnMo7s6SQH/ZH5s1yR6SJq8+3lDz+dCuT42qJVqIPVvxd10LW0FNN+ t7HFeLadU6ekSgD13/EYMYXlvNHkw7dAItSDxIzgRyykLz0bCU9xwNWoS4Z43+ifF9anJ+uR 0ltWEl1j++h6ZrD3LLuCgJIt1so0m49GzdcSpOI7LCwMlacyvafiEyjUn+tSNDsnfw== Message-ID: <8513e11e-f699-70e8-6478-24ee2375326c@delphij.net> Date: Fri, 21 Sep 2018 13:11:46 -0700 User-Agent: Thunderbird MIME-Version: 1.0 In-Reply-To: <201809211749.w8LHnbap091466@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="UrJ0kSDQuiTnpY80Y8O1SNZHCeg2cevvV" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 20:11:59 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UrJ0kSDQuiTnpY80Y8O1SNZHCeg2cevvV Content-Type: multipart/mixed; boundary="UjyCLwTlhi1FmKdeDAgFBeW76tcb3U3f1"; protected-headers="v1" From: Xin Li <delphij@delphij.net> Reply-To: d@delphij.net To: Ed Maste <emaste@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <8513e11e-f699-70e8-6478-24ee2375326c@delphij.net> Subject: Re: svn commit: r338861 - head/lib/libc References: <201809211749.w8LHnbap091466@repo.freebsd.org> In-Reply-To: <201809211749.w8LHnbap091466@repo.freebsd.org> --UjyCLwTlhi1FmKdeDAgFBeW76tcb3U3f1 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 9/21/18 10:49, Ed Maste wrote: > Author: emaste > Date: Fri Sep 21 17:49:37 2018 > New Revision: 338861 > URL: https://svnweb.freebsd.org/changeset/base/338861 >=20 > Log: > libc: require ifunc-capable linker for amd64/i386 > =20 > We expect to introduce optimized libc routines in the near future, > which requires use of a linker that supports ifuncs. > =20 > Approved by: re (gjb, kib) > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/lib/libc/Makefile >=20 > Modified: head/lib/libc/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/Makefile Fri Sep 21 17:44:05 2018 (r338860) > +++ head/lib/libc/Makefile Fri Sep 21 17:49:37 2018 (r338861) > @@ -21,6 +21,11 @@ LIBC_ARCH=3D${MACHINE_ARCH} > LIBC_ARCH=3D${MACHINE_CPUARCH} > .endif > =20 > +.if (${LIBC_ARCH} =3D=3D amd64 || ${LIBC_ARCH} =3D=3D i386) && \ > + defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} =3D=3D "" > +.error ${LIBC_ARCH} libc requires linker ifunc support > +.endif > + > # All library objects contain FreeBSD revision strings by default; the= y may be > # excluded as a space-saving measure. To produce a library that does > # not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to= CFLAGS It seems that this would break bootstraping from a FreeBSD -CURRENT before ifunc? Cheers, --UjyCLwTlhi1FmKdeDAgFBeW76tcb3U3f1-- --UrJ0kSDQuiTnpY80Y8O1SNZHCeg2cevvV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJbpVCFAAoJEEB5f3yV9INP3agP/2NJv7SBId68j+aTurFH88S5 QK9Nv4Iz2rqR4/9b6jX9rMy91VazC7IiNHiI4tYyP15el9u4FbehQFWJvMJl278r mlD4VUXTnn3tQZb8hqNHvjSwimNl2XyWowJJrz3hdH07z7cCTAhL32UcoGQ+zl9w YLs9NarmWDpHmHPFfwBXAM7XDxoL+gd0GWqas27ttY9sPDy8XY0xOlnIpSGbhVRL +JwAQ03n/UwQI9/LV0X/J/pPevcnzh+mAIMEYnxam+pQVG8EVKrsenGt1CvofBoj k1DSPwkXuYezIuZ4ircs8UzuGe9fGGcOO1vpM85yutdfEWYB2p/dQG7zilrtQynW bA1QXMhwcySJq1DPPZpUA64FVl+9SveJ5UPC75Wi4YM3y2npO4TmwZ+7mzbzLnkY 2K7UhAGebSWwLkfnhvXPmeMEnWaQPh9E9ntsSVMVEaKhOWRANaSrRTgc4BZ7h4mu u4In43ajlRwxuum+o4rHF6zhMTNc9SNAosKr2dqfALvzeZDt4CvQHAef4XjA/v0B gP6OnBI7+GV053Fg7CxQw1+H9Cu5XBmU4rflj/+UeEQNS63vaBa/+HxAckwXwarA i+oKI3ud3zpv7MlOtQ0qqm3iJdvQigXdQHIrSh17BWXxI3FOPz1XV1B8njm224xs ScENm6uS9QBVyGIRA6Ce =H2/3 -----END PGP SIGNATURE----- --UrJ0kSDQuiTnpY80Y8O1SNZHCeg2cevvV-- From owner-svn-src-head@freebsd.org Fri Sep 21 20:20:04 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5747010A318A; Fri, 21 Sep 2018 20:20:04 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D7948E91B; Fri, 21 Sep 2018 20:20:04 +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 0411011C85; Fri, 21 Sep 2018 20:20:04 +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 w8LKK3QC069789; Fri, 21 Sep 2018 20:20:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LKK3Cm069788; Fri, 21 Sep 2018 20:20:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201809212020.w8LKK3Cm069788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston <markj@FreeBSD.org> Date: Fri, 21 Sep 2018 20:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338863 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 338863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 20:20:04 -0000 Author: markj Date: Fri Sep 21 20:20:03 2018 New Revision: 338863 URL: https://svnweb.freebsd.org/changeset/base/338863 Log: Use the GNU as-compatible .endm instead of .endmacro. Approved by: re (gjb) Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Fri Sep 21 17:53:06 2018 (r338862) +++ head/sys/amd64/amd64/support.S Fri Sep 21 20:20:03 2018 (r338863) @@ -294,14 +294,14 @@ END(fillw) .if \smap stac .endif -.endmacro +.endm .macro SMAP_ENABLE smap .if \smap clac .endif -.endmacro +.endm /* * copyout(from_kernel, to_user, len) @@ -367,7 +367,7 @@ END(fillw) movq %rax,PCB_ONFAULT(%r9) POP_FRAME_POINTER ret -.endmacro +.endm ENTRY(copyout_nosmap_std) COPYOUT smap=0 erms=0 @@ -436,7 +436,7 @@ END(copyout_smap_erms) movq %rax,PCB_ONFAULT(%r9) POP_FRAME_POINTER ret -.endmacro +.endm ENTRY(copyin_nosmap_std) COPYIN smap=0 erms=0 From owner-svn-src-head@freebsd.org Fri Sep 21 21:56:01 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA29410A582E; Fri, 21 Sep 2018 21:56:00 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A06B972505; Fri, 21 Sep 2018 21:56:00 +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 96CFB12CA4; Fri, 21 Sep 2018 21:56:00 +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 w8LLu08T021867; Fri, 21 Sep 2018 21:56:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LLu0O8021866; Fri, 21 Sep 2018 21:56:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201809212156.w8LLu0O8021866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin <mav@FreeBSD.org> Date: Fri, 21 Sep 2018 21:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338869 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 338869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 21:56:01 -0000 Author: mav Date: Fri Sep 21 21:56:00 2018 New Revision: 338869 URL: https://svnweb.freebsd.org/changeset/base/338869 Log: MFV r338866: 9700 ZFS resilvered mirror does not balance reads illumos/illumos-gate@82f63c3c2bf5e4378706e8dcfccf717d67371be9 Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Matthew Ahrens <mahrens@delphix.com> Author: Jerry Jelinek <jerry.jelinek@joyent.com> Approved by: re (delphij) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Sep 21 21:15:43 2018 (r338868) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Sep 21 21:56:00 2018 (r338869) @@ -28,7 +28,7 @@ * Copyright 2013 Saso Kiselkov. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright 2016 Toomas Soome <tsoome@me.com> - * Copyright 2017 Joyent, Inc. + * Copyright 2018 Joyent, Inc. * Copyright (c) 2017 Datto Inc. * Copyright 2018 OmniOS Community Edition (OmniOSce) Association. */ @@ -6923,6 +6923,7 @@ spa_vdev_resilver_done_hunt(vdev_t *vd) /* * Check for a completed resilver with the 'unspare' flag set. + * Also potentially update faulted state. */ if (vd->vdev_ops == &vdev_spare_ops) { vdev_t *first = vd->vdev_child[0]; @@ -6943,6 +6944,8 @@ spa_vdev_resilver_done_hunt(vdev_t *vd) vdev_dtl_empty(newvd, DTL_OUTAGE) && !vdev_dtl_required(oldvd)) return (oldvd); + + vdev_propagate_state(vd); /* * If there are more than two spares attached to a disk, From owner-svn-src-head@freebsd.org Fri Sep 21 23:48:42 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 009BC10A76DA; Fri, 21 Sep 2018 23:48:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E33475DF3; Fri, 21 Sep 2018 23:48:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9415713E97; Fri, 21 Sep 2018 23:48:41 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8LNmfDu080472; Fri, 21 Sep 2018 23:48:41 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8LNmfJL080471; Fri, 21 Sep 2018 23:48:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <201809212348.w8LNmfJL080471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar <np@FreeBSD.org> Date: Fri, 21 Sep 2018 23:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338872 - head/usr.sbin/cxgbetool X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/usr.sbin/cxgbetool X-SVN-Commit-Revision: 338872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Sep 2018 23:48:42 -0000 Author: np Date: Fri Sep 21 23:48:40 2018 New Revision: 338872 URL: https://svnweb.freebsd.org/changeset/base/338872 Log: cxgbetool(8): The VLAN tag provided in the action for a filter must be prefixed with either '=' or '+'. Fix the description of the parameter in the man page while here. Approved by: re@ (kib@) Sponsored by: Chelsio Communications Modified: head/usr.sbin/cxgbetool/cxgbetool.8 head/usr.sbin/cxgbetool/cxgbetool.c Modified: head/usr.sbin/cxgbetool/cxgbetool.8 ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.8 Fri Sep 21 23:31:04 2018 (r338871) +++ head/usr.sbin/cxgbetool/cxgbetool.8 Fri Sep 21 23:48:40 2018 (r338872) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Sep 18, 2018 +.Dd Sep 21, 2018 .Dt CXGBETOOL 8 .Os .Sh NAME @@ -450,11 +450,11 @@ eport. .It Cm vlan Insert, remove, or rewrite the VLAN tag before switching the packet out of eport. -.Cm vlan=none +.Cm none removes the tag, -.Cm vlan= Ns Ar tag +.Cm = Ns Ar tag replaces the existing tag with the one provided, and -.Cm vlan=+ Ns Ar tag +.Cm + Ns Ar tag inserts the given tag into the frame. .It Cm nat Specify the desired NAT mode. Valid NAT modes values are: Modified: head/usr.sbin/cxgbetool/cxgbetool.c ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.c Fri Sep 21 23:31:04 2018 (r338871) +++ head/usr.sbin/cxgbetool/cxgbetool.c Fri Sep 21 23:48:40 2018 (r338872) @@ -1327,17 +1327,10 @@ set_filter(uint32_t idx, int argc, const char *argv[], t.fs.newvlan = VLAN_REWRITE; } else if (argv[start_arg + 1][0] == '+') { t.fs.newvlan = VLAN_INSERT; - } else if (isdigit(argv[start_arg + 1][0]) && - !parse_val_mask("vlan", args, &val, &mask, hash)) { - t.fs.val.vlan = val; - t.fs.mask.vlan = mask; - t.fs.val.vlan_vld = 1; - t.fs.mask.vlan_vld = 1; } else { warnx("unknown vlan parameter \"%s\"; must" " be one of \"none\", \"=<vlan>\", " - " \"+<vlan>\", or \"<vlan>\"", - argv[start_arg + 1]); + " \"+<vlan>\"", argv[start_arg + 1]); return (EINVAL); } if (t.fs.newvlan == VLAN_REWRITE || From owner-svn-src-head@freebsd.org Sat Sep 22 01:24:31 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6706310A9B71; Sat, 22 Sep 2018 01:24:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 185677905F; Sat, 22 Sep 2018 01:24:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 119C714FCD; Sat, 22 Sep 2018 01:24:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8M1OUhr031819; Sat, 22 Sep 2018 01:24:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8M1OUMe031817; Sat, 22 Sep 2018 01:24:30 GMT (envelope-from np@FreeBSD.org) Message-Id: <201809220124.w8M1OUMe031817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar <np@FreeBSD.org> Date: Sat, 22 Sep 2018 01:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338874 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 338874 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 22 Sep 2018 01:24:31 -0000 Author: np Date: Sat Sep 22 01:24:30 2018 New Revision: 338874 URL: https://svnweb.freebsd.org/changeset/base/338874 Log: cxgbe(4): Reuse existing "switching" L2T entries when possible. Approved by: re@ (rgrimes@) Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_filter.c head/sys/dev/cxgbe/t4_l2t.c head/sys/dev/cxgbe/t4_l2t.h Modified: head/sys/dev/cxgbe/t4_filter.c ============================================================================== --- head/sys/dev/cxgbe/t4_filter.c Fri Sep 21 23:54:01 2018 (r338873) +++ head/sys/dev/cxgbe/t4_filter.c Sat Sep 22 01:24:30 2018 (r338874) @@ -593,13 +593,8 @@ set_tcamfilter(struct adapter *sc, struct t4_filter *t } } mtx_unlock(&sc->tids.ftid_lock); - if (rc != 0) { - if (l2te) - t4_l2t_release(l2te); - if (smt) - t4_smt_release(smt); + if (rc != 0) return (rc); - } /* * Can't fail now. A set-filter WR will definitely be sent. @@ -817,8 +812,8 @@ int set_filter(struct adapter *sc, struct t4_filter *t) { struct tid_info *ti = &sc->tids; - struct l2t_entry *l2te; - struct smt_entry *smt; + struct l2t_entry *l2te = NULL; + struct smt_entry *smt = NULL; uint64_t ftuple; int rc; @@ -942,43 +937,41 @@ done: * Allocate L2T entry, SMT entry, etc. */ - l2te = NULL; if (t->fs.newdmac || t->fs.newvlan) { /* This filter needs an L2T entry; allocate one. */ - l2te = t4_l2t_alloc_switching(sc->l2t); - if (__predict_false(l2te == NULL)) - return (EAGAIN); - rc = t4_l2t_set_switching(sc, l2te, t->fs.vlan, t->fs.eport, + l2te = t4_l2t_alloc_switching(sc, t->fs.vlan, t->fs.eport, t->fs.dmac); - if (rc) { - t4_l2t_release(l2te); - return (ENOMEM); + if (__predict_false(l2te == NULL)) { + rc = EAGAIN; + goto error; } } - smt = NULL; if (t->fs.newsmac) { /* This filter needs an SMT entry; allocate one. */ smt = t4_smt_alloc_switching(sc->smt, t->fs.smac); if (__predict_false(smt == NULL)) { - if (l2te != NULL) - t4_l2t_release(l2te); - return (EAGAIN); + rc = EAGAIN; + goto error; } rc = t4_smt_set_switching(sc, smt, 0x0, t->fs.smac); - if (rc) { - t4_smt_release(smt); - if (l2te != NULL) - t4_l2t_release(l2te); - return (rc); - } + if (rc) + goto error; } if (t->fs.hash) - return (set_hashfilter(sc, t, ftuple, l2te, smt)); + rc = set_hashfilter(sc, t, ftuple, l2te, smt); else - return (set_tcamfilter(sc, t, l2te, smt)); + rc = set_tcamfilter(sc, t, l2te, smt); + if (rc != 0 && rc != EINPROGRESS) { +error: + if (l2te) + t4_l2t_release(l2te); + if (smt) + t4_smt_release(smt); + } + return (rc); } static int @@ -1552,10 +1545,6 @@ set_hashfilter(struct adapter *sc, struct t4_filter *t f = malloc(sizeof(*f), M_CXGBE, M_ZERO | M_NOWAIT); if (__predict_false(f == NULL)) { - if (l2te) - t4_l2t_release(l2te); - if (smt) - t4_smt_release(smt); rc = ENOMEM; goto done; } @@ -1565,10 +1554,6 @@ set_hashfilter(struct adapter *sc, struct t4_filter *t atid = alloc_atid(sc, f); if (__predict_false(atid) == -1) { - if (l2te) - t4_l2t_release(l2te); - if (smt) - t4_smt_release(smt); free(f, M_CXGBE); rc = EAGAIN; goto done; @@ -1579,10 +1564,6 @@ set_hashfilter(struct adapter *sc, struct t4_filter *t &cookie); if (wr == NULL) { free_atid(sc, atid); - if (l2te) - t4_l2t_release(l2te); - if (smt) - t4_smt_release(smt); free(f, M_CXGBE); rc = ENOMEM; goto done; Modified: head/sys/dev/cxgbe/t4_l2t.c ============================================================================== --- head/sys/dev/cxgbe/t4_l2t.c Fri Sep 21 23:54:01 2018 (r338873) +++ head/sys/dev/cxgbe/t4_l2t.c Sat Sep 22 01:24:30 2018 (r338874) @@ -108,6 +108,44 @@ found: return (e); } +static struct l2t_entry * +find_or_alloc_l2e(struct l2t_data *d, uint16_t vlan, uint8_t port, uint8_t *dmac) +{ + struct l2t_entry *end, *e, **p; + struct l2t_entry *first_free = NULL; + + for (e = &d->l2tab[0], end = &d->l2tab[d->l2t_size]; e != end; ++e) { + if (atomic_load_acq_int(&e->refcnt) == 0) { + if (!first_free) + first_free = e; + } else if (e->state == L2T_STATE_SWITCHING && + memcmp(e->dmac, dmac, ETHER_ADDR_LEN) == 0 && + e->vlan == vlan && e->lport == port) + return (e); /* Found existing entry that matches. */ + } + + if (first_free == NULL) + return (NULL); /* No match and no room for a new entry. */ + + /* + * The entry we found may be an inactive entry that is + * presently in the hash table. We need to remove it. + */ + e = first_free; + if (e->state < L2T_STATE_SWITCHING) { + for (p = &d->l2tab[e->hash].first; *p; p = &(*p)->next) { + if (*p == e) { + *p = e->next; + e->next = NULL; + break; + } + } + } + e->state = L2T_STATE_UNUSED; + return (e); +} + + /* * Write an L2T entry. Must be called with the entry locked. * The write may be synchronous or asynchronous. @@ -154,41 +192,38 @@ t4_write_l2e(struct l2t_entry *e, int sync) * address resolution updates do not see them. */ struct l2t_entry * -t4_l2t_alloc_switching(struct l2t_data *d) +t4_l2t_alloc_switching(struct adapter *sc, uint16_t vlan, uint8_t port, + uint8_t *eth_addr) { + struct l2t_data *d = sc->l2t; struct l2t_entry *e; + int rc; rw_wlock(&d->lock); - e = t4_alloc_l2e(d); + e = find_or_alloc_l2e(d, vlan, port, eth_addr); if (e) { - mtx_lock(&e->lock); /* avoid race with t4_l2t_free */ - e->state = L2T_STATE_SWITCHING; - atomic_store_rel_int(&e->refcnt, 1); - mtx_unlock(&e->lock); + if (atomic_load_acq_int(&e->refcnt) == 0) { + mtx_lock(&e->lock); /* avoid race with t4_l2t_free */ + e->wrq = &sc->sge.ctrlq[0]; + e->iqid = sc->sge.fwq.abs_id; + e->state = L2T_STATE_SWITCHING; + e->vlan = vlan; + e->lport = port; + memcpy(e->dmac, eth_addr, ETHER_ADDR_LEN); + atomic_store_rel_int(&e->refcnt, 1); + atomic_subtract_int(&d->nfree, 1); + rc = t4_write_l2e(e, 0); + mtx_unlock(&e->lock); + if (rc != 0) + e = NULL; + } else { + MPASS(e->vlan == vlan); + MPASS(e->lport == port); + atomic_add_int(&e->refcnt, 1); + } } rw_wunlock(&d->lock); - return e; -} - -/* - * Sets/updates the contents of a switching L2T entry that has been allocated - * with an earlier call to @t4_l2t_alloc_switching. - */ -int -t4_l2t_set_switching(struct adapter *sc, struct l2t_entry *e, uint16_t vlan, - uint8_t port, uint8_t *eth_addr) -{ - int rc; - - e->vlan = vlan; - e->lport = port; - e->wrq = &sc->sge.ctrlq[0]; - e->iqid = sc->sge.fwq.abs_id; - memcpy(e->dmac, eth_addr, ETHER_ADDR_LEN); - mtx_lock(&e->lock); - rc = t4_write_l2e(e, 0); - mtx_unlock(&e->lock); - return (rc); + return (e); } int Modified: head/sys/dev/cxgbe/t4_l2t.h ============================================================================== --- head/sys/dev/cxgbe/t4_l2t.h Fri Sep 21 23:54:01 2018 (r338873) +++ head/sys/dev/cxgbe/t4_l2t.h Sat Sep 22 01:24:30 2018 (r338874) @@ -91,7 +91,8 @@ struct l2t_data { int t4_init_l2t(struct adapter *, int); int t4_free_l2t(struct l2t_data *); struct l2t_entry *t4_alloc_l2e(struct l2t_data *); -struct l2t_entry *t4_l2t_alloc_switching(struct l2t_data *); +struct l2t_entry *t4_l2t_alloc_switching(struct adapter *, uint16_t, uint8_t, + uint8_t *); int t4_l2t_set_switching(struct adapter *, struct l2t_entry *, uint16_t, uint8_t, uint8_t *); int t4_write_l2e(struct l2t_entry *, int); From owner-svn-src-head@freebsd.org Sat Sep 22 11:39:31 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FEBA1094D10; Sat, 22 Sep 2018 11:39:31 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 387B68F72A; Sat, 22 Sep 2018 11:39:31 +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 2512D1B55E; Sat, 22 Sep 2018 11:39:31 +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 w8MBdU3M051425; Sat, 22 Sep 2018 11:39:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8MBdUJr051424; Sat, 22 Sep 2018 11:39:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201809221139.w8MBdUJr051424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik <mjg@FreeBSD.org> Date: Sat, 22 Sep 2018 11:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338885 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 338885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 22 Sep 2018 11:39:31 -0000 Author: mjg Date: Sat Sep 22 11:39:30 2018 New Revision: 338885 URL: https://svnweb.freebsd.org/changeset/base/338885 Log: vfs: __predict common case in VFS_EPILOGUE/PROLOGUE NFS is the only in-tree filesystem using the feature, but all ops test for it. Currently the resulting sigdefer calls have to be jumped over in the common case. This is a bandaid, longer term fix will move this feature away. Approved by: re (kib) Modified: head/sys/sys/signalvar.h Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Sat Sep 22 06:50:56 2018 (r338884) +++ head/sys/sys/signalvar.h Sat Sep 22 11:39:30 2018 (r338885) @@ -349,7 +349,7 @@ static inline int sigdeferstop(int mode) { - if (mode == SIGDEFERSTOP_NOP) + if (__predict_true(mode == SIGDEFERSTOP_NOP)) return (SIGDEFERSTOP_VAL_NCHG); return (sigdeferstop_impl(mode)); } @@ -358,7 +358,7 @@ static inline void sigallowstop(int prev) { - if (prev == SIGDEFERSTOP_VAL_NCHG) + if (__predict_true(prev == SIGDEFERSTOP_VAL_NCHG)) return; sigallowstop_impl(prev); } From owner-svn-src-head@freebsd.org Sat Sep 22 13:14:45 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A654D1097F79; Sat, 22 Sep 2018 13:14:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58D077257F; Sat, 22 Sep 2018 13:14:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FC771C57E; Sat, 22 Sep 2018 13:14:45 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8MDEj1g002014; Sat, 22 Sep 2018 13:14:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8MDEjU8002013; Sat, 22 Sep 2018 13:14:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201809221314.w8MDEjU8002013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala <trasz@FreeBSD.org> Date: Sat, 22 Sep 2018 13:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338886 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 338886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 22 Sep 2018 13:14:46 -0000 Author: trasz Date: Sat Sep 22 13:14:44 2018 New Revision: 338886 URL: https://svnweb.freebsd.org/changeset/base/338886 Log: Improve loader passwords: 1. Be clear about which password is being requested 2. Remove extraneous whitespace between the prompt and the cursor 3. Move the twiddle to where the prompt is, instead of two characters to the right 4. Fix erasing the 'incorrect password' message when retrying; previously it was erased partially 5. Remove the unneeded exclamation mark Reviewed by: kevans Approved by: re (gjb) MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17236 Modified: head/stand/lua/password.lua Modified: head/stand/lua/password.lua ============================================================================== --- head/stand/lua/password.lua Sat Sep 22 11:39:30 2018 (r338885) +++ head/stand/lua/password.lua Sat Sep 22 13:14:44 2018 (r338886) @@ -34,7 +34,7 @@ local screen = require("screen") local password = {} -local INCORRECT_PASSWORD = "loader: incorrect password!" +local INCORRECT_PASSWORD = "loader: incorrect password" -- Asterisks as a password mask local show_password_mask = false local twiddle_chars = {"/", "-", "\\", "|"} @@ -45,7 +45,7 @@ function password.read(prompt_length) local twiddle_pos = 1 local function draw_twiddle() - printc(" " .. twiddle_chars[twiddle_pos]) + printc(twiddle_chars[twiddle_pos]) -- Reset cursor to just after the password prompt screen.setcursor(prompt_length + 2, screen.default_y) twiddle_pos = (twiddle_pos % #twiddle_chars) + 1 @@ -87,20 +87,19 @@ function password.check() local attempts = 1 local function clear_incorrect_text_prompt() - printc("\n") - printc(string.rep(" ", #INCORRECT_PASSWORD)) + printc("\r" .. string.rep(" ", #INCORRECT_PASSWORD)) end while true do + if attempts > 1 then + clear_incorrect_text_prompt() + end screen.defcursor() printc(prompt) local read_pwd = password.read(#prompt) if pwd == nil or pwd == read_pwd then -- Clear the prompt + twiddle printc(string.rep(" ", #prompt + 5)) - if attempts > 1 then - clear_incorrect_text_prompt() - end return read_pwd end printc("\n" .. INCORRECT_PASSWORD) @@ -116,11 +115,11 @@ function password.check() end local boot_pwd = loader.getenv("bootlock_password") - compare("Boot password: ", boot_pwd) + compare("Bootlock password:", boot_pwd) local geli_prompt = loader.getenv("geom_eli_passphrase_prompt") if geli_prompt ~= nil and geli_prompt:lower() == "yes" then - local passphrase = doPrompt("GELI Passphrase: ") + local passphrase = doPrompt("GELI Passphrase:") loader.setenv("kern.geom.eli.passphrase", passphrase) end @@ -128,7 +127,7 @@ function password.check() if pwd ~= nil then core.autoboot() end - compare("Password: ", pwd) + compare("Loader password:", pwd) end return password From owner-svn-src-head@freebsd.org Sat Sep 22 13:17:31 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D25D1098143; Sat, 22 Sep 2018 13:17:31 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 203F4728B5; Sat, 22 Sep 2018 13:17:31 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 171831C587; Sat, 22 Sep 2018 13:17:31 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8MDHUWj002179; Sat, 22 Sep 2018 13:17:30 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8MDHUgZ002177; Sat, 22 Sep 2018 13:17:30 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201809221317.w8MDHUgZ002177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis <brd@FreeBSD.org> Date: Sat, 22 Sep 2018 13:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338887 - in head: etc lib/libwrap X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc lib/libwrap X-SVN-Commit-Revision: 338887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 22 Sep 2018 13:17:31 -0000 Author: brd Date: Sat Sep 22 13:17:30 2018 New Revision: 338887 URL: https://svnweb.freebsd.org/changeset/base/338887 Log: Move hosts.allow to lib/libwrap/ This leverages CONFS to handle the install. Approved by: re (blanket, pkgbase), bapt (mentor) Differential Revision: https://reviews.freebsd.org/D17240 Added: head/lib/libwrap/hosts.allow - copied unchanged from r338886, head/etc/hosts.allow Deleted: head/etc/hosts.allow Modified: head/etc/Makefile head/lib/libwrap/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sat Sep 22 13:14:44 2018 (r338886) +++ head/etc/Makefile Sat Sep 22 13:17:30 2018 (r338887) @@ -14,7 +14,6 @@ SUBDIR+=sendmail BIN1= \ group \ - hosts.allow \ login.access \ rc.bsdextended \ rc.firewall \ Modified: head/lib/libwrap/Makefile ============================================================================== --- head/lib/libwrap/Makefile Sat Sep 22 13:14:44 2018 (r338886) +++ head/lib/libwrap/Makefile Sat Sep 22 13:17:30 2018 (r338887) @@ -4,6 +4,7 @@ .include <src.opts.mk> +CONFS= hosts.allow PACKAGE=lib${LIB} LIB= wrap SHLIB_MAJOR= 6 Copied: head/lib/libwrap/hosts.allow (from r338886, head/etc/hosts.allow) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libwrap/hosts.allow Sat Sep 22 13:17:30 2018 (r338887, copy of r338886, head/etc/hosts.allow) @@ -0,0 +1,92 @@ +# +# hosts.allow access control file for "tcp wrapped" applications. +# $FreeBSD$ +# +# NOTE: The hosts.deny file is deprecated. +# Place both 'allow' and 'deny' rules in the hosts.allow file. +# See hosts_options(5) for the format of this file. +# hosts_access(5) no longer fully applies. +# +# _____ _ _ +# | ____| __ __ __ _ _ __ ___ _ __ | | ___ | | +# | _| \ \/ / / _` | | '_ ` _ \ | '_ \ | | / _ \ | | +# | |___ > < | (_| | | | | | | | | |_) | | | | __/ |_| +# |_____| /_/\_\ \__,_| |_| |_| |_| | .__/ |_| \___| (_) +# |_| +# !!! This is an example! You will need to modify it for your specific +# !!! requirements! + + +# Start by allowing everything (this prevents the rest of the file +# from working, so remove it when you need protection). +# The rules here work on a "First match wins" basis. +ALL : ALL : allow + +# Wrapping sshd(8) is not normally a good idea, but if you +# need to do it, here's how +#sshd : .evil.cracker.example.com : deny + +# Protect against simple DNS spoofing attacks by checking that the +# forward and reverse records for the remote host match. If a mismatch +# occurs, access is denied, and any positive ident response within +# 20 seconds is logged. No protection is afforded against DNS poisoning, +# IP spoofing or more complicated attacks. Hosts with no reverse DNS +# pass this rule. +ALL : PARANOID : RFC931 20 : deny + +# Allow anything from localhost. Note that an IP address (not a host +# name) *MUST* be specified for rpcbind(8). +ALL : localhost 127.0.0.1 : allow +# Comment out next line if you build libwrap without IPv6 support. +ALL : [::1] : allow +#ALL : my.machine.example.com 192.0.2.35 : allow + +# To use IPv6 addresses you must enclose them in []'s +#ALL : [fe80::%fxp0]/10 : allow +#ALL : [fe80::]/10 : deny +#ALL : [2001:db8:2:1:2:3:4:3fe1] : deny +#ALL : [2001:db8:2:1::]/64 : allow + +# Sendmail can help protect you against spammers and relay-rapers +sendmail : localhost : allow +#sendmail : .nice.guy.example.com : allow +#sendmail : .evil.cracker.example.com : deny +sendmail : ALL : allow + +# Exim is an alternative to sendmail, available in the ports tree +exim : localhost : allow +#exim : .nice.guy.example.com : allow +#exim : .evil.cracker.example.com : deny +exim : ALL : allow + +# Rpcbind is used for all RPC services; protect your NFS! +# Rpcbind should be running with -W option to support this. +# (IP addresses rather than hostnames *MUST* be used here) +#rpcbind : 192.0.2.32/255.255.255.224 : allow +#rpcbind : 192.0.2.96/255.255.255.224 : allow +rpcbind : ALL : deny + +# NIS master server. Only local nets should have access +# (Since this is an RPC service, rpcbind needs to be considered) +ypserv : localhost : allow +#ypserv : .unsafe.my.net.example.com : deny +#ypserv : .my.net.example.com : allow +ypserv : ALL : deny + +# Provide a small amount of protection for ftpd +ftpd : localhost : allow +#ftpd : .nice.guy.example.com : allow +#ftpd : .evil.cracker.example.com : deny +ftpd : ALL : allow + +# You need to be clever with finger; do _not_ backfinger!! You can easily +# start a "finger war". +fingerd : ALL \ + : spawn (echo Finger. | \ + /usr/bin/mail -s "tcpd\: %u@%h[%a] fingered me!" root) & \ + : deny + +# The rest of the daemons are protected. +ALL : ALL \ + : severity auth.info \ + : twist /bin/echo "You are not welcome to use %d from %h." From owner-svn-src-head@freebsd.org Sat Sep 22 15:32:54 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA38C109B1C6; Sat, 22 Sep 2018 15:32:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8750376F68; Sat, 22 Sep 2018 15:32:54 +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 822401DC7E; Sat, 22 Sep 2018 15:32:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8MFWsqG073667; Sat, 22 Sep 2018 15:32:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8MFWsPk073665; Sat, 22 Sep 2018 15:32:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201809221532.w8MFWsPk073665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh <imp@FreeBSD.org> Date: Sat, 22 Sep 2018 15:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338888 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 338888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 22 Sep 2018 15:32:55 -0000 Author: imp Date: Sat Sep 22 15:32:53 2018 New Revision: 338888 URL: https://svnweb.freebsd.org/changeset/base/338888 Log: We don't need shell protection for when we're expanding matches. Don't add it. This should fix when we do regepx matches against variables we've set and fix wifi bring up. PR: 231441 Approved by: re@ (kib) Differential Revision: https://reviews.freebsd.org/D17267 Modified: head/sbin/devd/devd.cc head/sbin/devd/devd.hh Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Sat Sep 22 13:17:30 2018 (r338887) +++ head/sbin/devd/devd.cc Sat Sep 22 15:32:53 2018 (r338888) @@ -666,7 +666,7 @@ config::shell_quote(const string &s) } void -config::expand_one(const char *&src, string &dst) +config::expand_one(const char *&src, string &dst, bool is_shell) { int count; string buffer; @@ -705,7 +705,7 @@ config::expand_one(const char *&src, string &dst) do { buffer += *src++; } while (is_id_char(*src)); - dst.append(shell_quote(get_variable(buffer))); + dst.append(is_shell ? shell_quote(get_variable(buffer)) : get_variable(buffer)); } const string @@ -731,7 +731,7 @@ config::expand_string(const char *src, const char *pre } dst.append(src, var_at - src); src = var_at; - expand_one(src, dst); + expand_one(src, dst, prepend == NULL); } if (append != NULL) Modified: head/sbin/devd/devd.hh ============================================================================== --- head/sbin/devd/devd.hh Sat Sep 22 13:17:30 2018 (r338887) +++ head/sbin/devd/devd.hh Sat Sep 22 15:32:53 2018 (r338888) @@ -172,7 +172,7 @@ class config (protected) void sort_vector(std::vector<event_proc *> &); void parse_one_file(const char *fn); void parse_files_in_dir(const char *dirname); - void expand_one(const char *&src, std::string &dst); + void expand_one(const char *&src, std::string &dst, bool is_shell); std::string shell_quote(const std::string &s); bool is_id_char(char) const; bool chop_var(char *&buffer, char *&lhs, char *&rhs) const; From owner-svn-src-head@freebsd.org Sat Sep 22 16:30:49 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82384109C8FB; Sat, 22 Sep 2018 16:30:49 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34ED2790B8; Sat, 22 Sep 2018 16:30:49 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FD671E4BF; Sat, 22 Sep 2018 16:30:49 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8MGUnKO000940; Sat, 22 Sep 2018 16:30:49 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8MGUn0I000939; Sat, 22 Sep 2018 16:30:49 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201809221630.w8MGUn0I000939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" <ae@FreeBSD.org> Date: Sat, 22 Sep 2018 16:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338890 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 338890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 22 Sep 2018 16:30:49 -0000 Author: ae Date: Sat Sep 22 16:30:48 2018 New Revision: 338890 URL: https://svnweb.freebsd.org/changeset/base/338890 Log: Update ifr_name before invoking IPSECSREQID ioctl, this fixes the case, when `ifconfig ipsec create reqid N` command invoked without interface unit number. The "name" global variable is updated after interface cloning in the ifclonecreate() and contains actual interface name. Reported by: lev Approved by: re (kib) MFC after: 1 week Modified: head/sbin/ifconfig/ifipsec.c Modified: head/sbin/ifconfig/ifipsec.c ============================================================================== --- head/sbin/ifconfig/ifipsec.c Sat Sep 22 16:19:21 2018 (r338889) +++ head/sbin/ifconfig/ifipsec.c Sat Sep 22 16:30:48 2018 (r338890) @@ -72,6 +72,7 @@ DECL_CMD_FUNC(setreqid, val, arg) warn("Invalid reqid value %s", val); return; } + strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); ifr.ifr_data = (char *)&v; if (ioctl(s, IPSECSREQID, &ifr) == -1) { warn("ioctl(IPSECSREQID)"); From owner-svn-src-head@freebsd.org Sat Sep 22 17:04:40 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11430109DC65; Sat, 22 Sep 2018 17:04:40 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A71907B89C; Sat, 22 Sep 2018 17:04: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 9C5671EB48; Sat, 22 Sep 2018 17:04: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 w8MH4dbf024192; Sat, 22 Sep 2018 17:04:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8MH4dOd024191; Sat, 22 Sep 2018 17:04:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809221704.w8MH4dOd024191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov <kib@FreeBSD.org> Date: Sat, 22 Sep 2018 17:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338891 - 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: 338891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 22 Sep 2018 17:04:40 -0000 Author: kib Date: Sat Sep 22 17:04:39 2018 New Revision: 338891 URL: https://svnweb.freebsd.org/changeset/base/338891 Log: Further reorganize pmap_invalidate TLB code. Split calculation of mask for shootdown IPI and local invalidation. Reorder IPI before local. Suggested by: alc Reviewed by: alc, markj Tested by: pho Sponsored by: The FreeBSD Foundation Approved by: re (rgrimes) Differential revision: https://reviews.freebsd.org/D17277 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Sep 22 16:30:48 2018 (r338890) +++ head/sys/amd64/amd64/pmap.c Sat Sep 22 17:04:39 2018 (r338891) @@ -1704,6 +1704,13 @@ pmap_invalidate_ept(pmap_t pmap) sched_unpin(); } +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) @@ -1790,7 +1797,6 @@ DEFINE_IFUNC(static, void, pmap_invalidate_page_mode, void pmap_invalidate_page(pmap_t pmap, vm_offset_t va) { - cpuset_t *mask; if (pmap_type_guest(pmap)) { pmap_invalidate_ept(pmap); @@ -1801,16 +1807,14 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) ("pmap_invalidate_page: invalid type %d", pmap->pm_type)); sched_pin(); + smp_masked_invlpg(pmap_invalidate_cpu_mask(pmap), va, pmap); if (pmap == kernel_pmap) { invlpg(va); - mask = &all_cpus; } else { if (pmap == PCPU_GET(curpmap)) invlpg(va); pmap_invalidate_page_mode(pmap, va); - mask = &pmap->pm_active; } - smp_masked_invlpg(*mask, va, pmap); sched_unpin(); } @@ -1890,7 +1894,6 @@ DEFINE_IFUNC(static, void, pmap_invalidate_range_mode, void pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - cpuset_t *mask; vm_offset_t addr; if (eva - sva >= PMAP_INVLPG_THRESHOLD) { @@ -1907,19 +1910,17 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm ("pmap_invalidate_range: invalid type %d", pmap->pm_type)); sched_pin(); + smp_masked_invlpg_range(pmap_invalidate_cpu_mask(pmap), sva, eva, pmap); if (pmap == kernel_pmap) { for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); - mask = &all_cpus; } else { if (pmap == PCPU_GET(curpmap)) { for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); } pmap_invalidate_range_mode(pmap, sva, eva); - mask = &pmap->pm_active; } - smp_masked_invlpg_range(*mask, sva, eva, pmap); sched_unpin(); } @@ -2010,7 +2011,6 @@ DEFINE_IFUNC(static, void, pmap_invalidate_all_mode, ( void pmap_invalidate_all(pmap_t pmap) { - cpuset_t *mask; if (pmap_type_guest(pmap)) { pmap_invalidate_ept(pmap); @@ -2021,9 +2021,8 @@ pmap_invalidate_all(pmap_t pmap) ("pmap_invalidate_all: invalid type %d", pmap->pm_type)); sched_pin(); - mask = pmap == kernel_pmap ? &all_cpus : &pmap->pm_active; + smp_masked_invltlb(pmap_invalidate_cpu_mask(pmap), pmap); pmap_invalidate_all_mode(pmap); - smp_masked_invltlb(*mask, pmap); sched_unpin(); } From owner-svn-src-head@freebsd.org Sat Sep 22 17:05:50 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFD40109DD10; Sat, 22 Sep 2018 17:05:49 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B2017BA0E; Sat, 22 Sep 2018 17:05:49 +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 7B84C1EB4F; Sat, 22 Sep 2018 17:05:49 +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 w8MH5nLh024293; Sat, 22 Sep 2018 17:05:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8MH5ncM024292; Sat, 22 Sep 2018 17:05:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809221705.w8MH5ncM024292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov <kib@FreeBSD.org> Date: Sat, 22 Sep 2018 17:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338892 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 338892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 22 Sep 2018 17:05:50 -0000 Author: kib Date: Sat Sep 22 17:05:49 2018 New Revision: 338892 URL: https://svnweb.freebsd.org/changeset/base/338892 Log: Correct panic messages. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation Approved by: re (rgrimes) MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Sat Sep 22 17:04:39 2018 (r338891) +++ head/sys/ufs/ffs/ffs_softdep.c Sat Sep 22 17:05:49 2018 (r338892) @@ -10261,22 +10261,22 @@ initiate_write_inodeblock_ufs1(inodedep, bp) prevlbn = adp->ad_offset; if (adp->ad_offset < UFS_NDADDR && dp->di_db[adp->ad_offset] != adp->ad_newblkno) - panic("%s: direct pointer #%jd mismatch %d != %jd", - "softdep_write_inodeblock", + panic("initiate_write_inodeblock_ufs1: " + "direct pointer #%jd mismatch %d != %jd", (intmax_t)adp->ad_offset, dp->di_db[adp->ad_offset], (intmax_t)adp->ad_newblkno); if (adp->ad_offset >= UFS_NDADDR && dp->di_ib[adp->ad_offset - UFS_NDADDR] != adp->ad_newblkno) - panic("%s: indirect pointer #%jd mismatch %d != %jd", - "softdep_write_inodeblock", + panic("initiate_write_inodeblock_ufs1: " + "indirect pointer #%jd mismatch %d != %jd", (intmax_t)adp->ad_offset - UFS_NDADDR, dp->di_ib[adp->ad_offset - UFS_NDADDR], (intmax_t)adp->ad_newblkno); deplist |= 1 << adp->ad_offset; if ((adp->ad_state & ATTACHED) == 0) - panic("softdep_write_inodeblock: Unknown state 0x%x", - adp->ad_state); + panic("initiate_write_inodeblock_ufs1: " + "Unknown state 0x%x", adp->ad_state); #endif /* INVARIANTS */ adp->ad_state &= ~ATTACHED; adp->ad_state |= UNDONE; @@ -10299,7 +10299,8 @@ initiate_write_inodeblock_ufs1(inodedep, bp) for (i = adp->ad_offset + 1; i < UFS_NDADDR; i++) { #ifdef INVARIANTS if (dp->di_db[i] != 0 && (deplist & (1 << i)) == 0) - panic("softdep_write_inodeblock: lost dep1"); + panic("initiate_write_inodeblock_ufs1: " + "lost dep1"); #endif /* INVARIANTS */ dp->di_db[i] = 0; } @@ -10307,7 +10308,8 @@ initiate_write_inodeblock_ufs1(inodedep, bp) #ifdef INVARIANTS if (dp->di_ib[i] != 0 && (deplist & ((1 << UFS_NDADDR) << i)) == 0) - panic("softdep_write_inodeblock: lost dep2"); + panic("initiate_write_inodeblock_ufs1: " + "lost dep2"); #endif /* INVARIANTS */ dp->di_ib[i] = 0; } @@ -10429,18 +10431,18 @@ initiate_write_inodeblock_ufs2(inodedep, bp) adp = TAILQ_NEXT(adp, ad_next)) { #ifdef INVARIANTS if (deplist != 0 && prevlbn >= adp->ad_offset) - panic("softdep_write_inodeblock: lbn order"); + panic("initiate_write_inodeblock_ufs2: lbn order"); prevlbn = adp->ad_offset; if (dp->di_extb[adp->ad_offset] != adp->ad_newblkno) - panic("%s: direct pointer #%jd mismatch %jd != %jd", - "softdep_write_inodeblock", + panic("initiate_write_inodeblock_ufs2: " + "ext pointer #%jd mismatch %jd != %jd", (intmax_t)adp->ad_offset, (intmax_t)dp->di_extb[adp->ad_offset], (intmax_t)adp->ad_newblkno); deplist |= 1 << adp->ad_offset; if ((adp->ad_state & ATTACHED) == 0) - panic("softdep_write_inodeblock: Unknown state 0x%x", - adp->ad_state); + panic("initiate_write_inodeblock_ufs2: Unknown " + "state 0x%x", adp->ad_state); #endif /* INVARIANTS */ adp->ad_state &= ~ATTACHED; adp->ad_state |= UNDONE; @@ -10461,7 +10463,8 @@ initiate_write_inodeblock_ufs2(inodedep, bp) for (i = adp->ad_offset + 1; i < UFS_NXADDR; i++) { #ifdef INVARIANTS if (dp->di_extb[i] != 0 && (deplist & (1 << i)) == 0) - panic("softdep_write_inodeblock: lost dep1"); + panic("initiate_write_inodeblock_ufs2: " + "lost dep1"); #endif /* INVARIANTS */ dp->di_extb[i] = 0; } @@ -10494,22 +10497,22 @@ initiate_write_inodeblock_ufs2(inodedep, bp) prevlbn = adp->ad_offset; if (adp->ad_offset < UFS_NDADDR && dp->di_db[adp->ad_offset] != adp->ad_newblkno) - panic("%s: direct pointer #%jd mismatch %jd != %jd", - "softdep_write_inodeblock", + panic("initiate_write_inodeblock_ufs2: " + "direct pointer #%jd mismatch %jd != %jd", (intmax_t)adp->ad_offset, (intmax_t)dp->di_db[adp->ad_offset], (intmax_t)adp->ad_newblkno); if (adp->ad_offset >= UFS_NDADDR && dp->di_ib[adp->ad_offset - UFS_NDADDR] != adp->ad_newblkno) - panic("%s indirect pointer #%jd mismatch %jd != %jd", - "softdep_write_inodeblock:", + panic("initiate_write_inodeblock_ufs2: " + "indirect pointer #%jd mismatch %jd != %jd", (intmax_t)adp->ad_offset - UFS_NDADDR, (intmax_t)dp->di_ib[adp->ad_offset - UFS_NDADDR], (intmax_t)adp->ad_newblkno); deplist |= 1 << adp->ad_offset; if ((adp->ad_state & ATTACHED) == 0) - panic("softdep_write_inodeblock: Unknown state 0x%x", - adp->ad_state); + panic("initiate_write_inodeblock_ufs2: Unknown " + "state 0x%x", adp->ad_state); #endif /* INVARIANTS */ adp->ad_state &= ~ATTACHED; adp->ad_state |= UNDONE; @@ -10532,7 +10535,8 @@ initiate_write_inodeblock_ufs2(inodedep, bp) for (i = adp->ad_offset + 1; i < UFS_NDADDR; i++) { #ifdef INVARIANTS if (dp->di_db[i] != 0 && (deplist & (1 << i)) == 0) - panic("softdep_write_inodeblock: lost dep2"); + panic("initiate_write_inodeblock_ufs2: " + "lost dep2"); #endif /* INVARIANTS */ dp->di_db[i] = 0; } @@ -10540,7 +10544,8 @@ initiate_write_inodeblock_ufs2(inodedep, bp) #ifdef INVARIANTS if (dp->di_ib[i] != 0 && (deplist & ((1 << UFS_NDADDR) << i)) == 0) - panic("softdep_write_inodeblock: lost dep3"); + panic("initiate_write_inodeblock_ufs2: " + "lost dep3"); #endif /* INVARIANTS */ dp->di_ib[i] = 0; } From owner-svn-src-head@freebsd.org Sat Sep 22 18:24:29 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F8A9109F287 for <svn-src-head@mailman.ysv.freebsd.org>; Sat, 22 Sep 2018 18:24:29 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE38C7DBC4 for <svn-src-head@freebsd.org>; Sat, 22 Sep 2018 18:24:28 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wm1-x341.google.com with SMTP id j25-v6so6673096wmc.1 for <svn-src-head@freebsd.org>; Sat, 22 Sep 2018 11:24:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3dUI76GVUoUsOop/X7mBovn/qvY7sVqAn+5srOX2mIw=; b=fHfngsUx68GJ3U7zg58cKkx4tbEYxxeYx+iaDTZjJck8Jy4j0t2R5xLlFMYnEVXzKZ xoVJZQFxCIRRq8vVaVtYckfjImof44eMnBnU+XL6eW7k6ev9cotMGNoNcRl3c9HA2+AX xEFFWSq1mZ6idXkn3plQjl0AY+9jkDz5BCLUkQs/DNjpJ3dc8JAM0dvnF6xotTHL2a4i 7kOSjjDAIEpGRr9vPHuZDzFOms16Yd5UCBLO57rfOL+BYTwNwOpleSYIQi6YllurIM5g STClA9qTllWAieCNxLwS2mqG5xNRQ2RzOHTVcUX5z+Vc+w+PreOa+wVkDgy4c4Zrxpm7 Vt7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3dUI76GVUoUsOop/X7mBovn/qvY7sVqAn+5srOX2mIw=; b=CuO74YawmxRTuPzrgYc08s8fw33e7C9HaU4toXbgctpCM9YGhmQNcFdQbpVxxiNtVi PKco4H6vUgjjOaFa+UlSROU+OU7kE3ouujB8gchjEOPiy8bMwU7PCG1c9kNTfSiwYDIb N3EEZbQOX5FQv9ysxhshH3JrSrFaYCtkE05nBeNLGRr1jd8SVlEeirVTJHKyEPXTWMvr sIWPqAmO1ALv8kpws2zf19plimaeSXuLFnT2irQFi0qtfMcKImlno13+xwne8xSDpFiC AG2dugxI0D7dv/wjt0ew9hrmOIekyOrdEwKV9zL0tHTxekvmHbrP4+4Ez7aL9KlgoBJl qpsA== X-Gm-Message-State: ABuFfohMR4KGYk4ZsrKalKGkdLRyg1cT8qG6Xv564tCUC5giww+U7wik wwTX5MzVu61qlypQ1SP28fWadw== X-Google-Smtp-Source: ANB0VdY8rwGKnbJ6pyxO9vlQlTxvKHMNV0+iXE+LXC6/VlXS+sdQ4ykeYLGqkofZMYCIaw6Q1PqGlg== X-Received: by 2002:a1c:df54:: with SMTP id w81-v6mr2098709wmg.6.1537640667454; Sat, 22 Sep 2018 11:24:27 -0700 (PDT) Received: from mutt-hbsd (slave237.starsellersworld.net. [85.199.141.237]) by smtp.gmail.com with ESMTPSA id j44-v6sm53141770wre.40.2018.09.22.11.24.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Sep 2018 11:24:26 -0700 (PDT) Date: Sat, 22 Sep 2018 14:24:14 -0400 From: Shawn Webb <shawn.webb@hardenedbsd.org> To: d@delphij.net Cc: Ed Maste <emaste@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r338861 - head/lib/libc Message-ID: <20180922182414.mrm5oavdjeu6bb3y@mutt-hbsd> References: <201809211749.w8LHnbap091466@repo.freebsd.org> <8513e11e-f699-70e8-6478-24ee2375326c@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="v2fua2r66qnkigtm" Content-Disposition: inline In-Reply-To: <8513e11e-f699-70e8-6478-24ee2375326c@delphij.net> X-Operating-System: FreeBSD mutt-hbsd 12.0-ALPHA5 FreeBSD 12.0-ALPHA5 X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20180622 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 22 Sep 2018 18:24:29 -0000 --v2fua2r66qnkigtm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 21, 2018 at 01:11:46PM -0700, Xin Li wrote: > On 9/21/18 10:49, Ed Maste wrote: > > Author: emaste > > Date: Fri Sep 21 17:49:37 2018 > > New Revision: 338861 > > URL: https://svnweb.freebsd.org/changeset/base/338861 > >=20 > > Log: > > libc: require ifunc-capable linker for amd64/i386 > > =20 > > We expect to introduce optimized libc routines in the near future, > > which requires use of a linker that supports ifuncs. > > =20 > > Approved by: re (gjb, kib) > > Sponsored by: The FreeBSD Foundation > >=20 > > Modified: > > head/lib/libc/Makefile > >=20 > > Modified: head/lib/libc/Makefile > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/lib/libc/Makefile Fri Sep 21 17:44:05 2018 (r338860) > > +++ head/lib/libc/Makefile Fri Sep 21 17:49:37 2018 (r338861) > > @@ -21,6 +21,11 @@ LIBC_ARCH=3D${MACHINE_ARCH} > > LIBC_ARCH=3D${MACHINE_CPUARCH} > > .endif > > =20 > > +.if (${LIBC_ARCH} =3D=3D amd64 || ${LIBC_ARCH} =3D=3D i386) && \ > > + defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} =3D=3D "" > > +.error ${LIBC_ARCH} libc requires linker ifunc support > > +.endif > > + > > # All library objects contain FreeBSD revision strings by default; the= y may be > > # excluded as a space-saving measure. To produce a library that does > > # not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to= CFLAGS >=20 > It seems that this would break bootstraping from a FreeBSD -CURRENT > before ifunc? It does. The HardenedBSD nightly build server is running 11-STABLE and now cannot build 12-CURRENT: https://jenkins.hardenedbsd.org/jenkins/job/HardenedBSD-CURRENT-amd64/1332/= console Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --v2fua2r66qnkigtm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlumiMkACgkQaoRlj1JF bu7vbQ//WyCQmmEuwZxvHDvVk8gTp/nBA3d9HFt+dRmBcGTH3+KUh55wfNVT7tSZ OZ/jeODWrxXhT3o9/+cpq/UVaWvNuXJdys1EKd+LYaRQ38BJsXLOhVkfiTojUPb5 wjOjnIBmnnfh8VKgR67wUvprEVR+BO3b1CnYQnQXuSicIM+TVWAbXiWASuRinGDF 7T3xMpy9XWgYTkyAzibqabgidKemVjvVsylUQK+AWeF4ZcX3X37DB55NQW4kOcuc 5u6RnsrHf08Gyk66meOY0sVGrNfmHWq78kWZk4Bh6Xr7xQa7b+21wrFqycKD6AbN rwBozcDsWWkZNJ+r7Tt/qs00KShr5yPUlRkb0cYUi8Q/LUSBdqwLNkxmKlEnSiqs k1u25Yua2cpLLwO2Rouza4yMTdvsHXQpRD0Hjdo+gjTYXyofY1hWpXIBIexzcCZY IE19k5aH5M9Fr5dTtl0xOSuQMw4qjuJb0EtywZQeXwVe/AU/fCDCsPFQAla6nZ86 hD5kNCn9BGI09L888OQ3sHUAdgRyVnG1D0UsFGqnwOgORgBuuxNjlRIYZPP5w1Si gqy8aq72AEHeIsCDXrW/h+H2uGVU6s06hyYXTb+l5W0DbaDoHlyXxpFLLPsuDFzb TKgpZAPo8oi2HqRm01GTRane8RGQ17Aqtg5aJV7jgivDvmGzVug= =dSP/ -----END PGP SIGNATURE----- --v2fua2r66qnkigtm-- From owner-svn-src-head@freebsd.org Sat Sep 22 20:58:44 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B3D210A3B1F; Sat, 22 Sep 2018 20:58:44 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8BA282CA3; Sat, 22 Sep 2018 20:58:43 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3A3D2107D; Sat, 22 Sep 2018 20:58:43 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8MKwhAw042345; Sat, 22 Sep 2018 20:58:43 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8MKwhGe042344; Sat, 22 Sep 2018 20:58:43 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <201809222058.w8MKwhGe042344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler <andreast@FreeBSD.org> Date: Sat, 22 Sep 2018 20:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338893 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 338893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 22 Sep 2018 20:58:44 -0000 Author: andreast Date: Sat Sep 22 20:58:43 2018 New Revision: 338893 URL: https://svnweb.freebsd.org/changeset/base/338893 Log: Set the default loader for powerpc(32- and 64-bit) back to to forth. There are some issues with the lua-loader. To be on the safe side, use a well known and working loader. Approved by: re (glen) Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sat Sep 22 17:05:49 2018 (r338892) +++ head/share/mk/src.opts.mk Sat Sep 22 20:58:43 2018 (r338893) @@ -358,6 +358,11 @@ BROKEN_OPTIONS+=LOADER_UBOOT .if ${__T} == "sparc64" BROKEN_OPTIONS+=LOADER_GELI LOADER_LUA .endif +# Lua in loader currently cause boot failures on powerpc. +# Further debugging is required. +.if ${__T} == "powerpc" +BROKEN_OPTIONS+=LOADER_LUA +.endif .if ${__T:Mmips64*} # profiling won't work on MIPS64 because there is only assembly for o32